summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
commit0efa7c32aaf21a29b42b5926cc116007056843be (patch)
tree882f663a5dd0e65694bf6077b71086dd77fd7ff8 /Slimber/Qt
parent1d20eabbc32274b491b4c2bedf73d19933d97bfd (diff)
downloadswift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.zip
swift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.tar.bz2
Moved some modules into separate git modules.
Diffstat (limited to 'Slimber/Qt')
m---------Slimber0
-rw-r--r--Slimber/Qt/QtMenulet.cpp2
-rw-r--r--Slimber/Qt/QtMenulet.h65
-rw-r--r--Slimber/Qt/SConscript45
-rw-r--r--Slimber/Qt/Slimber.qrc9
-rw-r--r--Slimber/Qt/main.cpp19
6 files changed, 0 insertions, 140 deletions
diff --git a/Slimber b/Slimber
new file mode 160000
+Subproject 723115ef8542c640580ea4751fca3c359a79dec
diff --git a/Slimber/Qt/QtMenulet.cpp b/Slimber/Qt/QtMenulet.cpp
deleted file mode 100644
index 58c7d50..0000000
--- a/Slimber/Qt/QtMenulet.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Slimber/Qt/QtMenulet.h"
-
diff --git a/Slimber/Qt/QtMenulet.h b/Slimber/Qt/QtMenulet.h
deleted file mode 100644
index 4ac9140..0000000
--- a/Slimber/Qt/QtMenulet.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#pragma once
-
-#include <QCoreApplication>
-#include <QMenu>
-#include <QString>
-#include <QSystemTrayIcon>
-#include <QObject>
-#include <QPixmap>
-
-#include "Slimber/Menulet.h"
-
-class QtMenulet : public QObject, public Menulet {
- Q_OBJECT
- public:
- QtMenulet() {
- trayIcon.setIcon(QPixmap(":/icons/UsersOffline.png"));
- trayIcon.setContextMenu(&menu);
- trayIcon.show();
- }
-
- void clear() {
- menu.clear();
- }
-
- void addItem(const Swift::String& name, const Swift::String& icon) {
- menu.addAction(getIcon(icon), QString::fromUtf8(name.getUTF8Data()));
- }
-
- void addAboutItem() {
- menu.addAction("About");
- }
-
- void addRestartItem() {
- menu.addAction("Restart", this, SLOT(restart()));
- }
-
- void addExitItem() {
- menu.addAction("Exit", qApp, SLOT(quit()));
- }
-
- void addSeparator() {
- menu.addSeparator();
- }
-
- void setIcon(const Swift::String& icon) {
- trayIcon.setIcon(getIcon(icon));
- }
-
- private:
- QPixmap getIcon(const Swift::String& name) {
- return QPixmap(":/icons/" + QString::fromUtf8(name.getUTF8Data()) + ".png");
- }
-
- private slots:
- void showAboutDialog() {
- }
-
- void restart() {
- onRestartClicked();
- }
-
- private:
- QMenu menu;
- QSystemTrayIcon trayIcon;
-};
diff --git a/Slimber/Qt/SConscript b/Slimber/Qt/SConscript
deleted file mode 100644
index b2b8320..0000000
--- a/Slimber/Qt/SConscript
+++ /dev/null
@@ -1,45 +0,0 @@
-import os, shutil, datetime
-
-Import("env")
-
-myenv = env.Clone()
-
-myenv.MergeFlags(env["SLIMBER_FLAGS"])
-myenv.MergeFlags(env["SWIFTEN_FLAGS"])
-myenv.MergeFlags(env["CPPUNIT_FLAGS"])
-myenv.MergeFlags(env["LIBIDN_FLAGS"])
-myenv.MergeFlags(env["BOOST_FLAGS"])
-myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
-myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
-
-myenv.Tool("qt4", toolpath = ["#/BuildTools/SCons/Tools"])
-myenv.Tool("nsis", toolpath = ["#/BuildTools/SCons/Tools"])
-myenv.EnableQt4Modules(['QtCore', 'QtGui'], debug = False)
-
-myenv.Append(CPPPATH = ["."])
-
-if env["PLATFORM"] == "win32" :
- myenv.Append(LINKFLAGS = ["/SUBSYSTEM:WINDOWS"])
- myenv.Append(LIBS = "qtmain")
-
-sources = ["main.cpp", "QtMenulet.cpp"]
-
-#if env["PLATFORM"] == "win32" :
-# myenv.RES("../resources/Windows/Slimber.rc")
-# sources += ["../resources/Windows/Slimber.res"]
-
-if env["PLATFORM"] == "win32" :
- slimberProgram = myenv.Program("Slimber", sources)
-else :
- slimberProgram = myenv.Program("slimber", sources)
-
-myenv.Qrc("Slimber.qrc")
-
-if env["PLATFORM"] == "win32" :
- if "dist" in COMMAND_LINE_TARGETS or env.GetOption("clean") :
- myenv.WindowsBundle("Slimber", resources = [], qtlibs = ["QtCore4", "QtGui4"])
- myenv.Append(NSIS_OPTIONS = [
- "/DmsvccRedistributableDir=\"" + env["vcredist"] + "\"",
- "/DbuildDate=" + datetime.date.today().strftime("%Y%m%d")
- ])
- #myenv.Nsis("../Packaging/nsis/slimber.nsi")
diff --git a/Slimber/Qt/Slimber.qrc b/Slimber/Qt/Slimber.qrc
deleted file mode 100644
index 6cc21ff..0000000
--- a/Slimber/Qt/Slimber.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE RCC>
-<RCC version="1.0">
- <qresource>
- <file alias="icons/Offline.png">../Resources/Offline.png</file>
- <file alias="icons/Online.png">../Resources/Online.png</file>
- <file alias="icons/UsersOffline.png">../Resources/UsersOffline.png</file>
- <file alias="icons/UsersOnline.png">../Resources/UsersOnline.png</file>
- </qresource>
-</RCC>
diff --git a/Slimber/Qt/main.cpp b/Slimber/Qt/main.cpp
deleted file mode 100644
index 0988e7c..0000000
--- a/Slimber/Qt/main.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <QApplication>
-#include <QSystemTrayIcon>
-#include <QMessageBox>
-
-#include "QtMenulet.h"
-#include "Slimber/MainController.h"
-
-int main(int argc, char* argv[]) {
- QApplication app(argc, argv);
- if (!QSystemTrayIcon::isSystemTrayAvailable()) {
-QMessageBox::critical(0, QObject::tr("Systray"), QObject::tr("No system tray"));
- return 1;
- }
-
- QtMenulet menulet;
- MainController controller(&menulet);
-
- return app.exec();
-}