refactoring qad widgets part 2
c++ cast, nullptr, forward declaration, agregate ui, connect to member functions, order and clear includes
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
#ifndef MATRIXEDIT_H
|
||||
#define MATRIXEDIT_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "qad_widgets_export.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
@@ -32,8 +32,8 @@ namespace Ui {
|
||||
class QAD_WIDGETS_EXPORT MatrixEdit: public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MatrixEdit(QWidget * parent = 0);
|
||||
~MatrixEdit();
|
||||
explicit MatrixEdit(QWidget * parent = nullptr);
|
||||
~MatrixEdit() override;
|
||||
|
||||
bool isReadOnly() const;
|
||||
void setReadOnly(bool yes);
|
||||
@@ -43,14 +43,6 @@ public:
|
||||
void setVector(const QVector<double> & v);
|
||||
void setMatrix(const QVector<QVector<double> > & v);
|
||||
|
||||
private:
|
||||
void setVectorMode(bool yes);
|
||||
void clear(bool ident = false);
|
||||
void changeEvent(QEvent * e);
|
||||
|
||||
Ui::MatrixEdit * ui;
|
||||
bool ro;
|
||||
|
||||
private slots:
|
||||
void on_spinRows_valueChanged(int cnt);
|
||||
void on_spinCols_valueChanged(int cnt);
|
||||
@@ -59,7 +51,14 @@ private slots:
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
|
||||
private:
|
||||
void setVectorMode(bool yes);
|
||||
void clear(bool ident = false);
|
||||
void changeEvent(QEvent * e) override;
|
||||
|
||||
Ui::MatrixEdit * ui;
|
||||
bool ro;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user