summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-01-17 15:20:29 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-01-17 15:20:29 (GMT)
commite2992ab2c52a12e0123bd4d8bbd70fa9437748fd (patch)
tree5a17acffc5cb4130f82532415e2f83995616d6fb
parenta53771b813f8ed5407fcd329fcfc5329d8ebfc22 (diff)
downloadswift-e2992ab2c52a12e0123bd4d8bbd70fa9437748fd.zip
swift-e2992ab2c52a12e0123bd4d8bbd70fa9437748fd.tar.bz2
Description is now updated as dialog options are changed.
Change-Id: I3210bebc9a1db6774504742fdd108984b06e135b
-rw-r--r--Swift/QtUI/QtHighlightEditor.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp
index e636b57..f933e3f 100644
--- a/Swift/QtUI/QtHighlightEditor.cpp
+++ b/Swift/QtUI/QtHighlightEditor.cpp
@@ -29,26 +29,6 @@ QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* pare
{
ui_.setupUi(this);
- //itemModel_ = new QtHighlightRulesItemModel(this);
- //ui_.treeView->setModel(itemModel_);
- //ui_.ruleWidget->setModel(itemModel_);
-//
- //for (int i = 0; i < QtHighlightRulesItemModel::NumberOfColumns; ++i) {
- //switch (i) {
- //case QtHighlightRulesItemModel::ApplyTo:
- //case QtHighlightRulesItemModel::Sender:
- //case QtHighlightRulesItemModel::Keyword:
- //case QtHighlightRulesItemModel::Action:
- //ui_.treeView->showColumn(i);
- //break;
- //default:
- //ui_.treeView->hideColumn(i);
- //break;
- //}
- //}
-//
- //setHighlightManager(NULL); // setup buttons for empty rules list
-//
connect(ui_.listWidget, SIGNAL(currentRowChanged(int)), SLOT(onCurrentRowChanged(int)));
connect(ui_.newButton, SIGNAL(clicked()), SLOT(onNewButtonClicked()));
@@ -68,10 +48,28 @@ QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* pare
connect(ui_.defaultSoundRadio, SIGNAL(clicked()), SLOT(soundOtherSelect()));
connect(ui_.customSoundRadio, SIGNAL(clicked()), SLOT(soundCustomSelect()));
+ /* replace the static lineedit control with the roster autocompleter */
ui_.dummySenderName->setVisible(false);
jid_ = new QtSuggestingJIDInput(this, settings);
ui_.senderName->addWidget(jid_);
+ /* we need to be notified if any of the state changes so that we can update our textual rule description */
+ connect(ui_.chatCheck, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.roomCheck, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.senderCheck, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(jid_, SIGNAL(textChanged(const QString&)), SLOT(updateRuleDescription()));
+ connect(ui_.keywordCheck, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.keyword, SIGNAL(textChanged(const QString&)), SLOT(updateRuleDescription()));
+ connect(ui_.nickIsKeyword, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.matchWholeWords, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.matchCase, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.noColorRadio, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.defaultColorRadio, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.customColorRadio, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.noSoundRadio, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.defaultSoundRadio, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+ connect(ui_.customSoundRadio, SIGNAL(clicked()), SLOT(updateRuleDescription()));
+
setWindowTitle(tr("Highlight Rules"));
}