diff options
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 910019b..78d8f91 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -1,21 +1,24 @@ /* - * Copyright (c) 2010 Kevin Smith + * Copyright (c) 2010-2011 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ -#ifndef SWIFT_QtChatWindow_H -#define SWIFT_QtChatWindow_H +#pragma once #include "Swift/Controllers/UIInterfaces/ChatWindow.h" #include "QtTabbable.h" +#include "SwifTools/LastLineTracker.h" + #include "Swiften/Base/IDGenerator.h" class QTextEdit; class QLineEdit; class QComboBox; +class QLabel; +class QSplitter; namespace Swift { class QtChatView; @@ -35,6 +38,7 @@ namespace Swift { void addSystemMessage(const std::string& message); void addPresenceMessage(const std::string& message); void addErrorMessage(const std::string& errorMessage); + void replaceMessage(const std::string& message, const std::string& id, const boost::posix_time::ptime& time); void show(); void activate(); void setUnreadMessageCount(int count); @@ -54,9 +58,16 @@ namespace Swift { void replaceLastMessage(const std::string& message); void setAckState(const std::string& id, AckState state); void flash(); + QByteArray getSplitterState(); + + public slots: + void handleChangeSplitterState(QByteArray state); + void handleFontResized(int fontSizeSteps); signals: void geometryChanged(); + void splitterMoved(); + void fontResized(int); protected slots: void qAppFocusChanged(QWidget* old, QWidget* now); @@ -71,22 +82,29 @@ namespace Swift { void returnPressed(); void handleInputChanged(); void handleKeyPressEvent(QKeyEvent* event); + void handleSplitterMoved(int pos, int index); private: void updateTitleWithUnreadCount(); void tabComplete(); + void beginCorrection(); + void cancelCorrection(); 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); int unreadCount_; bool contactIsTyping_; + LastLineTracker lastLineTracker_; QString contact_; + QString lastSentMessage_; QtChatView* messageLog_; QtChatTheme* theme_; QtTextEdit* input_; QComboBox* labelsWidget_; QtTreeWidget* treeWidget_; + QLabel* correctingLabel_; TabComplete* completer_; std::vector<SecurityLabelsCatalog::Item> availableLabels_; + bool isCorrection_; bool previousMessageWasSelf_; bool previousMessageWasSystem_; bool previousMessageWasPresence_; @@ -95,7 +113,6 @@ namespace Swift { UIEventStream* eventStream_; bool inputEnabled_; IDGenerator id_; + QSplitter *logRosterSplitter_; }; } - -#endif |