1 2 3 #ifndef OPTIONSSIMPLE_H 4 #define OPTIONSSIMPLE_H 5 6 // #include "outputdirectory.h" 7 // #include "conversionoptions.h" 8 9 #include <QWidget> 10 11 class Config; 12 class OutputDirectory; 13 // class ConversionOptions; 14 // class OptionsDetailed; 15 16 class KToolBarButton; 17 class KPushButton; 18 class QLabel; 19 class QCheckBox; 20 class KComboBox; 21 class CodecPlugin; 22 23 /** 24 * @short The options widget for setting up the output options very easy 25 * @author Daniel Faust <hessijames@gmail.com> 26 * @version 0.3 27 */ 28 class OptionsSimple : public QWidget 29 { 30 Q_OBJECT 31 public: 32 /** Constructor */ 33 OptionsSimple( Config *_config, /*OptionsDetailed*,*/ const QString &text, QWidget* parent ); 34 35 /** Detructor */ 36 ~OptionsSimple(); 37 38 void init(); 39 40 /** Set the current options */ 41 // void setCurrentOptions( const ConversionOptions& ); 42 43 /** Refills the whole form (e.g. after a config change) */ 44 // void refill(); // TODO syncronize with optionsDetailed 45 // 46 void setCurrentProfile( const QString& profile ); 47 void setCurrentFormat( const QString& format ); 48 void setCurrentOutputDirectory( const QString& directory ); 49 void setCurrentOutputDirectoryMode( int mode ); 50 void setReplayGainEnabled( bool enabled, const QString& toolTip = "" ); 51 void setReplayGainChecked( bool enabled ); 52 // void setBpmChecked( bool enabled ) { return cBpm->setChecked( enabled ); } setCurrentPlugin(CodecPlugin * plugin)53 void setCurrentPlugin( CodecPlugin *plugin ) { currentPlugin = plugin; } 54 55 QString currentProfile(); 56 QString currentFormat(); 57 bool isReplayGainChecked(); 58 // bool isBpmChecked() { return cBpm->isChecked(); } 59 60 OutputDirectory *outputDirectory; // this way it's easier to sync simple and detailed options 61 62 private: 63 KComboBox* cProfile; 64 KPushButton* pProfileRemove; 65 KPushButton* pProfileInfo; 66 KComboBox* cFormat; 67 KPushButton* pFormatInfo; 68 69 QCheckBox *cReplayGain; 70 // QCheckBox *cBpm; 71 QLabel *lEstimSize; 72 73 Config *config; 74 CodecPlugin *currentPlugin; 75 76 public slots: 77 void currentDataRateChanged( int dataRate ); 78 void updateProfiles(); 79 80 private slots: 81 void showHelp(); 82 void profileInfo(); 83 void profileRemove(); 84 void formatInfo(); 85 void profileChanged(); 86 // void formatChanged(); 87 void outputDirectoryChanged(); 88 89 void somethingChanged(); 90 91 signals: 92 void optionsChanged(); 93 void customProfilesEdited(); 94 }; 95 96 #endif 97