diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-10-25 15:47:40 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-10-25 15:48:08 (GMT) |
commit | bfdf408bed69a279eb710de915e932764ceaed76 (patch) | |
tree | a56cca8886784d31d91532067b62ffc1818e8291 /Swift/QtUI | |
parent | efd505dd4a85e696a650e29da829504cf01bb5d0 (diff) | |
download | swift-contrib-bfdf408bed69a279eb710de915e932764ceaed76.zip swift-contrib-bfdf408bed69a279eb710de915e932764ceaed76.tar.bz2 |
Some groundwork ready for autoaway
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtIdleDetector.cpp | 16 | ||||
-rw-r--r-- | Swift/QtUI/QtIdleDetector.h | 14 | ||||
-rw-r--r-- | Swift/QtUI/QtSwift.cpp | 5 | ||||
-rw-r--r-- | Swift/QtUI/QtSwift.h | 2 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 1 |
5 files changed, 37 insertions, 1 deletions
diff --git a/Swift/QtUI/QtIdleDetector.cpp b/Swift/QtUI/QtIdleDetector.cpp new file mode 100644 index 0000000..e947854 --- /dev/null +++ b/Swift/QtUI/QtIdleDetector.cpp @@ -0,0 +1,16 @@ +#include "QtIdleDetector.h" + +namespace Swift { + +QtIdleDetector::QtIdleDetector() { +} + +QtIdleDetector::~QtIdleDetector() { +} + +void QtIdleDetector::forceNotIdle() { + +} + + +} diff --git a/Swift/QtUI/QtIdleDetector.h b/Swift/QtUI/QtIdleDetector.h new file mode 100644 index 0000000..e21e4a8 --- /dev/null +++ b/Swift/QtUI/QtIdleDetector.h @@ -0,0 +1,14 @@ +#pragma once + +#include "Swift/Controllers/IdleDetector.h" + +namespace Swift { +class QtIdleDetector : public IdleDetector { + public: + QtIdleDetector(); + virtual ~QtIdleDetector(); + virtual void forceNotIdle(); + + +}; +} diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 656e8ce..0def66f 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -8,6 +8,7 @@ #include "Roster/QtTreeWidgetFactory.h" #include "QtSystemTray.h" #include "QtSoundPlayer.h" +#include "QtIdleDetector.h" #include <boost/bind.hpp> #include <QSplitter> @@ -41,10 +42,11 @@ QtSwift::QtSwift(bool netbookMode) { chatWindowFactory_ = new QtChatWindowFactory(treeWidgetFactory_, splitter_, settings_); rosterWindowFactory_ = new QtMainWindowFactory(treeWidgetFactory_); soundPlayer_ = new QtSoundPlayer(); + idleDetector_ = new QtIdleDetector(); if (splitter_) { splitter_->show(); } - mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_, soundPlayer_); + mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_, soundPlayer_, idleDetector_); } QtSwift::~QtSwift() { @@ -58,6 +60,7 @@ QtSwift::~QtSwift() { delete systemTray_; delete splitter_; delete soundPlayer_; + delete idleDetector_; } } diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h index 263dc05..60ff5a7 100644 --- a/Swift/QtUI/QtSwift.h +++ b/Swift/QtUI/QtSwift.h @@ -7,6 +7,7 @@ #include "QtMainWindowFactory.h" #include "QtChatWindowFactory.h" #include "QtSettingsProvider.h" +#include "QtIdleDetector.h" class QSplitter; @@ -36,6 +37,7 @@ namespace Swift { QtSystemTray* systemTray_; QSplitter* splitter_; QtSoundPlayer* soundPlayer_; + QtIdleDetector* idleDetector_; Application* application_; }; } diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index cf0dc47..c70f8a0 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -51,6 +51,7 @@ sources = [ "QtAddContactDialog.cpp", "QtChatWindow.cpp", "QtChatWindowFactory.cpp", + "QtIdleDetector.cpp", "QtJoinMUCDialog.cpp", "QtLoginWindow.cpp", "QtLoginWindowFactory.cpp", |