diff options
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 78d8f91..bc2d821 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -13,18 +13,19 @@ #include "SwifTools/LastLineTracker.h" #include "Swiften/Base/IDGenerator.h" class QTextEdit; class QLineEdit; class QComboBox; class QLabel; class QSplitter; +class QPushButton; namespace Swift { class QtChatView; class QtTreeWidget; class QtTreeWidgetFactory; class QtChatTheme; class TreeWidget; class QtTextEdit; class UIEventStream; @@ -57,18 +58,21 @@ namespace Swift { int getCount(); 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); + void setAlert(const std::string& alertText, const std::string& buttonText = ""); + void cancelAlert(); + void setCorrectionEnabled(Tristate enabled); signals: void geometryChanged(); void splitterMoved(); void fontResized(int); protected slots: void qAppFocusChanged(QWidget* old, QWidget* now); void closeEvent(QCloseEvent* event); @@ -77,18 +81,19 @@ namespace Swift { protected: void showEvent(QShowEvent* event); private slots: void returnPressed(); void handleInputChanged(); void handleKeyPressEvent(QKeyEvent* event); void handleSplitterMoved(int pos, int index); + void handleAlertButtonClicked(); 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_; @@ -96,23 +101,27 @@ namespace Swift { LastLineTracker lastLineTracker_; QString contact_; QString lastSentMessage_; QtChatView* messageLog_; QtChatTheme* theme_; QtTextEdit* input_; QComboBox* labelsWidget_; QtTreeWidget* treeWidget_; QLabel* correctingLabel_; + QLabel* alertLabel_; + QWidget* alertWidget_; + QPushButton* alertButton_; TabComplete* completer_; std::vector<SecurityLabelsCatalog::Item> availableLabels_; bool isCorrection_; bool previousMessageWasSelf_; bool previousMessageWasSystem_; bool previousMessageWasPresence_; QString previousSenderName_; bool inputClearing_; UIEventStream* eventStream_; bool inputEnabled_; IDGenerator id_; QSplitter *logRosterSplitter_; + Tristate correctionEnabled_; }; } |