diff options
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h')
-rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h index 6583d12..d907196 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h +++ b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h @@ -25,69 +25,69 @@ namespace Swift { class QtElidingLabel; /* - * covers features like: - * - preffered (star ceckbox) - * - combo check box - * - label - * - remove button + * covers features like: + * - preffered (star ceckbox) + * - combo check box + * - label + * - remove button */ class QtVCardGeneralField : public QWidget { - Q_OBJECT - Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged) - Q_PROPERTY(bool empty READ isEmpty) - - public: - explicit QtVCardGeneralField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false, int row = 0, QString label = QString(), - bool preferrable = true, bool taggable = true); - virtual ~QtVCardGeneralField(); - - void initialize(); - - virtual bool isEditable() const; - virtual void setEditable(bool); - - virtual bool isEmpty() const = 0; - - void setStarVisible(const bool isVisible); - bool getStarVisible() const; - - void setPreferred(const bool preferred); - bool getPreferred() const; - - protected: - virtual void setupContentWidgets() = 0; - virtual void customCleanup(); - - QtTagComboBox* getTagComboBox() const; - QGridLayout* getGridLayout() const; - - signals: - void editableChanged(bool); - void deleteField(QtVCardGeneralField*); - - public slots: - void handleCloseButtonClicked(); - void handlePreferredStarStateChanged(int statte); - - protected: - QList<QWidget*> childWidgets; - - private: - void updatePreferredStarVisibility(); - - private: - bool editable; - bool preferrable; - bool starVisible; - bool taggable; - QGridLayout* layout; - int row; - QCheckBox* preferredCheckBox; - QLabel* label; - QString labelText; - QtTagComboBox* tagComboBox; - QtElidingLabel* tagLabel; - QtCloseButton* closeButton; + Q_OBJECT + Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged) + Q_PROPERTY(bool empty READ isEmpty) + + public: + explicit QtVCardGeneralField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false, int row = 0, QString label = QString(), + bool preferrable = true, bool taggable = true); + virtual ~QtVCardGeneralField(); + + void initialize(); + + virtual bool isEditable() const; + virtual void setEditable(bool); + + virtual bool isEmpty() const = 0; + + void setStarVisible(const bool isVisible); + bool getStarVisible() const; + + void setPreferred(const bool preferred); + bool getPreferred() const; + + protected: + virtual void setupContentWidgets() = 0; + virtual void customCleanup(); + + QtTagComboBox* getTagComboBox() const; + QGridLayout* getGridLayout() const; + + signals: + void editableChanged(bool); + void deleteField(QtVCardGeneralField*); + + public slots: + void handleCloseButtonClicked(); + void handlePreferredStarStateChanged(int statte); + + protected: + QList<QWidget*> childWidgets; + + private: + void updatePreferredStarVisibility(); + + private: + bool editable; + bool preferrable; + bool starVisible; + bool taggable; + QGridLayout* layout; + int row; + QCheckBox* preferredCheckBox; + QLabel* label; + QString labelText; + QtTagComboBox* tagComboBox; + QtElidingLabel* tagLabel; + QtCloseButton* closeButton; }; } |