diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch) | |
tree | 8d927b7b47a90c4adb646482a52613f58acd6f8c /superkaramba/src/karambaapp.h | |
download | tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'superkaramba/src/karambaapp.h')
-rw-r--r-- | superkaramba/src/karambaapp.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/superkaramba/src/karambaapp.h b/superkaramba/src/karambaapp.h new file mode 100644 index 0000000..ef92244 --- /dev/null +++ b/superkaramba/src/karambaapp.h @@ -0,0 +1,95 @@ +/*************************************************************************** + * Copyright (C) 2003-2004 Adam Geitgey <[email protected]> * + * Copyright (C) 2003 Hans Karlsson <[email protected]> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef KARAMBAAPP_H +#define KARAMBAAPP_H + +#include "kapplication.h" +#include <kdeversion.h> +#include <ksystemtray.h> + +#undef KDE_3_2 +#undef KDE_3_3 +#if defined(KDE_MAKE_VERSION) +#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) +#define KDE_3_2 +#endif +#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) +#define KDE_3_3 +#endif +#endif + +#define karambaApp ((KarambaApplication*)qApp) + +class karamba; +class KarambaIface; +class KCmdLineArgs; +class ThemesDlg; +class dcopIface_stub; +class KHelpMenu; +class KAboutData; + +class KarambaApplication : public KApplication +{ + Q_OBJECT + + friend class KarambaIface; + + private: + static int fd; + KHelpMenu* m_helpMenu; + + void showKarambaMenuExtension(bool show = true); + void setToolTip(const QString &tip = QString::null); + + protected: + KarambaIface* iface; + ThemesDlg* themeListWindow; + dcopIface_stub* dcopIfaceStub; + QObjectList *karambaList; + KSystemTray* sysTrayIcon; + + public: + KarambaApplication(); + ~KarambaApplication(); + + QString getMainKaramba(); + QStringList getKarambas(); + bool themeExists(QString pretty_name); + void initDcopStub(QCString app = ""); + void setUpSysTray(KAboutData* about); + void checkPreviousSession(KApplication &app, QStringList &lst); + void checkCommandLine(KCmdLineArgs *args, QStringList &lst); + bool startThemes(QStringList &lst); + KarambaIface* dcopIface() { return iface; }; + dcopIface_stub* dcopStub() { return dcopIfaceStub; }; + QWidget* parentWindow() { return (QWidget*)themeListWindow; }; + + void addKaramba(karamba* k, bool reloading = false); + void deleteKaramba(karamba* k, bool reloading = false); + bool hasKaramba(karamba* k); + + static bool lockKaramba(); + static void unlockKaramba(); + static void checkSuperKarambaDir(); + + public slots: + void buildToolTip(); + void globalQuitSuperKaramba(); + void globalShowThemeDialog(); + void globalHideSysTray(bool hide = true); + + protected slots: + void quitSuperKaramba(); + void showThemeDialog(); + void hideSysTray(bool hide = true); +}; + +#endif // KARAMBAAPP_H |