summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookmain.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kaddressbookmain.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kaddressbookmain.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 92c32ca..8ebb93a 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -47,114 +47,97 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
//MOC_SKIP_END
#endif //KAB_EMBEDDED
{
setIcon(SmallIcon( "ka24" ) );
#if 0
//US for embedded systems, create the toolbar before we initiate KABCore.
// KABCore will fill the toolbar with menues and icons
QMainWindow::ToolBarDock tbd;
tbd = Top;
iconToolBar = new QToolBar( this );
addToolBar (iconToolBar , tbd );
iconToolBar->setHorizontalStretchable(true);
//US iconToolBar->setWidth(300);
#endif // 0
mCore = new KABCore( this, true, this );
#ifdef KAB_EMBEDDED
setCaption( i18n( "KAddressbook/Pi" ) );
#else //KAB_EMBEDDED
setCaption( i18n( "Address Book Browser" ) );
#endif //KAB_EMBEDDED
//mCore->restoreSettings();
initActions();
setCentralWidget( mCore );
//US statusBar()->show();
#ifndef KAB_EMBEDDED
setStandardToolBarMenuEnabled(true);
createGUI( "kaddressbookui.rc", false );
#endif //KAB_EMBEDDED
setAutoSaveSettings();
qApp->processEvents();
mCore->restoreSettings();
}
KAddressBookMain::~KAddressBookMain()
{
// mCore->saveSettings();
}
-#ifndef DESKTOP_VERSION
-void KAddressBookMain::show ()
-{
- static bool block = false;
- if( block ) {
- QWidget::show();
- return;
- } else {
- block = true ;
- QWidget::showFullScreen();
- }
- int min = 20;
- if ( QApplication::desktop()->width() > 320 )
- min += 20;
- setGeometry( 0,0,QApplication::desktop()->width(), QApplication::desktop()->height() - min );
- block = false;
-}
-#endif
+
void KAddressBookMain::showMinimized ()
{
QWidget::showMinimized () ;
}
void KAddressBookMain::addEmail( QString addr )
{
mCore->addEmail( addr );
}
#ifndef KAB_EMBEDDED
ASYNC KAddressBookMain::showContactEditor( QString uid )
{
mCore->editContact( uid );
}
#endif //KAB_EMBEDDED
void KAddressBookMain::newContact()
{
mCore->newContact();
}
QString KAddressBookMain::getNameByPhone( QString phone )
{
return mCore->getNameByPhone( phone );
}
void KAddressBookMain::save()
{
mCore->save();
}
void KAddressBookMain::exit()
{
close( );
}
void KAddressBookMain::saveProperties( KConfig* )
{
}
void KAddressBookMain::readProperties( KConfig* )
{
}
void KAddressBookMain::initActions()
{
#ifndef KAB_EMBEDDED
KStdAction::quit( this, SLOT( close() ), actionCollection() );
KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() );