diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-11-18 12:09:08 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-12-22 20:19:07 (GMT) |
commit | 9f04a7ec3429303118f12607703b877d8ba43888 (patch) | |
tree | 3e868395fa3c4f9cbbf84614094bb0251b425c15 /Swift/QtUI/UserSearch/QtUserSearchWindow.h | |
parent | 04b99ce8430109d0467c29c85cb6bacb85c54c44 (diff) | |
download | swift-contrib-9f04a7ec3429303118f12607703b877d8ba43888.zip swift-contrib-9f04a7ec3429303118f12607703b877d8ba43888.tar.bz2 |
Basic User Search support, and Find Rooms cleanup.
Adds a throbber to the MUC search, turns the Add Contact dialog into something searchy, adds the option to open chats to arbitrary JIDs.
Resolves: #614
Resolves: #695
Resolves: #436
Release-Notes: On servers that support it, users can now perform searches for contacts to add or chat to.
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.h')
-rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.h b/Swift/QtUI/UserSearch/QtUserSearchWindow.h new file mode 100644 index 0000000..dca321a --- /dev/null +++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swift/QtUI/UserSearch/ui_QtUserSearchWindow.h" + +#include "Swift/Controllers/UIInterfaces/UserSearchWindow.h" + + +namespace Swift { + class UserSearchModel; + class UserSearchDelegate; + class UserSearchResult; + class UIEventStream; + class QtUserSearchWindow : public QWidget, public UserSearchWindow, private Ui::QtUserSearchWindow { + Q_OBJECT + public: + QtUserSearchWindow(UIEventStream* eventStream); + virtual ~QtUserSearchWindow(); + + virtual void addSavedServices(const std::vector<JID>& services); + + virtual void clear(); + virtual void show(); + virtual void setResults(const std::vector<UserSearchResult>& results); + virtual void setSelectedService(const JID& jid); + virtual void setServerSupportsSearch(bool error); + virtual void setSearchError(bool error); + virtual void setSearchFields(boost::shared_ptr<SearchPayload> fields) ; + private slots: + void handleGetForm(); + void handleSelected(const QModelIndex& current); + void handleSearch(); + void handleActivated(const QModelIndex& index); + void handleOkClicked(); + void handleCancelClicked(); + void enableCorrectButtons(); + private: + UserSearchModel* model_; + UserSearchDelegate* delegate_; + UIEventStream* eventStream_; + JID lastServiceJID_; + }; +} |