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


#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H

#include <kdialogbase.h>

#include <tqmap.h>


class Config;
class ConfigGeneralPage;
class ConfigPluginsPage;
class ConfigEnvironmentPage;
class ConfigBackendsPage;

/**
 * @short Config dialog
 * @author Daniel Faust <[email protected]>
 * @version 0.3
 */
class ConfigDialog : public KDialogBase
{
    Q_OBJECT
  TQ_OBJECT
public:
    enum Page {
        GeneralPage,
        PluginsPage,
        EnvironmentPage,
        BackendsPage
    };

    /**
     * Constructor
     */
    ConfigDialog( Config*, TQWidget *parent = 0, const char *name = 0, Page startPage = GeneralPage );

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

private:
    TQFrame* addPage( const TQString &itemName, const TQString &iconName );

    TQFrame* generalPage;
    ConfigGeneralPage* configGeneralPage;
    TQFrame* pluginsPage;
    ConfigPluginsPage* configPluginsPage;
    TQFrame* environmentPage;
    ConfigEnvironmentPage* configEnvironmentPage;
    TQFrame* backendsPage;
    ConfigBackendsPage* configBackendsPage;

    void setConfigChanged( const bool );

    Config* config;

    TQMap<TQString, TQString> binaries;

private slots:
    void configChanged();
    void okClickedSlot();
    void applyClickedSlot();
    void defaultClickedSlot();

signals:
    void saveGeneral();
    void savePlugins();
    void saveEnvironment();
    void saveBackends();

    void resetGeneral();
    void resetPlugins();
    void resetEnvironment();
    void resetBackends();
};

#endif // CONFIGDIALOG_H