1 
2 #ifndef OPTIONSDETAILED_H
3 #define OPTIONSDETAILED_H
4 
5 #include <QCheckBox>
6 #include <QDomDocument>
7 #include <QMap>
8 #include <QWidget>
9 
10 class CodecPlugin;
11 class Config;
12 class ConversionOptions;
13 class FilterPlugin;
14 class OutputDirectory;
15 class CodecWidget;
16 class FilterWidget;
17 
18 class KComboBox;
19 class KPushButton;
20 class QGridLayout;
21 class QLabel;
22 class QToolButton;
23 
24 
25 /**
26 	@author Daniel Faust <hessijames@gmail.com>
27 */
28 class OptionsDetailed : public QWidget
29 {
30     Q_OBJECT
31 public:
32     OptionsDetailed( Config *_config, QWidget *parent );
33     ~OptionsDetailed();
34 
35     void init();
36 
37     /** Return the current options */
38     ConversionOptions *currentConversionOptions( bool saveLastUsed = true );
39     /** Set the current options */
40     bool setCurrentConversionOptions( const ConversionOptions *conversionOptions );
41 
42     QString currentProfile();
43     bool setCurrentProfile( const QString& profile );
44     QString currentFormat();
45     void setCurrentFormat( const QString& format );
46     void resetFilterOptions();
47     void setReplayGainChecked( bool enabled );
48 
49     bool isReplayGainEnabled( QString *toolTip = 0 );
50     bool isReplayGainChecked();
51     CodecPlugin *getCurrentPlugin();
52 
53     OutputDirectory *outputDirectory; // this way it's easier to sync simple and detailed options
54 
55 //     QSize sizeHint();
56 
57 private:
58     QGridLayout *grid;
59     KComboBox *cFormat;
60     QLabel *lPlugin;
61     KComboBox *cPlugin;
62     KPushButton *pConfigurePlugin;
63     CodecWidget *wPlugin;
64     QMap<FilterWidget*,FilterPlugin*> wFilter;
65     QCheckBox *cReplayGain;
66     QLabel *lEstimSize;
67     KPushButton *pProfileSave;
68     QToolButton *pProfileLoad;
69 
70     Config *config;
71 
72     CodecPlugin *currentPlugin;
73 
74 //     QSize size_hint;
75 
76 public slots:
77     void somethingChanged();
78     void loadCustomProfileButtonClicked();
79     bool saveCustomProfile( bool lastUsed = false );
80     void updateProfiles();
81 
82 private slots:
83     void formatChanged( const QString& format );
84     void encoderChanged( const QString& encoder );
85     void configurePlugin();
86 
87 signals:
88     // connected to optionsSimple
89     void currentDataRateChanged( int rate );
90 //     void optionsChanged();
91     void customProfilesEdited();
92 };
93 
94 #endif
95