author | zautrix <zautrix> | 2004-10-27 21:34:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 21:34:55 (UTC) |
commit | 9c88346fc757fd1dc54b3fca151a2a610159d8cf (patch) (unidiff) | |
tree | 4a5de97ba71ce66eea914d55923d88aff3515c93 /kaddressbook/kcmconfigs | |
parent | 7f3cc07fab5f5f6ddd402c458341f1df3a144e2c (diff) | |
download | kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.zip kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.tar.gz kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.tar.bz2 |
several fixes
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 936d052..8bf9bb0 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp | |||
@@ -106,32 +106,34 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
106 | addWidFont(i18n("phone:123"),i18n("Details view font"), | 106 | addWidFont(i18n("phone:123"),i18n("Details view font"), |
107 | &(KABPrefs::instance()->mDetailsFont),hBox); | 107 | &(KABPrefs::instance()->mDetailsFont),hBox); |
108 | hboxLayout->addWidget(detailsFont->label()); | 108 | hboxLayout->addWidget(detailsFont->label()); |
109 | hboxLayout->addWidget(detailsFont->preview()); | 109 | hboxLayout->addWidget(detailsFont->preview()); |
110 | hboxLayout->addWidget(detailsFont->button()); | 110 | hboxLayout->addWidget(detailsFont->button()); |
111 | hboxLayout->setMargin(KDialog::marginHintSmall() ); | 111 | hboxLayout->setMargin(KDialog::marginHintSmall() ); |
112 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); | 112 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); |
113 | //hBox->setBackgroundColor( black); | 113 | //hBox->setBackgroundColor( black); |
114 | layout->addWidget( hBox ); | 114 | layout->addWidget( hBox ); |
115 | 115 | ||
116 | //general groupbox | 116 | //general groupbox |
117 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); | 117 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); |
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" ); | ||
123 | boxLayout->addWidget( mMenuBarBox ); | ||
122 | 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" ); |
123 | boxLayout->addWidget( mSearchReturnBox ); | 125 | boxLayout->addWidget( mSearchReturnBox ); |
124 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); | 126 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); |
125 | boxLayout->addWidget( mViewsSingleClickBox ); | 127 | boxLayout->addWidget( mViewsSingleClickBox ); |
126 | 128 | ||
127 | mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); | 129 | mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); |
128 | boxLayout->addWidget( mNameParsing ); | 130 | boxLayout->addWidget( mNameParsing ); |
129 | 131 | ||
130 | mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); | 132 | mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); |
131 | boxLayout->addWidget( mMultipleViewsAtOnce ); | 133 | boxLayout->addWidget( mMultipleViewsAtOnce ); |
132 | 134 | ||
133 | mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" ); | 135 | mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" ); |
134 | boxLayout->addWidget( mAskForQuit ); | 136 | boxLayout->addWidget( mAskForQuit ); |
135 | 137 | ||
136 | layout->addWidget( vBox ); | 138 | layout->addWidget( vBox ); |
137 | 139 | ||
@@ -152,78 +154,79 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
152 | groupBox->layout()->setMargin(1) ; | 154 | groupBox->layout()->setMargin(1) ; |
153 | groupBox->layout()->setSpacing(0); | 155 | groupBox->layout()->setSpacing(0); |
154 | mExtensionView = new KListView( groupBox ); | 156 | mExtensionView = new KListView( groupBox ); |
155 | mExtensionView->setAllColumnsShowFocus( true ); | 157 | mExtensionView->setAllColumnsShowFocus( true ); |
156 | mExtensionView->addColumn( i18n( "Name" ) ); | 158 | mExtensionView->addColumn( i18n( "Name" ) ); |
157 | mExtensionView->addColumn( i18n( "Description" ) ); | 159 | mExtensionView->addColumn( i18n( "Description" ) ); |
158 | mExtensionView->setMaximumHeight(80); | 160 | mExtensionView->setMaximumHeight(80); |
159 | 161 | ||
160 | boxLayout->addWidget( mExtensionView ); | 162 | boxLayout->addWidget( mExtensionView ); |
161 | 163 | ||
162 | mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox ); | 164 | mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox ); |
163 | mConfigureButton->setEnabled( false ); | 165 | mConfigureButton->setEnabled( false ); |
164 | boxLayout->addWidget( mConfigureButton ); | 166 | boxLayout->addWidget( mConfigureButton ); |
165 | 167 | ||
166 | extensionLayout->addWidget( groupBox ); | 168 | extensionLayout->addWidget( groupBox ); |
167 | 169 | ||
170 | connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | ||
168 | connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 171 | connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
169 | connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 172 | connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
170 | connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 173 | connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
171 | connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 174 | connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
172 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 175 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
173 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), | 176 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), |
174 | SLOT( selectionChanged( QListViewItem* ) ) ); | 177 | SLOT( selectionChanged( QListViewItem* ) ) ); |
175 | connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), | 178 | connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), |
176 | SLOT( itemClicked( QListViewItem* ) ) ); | 179 | SLOT( itemClicked( QListViewItem* ) ) ); |
177 | connect( mConfigureButton, SIGNAL( clicked() ), | 180 | connect( mConfigureButton, SIGNAL( clicked() ), |
178 | SLOT( configureExtension() ) ); | 181 | SLOT( configureExtension() ) ); |
179 | 182 | ||
180 | tabWidget->addTab( extensionPage, i18n( "Extensions" ) ); | 183 | tabWidget->addTab( extensionPage, i18n( "Extensions" ) ); |
181 | 184 | ||
182 | // Addressee page | 185 | // Addressee page |
183 | mAddresseeWidget = new AddresseeWidget( this ); | 186 | mAddresseeWidget = new AddresseeWidget( this ); |
184 | tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); | 187 | tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); |
185 | connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) ); | 188 | connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) ); |
186 | 189 | ||
187 | } | 190 | } |
188 | 191 | ||
189 | void KABConfigWidget::usrReadConfig() | 192 | void KABConfigWidget::usrReadConfig() |
190 | { | 193 | { |
191 | KABPrefs* prefs = KABPrefs::instance(); | 194 | KABPrefs* prefs = KABPrefs::instance(); |
192 | 195 | ||
193 | bool blocked = signalsBlocked(); | 196 | bool blocked = signalsBlocked(); |
194 | blockSignals( true ); | 197 | blockSignals( true ); |
195 | 198 | mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); | |
196 | mNameParsing->setChecked( prefs->mAutomaticNameParsing ); | 199 | mNameParsing->setChecked( prefs->mAutomaticNameParsing ); |
197 | mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); | 200 | mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); |
198 | mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); | 201 | mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); |
199 | mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); | 202 | mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); |
200 | mAskForQuit->setChecked( prefs->mAskForQuit ); | 203 | mAskForQuit->setChecked( prefs->mAskForQuit ); |
201 | 204 | ||
202 | mAddresseeWidget->restoreSettings(); | 205 | mAddresseeWidget->restoreSettings(); |
203 | 206 | ||
204 | restoreExtensionSettings(); | 207 | restoreExtensionSettings(); |
205 | 208 | ||
206 | blockSignals( blocked ); | 209 | blockSignals( blocked ); |
207 | 210 | ||
208 | } | 211 | } |
209 | 212 | ||
210 | void KABConfigWidget::usrWriteConfig() | 213 | void KABConfigWidget::usrWriteConfig() |
211 | { | 214 | { |
212 | KABPrefs* prefs = KABPrefs::instance(); | 215 | KABPrefs* prefs = KABPrefs::instance(); |
213 | 216 | prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); | |
214 | prefs->mAutomaticNameParsing = mNameParsing->isChecked(); | 217 | prefs->mAutomaticNameParsing = mNameParsing->isChecked(); |
215 | prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); | 218 | prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); |
216 | prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); | 219 | prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); |
217 | prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); | 220 | prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); |
218 | prefs->mAskForQuit = mAskForQuit->isChecked(); | 221 | prefs->mAskForQuit = mAskForQuit->isChecked(); |
219 | 222 | ||
220 | mAddresseeWidget->saveSettings(); | 223 | mAddresseeWidget->saveSettings(); |
221 | 224 | ||
222 | saveExtensionSettings(); | 225 | saveExtensionSettings(); |
223 | 226 | ||
224 | } | 227 | } |
225 | 228 | ||
226 | void KABConfigWidget::restoreExtensionSettings() | 229 | void KABConfigWidget::restoreExtensionSettings() |
227 | { | 230 | { |
228 | QStringList activeExtensions = KABPrefs::instance()->mActiveExtensions; | 231 | QStringList activeExtensions = KABPrefs::instance()->mActiveExtensions; |
229 | 232 | ||
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index 1e71fd1..08d71b4 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h | |||
@@ -53,23 +53,23 @@ class KABConfigWidget : public KPrefsWidget | |||
53 | 53 | ||
54 | private slots: | 54 | private slots: |
55 | void configureExtension(); | 55 | void configureExtension(); |
56 | void selectionChanged( QListViewItem* ); | 56 | void selectionChanged( QListViewItem* ); |
57 | void itemClicked( QListViewItem* ); | 57 | void itemClicked( QListViewItem* ); |
58 | 58 | ||
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 *mMultipleViewsAtOnce; | 67 | QCheckBox *mMultipleViewsAtOnce; |
68 | QCheckBox *mAskForQuit; | 68 | QCheckBox *mAskForQuit; |
69 | 69 | QCheckBox *mMenuBarBox; | |
70 | QPushButton *mConfigureButton; | 70 | QPushButton *mConfigureButton; |
71 | 71 | ||
72 | AddresseeWidget *mAddresseeWidget; | 72 | AddresseeWidget *mAddresseeWidget; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | #endif | 75 | #endif |