Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 3fc5830..097965b 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp @@ -26,12 +26,13 @@ #include <qtabwidget.h> #include <qlayout.h> #include <qheader.h> #include <qhbox.h> #include <qvbox.h> #include <qtoolbutton.h> +#include <qtooltip.h> class ToolButton : public QToolButton { public: ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) : QToolButton( parent, name ) { @@ -78,17 +79,25 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags tab3Layout->setMargin( 20 ); QHBox *hbox_auto = new QHBox( tab_3 ); TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); QHBox *hbox_inactive = new QHBox( tab_3 ); - TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); + TimeLabel = new QLabel( hbox_inactive, "TimeLabel" ); TimeLabel->setText( tr( "minutes inactive" ) ); SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); + QHBox *hbox_iconSize = new QHBox( tab_3 ); + QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" ); + iconSizeLabel->setText( tr( "Icon size" ) ); + // iconSizeLabel->setToolTip( tr( "Set the icon size in pixel" ) ); + SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" ); + SpinBoxIconSize->setMaxValue( 32 ); + tab3Layout->addWidget( hbox_auto ); tab3Layout->addWidget( hbox_inactive ); + tab3Layout->addWidget( hbox_iconSize ); TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); m_applets_changed = false; connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); @@ -105,13 +114,13 @@ void TodayConfig::setAutoStart() { Config cfg( "today" ); cfg.setGroup( "Autostart" ); if ( m_autoStart ) { QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); e << QString( "add" ); e << QString( "today" ); - e << QString("%1").arg( m_autoStartTimer ); + e << QString( "%1" ).arg( m_autoStartTimer ); } else { QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); e << QString( "remove" ); e << QString( "today" ); } } @@ -124,12 +133,16 @@ void TodayConfig::readConfig() { cfg.setGroup( "Autostart" ); m_autoStart = cfg.readNumEntry( "autostart", 1 ); CheckBoxAuto->setChecked( m_autoStart ); m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); SpinBoxTime->setValue( m_autoStartTimer ); + cfg.setGroup( "General" ); + m_iconSize = cfg.readNumEntry( "IconSize", 18 ); + SpinBoxIconSize->setValue( m_iconSize ); + cfg.setGroup( "Plugins" ); m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); } /** * Write the config part @@ -165,12 +178,17 @@ void TodayConfig::writeConfig() { cfg.setGroup( "Autostart" ); m_autoStart = CheckBoxAuto->isChecked(); cfg.writeEntry( "autostart", m_autoStart ); m_autoStartTimer = SpinBoxTime->value(); cfg.writeEntry( "autostartdelay", m_autoStartTimer ); + m_iconSize = SpinBoxIconSize->value(); + + cfg.setGroup( "General" ); + cfg.writeEntry( "IconSize", m_iconSize ); + // set autostart settings setAutoStart(); } |