summaryrefslogtreecommitdiffstats
path: root/src/optionssimple.h
blob: bb88d22dab30c80452f9620a056c90bc315b5136 (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


#ifndef OPTIONSSIMPLE_H
#define OPTIONSSIMPLE_H

#include "outputdirectory.h"
#include "conversionoptions.h"

#include <qwidget.h>

class Config;
class ConversionOptions;
class OptionsDetailed;

class KComboBox;
class KToolBarButton;
class KPushButton;

/**
 * @short The options widget for setting up the output options very easy
 * @author Daniel Faust <hessijames@gmail.com>
 * @version 0.3
 */
class OptionsSimple : public QWidget
{
    Q_OBJECT
public:
    /**
     * Constructor
     */
    OptionsSimple( Config*, OptionsDetailed*, const QString &text, QWidget* parent=0, const char* name=0 );

    /**
     * Detructor
     */
    virtual ~OptionsSimple();

    /**
     * Set the current options
     */
//     void setCurrentOptions( const ConversionOptions& );

    /**
     * Refills the whole form (e.g. after a config change)
     */
    void refill(); // TODO syncronize with optionsDetailed

    void setCurrentProfile( const QString& profile );
    void setCurrentFormat( const QString& format );
    void setCurrentOutputDirectory( const QString& directory );

private:
    KComboBox* cProfile;
    KPushButton* pProfileRemove;
    KPushButton* pProfileInfo;
    KComboBox* cFormat;
    KPushButton* pFormatInfo;

    OutputDirectory* outputDirectory;

    Config* config;
    OptionsDetailed* optionsDetailed;

    QStringList sProfile;
    QStringList sFormat;

    int profileIndex( const QString& string );
    int formatIndex( const QString& string );

//public slots:
//    void setProfile( const QString &profile );
//    void setFormat( const QString &format );

private slots:
    void profileInfo();
    void profileRemove();
    void formatInfo();
    void profileChanged();
    void formatChanged();
    void outputDirectoryModeChanged( OutputDirectory::Mode );
    void outputDirectoryPathChanged( const QString& );

    void somethingChanged();

signals:
//     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 );
//     void setOutputDirectoryPath( const QString& directory );
//     void setOptions( const ConversionOptions& options );
//     void setUserOptions( const QString& options );

    void optionsChanged();
};

#endif