summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCătălin Badea <catalin.badea392@gmail.com>2012-08-21 19:06:05 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-08-30 20:54:18 (GMT)
commit7d0cd94de71d9e55e573e28206470439ecde3db5 (patch)
treec361caa96dac71d53a74ba76aa3dc1d349a0c59e /Swift/Controllers/UIInterfaces
parent6856199274e9c5e581220fccf520b8f011519d17 (diff)
downloadswift-7d0cd94de71d9e55e573e28206470439ecde3db5.zip
swift-7d0cd94de71d9e55e573e28206470439ecde3db5.tar.bz2
History dialog
Add history dialog as an experimental feature. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r--Swift/Controllers/UIInterfaces/HistoryWindow.h34
-rw-r--r--Swift/Controllers/UIInterfaces/HistoryWindowFactory.h18
-rw-r--r--Swift/Controllers/UIInterfaces/UIFactory.h2
3 files changed, 54 insertions, 0 deletions
diff --git a/Swift/Controllers/UIInterfaces/HistoryWindow.h b/Swift/Controllers/UIInterfaces/HistoryWindow.h
new file mode 100644
index 0000000..ffb0ad5
--- /dev/null
+++ b/Swift/Controllers/UIInterfaces/HistoryWindow.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2012 Catalin Badea
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swift/Controllers/Roster/Roster.h>
+
+namespace Swift {
+ class HistoryWindow {
+ public:
+ virtual ~HistoryWindow() {};
+
+ virtual void activate() = 0;
+ virtual void setRosterModel(Roster*) = 0;
+ virtual void addMessage(const std::string &message, const std::string &senderName, bool senderIsSelf, const std::string& avatarPath, const boost::posix_time::ptime& time, bool addAtTheTop) = 0;
+ virtual void resetConversationView() = 0;
+ virtual void resetConversationViewTopInsertPoint() = 0; // this is a temporary fix used in adding messages at the top
+ virtual void setDate(const boost::gregorian::date& date) = 0;
+
+ virtual std::string getSearchBoxText() = 0;
+ virtual boost::gregorian::date getLastVisibleDate() = 0;
+
+ boost::signal<void (RosterItem*)> onSelectedContactChanged;
+ boost::signal<void (const std::string&)> onReturnPressed;
+ boost::signal<void (const boost::gregorian::date&)> onScrollReachedTop;
+ boost::signal<void (const boost::gregorian::date&)> onScrollReachedBottom;
+ boost::signal<void ()> onPreviousButtonClicked;
+ boost::signal<void ()> onNextButtonClicked;
+ boost::signal<void (const boost::gregorian::date&)> onCalendarClicked;
+ };
+}
diff --git a/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h b/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h
new file mode 100644
index 0000000..e91bc37
--- /dev/null
+++ b/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2012 Catalin Badea
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swift/Controllers/UIInterfaces/HistoryWindow.h>
+
+namespace Swift {
+ class UIEventStream;
+ class HistoryWindowFactory {
+ public:
+ virtual ~HistoryWindowFactory() {};
+ virtual HistoryWindow* createHistoryWindow(UIEventStream* eventStream) = 0;
+ };
+}
diff --git a/Swift/Controllers/UIInterfaces/UIFactory.h b/Swift/Controllers/UIInterfaces/UIFactory.h
index cf89dab..d6bea77 100644
--- a/Swift/Controllers/UIInterfaces/UIFactory.h
+++ b/Swift/Controllers/UIInterfaces/UIFactory.h
@@ -8,6 +8,7 @@
#include <Swift/Controllers/UIInterfaces/ChatListWindowFactory.h>
#include <Swift/Controllers/UIInterfaces/ChatWindowFactory.h>
+#include <Swift/Controllers/UIInterfaces/HistoryWindowFactory.h>
#include <Swift/Controllers/UIInterfaces/EventWindowFactory.h>
#include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h>
#include <Swift/Controllers/UIInterfaces/MainWindowFactory.h>
@@ -24,6 +25,7 @@ namespace Swift {
class UIFactory :
public ChatListWindowFactory,
public ChatWindowFactory,
+ public HistoryWindowFactory,
public EventWindowFactory,
public LoginWindowFactory,
public MainWindowFactory,