superkaramba
karambaapp.h
00001
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*)tqApp)
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 TQ_OBJECT
00043
00044 friend class KarambaIface;
00045
00046 private:
00047 static int fd;
00048 KHelpMenu* m_helpMenu;
00049
00050 void showKarambaMenuExtension(bool show = true);
00051 void setToolTip(const TQString &tip = TQString());
00052
00053 protected:
00054 KarambaIface* iface;
00055 ThemesDlg* themeListWindow;
00056 dcopIface_stub* dcopIfaceStub;
00057 TQObjectList *karambaList;
00058 KSystemTray* sysTrayIcon;
00059
00060 public:
00061 KarambaApplication();
00062 ~KarambaApplication();
00063
00064 TQString getMainKaramba();
00065 TQStringList getKarambas();
00066 bool themeExists(TQString pretty_name);
00067 void initDcopStub(TQCString app = "");
00068 void setUpSysTray(KAboutData* about);
00069 void checkPreviousSession(KApplication &app, TQStringList &lst);
00070 void checkCommandLine(KCmdLineArgs *args, TQStringList &lst);
00071 bool startThemes(TQStringList &lst);
00072 KarambaIface* dcopIface() { return iface; };
00073 dcopIface_stub* dcopStub() { return dcopIfaceStub; };
00074 TQWidget* parentWindow() { return (TQWidget*)themeListWindow; };
00075
00076 void addKaramba(karamba* k, bool reloading = false);
00077 void deleteKaramba(karamba* k, bool reloading = false);
00078 bool hasKaramba(karamba* k);
00079
00080 static bool lockKaramba();
00081 static void unlockKaramba();
00082 static void checkSuperKarambaDir();
00083
00084 public slots:
00085 void buildToolTip();
00086 void globalQuitSuperKaramba();
00087 void globalShowThemeDialog();
00088 void globalHideSysTray(bool hide = true);
00089
00090 protected slots:
00091 void quitSuperKaramba();
00092 void showThemeDialog();
00093 void hideSysTray(bool hide = true);
00094 };
00095
00096 #endif // KARAMBAAPP_H