diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-01 11:36:27 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-10-08 07:58:57 (GMT) |
commit | 54351d4b9d8d3580c4f60306c3e1dfcba304777b (patch) | |
tree | 7a1cfea12e59e7b13a2b903c0eb8e30b640473c4 /Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp | |
parent | 3e40b302af0e2abde3c002c7f25ec5276f68f230 (diff) | |
download | swift-contrib-54351d4b9d8d3580c4f60306c3e1dfcba304777b.zip swift-contrib-54351d4b9d8d3580c4f60306c3e1dfcba304777b.tar.bz2 |
Explain the use of preffered stars in 'Edit Profile' dialog if they are checked.
Test-Information:
Verified this works by running Swift and editing a profile.
Change-Id: I965ef374ceed2ba5b3225070931b6c06e3b9e800
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp')
-rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp index 74d9c59..155bd4f 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp +++ b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp @@ -16,4 +16,5 @@ #include <QHBoxLayout> +#include <QToolTip> namespace Swift { @@ -39,4 +40,5 @@ void QtVCardGeneralField::initialize() { layout->addWidget(preferredCheckBox, row, 0, Qt::AlignVCenter); childWidgets << preferredCheckBox; + connect(preferredCheckBox, SIGNAL(stateChanged(int)), SLOT(handlePreferredStarStateChanged(int))); } label = new QLabel(this); @@ -125,4 +127,10 @@ void QtVCardGeneralField::handleCloseButtonClicked() { } +void QtVCardGeneralField::handlePreferredStarStateChanged(int state) { + if (state == Qt::Checked) { + QToolTip::showText(QCursor::pos(), tr("Marked as your preferred %1. Click again to undo.").arg(labelText)); + } +} + void QtVCardGeneralField::updatePreferredStarVisibility() { if (preferredCheckBox) { |