summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baczynski <danielbaczynski8@gmail.com>2015-03-25 00:16:20 (GMT)
committerKevin Smith <git@kismith.co.uk>2015-03-26 07:39:31 (GMT)
commit85e53159321ab3e013dd2fc0a16748ed6755b119 (patch)
tree6ed333198bb756c8e1946505663ae0c95e72223b /Swift/QtUI/QtChatWindow.h
parentb23f4fb9bee49f93bbba6a9039f0f764664125cd (diff)
downloadswift-85e53159321ab3e013dd2fc0a16748ed6755b119.zip
swift-85e53159321ab3e013dd2fc0a16748ed6755b119.tar.bz2
Add emoticons input popup
This is simple popup menu added to chat window where it is possible to choose an emoticon. To activate click on the smiling face next to input field. When emoticon is selected its text equivalent is appended to input. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Tested on Ubuntu 14.10 with KDE and Qt 4.8.6 Change-Id: I6c5907959970398c9c38591f64ceec20efcbf409
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r--Swift/QtUI/QtChatWindow.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h
index da3a3b9..5c6fa2a 100644
--- a/Swift/QtUI/QtChatWindow.h
+++ b/Swift/QtUI/QtChatWindow.h
@@ -8,9 +8,11 @@
#include <map>
+#include <QMap>
+#include <QMenu>
#include <QPointer>
+#include <QString>
#include <QTextCursor>
-#include <QMap>
#include <SwifTools/LastLineTracker.h>
@@ -18,12 +20,12 @@
#include <Swift/QtUI/ChatSnippet.h>
#include <Swift/QtUI/QtAffiliationEditor.h>
+#include <Swift/QtUI/QtEmoticonsGrid.h>
#include <Swift/QtUI/QtMUCConfigurationWindow.h>
#include <Swift/QtUI/QtSwiftUtil.h>
#include <Swift/QtUI/QtTabbable.h>
-
class QTextEdit;
class QLineEdit;
class QComboBox;
@@ -77,7 +79,7 @@ namespace Swift {
Q_OBJECT
public:
- QtChatWindow(const QString &contact, QtChatTheme* theme, UIEventStream* eventStream, SettingsProvider* settings);
+ QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventStream* eventStream, SettingsProvider* settings, const std::map<std::string, std::string>& emoticons);
virtual ~QtChatWindow();
std::string addMessage(const ChatMessage& message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time, const HighlightAction& highlight);
std::string addAction(const ChatMessage& message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time, const HighlightAction& highlight);
@@ -169,6 +171,8 @@ namespace Swift {
void handleActionButtonClicked();
void handleAffiliationEditorAccepted();
void handleCurrentLabelChanged(int);
+ void handleEmoticonsButtonClicked();
+ void handleEmoticonClicked(QString emoticonAsText);
private:
void updateTitleWithUnreadCount();
@@ -221,5 +225,6 @@ namespace Swift {
bool impromptu_;
bool isMUC_;
bool supportsImpromptuChat_;
+ QMenu* emoticonsMenu_;
};
}