Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

app.h

Go to the documentation of this file.
00001 #ifndef NOATUN_H
00002 #define NOATUN_H
00003 
00004 #include <kuniqueapplication.h>
00005 
00006 class Playlist;
00007 class Player;
00008 class LibraryLoader;
00009 class KPopupMenu;
00010 class NoatunPreferences;
00011 class Downloader;
00012 class Effects;
00013 class EffectView;
00014 class Equalizer;
00015 class EqualizerView;
00016 
00017 class NoatunApp : public KUniqueApplication
00018 {
00019 Q_OBJECT
00020 friend class Playlist;
00021 friend class KCrash;
00022 
00023 public:
00024         NoatunApp();
00025         ~NoatunApp();
00026 
00027         Playlist *playlist() const;
00028         Player *player() const { return mPlayer; }
00029         NoatunPreferences *preferencesBox() const { return mPref; }
00030 
00036         QString mimeTypes();
00037         
00038         LibraryLoader *libraryLoader() const { return mLibraryLoader; }
00039         Downloader *downloader() const { return mDownloader; }
00040         static QImage readPNG(const QString &filename);
00041         Effects *effects() const;
00042         ::Equalizer *equalizer() const { return mEqualizer; }
00043         EqualizerView *equalizerView() const { return mEqualizerView; }
00044 
00045         QCString version() const;
00046 
00047         virtual void commitData(QSessionManager &);
00048         virtual void saveState(QSessionManager &);
00049 
00050 signals:
00054         void hideYourself();
00055 
00059         void showYourself();
00060 
00061 public slots:
00065         void toggleInterfaces();
00069         void showInterfaces();
00074         void hideInterfaces();
00075 
00076 public: //options
00077         bool autoPlay() const;
00078         bool loopList() const;
00079         bool oneInstance() const;
00080         QString saveDirectory() const;
00081         bool clearOnStart() const;
00082         bool clearOnOpen() const;
00083         bool hackUpPlaylist() const;
00084         bool fastMixer() const;
00085         QString titleFormat() const;
00086         
00087         void setOneInstance(bool);
00088         void setLoopList(bool);
00089         void setAutoPlay(bool);
00090         void setSaveDirectory(const QString &);
00091         void setRememberPositions(bool);
00092         void setClearOnStart(bool);
00093         void setClearOnOpen(bool);
00094         void setHackUpPlaylist(bool);
00095         void setFastMixer(bool);
00096         void setTitleFormat(const QString &);
00097 
00104         int pluginMenuAdd(const QString &text, const QObject *receiver, const char *member);
00105 
00109         void pluginMenuRemove(int id);
00110 
00111         KPopupMenu *pluginMenu(void);
00112 
00113 protected:
00114         virtual int newInstance();
00115 
00116 public slots:
00117         // slots for the contextMenu
00118         void preferences();
00119         void quit();
00120         void fileOpen();
00121         void effectView();
00122         void equalizerView();
00123         
00124 private:
00125         void loadPlugins();
00126 
00127 private:
00128         Player *mPlayer;
00129         LibraryLoader *mLibraryLoader;
00130         KPopupMenu *mPluginMenu;
00131         Downloader *mDownloader;
00132         Effects *mEffects;
00133         EffectView *mEffectView;
00134         NoatunPreferences *mPref;
00135         ::Equalizer *mEqualizer;
00136         EqualizerView *mEqualizerView;
00137         bool showingInterfaces;
00138 };
00139 
00140 #define napp (static_cast<NoatunApp*>(kapp))
00141 
00142 // version info for the plugins
00143 // this is MAJOR.MINOR.PATCHLEVEL
00144 // and you developers better ignore patchlevel :)
00145 #define NOATUN_MAJOR 2
00146 #define NOATUN_MINOR 2
00147 #define NOATUN_PATCHLEVEL 1
00148 
00149 #define NOATUN_VERSION "2.2.1"
00150 
00151 #endif

Generated on Sat May 24 15:10:27 2003 for Noatun by doxygen1.3-rc3