blob: e743907d14b424f2ab5000c76b55498f537997fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#ifndef OPTIONSDETAILED_H
#define OPTIONSDETAILED_H
#include "outputdirectory.h"
#include "conversionoptions.h"
#include <qwidget.h>
class Config;
//class OutputDirectory;
class ConversionOptions;
class QLabel;
class KIntSpinBox;
class QCheckBox;
class KComboBox;
class KLineEdit;
class KToolBarButton;
/**
* @short The options widget for setting up the output options more detailed
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
class OptionsDetailed : public QWidget
{
Q_OBJECT
public:
/**
* Constructor
*/
OptionsDetailed( Config*, QWidget* parent=0, const char* name=0 );
/**
* Destructor
*/
virtual ~OptionsDetailed();
/**
* Return the current options
*/
ConversionOptions getCurrentOptions();
/**
* Set the current options
*/
void setCurrentOptions( const ConversionOptions& );
/**
* Refills the whole form (e.g. after a config change)
*/
void refill(); // TODO syncronize with optionsSimple
private:
KComboBox* cFormat;
KComboBox* cQualityMode;
KIntSpinBox* iQuality;
KComboBox* cBitrateMode;
QCheckBox* cBitrateRangeSwitch;
KIntSpinBox* iMinBitrate;
QLabel* lBitrateRangeTo;
KIntSpinBox* iMaxBitrate;
QLabel* lBitrateRangeUnit;
QCheckBox* cSamplingrateSwitch;
KComboBox* cSamplingrate;
QLabel* lSamplingrateUnit;
QCheckBox* cChannelsSwitch;
KComboBox* cChannels;
QCheckBox* cReplayGain;
KToolBarButton* pProfileSave;
KLineEdit* lUserOptions;
QWidget* normalOptions;
QWidget* advancedOptions;
OutputDirectory* outputDirectory;
Config* config;
// QString getQualityMode();
QString lastQualityMode;
/** because we can't search within combo boxes, we need a seperate string lists, that we can search */
QStringList sFormat;
QStringList sQualityMode;
QStringList sBitrateMode;
QStringList sChannels;
int formatIndex( const QString &string );
int qualityModeIndex( const QString &string );
int bitrateModeIndex( const QString &string );
int channelsIndex( const QString &string );
int getQuality();
bool getBitrateRangeEnabled();
bool getSamplingrateEnabled();
int getSamplingrate();
bool getChannelsEnabled();
QString getChannels();
private slots:
void formatChanged();
void qualityModeChanged();
void qualityChanged();
void bitrateModeChanged();
void bitrateRangeToggled();
void samplingrateToggled();
void channelsToggled();
void saveProfile();
void somethingChanged();
public:
QString getFormat();
OutputDirectory::Mode getOutputDirectoryMode();
QString getOutputDirectoryPath();
void setFormat( const QString &format );
void setQualityMode( const QString &qualityMode );
void setQuality( int quality );
void setBitrateMode( const QString &bitrateMode );
void setBitrateRangeEnabled( bool enabled );
void setMinBitrate( int bitrate );
void setMaxBitrate( int bitrate );
void setSamplingrateEnabled( bool enabled );
void setSamplingrate( int sampleRate );
void setSamplingrate( const QString &sampleRate );
void setChannelsEnabled( bool enabled );
void setChannels( const QString &channels );
void setReplayGainEnabled( bool enabled );
void setOutputDirectoryMode( OutputDirectory::Mode mode );
void setOutputDirectoryPath( const QString &path );
void setUserOptions( const QString &options );
public slots:
void toggleAdvancedOptions();
signals:
void optionsChanged();
};
#endif // OPTIONSDETAILED_H
|