summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/configpage.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/kresources/configpage.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'microkde/kresources/configpage.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/configpage.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/microkde/kresources/configpage.h b/microkde/kresources/configpage.h
new file mode 100644
index 0000000..492ea54
--- a/dev/null
+++ b/microkde/kresources/configpage.h
@@ -0,0 +1,103 @@
1/*
2 This file is part of libkresources.
3 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
4 Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
20*/
21
22
23#ifndef KRESOURCES_CONFIGPAGE_H
24#define KRESOURCES_CONFIGPAGE_H
25
26#include <qstringlist.h>
27#include <qwidget.h>
28
29#include "manager.h"
30
31class KComboBox;
32class KListView;
33
34class QListViewItem;
35class QPushButton;
36
37
38namespace KRES {
39
40class ResourcePageInfo
41{
42 public:
43 Manager<Resource> *mManager;
44 KConfig *mConfig;
45};
46
47class Resource;
48
49class ConfigPage : public QWidget, public ManagerListener<Resource>
50{
51 Q_OBJECT
52
53 public:
54 ConfigPage( QWidget *parent = 0, const char *name = 0 );
55 virtual ~ConfigPage();
56
57 void load();
58 void save();
59 virtual void defaults();
60
61 public slots:
62 void slotFamilyChanged( int );
63 void slotAdd();
64 void slotRemove();
65 void slotEdit();
66 void slotStandard();
67 void slotSelectionChanged();
68
69 // From ManagerListener<Resource>
70 public:
71 virtual void resourceAdded( Resource* resource );
72 virtual void resourceModified( Resource* resource );
73 virtual void resourceDeleted( Resource* resource );
74
75 protected slots:
76 void slotItemClicked( QListViewItem * );
77
78 signals:
79 void changed( bool );
80
81 private:
82 void saveResourceSettings();
83
84 Manager<Resource>* mCurrentManager;
85 KConfig* mCurrentConfig;
86 KConfig* mConfig;
87 QString mFamily;
88 QStringList mFamilyMap;
89 QValueList<ResourcePageInfo> mInfoMap;
90
91 KComboBox* mFamilyCombo;
92 KListView* mListView;
93 QPushButton* mAddButton;
94 QPushButton* mRemoveButton;
95 QPushButton* mEditButton;
96 QPushButton* mStandardButton;
97
98 QListViewItem* mLastItem;
99};
100
101}
102
103#endif