summaryrefslogtreecommitdiffstats
path: root/ksim/generalprefs.h
blob: 776348a1b70002c67608d8db02f67d76b5328c0c (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
/*  ksim - a system monitor for kde
 *
 *  Copyright (C) 2001  Robbie Ward <linuxphreak@gmx.co.uk>
 *
 *  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.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef GENERAL_H
#define GENERAL_H

#include <tqwidget.h>
#include <tqiconset.h>

class TQVBoxLayout;
class TQHBoxLayout;
class TQGridLayout;
class TQCheckBox;
class TQGroupBox;
class TQLabel;
class TQLineEdit;
class TQTabWidget;
class KComboBox;
class TQPopupMenu;
class TQPushButton;
class KIntSpinBox;

namespace KSim
{
  class Config;

  class GeneralPrefs : public TQWidget
  {
    Q_OBJECT
  TQ_OBJECT
    public:
      GeneralPrefs(TQWidget *parent, const char *name=0);
      ~GeneralPrefs();

    public slots:
      void saveConfig(KSim::Config *);
      void readConfig(KSim::Config *);

    private:
      TQGridLayout *m_mainLayout;
      TQGroupBox *m_sizeBox;
      TQLabel *m_sizeHLabel;
      KIntSpinBox *m_sizeHSpin;
      TQLabel *m_sizeWLabel;
      KIntSpinBox *m_sizeWSpin;
      TQCheckBox *m_displayFqdn;
      TQCheckBox *m_recolourThemes;
  };

  class ClockPrefs : public TQWidget
  {
    Q_OBJECT
  TQ_OBJECT
    public:
      ClockPrefs(TQWidget *parent, const char *name=0);
      ~ClockPrefs();

    public slots:
      void saveConfig(KSim::Config *);
      void readConfig(KSim::Config *);

    private:
      TQVBoxLayout *m_mainLayout;
      TQCheckBox *m_timeCheck;
      TQCheckBox *m_dateCheck;
  };

  class UptimePrefs : public TQWidget
  {
    Q_OBJECT
  TQ_OBJECT
    public:
      UptimePrefs(TQWidget *parent, const char *name=0);
      ~UptimePrefs();

    public slots:
      void saveConfig(KSim::Config *);
      void readConfig(KSim::Config *);

    private slots:
      void uptimeContextMenu(TQPopupMenu *);
      void insertUptimeItem();
      void removeUptimeItem();

    private:
      TQVBoxLayout *m_mainLayout;
      TQHBoxLayout *m_subLayout;
      TQVBoxLayout *m_boxLayout;
      KComboBox *m_uptimeCombo;
      TQPushButton *m_uptimeAdd;
      TQCheckBox *m_uptimeCheck;
      TQLabel *m_formatLabel;
      TQLabel *m_uptimeInfo;
      TQGroupBox *m_uptimeBox;
      TQLabel *m_udLabel;
      TQLabel *m_uhLabel;
      TQLabel *m_umLabel;
      TQLabel *m_usLabel;
      TQIconSet m_addIcon;
      TQIconSet m_removeIcon;
  };

  class MemoryPrefs : public TQWidget
  {
    Q_OBJECT
  TQ_OBJECT
    public:
      MemoryPrefs(TQWidget *parent, const char *name=0);
      ~MemoryPrefs();

    public slots:
      void saveConfig(KSim::Config *);
      void readConfig(KSim::Config *);

    private slots:
      void memoryContextMenu(TQPopupMenu *);
      void insertMemoryItem();
      void removeMemoryItem();

    private:
      TQVBoxLayout *m_mainLayout;
      TQHBoxLayout *m_subLayout;
      TQVBoxLayout *m_boxLayout;
      TQCheckBox *m_memCheck;
      TQLabel *m_memFormat;
      KComboBox *m_memCombo;
      TQLabel *m_memInfo;
      TQGroupBox *m_memBox;
      TQLabel *m_mtLabel;
      TQLabel *m_mfLabel;
      TQLabel *m_muLabel;
      TQLabel *m_mcLabel;
      TQLabel *m_mbLabel;
      TQLabel *m_msLabel;
      TQPushButton *m_memoryAdd;
      TQIconSet m_addIcon;
      TQIconSet m_removeIcon;
  };

  class SwapPrefs : public TQWidget
  {
    Q_OBJECT
  TQ_OBJECT
    public:
      SwapPrefs(TQWidget *parent, const char *name=0);
      ~SwapPrefs();

    public slots:
      void saveConfig(KSim::Config *);
      void readConfig(KSim::Config *);

    private slots:
      void swapContextMenu(TQPopupMenu *);
      void insertSwapItem();
      void removeSwapItem();

    private:
      TQVBoxLayout *m_mainLayout;
      TQHBoxLayout *m_subLayout;
      TQVBoxLayout *m_boxLayout;
      TQCheckBox *m_swapCheck;
      TQLabel *m_swapFormat;
      KComboBox *m_swapCombo;
      TQLabel *m_swapInfo;
      TQGroupBox *m_swapBox;
      TQLabel *m_stLabel;
      TQLabel *m_sfLabel;
      TQLabel *m_suLabel;
      TQPushButton *m_swapAdd;
      TQIconSet m_addIcon;
      TQIconSet m_removeIcon;
  };
}
#endif