1 /* 2 * soundkonverter.h 3 * 4 * Copyright (C) 2007 Daniel Faust <hessijames@gmail.com> 5 */ 6 #ifndef SOUNDKONVERTER_H 7 #define SOUNDKONVERTER_H 8 9 10 #include <KXmlGuiWindow> 11 #include <KUrl> 12 #include <kdeversion.h> 13 14 class soundKonverterView; 15 class KToggleAction; 16 class KUrl; 17 class Config; 18 class Logger; 19 class LogViewer; 20 class CDManager; 21 class ReplayGainScanner; 22 23 class KStatusNotifierItem; 24 25 26 /** 27 * This class serves as the main window for soundKonverter. It handles the 28 * menus, toolbars, and status bars. 29 * 30 * @short Main window class 31 * @author Daniel Faust <hessijames@gmail.com> 32 * @version 1.0 33 */ 34 class soundKonverter : public KXmlGuiWindow 35 { 36 Q_OBJECT 37 public: 38 /** Default Constructor */ 39 soundKonverter(); 40 41 /** Default Destructor */ 42 ~soundKonverter(); 43 44 virtual void saveProperties( KConfigGroup& configGroup ); 45 46 void showSystemTray(); 47 void addConvertFiles( const KUrl::List& urls, const QString& profile, const QString& format, const QString& directory, const QString& notifyCommand ); 48 void addReplayGainFiles( const KUrl::List& urls ); 49 bool ripCd( const QString& device, const QString& profile, const QString& format, const QString& directory, const QString& notifyCommand ); setAutoClose(bool enabled)50 void setAutoClose( bool enabled ) { autoclose = enabled; } 51 void startConversion(); 52 void loadAutosaveFileList(); 53 void loadFileList(const QString& fileListPath); 54 void startupChecks(); 55 56 private slots: 57 void showConfigDialog(); 58 void showLogViewer( const int logId = 0 ); 59 void showReplayGainScanner(); 60 void replayGainScannerClosed(); 61 void showMainWindow(); 62 void showAboutPlugins(); 63 void progressChanged( const QString& progress ); 64 65 /** The conversion has started */ 66 void conversionStarted(); 67 /** The conversion has stopped */ 68 void conversionStopped( bool failed ); 69 70 private: 71 Config *config; 72 Logger *logger; 73 CDManager *cdManager; 74 QWeakPointer<ReplayGainScanner> replayGainScanner; 75 76 soundKonverterView *m_view; 77 LogViewer *logViewer; 78 79 KStatusNotifierItem *systemTray; 80 81 /// exit soundkonverter after all files have been converted 82 bool autoclose; 83 84 void setupActions(); 85 86 }; 87 88 #endif // _SOUNDKONVERTER_H_ 89