Diffstat (limited to 'noncore/settings/appearance2/appearance.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 9638686..088171c 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -42,49 +42,49 @@ | |||
42 | #include <opie2/odebug.h> | 42 | #include <opie2/odebug.h> |
43 | 43 | ||
44 | #include <qpe/config.h> | 44 | #include <qpe/config.h> |
45 | #include <qpe/global.h> | 45 | #include <qpe/global.h> |
46 | #include <qpe/qpeapplication.h> | 46 | #include <qpe/qpeapplication.h> |
47 | #include <qpe/qpemessagebox.h> | 47 | #include <qpe/qpemessagebox.h> |
48 | #include <qpe/qcopenvelope_qws.h> | 48 | #include <qpe/qcopenvelope_qws.h> |
49 | #include <qpe/qpestyle.h> | 49 | #include <qpe/qpestyle.h> |
50 | #include <qpe/lightstyle.h> | 50 | #include <qpe/lightstyle.h> |
51 | #include <qpe/styleinterface.h> | 51 | #include <qpe/styleinterface.h> |
52 | 52 | ||
53 | /* QT */ | 53 | /* QT */ |
54 | #include <qbuttongroup.h> | 54 | #include <qbuttongroup.h> |
55 | #include <qcheckbox.h> | 55 | #include <qcheckbox.h> |
56 | #include <qcombobox.h> | 56 | #include <qcombobox.h> |
57 | #include <qdialog.h> | 57 | #include <qdialog.h> |
58 | #include <qdir.h> | 58 | #include <qdir.h> |
59 | #include <qlabel.h> | 59 | #include <qlabel.h> |
60 | #include <qlayout.h> | 60 | #include <qlayout.h> |
61 | #include <qlineedit.h> | 61 | #include <qlineedit.h> |
62 | #include <qlistbox.h> | 62 | #include <qlistbox.h> |
63 | #include <qmessagebox.h> | 63 | #include <qmessagebox.h> |
64 | #include <qpushbutton.h> | 64 | #include <qpushbutton.h> |
65 | #include <qradiobutton.h> | 65 | #include <qradiobutton.h> |
66 | #if QT_VERSION >= 300 | 66 | #if QT_VERSION >= 0x030000 |
67 | #include <qstylefactory.h> | 67 | #include <qstylefactory.h> |
68 | #endif | 68 | #endif |
69 | #include <qtoolbutton.h> | 69 | #include <qtoolbutton.h> |
70 | #include <qwindowsstyle.h> | 70 | #include <qwindowsstyle.h> |
71 | #include <qlistview.h> | 71 | #include <qlistview.h> |
72 | #include <qheader.h> | 72 | #include <qheader.h> |
73 | #include <qvbox.h> | 73 | #include <qvbox.h> |
74 | #include <qwhatsthis.h> | 74 | #include <qwhatsthis.h> |
75 | 75 | ||
76 | using namespace Opie; | 76 | using namespace Opie; |
77 | using namespace Opie::Ui; | 77 | using namespace Opie::Ui; |
78 | using namespace Opie::Core; | 78 | using namespace Opie::Core; |
79 | 79 | ||
80 | class DefaultWindowDecoration : public WindowDecorationInterface | 80 | class DefaultWindowDecoration : public WindowDecorationInterface |
81 | { | 81 | { |
82 | public: | 82 | public: |
83 | DefaultWindowDecoration() : ref(0) {} | 83 | DefaultWindowDecoration() : ref(0) {} |
84 | QString name() const | 84 | QString name() const |
85 | { | 85 | { |
86 | return "Default"; | 86 | return "Default"; |
87 | } | 87 | } |
88 | QPixmap icon() const | 88 | QPixmap icon() const |
89 | { | 89 | { |
90 | return QPixmap(); | 90 | return QPixmap(); |
@@ -109,49 +109,49 @@ private: | |||
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | ||
115 | 115 | ||
116 | QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg ) | 116 | QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg ) |
117 | { | 117 | { |
118 | QWidget* tab = new QWidget( parent, "StyleTab" ); | 118 | QWidget* tab = new QWidget( parent, "StyleTab" ); |
119 | QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 ); | 119 | QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 ); |
120 | 120 | ||
121 | m_style_list = new QListBox( tab, "m_style_list" ); | 121 | m_style_list = new QListBox( tab, "m_style_list" ); |
122 | vertLayout->addWidget( m_style_list ); | 122 | vertLayout->addWidget( m_style_list ); |
123 | QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) ); | 123 | QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) ); |
124 | 124 | ||
125 | m_style_settings = new QPushButton ( tr( "Settings..." ), tab ); | 125 | m_style_settings = new QPushButton ( tr( "Settings..." ), tab ); |
126 | connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked())); | 126 | connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked())); |
127 | vertLayout-> addWidget ( m_style_settings ); | 127 | vertLayout-> addWidget ( m_style_settings ); |
128 | QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) ); | 128 | QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) ); |
129 | 129 | ||
130 | QString s = cfg. readEntry ( "Style", "Light" ); | 130 | QString s = cfg. readEntry ( "Style", "Light" ); |
131 | 131 | ||
132 | 132 | ||
133 | #if QT_VERSION >= 300 | 133 | #if QT_VERSION >= 0x030000 |
134 | m_style_list->insertStringList(QStyleFactory::styles()); | 134 | m_style_list->insertStringList(QStyleFactory::styles()); |
135 | #else | 135 | #else |
136 | m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( ))); | 136 | m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( ))); |
137 | m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( ))); | 137 | m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( ))); |
138 | m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( ))); | 138 | m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( ))); |
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | { | 141 | { |
142 | QString path = QPEApplication::qpeDir ( ); | 142 | QString path = QPEApplication::qpeDir ( ); |
143 | path.append( "/plugins/styles/" ); | 143 | path.append( "/plugins/styles/" ); |
144 | QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); | 144 | QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); |
145 | 145 | ||
146 | for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) | 146 | for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) |
147 | { | 147 | { |
148 | QString libstr = path; | 148 | QString libstr = path; |
149 | libstr.append( "/" ); | 149 | libstr.append( "/" ); |
150 | libstr.append( *it ); | 150 | libstr.append( *it ); |
151 | QLibrary *lib = new QLibrary ( libstr ); | 151 | QLibrary *lib = new QLibrary ( libstr ); |
152 | StyleInterface *iface; | 152 | StyleInterface *iface; |
153 | 153 | ||
154 | if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface ) | 154 | if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface ) |
155 | { | 155 | { |
156 | StyleListItem *slit = new StyleListItem ( lib, iface ); | 156 | StyleListItem *slit = new StyleListItem ( lib, iface ); |
157 | m_style_list-> insertItem ( slit ); | 157 | m_style_list-> insertItem ( slit ); |