summaryrefslogtreecommitdiffstats
path: root/src/options.h
blob: 65c566b54cbda1865081997ba123b4436ac9b568 (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


#ifndef OPTIONS_H
#define OPTIONS_H

#include <tqwidget.h>

#include "conversionoptions.h"

#include <kio/jobclasses.h>

class OptionsSimple;
class OptionsDetailed;
class Config;

class TQStringList;
class KTabWidget;
class KPushButton;


/**
 * All we need to know about a profile
 */
struct ProfileData
{
    TQString name;
    ConversionOptions options;
};


/**
 * The data pool
 */
// struct OptionsData
// {
//     TQString name;
//     ConversionOptions options;
// };


/**
 * @short The widget, where we can set our output options
 * @author Daniel Faust <[email protected]>
 * @version 0.3
 */
class Options : public TQWidget
{
    Q_OBJECT
  TQ_OBJECT
public:
    /**
     * Constructor
     */
    Options( Config*, const TQString &text, TQWidget* tqparent = 0, const char* name = 0 );

    /**
     * Destructor
     */
    virtual ~Options();

    /**
     * Return the current options
     */
    ConversionOptions getCurrentOptions();

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

    /**
     * Set the current profile
     */
    void setProfile( const TQString& );

    /**
     * Set the current format
     */
    void setFormat( const TQString& );

    /**
     * Set the current output directory
     */
    void setOutputDirectory( const TQString& );

private:
    /** Toggle between normal and advanced options in the detailed tab */
    KPushButton* pAdvancedOptionsToggle;

    //** Notify the user about new plugins */
//     KPushButton* pPluginsNotify;
    /** Notify the user about new / lost backends */
    KPushButton* pBackendsNotify;

    KTabWidget* tab;

    OutputDirectory* outputDirectory;

    OptionsSimple* optionsSimple;
    OptionsDetailed* optionsDetailed;

    Config *config;

    KIO::FileCopyJob* getPluginListJob;

    // /** Copy all options from the detailed tab to the simple tab / find the matching profile */
    //void updateSimpleTab();

private slots:
    void tabChanged( TQWidget* );
    void somethingChanged();
    void configChanged();
//     void getPluginListFinished( KIO::Job* job );
//     void showConfigDialogPlugins();
    void showConfigDialogBackends();

signals:
    void optionsChanged();
    void showConfigPluginsPage();
    void showConfigEnvironmentPage();
};

#endif // OPTIONS_H