karambaapp.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef KARAMBAAPP_H
00012 #define KARAMBAAPP_H
00013
00014 #include "kapplication.h"
00015 #include <kdeversion.h>
00016 #include <ksystemtray.h>
00017
00018 #undef KDE_3_2
00019 #undef KDE_3_3
00020 #if defined(KDE_MAKE_VERSION)
00021 #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
00022 #define KDE_3_2
00023 #endif
00024 #if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
00025 #define KDE_3_3
00026 #endif
00027 #endif
00028
00029 #define karambaApp ((KarambaApplication*)qApp)
00030
00031 class karamba;
00032 class KarambaIface;
00033 class KCmdLineArgs;
00034 class ThemesDlg;
00035 class dcopIface_stub;
00036 class KHelpMenu;
00037 class KAboutData;
00038
00039 class KarambaApplication : public KApplication
00040 {
00041 Q_OBJECT
00042
00043 friend class KarambaIface;
00044
00045 private:
00046 static int fd;
00047 KHelpMenu* m_helpMenu;
00048
00049 void showKarambaMenuExtension(bool show = true);
00050 void setToolTip(const QString &tip = QString::null);
00051
00052 protected:
00053 KarambaIface* iface;
00054 ThemesDlg* themeListWindow;
00055 dcopIface_stub* dcopIfaceStub;
00056 QObjectList *karambaList;
00057 KSystemTray* sysTrayIcon;
00058
00059 public:
00060 KarambaApplication();
00061 ~KarambaApplication();
00062
00063 QString getMainKaramba();
00064 QStringList getKarambas();
00065 bool themeExists(QString pretty_name);
00066 void initDcopStub(QCString app = "");
00067 void setUpSysTray(KAboutData* about);
00068 void checkPreviousSession(KApplication &app, QStringList &lst);
00069 void checkCommandLine(KCmdLineArgs *args, QStringList &lst);
00070 bool startThemes(QStringList &lst);
00071 KarambaIface* dcopIface() { return iface; };
00072 dcopIface_stub* dcopStub() { return dcopIfaceStub; };
00073 QWidget* parentWindow() { return (QWidget*)themeListWindow; };
00074
00075 void addKaramba(karamba* k, bool reloading = false);
00076 void deleteKaramba(karamba* k, bool reloading = false);
00077 bool hasKaramba(karamba* k);
00078
00079 static bool lockKaramba();
00080 static void unlockKaramba();
00081 static void checkSuperKarambaDir();
00082
00083 public slots:
00084 void buildToolTip();
00085 void globalQuitSuperKaramba();
00086 void globalShowThemeDialog();
00087 void globalHideSysTray(bool hide = true);
00088
00089 protected slots:
00090 void quitSuperKaramba();
00091 void showThemeDialog();
00092 void hideSysTray(bool hide = true);
00093 };
00094
00095 #endif // KARAMBAAPP_H
|