summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
index 4afe692..93d326b 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
@@ -1,15 +1,21 @@
/*
* Copyright (c) 2012 Tobias Markmann
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2014 Kevin Smith and Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
#pragma once
#include <QCheckBox>
#include <QGridLayout>
#include <QLabel>
#include <QWidget>
#include "QtCloseButton.h"
#include "QtTagComboBox.h"
@@ -34,18 +40,21 @@ class QtVCardGeneralField : public QWidget {
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;
@@ -55,20 +64,24 @@ class QtVCardGeneralField : public QWidget {
void deleteField(QtVCardGeneralField*);
public slots:
void handleCloseButtonClicked();
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;
QLabel* tagLabel;
QtCloseButton* closeButton;