diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-04-13 19:49:39 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-04-14 15:44:35 (GMT) |
commit | d4517116fc71d1b2d5967004757630293613e928 (patch) | |
tree | cfb8d66bb781548c5b60d037ef8372f2e82b921b /Swift/QtUI/QtChatWindow.h | |
parent | 2dcdee8e9f657c7f5c5d5c507373fd328beaa568 (diff) | |
download | swift-contrib-d4517116fc71d1b2d5967004757630293613e928.zip swift-contrib-d4517116fc71d1b2d5967004757630293613e928.tar.bz2 |
Improve tab completion
Remember last tab completion suggestion and use it for cycling through all completion candidates.
Resolves: #1070
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 18eb092..9db1884 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -10,18 +10,19 @@ #include <Swift/QtUI/QtMUCConfigurationWindow.h> #include <Swift/QtUI/QtAffiliationEditor.h> #include <QtTabbable.h> #include <SwifTools/LastLineTracker.h> #include <map> #include <QPointer> +#include <QTextCursor> class QTextEdit; class QLineEdit; class QComboBox; class QLabel; class QSplitter; class QPushButton; namespace Swift { @@ -112,18 +113,19 @@ namespace Swift { void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent *event); protected: void showEvent(QShowEvent* event); private slots: void returnPressed(); void handleInputChanged(); + void handleCursorPositionChanged(); void handleKeyPressEvent(QKeyEvent* event); void handleSplitterMoved(int pos, int index); void handleAlertButtonClicked(); void handleActionButtonClicked(); void handleHTMLButtonClicked(QString id, QString arg1, QString arg2, QString arg3); void handleAffiliationEditorAccepted(); private: @@ -144,36 +146,38 @@ namespace Swift { std::string addMessage(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const QString& style, const boost::posix_time::ptime& time); void handleOccupantSelectionChanged(RosterItem* item); bool appendToPreviousCheck(PreviousMessageKind messageKind, const std::string& senderName, bool senderIsSelf) const; int unreadCount_; bool contactIsTyping_; LastLineTracker lastLineTracker_; QString contact_; QString lastSentMessage_; + QTextCursor tabCompleteCursor_; QtChatView* messageLog_; QtChatTheme* theme_; QtTextEdit* input_; QComboBox* labelsWidget_; QtOccupantListWidget* treeWidget_; QLabel* correctingLabel_; QLabel* alertLabel_; QWidget* alertWidget_; QPushButton* alertButton_; TabComplete* completer_; QLineEdit* subject_; QPushButton* actionButton_; std::vector<SecurityLabelsCatalog::Item> availableLabels_; bool isCorrection_; bool previousMessageWasSelf_; PreviousMessageKind previousMessageKind_; QString previousSenderName_; bool inputClearing_; + bool tabCompletion_; UIEventStream* eventStream_; bool inputEnabled_; QSplitter *logRosterSplitter_; Tristate correctionEnabled_; QString alertStyleSheet_; std::map<QString, QString> descriptions; QtChatWindowJSBridge* jsBridge; QPointer<QtMUCConfigurationWindow> mucConfigurationWindow_; QPointer<QtAffiliationEditor> affiliationEditor_; |