mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
Factorisation de code : reunion des 3 proprietes (type, singleLineProperties et texte) au sein d'une meme classe ConductorProperties
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@177 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -7,6 +7,7 @@ class ConductorPropertiesWidget : public QWidget {
|
||||
// constructeurs, destructeur
|
||||
public:
|
||||
ConductorPropertiesWidget(QWidget * = 0);
|
||||
ConductorPropertiesWidget(const ConductorProperties &, QWidget * = 0);
|
||||
virtual ~ConductorPropertiesWidget();
|
||||
|
||||
private:
|
||||
@@ -14,18 +15,16 @@ class ConductorPropertiesWidget : public QWidget {
|
||||
|
||||
// methodes
|
||||
public:
|
||||
Conductor::ConductorType conductorType() const;
|
||||
void setSingleLineProperties(const SingleLineProperties &);
|
||||
SingleLineProperties singleLineProperties() const;
|
||||
QString conductorText() const;
|
||||
void setConductorText(const QString &);
|
||||
void setConductorProperties(const ConductorProperties &);
|
||||
ConductorProperties conductorProperties() const;
|
||||
|
||||
private:
|
||||
void setConductorType(ConductorProperties::ConductorType);
|
||||
|
||||
public slots:
|
||||
void updatePreview();
|
||||
void updateSingleLineConfig();
|
||||
void updateSingleLineDisplay();
|
||||
void setConductorType(Conductor::ConductorType);
|
||||
void setConductorType(int);
|
||||
void updateConfig();
|
||||
void updateDisplay();
|
||||
|
||||
// attributs prives
|
||||
private:
|
||||
@@ -41,9 +40,7 @@ class ConductorPropertiesWidget : public QWidget {
|
||||
QCheckBox *neutral_checkbox;
|
||||
QLabel *preview;
|
||||
|
||||
Conductor::ConductorType type_;
|
||||
SingleLineProperties slp;
|
||||
QString conductor_text;
|
||||
ConductorProperties properties_;
|
||||
|
||||
// methodes privees
|
||||
void buildInterface();
|
||||
|
||||
Reference in New Issue
Block a user