blob: 9ffcaeadf37914cebe7749dfe8ac2daa783b289f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*
* Copyright (c) 2012 Tobias Markmann
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#pragma once
#include <QWidget>
#include <QLabel>
#include <QCheckBox>
#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;
};
}
|