summaryrefslogtreecommitdiff
path: root/noncore/settings/appearance2/decolistitem.h
Unidiff
Diffstat (limited to 'noncore/settings/appearance2/decolistitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/decolistitem.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/noncore/settings/appearance2/decolistitem.h b/noncore/settings/appearance2/decolistitem.h
new file mode 100644
index 0000000..dfdce47
--- a/dev/null
+++ b/noncore/settings/appearance2/decolistitem.h
@@ -0,0 +1,79 @@
1#ifndef DECOLISTITEM_H
2#define DECOLISTITEM_H
3
4#include <qpe/windowdecorationinterface.h>
5#include <qlistbox.h>
6
7class DecoListItem : public QListBoxText {
8public:
9 DecoListItem ( const QString &t ) : QListBoxText ( t )
10 {
11 m_lib = 0;
12 m_window_if = 0;
13 // m_settings_if = 0;
14 }
15
16 DecoListItem ( QLibrary *lib, WindowDecorationInterface *iface ) : QListBoxText ( iface-> name ( ))
17 {
18 m_lib = lib;
19 m_window_if = iface;
20
21 // iface-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &m_settings_if );
22 }
23
24 virtual ~DecoListItem ( )
25 {
26 // if ( m_settings_if )
27 // m_settings_if-> release ( );
28 if ( m_window_if )
29 m_window_if-> release ( );
30 delete m_lib;
31 }
32
33 bool hasSettings ( ) const
34 {
35 // return ( m_settings_if );
36 return false;
37 }
38
39 QWidget *settings ( QWidget * /*parent*/ )
40 {
41 // return m_settings_if ? m_settings_if-> create ( parent ) : 0;
42 return 0;
43 }
44
45 bool setSettings ( bool /*accepted*/ )
46 {
47 // if ( !m_settings_if )
48 // return false;
49
50 // if ( accepted )
51 // return m_settings_if-> accept ( );
52 // else {
53 // m_settings_if-> reject ( );
54 // return false;
55 // }
56 return false;
57 }
58
59 QString key ( )
60 {
61 if ( m_window_if )
62 return QString ( m_window_if-> name ( ));
63 else
64 return text ( );
65 }
66
67 WindowDecorationInterface *interface ( )
68 {
69 return m_window_if;
70 }
71
72private:
73 QLibrary *m_lib;
74 WindowDecorationInterface *m_window_if;
75 //WindowDecorationSettingsInterface *m_settings_if;
76
77};
78
79#endif \ No newline at end of file