diff options
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h')
-rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h index ed07d9d..9ffcaea 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h +++ b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h @@ -7,6 +7,10 @@ #pragma once #include <QWidget> +#include <QLabel> +#include <QCheckBox> + +#include "QtTagComboBox.h" namespace Swift { @@ -17,14 +21,38 @@ namespace Swift { * - label */ class QtVCardGeneralField : public QWidget { - Q_OBJECT + Q_OBJECT + Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged) + Q_PROPERTY(bool empty READ isEmpty) + public: - explicit QtVCardGeneralField(QWidget* parent = 0); + explicit QtVCardGeneralField(QWidget* parent = 0, bool editable = false); + void initialize(); + + virtual void setupContentWidgets() = 0; + + virtual bool isEditable() const; + virtual void setEditable(bool); + + virtual bool isEmpty() const = 0; + + void setPreferred(const bool preferred); + bool getPreferred() const; + + protected: + QtTagComboBox* getTagComboBox(); + signals: + void editableChanged(bool); public slots: - + + private: + bool editable; + QCheckBox* preferredCheckBox; + QLabel* label; + QtTagComboBox* tagComboBox; }; } |