summaryrefslogtreecommitdiffstats
path: root/src/libgui/config_center.h
blob: 0cc7cee07f2f923b68e5c1d0984353772e5fb82c (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
/***************************************************************************
 *   Copyright (C) 2005 Nicolas Hadacek <hadacek@kde.org>                  *
 *   Copyright (C) 2004 Alain Gibaud <alain.gibaud@free.fr>                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
#ifndef CONFIG_CENTER_H
#define CONFIG_CENTER_H

#include <tqcheckbox.h>
#include <tqlineedit.h>
#include <tqwidgetstack.h>

#include "common/gui/key_gui.h"
#include "common/gui/dialog.h"
#include "progs/gui/prog_config_widget.h"
#include "global_config.h"
namespace DeviceChooser { class Button; }
class SelectDirectoryWidget;
class ToolsConfigWidget;

//----------------------------------------------------------------------------
BEGIN_DECLARE_CONFIG_WIDGET(BaseGlobalConfig, BaseGlobalConfigWidget)
END_DECLARE_CONFIG_WIDGET

class GlobalConfigWidget : public BaseGlobalConfigWidget
{
Q_OBJECT
  
public:
  GlobalConfigWidget();
  virtual TQString title() const { return i18n("General"); }
  virtual TQString header() const { return i18n("General Configuration"); }
  virtual TQPixmap pixmap() const;
  virtual void loadConfig();

public slots:
  virtual void saveConfig();

private:
  KeyComboBox<Log::DebugLevel> *_showDebug;
};

//----------------------------------------------------------------------------
class StandaloneConfigWidget : public ConfigWidget
{
  Q_OBJECT
  
public:
  StandaloneConfigWidget();
  virtual void loadConfig();
  virtual TQString title() const { return i18n("Standalone File"); }
  virtual TQString header() const { return i18n("Standalone File Compilation"); }
  virtual TQPixmap pixmap() const;

public slots:
  virtual void saveConfig();

private:
  DeviceChooser::Button *_device;
  ToolsConfigWidget     *_tools;
};

//----------------------------------------------------------------------------
class ConfigCenter : public Dialog
{
Q_OBJECT
  
public:
  enum Type { General = 0, ProgSelect, ProgOptions, DebugOptions,
              Standalone, Nb_Types };
  ConfigCenter(Type showType, TQWidget *parent);

public slots:
  virtual void slotOk();
  virtual void slotApply();

private:
  TQWidget      *_pages[Nb_Types];
  ConfigWidget *_configWidgets[Nb_Types];

  static ConfigWidget *factory(Type type);
};

#endif