Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 73 |
1 files changed, 16 insertions, 57 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index a60f1d2..bfb5ec6 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -3,3 +3,3 @@ | |||
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
@@ -78,50 +78,9 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
78 | 78 | ||
79 | // Misc tab | ||
79 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 80 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
80 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 81 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
81 | tab3Layout->setMargin( 20 ); | 82 | |
82 | QHBox *hbox_auto = new QHBox( tab_3 ); | 83 | m_guiMisc = new TodayConfigMiscBase( tab_3 ); |
83 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); | 84 | |
84 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); | 85 | tab3Layout->addWidget( m_guiMisc ); |
85 | QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) ); | ||
86 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); | ||
87 | QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); | ||
88 | |||
89 | QHBox *hbox_hide = new QHBox( tab_3 ); | ||
90 | TextLabel4 = new QLabel( hbox_hide, "HideBanner" ); | ||
91 | TextLabel4->setText( tr( "Tiny Banner" ) ); | ||
92 | //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) ); | ||
93 | CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" ); | ||
94 | // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); | ||
95 | |||
96 | QHBox *hbox_inactive = new QHBox( tab_3 ); | ||
97 | TimeLabel = new QLabel( hbox_inactive, "TimeLabel" ); | ||
98 | TimeLabel->setText( tr( "minutes inactive" ) ); | ||
99 | QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) ); | ||
100 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); | ||
101 | SpinBoxTime->setMaxValue ( 1440 ); | ||
102 | QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) ); | ||
103 | QHBox *hbox_iconSize = new QHBox( tab_3 ); | ||
104 | QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" ); | ||
105 | iconSizeLabel->setText( tr( "Icon size" ) ); | ||
106 | QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) ); | ||
107 | SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" ); | ||
108 | SpinBoxIconSize->setMaxValue( 32 ); | ||
109 | QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) ); | ||
110 | |||
111 | QHBox *hbox_refresh = new QHBox( tab_3 ); | ||
112 | QLabel *refreshLabel = new QLabel( hbox_refresh ); | ||
113 | refreshLabel->setText( tr( "Refresh" ) ); | ||
114 | QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) ); | ||
115 | SpinRefresh = new QSpinBox( hbox_refresh ); | ||
116 | SpinRefresh->setMinValue( 0 ); | ||
117 | SpinRefresh->setSuffix( tr( " sec" ) ); | ||
118 | SpinRefresh->setMaxValue ( 7200 ); | ||
119 | SpinRefresh->setSpecialValueText ( tr("never") ); | ||
120 | QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) ); | ||
121 | |||
122 | tab3Layout->addWidget( hbox_auto ); | ||
123 | tab3Layout->addWidget( hbox_hide ); | ||
124 | tab3Layout->addWidget( hbox_inactive ); | ||
125 | tab3Layout->addWidget( hbox_iconSize ); | ||
126 | tab3Layout->addWidget( hbox_refresh ); | ||
127 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 86 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
@@ -163,5 +122,5 @@ void TodayConfig::readConfig() { | |||
163 | m_autoStart = cfg.readNumEntry( "autostart", 1 ); | 122 | m_autoStart = cfg.readNumEntry( "autostart", 1 ); |
164 | CheckBoxAuto->setChecked( m_autoStart ); | 123 | m_guiMisc->CheckBoxAuto->setChecked( m_autoStart ); |
165 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); | 124 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); |
166 | SpinBoxTime->setValue( m_autoStartTimer ); | 125 | m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer ); |
167 | 126 | ||
@@ -169,5 +128,5 @@ void TodayConfig::readConfig() { | |||
169 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | 128 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); |
170 | SpinBoxIconSize->setValue( m_iconSize ); | 129 | m_guiMisc->SpinBoxIconSize->setValue( m_iconSize ); |
171 | SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); | 130 | m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); |
172 | CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); | 131 | m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); |
173 | 132 | ||
@@ -211,7 +170,7 @@ void TodayConfig::writeConfig() { | |||
211 | cfg.setGroup( "Autostart" ); | 170 | cfg.setGroup( "Autostart" ); |
212 | m_autoStart = CheckBoxAuto->isChecked(); | 171 | m_autoStart = m_guiMisc->CheckBoxAuto->isChecked(); |
213 | cfg.writeEntry( "autostart", m_autoStart ); | 172 | cfg.writeEntry( "autostart", m_autoStart ); |
214 | m_autoStartTimer = SpinBoxTime->value(); | 173 | m_autoStartTimer = m_guiMisc->SpinBoxTime->value(); |
215 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); | 174 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); |
216 | m_iconSize = SpinBoxIconSize->value(); | 175 | m_iconSize = m_guiMisc->SpinBoxIconSize->value(); |
217 | 176 | ||
@@ -219,4 +178,4 @@ void TodayConfig::writeConfig() { | |||
219 | cfg.writeEntry( "IconSize", m_iconSize ); | 178 | cfg.writeEntry( "IconSize", m_iconSize ); |
220 | cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() ); | 179 | cfg.writeEntry( "HideBanner", m_guiMisc->CheckBoxHide->isChecked() ); |
221 | cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); | 180 | cfg.writeEntry( "checkinterval", m_guiMisc->SpinRefresh->value()*1000 ); |
222 | 181 | ||