/* * Copyright (c) 2012 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include #include #include "QtTagComboBox.h" namespace Swift { /* * covers features like: * - preffered (star checkbox) * - combo check box * - label */ 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, 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; }; }