diff options
author | Peter Burgess <pete.burgess@isode.com> | 2018-01-19 14:01:53 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2018-02-22 17:41:26 (GMT) |
commit | 85a144fe80d0fe89b5fed852013b6986b44978d4 (patch) | |
tree | ce5509ff53353b70cdce9332fa42bb464539e530 /Swift/QtUI/QtChatWindow.h | |
parent | 5eed7fcd3c8d42837a013855114deb6cdcaf47d0 (diff) | |
download | swift-85a144fe80d0fe89b5fed852013b6986b44978d4.zip swift-85a144fe80d0fe89b5fed852013b6986b44978d4.tar.bz2 |
Request and display security markings for MUC chat windows
Disco#info requested and handled by MUCController on rejoin().
UI display of disco#info implemented for QtChatWindow.
Test-Information:
Tests written for new MUCController features, and all tests passed.
Swift runs with changes and security markings show as and when
expected in local isode MUC windows.
Change-Id: Ibef4a31f6f8c4cff5f518a66106266a7f961d103
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 361d7c6..4e10053 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -1,32 +1,32 @@ /* - * Copyright (c) 2010-2017 Isode Limited. + * Copyright (c) 2010-2018 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <map> #include <string> #include <QMap> #include <QMenu> #include <QPointer> #include <QString> #include <QTextCursor> #include <QVBoxLayout> #include <Swift/Controllers/UIInterfaces/ChatWindow.h> #include <SwifTools/EmojiMapper.h> #include <SwifTools/LastLineTracker.h> #include <Swift/QtUI/ChatSnippet.h> #include <Swift/QtUI/QtAffiliationEditor.h> #include <Swift/QtUI/QtEmojisSelector.h> #include <Swift/QtUI/QtMUCConfigurationWindow.h> #include <Swift/QtUI/QtSwiftUtil.h> #include <Swift/QtUI/QtTabbable.h> class QTextEdit; class QLineEdit; @@ -167,79 +167,84 @@ namespace Swift { private slots: void handleLogCleared(); void returnPressed(); void handleInputChanged(); void handleCursorPositionChanged(); void handleKeyPressEvent(QKeyEvent* event); void handleSplitterMoved(int pos, int index); void handleAlertButtonClicked(); void handleActionButtonClicked(); void handleAffiliationEditorAccepted(); void handleCurrentLabelChanged(int); void handleEmojisButtonClicked(); void handleTextInputReceivedFocus(); void handleTextInputLostFocus(); private: void updateTitleWithUnreadCount(); void tabComplete(); void beginCorrection(); void cancelCorrection(); void handleSettingChanged(const std::string& setting); void handleOccupantSelectionChanged(RosterItem* item); void handleAppendedToLog(); static std::vector<JID> jidListFromQByteArray(const QByteArray& dataBytes); void resetDayChangeTimer(); + void setChatSecurityMarking(const std::string& markingValue, const std::string& markingForegroundColorValue, const std::string& markingBackgroundColorValue); + void removeChatSecurityMarking(); + private: int unreadCount_; bool contactIsTyping_; LastLineTracker lastLineTracker_; std::string id_; QString contact_; QString lastSentMessage_; QTextCursor tabCompleteCursor_; QtChatView* messageLog_; QtChatTheme* theme_; QtTextEdit* input_; QWidget* midBar_; QBoxLayout* subjectLayout_; QComboBox* labelsWidget_; QtOccupantListWidget* treeWidget_; QLabel* correctingLabel_; boost::optional<AlertID> correctingAlert_; QVBoxLayout* alertLayout_; std::map<AlertID, QWidget*> alertWidgets_; AlertID nextAlertId_; TabComplete* completer_; QLineEdit* subject_; bool isCorrection_; bool inputClearing_; bool tabCompletion_; UIEventStream* eventStream_; bool isOnline_; QSplitter* logRosterSplitter_; Tristate correctionEnabled_; Tristate fileTransferEnabled_; QString alertStyleSheet_; QPointer<QtMUCConfigurationWindow> mucConfigurationWindow_; QPointer<QtAffiliationEditor> affiliationEditor_; SettingsProvider* settings_ = nullptr; QtSettingsProvider* qtOnlySettings_ = nullptr; std::vector<ChatWindow::RoomAction> availableRoomActions_; QPalette defaultLabelsPalette_; LabelModel* labelModel_; BlockingState blockingState_; bool impromptu_; bool isMUC_; bool supportsImpromptuChat_; RoomBookmarkState roomBookmarkState_; std::unique_ptr<QMenu> emojisMenu_; QPointer<QtEmojisSelector> emojisGrid_; std::map<std::string, std::string> emoticonsMap_; QTimer* dayChangeTimer = nullptr; + QHBoxLayout* securityMarkingLayout_ = nullptr; + QLabel* securityMarkingDisplay_ = nullptr; }; } |