summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookmain.cpp
authorzautrix <zautrix>2005-01-17 12:18:59 (UTC)
committer zautrix <zautrix>2005-01-17 12:18:59 (UTC)
commit6b166ece0a576e9be9c71a61fab5424d75a9301f (patch) (unidiff)
treeb88bf3e82cafc0ac279eb46b8ebc61f112083032 /kaddressbook/kaddressbookmain.cpp
parent376ffdba71ab4d7d7988229f38678394a54e5576 (diff)
downloadkdepimpi-6b166ece0a576e9be9c71a61fab5424d75a9301f.zip
kdepimpi-6b166ece0a576e9be9c71a61fab5424d75a9301f.tar.gz
kdepimpi-6b166ece0a576e9be9c71a61fab5424d75a9301f.tar.bz2
many AB fixes
Diffstat (limited to 'kaddressbook/kaddressbookmain.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookmain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 2832257..519dc92 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -102,138 +102,138 @@ void KAddressBookMain::addEmail( QString addr )
102} 102}
103 103
104#ifndef KAB_EMBEDDED 104#ifndef KAB_EMBEDDED
105ASYNC KAddressBookMain::showContactEditor( QString uid ) 105ASYNC KAddressBookMain::showContactEditor( QString uid )
106{ 106{
107 mCore->editContact( uid ); 107 mCore->editContact( uid );
108} 108}
109#endif //KAB_EMBEDDED 109#endif //KAB_EMBEDDED
110void KAddressBookMain::newContact() 110void KAddressBookMain::newContact()
111{ 111{
112 mCore->newContact(); 112 mCore->newContact();
113} 113}
114 114
115QString KAddressBookMain::getNameByPhone( QString phone ) 115QString KAddressBookMain::getNameByPhone( QString phone )
116{ 116{
117 return mCore->getNameByPhone( phone ); 117 return mCore->getNameByPhone( phone );
118} 118}
119 119
120void KAddressBookMain::save() 120void KAddressBookMain::save()
121{ 121{
122 mCore->save(); 122 mCore->save();
123} 123}
124 124
125void KAddressBookMain::exit() 125void KAddressBookMain::exit()
126{ 126{
127 close( ); 127 close( );
128} 128}
129 129
130void KAddressBookMain::saveProperties( KConfig* ) 130void KAddressBookMain::saveProperties( KConfig* )
131{ 131{
132} 132}
133 133
134void KAddressBookMain::readProperties( KConfig* ) 134void KAddressBookMain::readProperties( KConfig* )
135{ 135{
136} 136}
137 137
138void KAddressBookMain::initActions() 138void KAddressBookMain::initActions()
139{ 139{
140#ifndef KAB_EMBEDDED 140#ifndef KAB_EMBEDDED
141 KStdAction::quit( this, SLOT( close() ), actionCollection() ); 141 KStdAction::quit( this, SLOT( close() ), actionCollection() );
142 KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() ); 142 KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() );
143#else //KAB_EMBEDDED 143#else //KAB_EMBEDDED
144 //US: transfered the setup of the actions into KABCore 144 //US: transfered the setup of the actions into KABCore
145#endif //KAB_EMBEDDED 145#endif //KAB_EMBEDDED
146 146
147 147
148} 148}
149 149
150//US new method to setup menues and toolbars on embedded systems 150//US new method to setup menues and toolbars on embedded systems
151#ifdef KAB_EMBEDDED 151#ifdef KAB_EMBEDDED
152/* 152/*
153QToolBar * KAddressBookMain::getIconToolBar() 153QToolBar * KAddressBookMain::getIconToolBar()
154{ 154{
155 return iconToolBar; 155 return iconToolBar;
156} 156}
157*/ 157*/
158 158
159void KAddressBookMain::createGUI() 159void KAddressBookMain::createGUI()
160{ 160{
161 161
162 162
163 163
164} 164}
165#endif //KAB_EMBEDDED 165#endif //KAB_EMBEDDED
166 166
167void KAddressBookMain::configureToolbars() 167void KAddressBookMain::configureToolbars()
168{ 168{
169#ifndef KAB_EMBEDDED 169#ifndef KAB_EMBEDDED
170 saveMainWindowSettings( KGlobal::config(), "MainWindow" ); 170 saveMainWindowSettings( KGlobal::config(), "MainWindow" );
171 171
172 KEditToolbar dlg( factory() ); 172 KEditToolbar dlg( factory() );
173 connect( &dlg, SIGNAL( newToolbarConfig() ), SLOT( slotNewToolbarConfig() ) ); 173 connect( &dlg, SIGNAL( newToolbarConfig() ), SLOT( slotNewToolbarConfig() ) );
174 174
175 dlg.exec(); 175 dlg.exec();
176#else //KAB_EMBEDDED 176#else //KAB_EMBEDDED
177 qDebug("KAddressBookMain::configureToolbars() not implemented by ulf" ); 177 qDebug("KAddressBookMain::configureToolbars() not implemented by ulf" );
178#endif //KAB_EMBEDDED 178#endif //KAB_EMBEDDED
179} 179}
180 180
181void KAddressBookMain::slotNewToolbarConfig() 181void KAddressBookMain::slotNewToolbarConfig()
182{ 182{
183#ifndef KAB_EMBEDDED 183#ifndef KAB_EMBEDDED
184 applyMainWindowSettings( KGlobal::config(), "MainWindow" ); 184 applyMainWindowSettings( KGlobal::config(), "MainWindow" );
185#else //KAB_EMBEDDED 185#else //KAB_EMBEDDED
186 qDebug("KAddressBookMain::slotNewToolbarConfig() not implemented by ulf" ); 186 qDebug("KAddressBookMain::slotNewToolbarConfig() not implemented by ulf" );
187#endif //KAB_EMBEDDED 187#endif //KAB_EMBEDDED
188} 188}
189 189
190void KAddressBookMain::configureKeys() 190void KAddressBookMain::configureKeys()
191{ 191{
192#ifndef KAB_EMBEDDED 192#ifndef KAB_EMBEDDED
193 KKeyDialog::configureKeys( actionCollection(), xmlFile(), true, this ); 193 KKeyDialog::configureKeys( actionCollection(), xmlFile(), true, this );
194#else //KAB_EMBEDDED 194#else //KAB_EMBEDDED
195 qDebug("KAddressBookMain::configureKeys() not implemented by ulf" ); 195 qDebug("KAddressBookMain::configureKeys() not implemented by ulf" );
196#endif //KAB_EMBEDDED 196#endif //KAB_EMBEDDED
197} 197}
198 198
199void KAddressBookMain::closeEvent( QCloseEvent* ce ) 199void KAddressBookMain::closeEvent( QCloseEvent* ce )
200{ 200{
201 bool mModified = mCore->modified(); 201 bool mModified = mCore->modified();
202 bool mAskForQuit = KABPrefs::instance()->mAskForQuit; 202 bool mAskForQuit = KABPrefs::instance()->mAskForQuit;
203 203
204 QString mess = i18n( "Close KA/Pi?"); 204 QString mess = i18n( "Close KA/Pi?");
205 if ( mModified == true ) 205 if ( mModified == true )
206 mess += i18n( "\nChanges will be saved!"); 206 mess += i18n( "\nChanges will be saved!");
207 else 207 else
208 mess += i18n( "\nNo unsaved changes detected!\nNothing will be saved!"); 208 mess += i18n( "\nNo unsaved changes detected!\nNothing will be saved!");
209 209
210 bool mQuit = true; 210 bool mQuit = true;
211 211
212 212
213 if (mAskForQuit) 213 if (mAskForQuit)
214 { 214 {
215 215
216 int res = QMessageBox::information( this, "KA/Pi", mess , i18n("Yes!"), i18n("No"), 0, 0 ); 216 int res = QMessageBox::information( this, "KA/Pi", mess , i18n("Yes!"), i18n("No"), 0, 0 );
217 if (res == 0) 217 if (res == 0)
218 mQuit = true; 218 mQuit = true;
219 else 219 else
220 mQuit = false; 220 mQuit = false;
221 } 221 }
222 222
223 if (mQuit == false) 223 if (mQuit == false)
224 return; 224 return;
225 225
226 if (mModified == true) 226 if (mModified == true)
227 { 227 {
228 save(); 228 save();
229 mCore->saveSettings(); 229 mCore->saveSettings();
230 KABPrefs::instance()->writeConfig(); 230 //KABPrefs::instance()->writeConfig();
231 } 231 }
232 232
233 ce->accept(); 233 ce->accept();
234} 234}
235 235
236#ifndef KAB_EMBEDDED 236#ifndef KAB_EMBEDDED
237#include "kaddressbookmain.moc" 237#include "kaddressbookmain.moc"
238#endif //KAB_EMBEDDED 238#endif //KAB_EMBEDDED
239 239