summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kcmconfigs
authorzautrix <zautrix>2005-03-29 13:52:41 (UTC)
committer zautrix <zautrix>2005-03-29 13:52:41 (UTC)
commit7046b36fb5dd14598ece00b575554eba2956ef84 (patch) (unidiff)
tree934579f9f61f09563dfcbfef207d314d510d57ea /kaddressbook/kcmconfigs
parent894717798a8d129f4b991a2fe856d2f1e8e9624a (diff)
downloadkdepimpi-7046b36fb5dd14598ece00b575554eba2956ef84.zip
kdepimpi-7046b36fb5dd14598ece00b575554eba2956ef84.tar.gz
kdepimpi-7046b36fb5dd14598ece00b575554eba2956ef84.tar.bz2
kapi fixes
Diffstat (limited to 'kaddressbook/kcmconfigs') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp15
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index 3ad2f74..986c9b8 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -118,16 +118,24 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
118 QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); 118 QVBoxLayout *boxLayout = new QVBoxLayout( vBox );
119 boxLayout->setAlignment( Qt::AlignTop ); 119 boxLayout->setAlignment( Qt::AlignTop );
120 boxLayout->setMargin(KDialog::marginHintSmall() ); 120 boxLayout->setMargin(KDialog::marginHintSmall() );
121 boxLayout->setSpacing( KDialog::spacingHintSmall() ); 121 boxLayout->setSpacing( KDialog::spacingHintSmall() );
122 mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); 122 mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" );
123 boxLayout->addWidget( mMenuBarBox ); 123 boxLayout->addWidget( mMenuBarBox );
124 mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); 124 mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" );
125 boxLayout->addWidget( mSearchReturnBox ); 125 boxLayout->addWidget( mSearchReturnBox );
126 mAutoSearchWithWildcardBox = new QCheckBox( i18n( "Search with '*' prefix (wildcard)" ), vBox, "mwildcard" );
127 boxLayout->addWidget( mAutoSearchWithWildcardBox);
128 mHideSearchOnSwitchBox = new QCheckBox( i18n( "Shrink searchfield in portrait view" ), vBox, "mswitch" );
129 boxLayout->addWidget( mHideSearchOnSwitchBox );
130
131#ifdef DESKTOP_VERSION
132 mHideSearchOnSwitchBox->hide();
133#endif
126 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); 134 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" );
127 boxLayout->addWidget( mViewsSingleClickBox ); 135 boxLayout->addWidget( mViewsSingleClickBox );
128 136
129 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); 137 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" );
130 boxLayout->addWidget( mNameParsing ); 138 boxLayout->addWidget( mNameParsing );
131 139
132 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); 140 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" );
133 boxLayout->addWidget( mMultipleViewsAtOnce ); 141 boxLayout->addWidget( mMultipleViewsAtOnce );
@@ -166,16 +174,18 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
166 boxLayout->addWidget( mConfigureButton ); 174 boxLayout->addWidget( mConfigureButton );
167 175
168 extensionLayout->addWidget( groupBox ); 176 extensionLayout->addWidget( groupBox );
169 177
170 connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 178 connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
171 connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 179 connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
172 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 180 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
173 connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 181 connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
182 connect( mAutoSearchWithWildcardBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
183 connect( mHideSearchOnSwitchBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
174 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 184 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
175 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 185 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
176 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), 186 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ),
177 SLOT( selectionChanged( QListViewItem* ) ) ); 187 SLOT( selectionChanged( QListViewItem* ) ) );
178 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), 188 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ),
179 SLOT( itemClicked( QListViewItem* ) ) ); 189 SLOT( itemClicked( QListViewItem* ) ) );
180 connect( mConfigureButton, SIGNAL( clicked() ), 190 connect( mConfigureButton, SIGNAL( clicked() ),
181 SLOT( configureExtension() ) ); 191 SLOT( configureExtension() ) );
@@ -194,16 +204,18 @@ void KABConfigWidget::usrReadConfig()
194 KABPrefs* prefs = KABPrefs::instance(); 204 KABPrefs* prefs = KABPrefs::instance();
195 205
196 bool blocked = signalsBlocked(); 206 bool blocked = signalsBlocked();
197 blockSignals( true ); 207 blockSignals( true );
198 mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); 208 mMenuBarBox->setChecked( prefs->mFullMenuBarVisible);
199 mNameParsing->setChecked( prefs->mAutomaticNameParsing ); 209 mNameParsing->setChecked( prefs->mAutomaticNameParsing );
200 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); 210 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick );
201 mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); 211 mSearchReturnBox->setChecked( prefs->mSearchWithReturn );
212 mAutoSearchWithWildcardBox->setChecked( prefs->mAutoSearchWithWildcard );
213 mHideSearchOnSwitchBox->setChecked( prefs->mHideSearchOnSwitch );
202 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); 214 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce );
203 mAskForQuit->setChecked( prefs->mAskForQuit ); 215 mAskForQuit->setChecked( prefs->mAskForQuit );
204 216
205 mAddresseeWidget->restoreSettings(); 217 mAddresseeWidget->restoreSettings();
206 218
207 restoreExtensionSettings(); 219 restoreExtensionSettings();
208 220
209 blockSignals( blocked ); 221 blockSignals( blocked );
@@ -212,16 +224,19 @@ void KABConfigWidget::usrReadConfig()
212 224
213void KABConfigWidget::usrWriteConfig() 225void KABConfigWidget::usrWriteConfig()
214{ 226{
215 KABPrefs* prefs = KABPrefs::instance(); 227 KABPrefs* prefs = KABPrefs::instance();
216 prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); 228 prefs->mFullMenuBarVisible = mMenuBarBox->isChecked();
217 prefs->mAutomaticNameParsing = mNameParsing->isChecked(); 229 prefs->mAutomaticNameParsing = mNameParsing->isChecked();
218 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); 230 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked();
219 prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); 231 prefs->mSearchWithReturn = mSearchReturnBox->isChecked();
232 prefs->mAutoSearchWithWildcard = mAutoSearchWithWildcardBox->isChecked();
233 prefs->mHideSearchOnSwitch = mHideSearchOnSwitchBox->isChecked();
234
220 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); 235 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked();
221 prefs->mAskForQuit = mAskForQuit->isChecked(); 236 prefs->mAskForQuit = mAskForQuit->isChecked();
222 237
223 mAddresseeWidget->saveSettings(); 238 mAddresseeWidget->saveSettings();
224 239
225 saveExtensionSettings(); 240 saveExtensionSettings();
226 241
227} 242}
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h
index 08d71b4..a172e97 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.h
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.h
@@ -59,16 +59,18 @@ class KABConfigWidget : public KPrefsWidget
59 private: 59 private:
60 void restoreExtensionSettings(); 60 void restoreExtensionSettings();
61 void saveExtensionSettings(); 61 void saveExtensionSettings();
62 62
63 KListView *mExtensionView; 63 KListView *mExtensionView;
64 QCheckBox *mSearchReturnBox; 64 QCheckBox *mSearchReturnBox;
65 QCheckBox *mNameParsing; 65 QCheckBox *mNameParsing;
66 QCheckBox *mViewsSingleClickBox; 66 QCheckBox *mViewsSingleClickBox;
67 QCheckBox *mAutoSearchWithWildcardBox;
68 QCheckBox *mHideSearchOnSwitchBox;
67 QCheckBox *mMultipleViewsAtOnce; 69 QCheckBox *mMultipleViewsAtOnce;
68 QCheckBox *mAskForQuit; 70 QCheckBox *mAskForQuit;
69 QCheckBox *mMenuBarBox; 71 QCheckBox *mMenuBarBox;
70 QPushButton *mConfigureButton; 72 QPushButton *mConfigureButton;
71 73
72 AddresseeWidget *mAddresseeWidget; 74 AddresseeWidget *mAddresseeWidget;
73}; 75};
74 76