summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r--Swift/QtUI/QtChatWindow.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h
index 08ad7ad..4c64c84 100644
--- a/Swift/QtUI/QtChatWindow.h
+++ b/Swift/QtUI/QtChatWindow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,13 +13,16 @@
#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>
@@ -40,7 +43,7 @@ namespace Swift {
class UIEventStream;
class QtChatWindowJSBridge;
class SettingsProvider;
- class QtEmoticonsGrid;
+ class QtSettingsProvider;
class LabelModel : public QAbstractListModel {
Q_OBJECT
@@ -78,7 +81,7 @@ namespace Swift {
Q_OBJECT
public:
- QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventStream* eventStream, SettingsProvider* settings, const std::map<std::string, std::string>& emoticons);
+ QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventStream* eventStream, SettingsProvider* settings, QtSettingsProvider* qtOnlySettings);
virtual ~QtChatWindow();
std::string addMessage(const ChatMessage& message, const std::string &senderName, bool senderIsSelf, std::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time);
std::string addAction(const ChatMessage& message, const std::string &senderName, bool senderIsSelf, std::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time);
@@ -138,6 +141,7 @@ namespace Swift {
public slots:
void handleChangeSplitterState(QByteArray state);
+ void handleEmojiClicked(QString emoji);
void handleFontResized(int fontSizeSteps);
AlertID addAlert(const std::string& alertText);
void removeAlert(const AlertID id);
@@ -171,8 +175,7 @@ namespace Swift {
void handleActionButtonClicked();
void handleAffiliationEditorAccepted();
void handleCurrentLabelChanged(int);
- void handleEmoticonsButtonClicked();
- void handleEmoticonClicked(QString emoticonAsText);
+ void handleEmojisButtonClicked();
void handleTextInputReceivedFocus();
void handleTextInputLostFocus();
@@ -221,7 +224,8 @@ namespace Swift {
QString alertStyleSheet_;
QPointer<QtMUCConfigurationWindow> mucConfigurationWindow_;
QPointer<QtAffiliationEditor> affiliationEditor_;
- SettingsProvider* settings_;
+ SettingsProvider* settings_ = nullptr;
+ QtSettingsProvider* qtOnlySettings_ = nullptr;
std::vector<ChatWindow::RoomAction> availableRoomActions_;
QPalette defaultLabelsPalette_;
LabelModel* labelModel_;
@@ -230,6 +234,7 @@ namespace Swift {
bool isMUC_;
bool supportsImpromptuChat_;
RoomBookmarkState roomBookmarkState_;
- QMenu* emoticonsMenu_;
+ std::unique_ptr<QMenu> emojisMenu_;
+ QPointer<QtEmojisSelector> emojisGrid_;
};
}