summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kcmconfigs
Unidiff
Diffstat (limited to 'kaddressbook/kcmconfigs') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index 8bf9bb0..3ad2f74 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -96,129 +96,129 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
96 96
97 // General page 97 // General page
98 QWidget *generalPage = new QWidget( this ); 98 QWidget *generalPage = new QWidget( this );
99 QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), 99 QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(),
100 KDialog::spacingHintSmall() ); 100 KDialog::spacingHintSmall() );
101 101
102 102
103 QWidget *hBox = new QWidget( generalPage, "qhbox" ); 103 QWidget *hBox = new QWidget( generalPage, "qhbox" );
104 QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); 104 QHBoxLayout *hboxLayout = new QHBoxLayout( hBox);
105 KPrefsWidFont *detailsFont = 105 KPrefsWidFont *detailsFont =
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" ); 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 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); 126 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" );
127 boxLayout->addWidget( mViewsSingleClickBox ); 127 boxLayout->addWidget( mViewsSingleClickBox );
128 128
129 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" );
130 boxLayout->addWidget( mNameParsing ); 130 boxLayout->addWidget( mNameParsing );
131 131
132 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" );
133 boxLayout->addWidget( mMultipleViewsAtOnce ); 133 boxLayout->addWidget( mMultipleViewsAtOnce );
134 134
135 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" );
136 boxLayout->addWidget( mAskForQuit ); 136 boxLayout->addWidget( mAskForQuit );
137 137
138 layout->addWidget( vBox ); 138 layout->addWidget( vBox );
139 139
140 tabWidget->addTab( generalPage, i18n( "General" ) ); 140 tabWidget->addTab( generalPage, i18n( "General" ) );
141 141
142 // Extension page 142 // Extension page
143 QWidget *extensionPage = new QWidget( this ); 143 QWidget *extensionPage = new QWidget( this );
144 QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), 144 QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(),
145 KDialog::spacingHintSmall() ); 145 KDialog::spacingHintSmall() );
146 146
147 //extensions groupbox 147 //extensions groupbox
148 148
149 QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); 149 QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage );
150 boxLayout = new QVBoxLayout( groupBox->layout() ); 150 boxLayout = new QVBoxLayout( groupBox->layout() );
151 boxLayout->setAlignment( Qt::AlignTop ); 151 boxLayout->setAlignment( Qt::AlignTop );
152 boxLayout->setMargin(KDialog::marginHintSmall()); 152 boxLayout->setMargin(KDialog::marginHintSmall());
153 boxLayout->setSpacing(KDialog::spacingHintSmall()); 153 boxLayout->setSpacing(KDialog::spacingHintSmall());
154 groupBox->layout()->setMargin(1) ; 154 groupBox->layout()->setMargin(1) ;
155 groupBox->layout()->setSpacing(0); 155 groupBox->layout()->setSpacing(0);
156 mExtensionView = new KListView( groupBox ); 156 mExtensionView = new KListView( groupBox );
157 mExtensionView->setAllColumnsShowFocus( true ); 157 mExtensionView->setAllColumnsShowFocus( true );
158 mExtensionView->addColumn( i18n( "Name" ) ); 158 mExtensionView->addColumn( i18n( "Name" ) );
159 mExtensionView->addColumn( i18n( "Description" ) ); 159 mExtensionView->addColumn( i18n( "Description" ) );
160 mExtensionView->setMaximumHeight(80); 160 //mExtensionView->setMaximumHeight(80);
161 161
162 boxLayout->addWidget( mExtensionView ); 162 boxLayout->addWidget( mExtensionView );
163 163
164 mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox ); 164 mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox );
165 mConfigureButton->setEnabled( false ); 165 mConfigureButton->setEnabled( false );
166 boxLayout->addWidget( mConfigureButton ); 166 boxLayout->addWidget( mConfigureButton );
167 167
168 extensionLayout->addWidget( groupBox ); 168 extensionLayout->addWidget( groupBox );
169 169
170 connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 170 connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
171 connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 171 connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
172 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 172 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
173 connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 173 connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
174 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 174 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
175 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 175 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
176 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), 176 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ),
177 SLOT( selectionChanged( QListViewItem* ) ) ); 177 SLOT( selectionChanged( QListViewItem* ) ) );
178 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), 178 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ),
179 SLOT( itemClicked( QListViewItem* ) ) ); 179 SLOT( itemClicked( QListViewItem* ) ) );
180 connect( mConfigureButton, SIGNAL( clicked() ), 180 connect( mConfigureButton, SIGNAL( clicked() ),
181 SLOT( configureExtension() ) ); 181 SLOT( configureExtension() ) );
182 182
183 tabWidget->addTab( extensionPage, i18n( "Extensions" ) ); 183 tabWidget->addTab( extensionPage, i18n( "Extensions" ) );
184 184
185 // Addressee page 185 // Addressee page
186 mAddresseeWidget = new AddresseeWidget( this ); 186 mAddresseeWidget = new AddresseeWidget( this );
187 tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); 187 tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) );
188 connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) ); 188 connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) );
189 189
190} 190}
191 191
192void KABConfigWidget::usrReadConfig() 192void KABConfigWidget::usrReadConfig()
193{ 193{
194 KABPrefs* prefs = KABPrefs::instance(); 194 KABPrefs* prefs = KABPrefs::instance();
195 195
196 bool blocked = signalsBlocked(); 196 bool blocked = signalsBlocked();
197 blockSignals( true ); 197 blockSignals( true );
198 mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); 198 mMenuBarBox->setChecked( prefs->mFullMenuBarVisible);
199 mNameParsing->setChecked( prefs->mAutomaticNameParsing ); 199 mNameParsing->setChecked( prefs->mAutomaticNameParsing );
200 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); 200 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick );
201 mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); 201 mSearchReturnBox->setChecked( prefs->mSearchWithReturn );
202 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); 202 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce );
203 mAskForQuit->setChecked( prefs->mAskForQuit ); 203 mAskForQuit->setChecked( prefs->mAskForQuit );
204 204
205 mAddresseeWidget->restoreSettings(); 205 mAddresseeWidget->restoreSettings();
206 206
207 restoreExtensionSettings(); 207 restoreExtensionSettings();
208 208
209 blockSignals( blocked ); 209 blockSignals( blocked );
210 210
211} 211}
212 212
213void KABConfigWidget::usrWriteConfig() 213void KABConfigWidget::usrWriteConfig()
214{ 214{
215 KABPrefs* prefs = KABPrefs::instance(); 215 KABPrefs* prefs = KABPrefs::instance();
216 prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); 216 prefs->mFullMenuBarVisible = mMenuBarBox->isChecked();
217 prefs->mAutomaticNameParsing = mNameParsing->isChecked(); 217 prefs->mAutomaticNameParsing = mNameParsing->isChecked();
218 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); 218 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked();
219 prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); 219 prefs->mSearchWithReturn = mSearchReturnBox->isChecked();
220 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); 220 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked();
221 prefs->mAskForQuit = mAskForQuit->isChecked(); 221 prefs->mAskForQuit = mAskForQuit->isChecked();
222 222
223 mAddresseeWidget->saveSettings(); 223 mAddresseeWidget->saveSettings();
224 224