Diffstat (limited to 'core/settings/launcher/tabssettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index 8f5f7fa..6cc69c0 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp @@ -30,24 +30,25 @@ #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/applnk.h> #include <qpe/mimetype.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> #include <qlistbox.h> #include <qpushbutton.h> #include <qlayout.h> #include <qlabel.h> #include <qwhatsthis.h> +#include <qcheckbox.h> #include "tabdialog.h" #include <stdlib.h> #include <qmessagebox.h> TabsSettings::TabsSettings ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); @@ -66,48 +67,55 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name ) connect ( p, SIGNAL( clicked ( )), this, SLOT( newClicked ( ))); p = new QPushButton ( tr( "Edit" ), this ); lay-> addWidget ( p, 2, 1 ); connect ( p, SIGNAL( clicked ( )), this, SLOT( editClicked ( ))); p = new QPushButton ( tr( "Delete" ), this ); lay-> addWidget ( p, 3, 1 ); connect ( p, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); lay-> setRowStretch ( 4, 10 ); + m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this ); + lay-> addMultiCellWidget ( m_busyblink, 5, 5, 0, 1 ); + init ( ); } void TabsSettings::init ( ) { AppLnkSet rootFolder( MimeType::appsFolderName ( )); QStringList types = rootFolder. types ( ); 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; pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); m_list-> insertItem ( pix, tr( "Documents" )); m_ids += "Documents"; // No tr - readTabSettings ( ); + Config cfg ( "Launcher" ); + + readTabSettings ( cfg ); + + cfg. setGroup ( "GUI" ); + m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" ); } -void TabsSettings::readTabSettings ( ) +void TabsSettings::readTabSettings ( Config &cfg ) { - Config cfg ( "Launcher" ); QString grp ( "Tab %1" ); // No tr m_tabs. clear ( ); for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { TabConfig tc; tc. m_view = TabConfig::Icon; tc. m_bg_type = TabConfig::Ruled; tc. m_changed = false; cfg. setGroup ( grp. arg ( *it )); QString view = cfg. readEntry ( "View", "Icon" ); @@ -189,24 +197,32 @@ void TabsSettings::accept ( ) } QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); te << *it << tc. m_text_color; QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); fe << *it << tc. m_font_family; fe << tc. m_font_size; fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 ); tc. m_changed = false; } + cfg. setGroup ( "GUI" ); + QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" ); + + cfg. writeEntry ( "BusyType", busytype ); + { + QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); + e << busytype; + } } void TabsSettings::newClicked ( ) { QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); } void TabsSettings::deleteClicked ( ) { int ind = m_list-> currentItem ( ); if ( ind < 0 ) |