diff options
| author | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-16 13:47:27 (GMT) |
|---|---|---|
| committer | Swift Review <review@swift.im> | 2014-07-29 09:48:04 (GMT) |
| commit | 4ab20a452e0af56c7ee210f863aeae31450954cc (patch) | |
| tree | be0a3777eb7bd814e4c6b9660a77dbb8fafb90d3 /Swift/QtUI/QtHighlightEditor.h | |
| parent | 9c5c731845881996f45b32ea6de12e0647f4634d (diff) | |
| download | swift-contrib-4ab20a452e0af56c7ee210f863aeae31450954cc.zip swift-contrib-4ab20a452e0af56c7ee210f863aeae31450954cc.tar.bz2 | |
Add ability to reorder highlight rules list.
Test-Information:
Add several highlight rules. Verify that the up and down buttons reorder the items in the list.
Change-Id: I6272799e2b2767ddfa01068c2ffcd1fb4651e11d
Diffstat (limited to 'Swift/QtUI/QtHighlightEditor.h')
| -rw-r--r-- | Swift/QtUI/QtHighlightEditor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.h b/Swift/QtUI/QtHighlightEditor.h index c7db464..e0595ad 100644 --- a/Swift/QtUI/QtHighlightEditor.h +++ b/Swift/QtUI/QtHighlightEditor.h @@ -1,69 +1,70 @@ /* * Copyright (c) 2012 Maciej Niedzielski * 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 <Swift/Controllers/HighlightRule.h> #include <Swift/Controllers/UIInterfaces/HighlightEditorWindow.h> #include <Swift/QtUI/ui_QtHighlightEditor.h> namespace Swift { class QtSettingsProvider; class QtSuggestingJIDInput; class QtWebKitChatView; class QtHighlightEditor : public QWidget, public HighlightEditorWindow { Q_OBJECT public: QtHighlightEditor(QtSettingsProvider* settings, QWidget* parent = NULL); virtual ~QtHighlightEditor(); virtual void show(); virtual void setHighlightManager(HighlightManager* highlightManager); virtual void setContactSuggestions(const std::vector<Contact::ref>& suggestions); private slots: void colorOtherSelect(); void colorCustomSelect(); void soundOtherSelect(); void soundCustomSelect(); void onNewButtonClicked(); void onDeleteButtonClicked(); + void onUpButtonClicked(); + void onDownButtonClicked(); void onCurrentRowChanged(int currentRow); void onApplyButtonClick(); void onCancelButtonClick(); void onOkButtonClick(); void setChildWidgetStates(); void widgetClick(); void disableDialog(); void handleContactSuggestionRequested(const QString& text); void selectSoundFile(); private: void handleOnUserSelected(const JID& jid); void populateList(); - void updateChatPreview(); void selectRow(int row); int getSelectedRow() const; HighlightRule ruleFromDialog(); void ruleToDialog(const HighlightRule& rule); Ui::QtHighlightEditor ui_; QtSettingsProvider* settings_; HighlightManager* highlightManager_; QtSuggestingJIDInput* jid_; int previousRow_; }; } |
Swift