summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-10-04 17:00:37 (GMT)
committerTobias Markmann <tm@ayena.de>2012-11-11 16:38:02 (GMT)
commit7a73d0f61859aa1ed1af64ec5d42819ab4264c09 (patch)
tree91f46c8c9a5fcf99d76581b97efa7b056fe1c502 /Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
parentf7807574201365276a26528135123545adcaa9bc (diff)
downloadswift-contrib-7a73d0f61859aa1ed1af64ec5d42819ab4264c09.zip
swift-contrib-7a73d0f61859aa1ed1af64ec5d42819ab4264c09.tar.bz2
Some refactoring.tobias/vcard
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h34
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;
};
}