summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-24 20:51:53 (UTC)
committer harlekin <harlekin>2003-03-24 20:51:53 (UTC)
commite0c0eaf4b77f87d27cd56ffae62bb8cc702753c1 (patch) (unidiff)
tree9e07a20530b8e8777398f00337f9d6d05b74f1fb
parent2bf0790dac098fd24a20161f32cd848a87fe56ca (diff)
downloadopie-e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1.zip
opie-e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1.tar.gz
opie-e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1.tar.bz2
configuration for hte big busy cursor
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabssettings.cpp52
-rw-r--r--core/settings/launcher/tabssettings.h2
2 files changed, 31 insertions, 23 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 9d6e8c1..7cd00bd 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -16,5 +16,5 @@
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
@@ -63,5 +63,5 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
63 63
64 QWhatsThis::add ( m_list, tr( "foobar" )); 64 QWhatsThis::add ( m_list, tr( "foobar" ));
65 65
66 QPushButton *p1, *p2, *p3; 66 QPushButton *p1, *p2, *p3;
67 p1 = new QPushButton ( tr( "New" ), this ); 67 p1 = new QPushButton ( tr( "New" ), this );
@@ -79,6 +79,9 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
79 lay-> setRowStretch ( 4, 10 ); 79 lay-> setRowStretch ( 4, 10 );
80 80
81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
83
81 m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this ); 84 m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_busyblink, 5, 5, 0, 1 ); 85 lay-> addMultiCellWidget ( m_busyblink, 6, 6, 0, 1 );
83 86
84 p1-> setEnabled ( false ); 87 p1-> setEnabled ( false );
@@ -86,9 +89,10 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
86 89
87 init ( ); 90 init ( );
88 91
89 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." ));
90 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 93 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
91 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); 94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." ));
92 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 95 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
96 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." ));
93 QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." )); 97 QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." ));
94} 98}
@@ -101,5 +105,5 @@ void TabsSettings::init ( )
101 m_list-> insertItem ( tr( "All Tabs" )); 105 m_list-> insertItem ( tr( "All Tabs" ));
102 m_ids << GLOBALID; 106 m_ids << GLOBALID;
103 107
104 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
105 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); 109 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it ));
@@ -115,9 +119,11 @@ void TabsSettings::init ( )
115 119
116 readTabSettings ( cfg ); 120 readTabSettings ( cfg );
117 121
118 cfg. setGroup ( "GUI" ); 122 cfg. setGroup ( "GUI" );
119 m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" ); 123 m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" );
124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
120} 125}
121 126
127
122void TabsSettings::readTabSettings ( Config &cfg ) 128void TabsSettings::readTabSettings ( Config &cfg )
123{ 129{
@@ -137,5 +143,5 @@ void TabsSettings::readTabSettings ( Config &cfg )
137 global_def. m_font_italic = false; 143 global_def. m_font_italic = false;
138 global_def. m_changed = false; 144 global_def. m_changed = false;
139 145
140 146
141 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 147 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
@@ -168,17 +174,17 @@ void TabsSettings::readTabSettings ( Config &cfg )
168 tc. m_font_weight = f [2]. toInt ( ); 174 tc. m_font_weight = f [2]. toInt ( );
169 tc. m_font_italic = ( f [3]. toInt ( )); 175 tc. m_font_italic = ( f [3]. toInt ( ));
170 } 176 }
171 m_tabs [*it] = tc; 177 m_tabs [*it] = tc;
172 } 178 }
173 179
174 // if all tabs have the same config, then initialize the GLOBALID tab to these values 180 // if all tabs have the same config, then initialize the GLOBALID tab to these values
175 181
176 TabConfig *first = 0; 182 TabConfig *first = 0;
177 bool same = true; 183 bool same = true;
178 184
179 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 185 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
180 if ( *it == GLOBALID ) 186 if ( *it == GLOBALID )
181 continue; 187 continue;
182 else if ( !first ) 188 else if ( !first )
183 first = &m_tabs [*it]; 189 first = &m_tabs [*it];
184 else 190 else
@@ -204,5 +210,5 @@ void TabsSettings::accept ( )
204 if ( !tc. m_changed ) 210 if ( !tc. m_changed )
205 continue; 211 continue;
206 212
207 cfg. setGroup ( grp. arg ( *it )); 213 cfg. setGroup ( grp. arg ( *it ));
208 switch ( tc. m_view ) { 214 switch ( tc. m_view ) {
@@ -228,5 +234,5 @@ void TabsSettings::accept ( )
228 else 234 else
229 cfg. removeEntry ( "Font" ); 235 cfg. removeEntry ( "Font" );
230 236
231 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); 237 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
232 238
@@ -258,8 +264,10 @@ void TabsSettings::accept ( )
258 tc. m_changed = false; 264 tc. m_changed = false;
259 } 265 }
260 cfg. setGroup ( "GUI" ); 266 cfg. setGroup ( "GUI" );
261 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" ); 267 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" );
262
263 cfg. writeEntry ( "BusyType", busytype ); 268 cfg. writeEntry ( "BusyType", busytype );
269
270 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
271
264 { 272 {
265 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); 273 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
@@ -276,5 +284,5 @@ void TabsSettings::deleteClicked ( )
276{ 284{
277 int ind = m_list-> currentItem ( ); 285 int ind = m_list-> currentItem ( );
278 286
279 if ( ind < 0 ) 287 if ( ind < 0 )
280 return; 288 return;
@@ -286,25 +294,25 @@ void TabsSettings::editClicked ( )
286{ 294{
287 int ind = m_list-> currentItem ( ); 295 int ind = m_list-> currentItem ( );
288 296
289 if ( ind < 0 ) 297 if ( ind < 0 )
290 return; 298 return;
291 299
292 TabConfig tc = m_tabs [m_ids [ind]]; 300 TabConfig tc = m_tabs [m_ids [ind]];
293 301
294 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); 302 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true );
295 303
296 d-> showMaximized ( ); 304 d-> showMaximized ( );
297 if ( d-> exec ( ) == QDialog::Accepted ) { 305 if ( d-> exec ( ) == QDialog::Accepted ) {
298 tc. m_changed = true; 306 tc. m_changed = true;
299 m_tabs [m_ids [ind]] = tc; 307 m_tabs [m_ids [ind]] = tc;
300 308
301 if ( m_ids [ind] == GLOBALID ) { 309 if ( m_ids [ind] == GLOBALID ) {
302 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 310 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
303 if ( *it != GLOBALID ) 311 if ( *it != GLOBALID )
304 m_tabs [*it] = tc; 312 m_tabs [*it] = tc;
305 } 313 }
306 } 314 }
307 } 315 }
308 316
309 delete d; 317 delete d;
310} 318}
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h
index 47fcee2..439def6 100644
--- a/core/settings/launcher/tabssettings.h
+++ b/core/settings/launcher/tabssettings.h
@@ -60,5 +60,5 @@ private:
60 QStringList m_ids; 60 QStringList m_ids;
61 QMap <QString, TabConfig> m_tabs; 61 QMap <QString, TabConfig> m_tabs;
62 QCheckBox *m_busyblink; 62 QCheckBox *m_busyblink, *m_bigbusy;
63}; 63};
64 64