author | harlekin <harlekin> | 2003-03-24 20:51:53 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-24 20:51:53 (UTC) |
commit | e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1 (patch) (side-by-side diff) | |
tree | 9e07a20530b8e8777398f00337f9d6d05b74f1fb | |
parent | 2bf0790dac098fd24a20161f32cd848a87fe56ca (diff) | |
download | opie-e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1.zip opie-e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1.tar.gz opie-e0c0eaf4b77f87d27cd56ffae62bb8cc702753c1.tar.bz2 |
configuration for hte big busy cursor
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 52 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.h | 2 |
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 @@ -12,13 +12,13 @@ .i_,=:_. -<s. This file is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.= = ; Public License for more details. -++= -. .` .: +++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -59,13 +59,13 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name ) lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); m_list = new QListBox ( this ); lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); QWhatsThis::add ( m_list, tr( "foobar" )); - + QPushButton *p1, *p2, *p3; p1 = new QPushButton ( tr( "New" ), this ); lay-> addWidget ( p1, 1, 1 ); connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( ))); p2 = new QPushButton ( tr( "Edit" ), this ); @@ -75,35 +75,39 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name ) p3 = new QPushButton ( tr( "Delete" ), this ); lay-> addWidget ( p3, 3, 1 ); connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); lay-> setRowStretch ( 4, 10 ); + m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); + lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); + m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this ); - lay-> addMultiCellWidget ( m_busyblink, 5, 5, 0, 1 ); + lay-> addMultiCellWidget ( m_busyblink, 6, 6, 0, 1 ); p1-> setEnabled ( false ); p3-> setEnabled ( false ); init ( ); - + QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 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>." )); QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); + 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." )); QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." )); } void TabsSettings::init ( ) { AppLnkSet rootFolder( MimeType::appsFolderName ( )); QStringList types = rootFolder. types ( ); m_list-> insertItem ( tr( "All Tabs" )); m_ids << GLOBALID; - + for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); m_ids << *it; } QImage img ( Resource::loadImage ( "DocsIcon" )); QPixmap pix; @@ -111,17 +115,19 @@ void TabsSettings::init ( ) m_list-> insertItem ( pix, tr( "Documents" )); m_ids += "Documents"; // No tr Config cfg ( "Launcher" ); readTabSettings ( cfg ); - + cfg. setGroup ( "GUI" ); m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" ); + m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); } + void TabsSettings::readTabSettings ( Config &cfg ) { QString grp ( "Tab %1" ); // No tr m_tabs. clear ( ); TabConfig global_def; @@ -133,13 +139,13 @@ void TabsSettings::readTabSettings ( Config &cfg ) global_def. m_font_use = false; global_def. m_font_family = font ( ). family ( ); global_def. m_font_size = font ( ). pointSize ( ); global_def. m_font_weight = 50; global_def. m_font_italic = false; global_def. m_changed = false; - + for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; cfg. setGroup ( grp. arg ( *it )); @@ -164,25 +170,25 @@ void TabsSettings::readTabSettings ( Config &cfg ) if ( f. count ( ) == 4 ) { tc. m_font_use = true; tc. m_font_family = f [0]; tc. m_font_size = f [1]. toInt ( ); tc. m_font_weight = f [2]. toInt ( ); tc. m_font_italic = ( f [3]. toInt ( )); - } + } m_tabs [*it] = tc; } // if all tabs have the same config, then initialize the GLOBALID tab to these values - + TabConfig *first = 0; bool same = true; - + for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { if ( *it == GLOBALID ) continue; - else if ( !first ) + else if ( !first ) first = &m_tabs [*it]; else same &= ( *first == m_tabs [*it] ); } if ( same ) { m_tabs [GLOBALID] = *first; @@ -200,13 +206,13 @@ void TabsSettings::accept ( ) for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { TabConfig &tc = m_tabs [*it]; if ( !tc. m_changed ) continue; - + cfg. setGroup ( grp. arg ( *it )); switch ( tc. m_view ) { case TabConfig::Icon: cfg.writeEntry ( "View", "Icon" ); break; case TabConfig::List: @@ -224,13 +230,13 @@ void TabsSettings::accept ( ) if ( tc. m_font_use ) { QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); cfg. writeEntry ( "Font", f ); } else cfg. removeEntry ( "Font" ); - + QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); switch ( tc. m_bg_type ) { case TabConfig::Ruled: cfg.writeEntry( "BackgroundType", "Ruled" ); be << *it << tc. m_bg_type << QString(""); @@ -254,16 +260,18 @@ void TabsSettings::accept ( ) fe << tc. m_font_size; fe << tc. m_font_weight; fe << ( tc. m_font_italic ? 1 : 0 ); tc. m_changed = false; } - cfg. setGroup ( "GUI" ); + cfg. setGroup ( "GUI" ); QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" ); - cfg. writeEntry ( "BusyType", busytype ); + + cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); + { QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); e << busytype; } } @@ -272,39 +280,39 @@ void TabsSettings::newClicked ( ) QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); } void TabsSettings::deleteClicked ( ) { int ind = m_list-> currentItem ( ); - + if ( ind < 0 ) return; QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); } void TabsSettings::editClicked ( ) { int ind = m_list-> currentItem ( ); - + if ( ind < 0 ) return; TabConfig tc = m_tabs [m_ids [ind]]; - + TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); - d-> showMaximized ( ); + d-> showMaximized ( ); if ( d-> exec ( ) == QDialog::Accepted ) { tc. m_changed = true; m_tabs [m_ids [ind]] = tc; - + if ( m_ids [ind] == GLOBALID ) { for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { if ( *it != GLOBALID ) m_tabs [*it] = tc; - } + } } } - + delete d; } 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 @@ -56,13 +56,13 @@ protected: private: QListBox *m_list; // QString currentTab; QStringList m_ids; QMap <QString, TabConfig> m_tabs; - QCheckBox *m_busyblink; + QCheckBox *m_busyblink, *m_bigbusy; }; #endif |