summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/otabwidget.h
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/otabwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/otabwidget.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/settings/sysinfo/otabwidget.h b/noncore/settings/sysinfo/otabwidget.h
new file mode 100644
index 0000000..4588cb9
--- a/dev/null
+++ b/noncore/settings/sysinfo/otabwidget.h
@@ -0,0 +1,62 @@
1/**********************************************************************
2** OTabWidget
3**
4** Modified tab widget control
5**
6** Copyright (C) 2002, Dan Williams
7** williamsdr@acm.org
8** http://draknor.net
9**
10** This file may be distributed and/or modified under the terms of the
11** GNU General Public License version 2 as published by the Free Software
12** Foundation and appearing in the file LICENSE.GPL included in the
13** packaging of this file.
14**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17**
18**********************************************************************/
19
20#ifndef OTABWIDGET_H
21#define OTABWIDGET_H
22
23#include <qtabwidget.h>
24
25class TabInfo
26{
27public:
28 TabInfo() : c( 0 ), i( 0 ), l( QString::null ) {}
29 TabInfo( QWidget *control, const QString &icon, const QString &label )
30 : c( control ), i( icon ), l( label ) {}
31 QString label() const { return l; }
32 QWidget *control() const { return c; }
33 QString icon() const { return i; }
34
35private:
36 QWidget *c;
37 QString i;
38 QString l;
39};
40
41typedef QValueList<TabInfo> TabInfoList;
42
43class OTabWidget : public QTabWidget
44{
45 Q_OBJECT
46public:
47 OTabWidget( QWidget *, const char * );
48 ~OTabWidget();
49
50 void addTab( QWidget *, const QString &, const QString & );
51
52private:
53 TabInfoList Tabs;
54 TabInfoList::Iterator CurrentTab;
55
56 QPixmap loadSmooth( const QString & );
57
58private slots:
59 void tabChangedSlot( QWidget * );
60};
61
62#endif