author | sandman <sandman> | 2002-09-20 01:42:10 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-20 01:42:10 (UTC) |
commit | b1f3d33cb0b3f203f153074a8812d5988c3031b2 (patch) (unidiff) | |
tree | 1734ac2808dab8f0982b23a2a9101486fcdcfee5 /noncore/settings/appearance2/decolistitem.h | |
parent | 9204c61f669fb265f6c5f14bfd6ca363a2929e40 (diff) | |
download | opie-b1f3d33cb0b3f203f153074a8812d5988c3031b2.zip opie-b1f3d33cb0b3f203f153074a8812d5988c3031b2.tar.gz opie-b1f3d33cb0b3f203f153074a8812d5988c3031b2.tar.bz2 |
New experimental appearance settings
Diffstat (limited to 'noncore/settings/appearance2/decolistitem.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/decolistitem.h | 79 |
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 | |||
7 | class DecoListItem : public QListBoxText { | ||
8 | public: | ||
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 | |||
72 | private: | ||
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 | ||