author | zautrix <zautrix> | 2004-06-29 11:59:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-29 11:59:46 (UTC) |
commit | da43dbdc6c82453228f34766fc74585615cba938 (patch) (side-by-side diff) | |
tree | 16576932cea08bf117b2d0320b0d5f66ee8ad093 /kaddressbook | |
parent | 627489ea2669d3997676bc3cee0f5d0d0c16c4d4 (diff) | |
download | kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.zip kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.gz kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.bz2 |
New lib ical.Some minor changes as well.
-rw-r--r-- | kaddressbook/kabcore.cpp | 42 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 2 | ||||
-rw-r--r-- | kaddressbook/kaddressbookmain.cpp | 19 | ||||
-rw-r--r-- | kaddressbook/kaddressbookmain.h | 4 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 6 |
5 files changed, 38 insertions, 35 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 3e578bc..70ab6b7 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -128,3 +128,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const #endif //KAB_EMBEDDED - + mExtensionBarSplitter = 0; mIsPart = !parent->inherits( "KAddressBookMain" ); @@ -225,3 +225,3 @@ void KABCore::restoreSettings() setDetailsVisible( state ); - QValueList<int> splitterSize = KABPrefs::instance()->mExtensionsSplitter; + QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; if ( splitterSize.count() == 0 ) { @@ -231,2 +231,11 @@ void KABCore::restoreSettings() mMiniSplitter->setSizes( splitterSize ); + if ( mExtensionBarSplitter ) { + splitterSize = KABPrefs::instance()->mExtensionsSplitter; + if ( splitterSize.count() == 0 ) { + splitterSize.append( width() / 2 ); + splitterSize.append( width() / 2 ); + } + mExtensionBarSplitter->setSizes( splitterSize ); + + } #ifndef KAB_EMBEDDED @@ -259,5 +268,6 @@ void KABCore::saveSettings() KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); - KABPrefs::instance()->mExtensionsSplitter = mMiniSplitter->sizes(); + if ( mExtensionBarSplitter ) + KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); - + KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); #ifndef KAB_EMBEDDED @@ -1145,3 +1155,17 @@ void KABCore::initGUI() +#ifdef DESKTOP_VERSION + topLayout = new QHBoxLayout( this ); + + mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); + mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); + + topLayout->addWidget(mMiniSplitter ); + + mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); + mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); + mViewManager = new ViewManager( this, mExtensionBarSplitter ); + mDetails = new ViewContainer( mMiniSplitter ); + mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); +#else if ( QApplication::desktop()->width() > 480 ) { @@ -1163,3 +1187,3 @@ void KABCore::initGUI() mExtensionManager = new ExtensionManager( this, mMiniSplitter ); - +#endif //eh->hide(); @@ -1488,2 +1512,3 @@ void KABCore::addActionsManually() + if (QApplication::desktop()->width() > 320 ) { @@ -1493,6 +1518,9 @@ void KABCore::addActionsManually() mViewManager->getFilterAction()->plug ( tb); - if (QApplication::desktop()->width() > 480 ) + if (QApplication::desktop()->width() > 480 ) { + mActionUndo->plug( tb ); mActionDelete->plug( tb ); + mActionRedo->plug( tb ); + } } - mActionQuit->plug ( tb ); + //mActionQuit->plug ( tb ); // tb->insertWidget(-1, 0, mIncSearchWidget, 6); diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index edf98c2..b84ec22 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -346,3 +346,3 @@ class KABCore : public QWidget // QSplitter *mDetailsSplitter; - //QSplitter *mExtensionBarSplitter; + KDGanttMinimizeSplitter *mExtensionBarSplitter; ViewContainer *mDetails; diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index 92c32ca..8ebb93a 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -94,20 +94,3 @@ KAddressBookMain::~KAddressBookMain() } -#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 () diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h index 81ae09c..cf6f899 100644 --- a/kaddressbook/kaddressbookmain.h +++ b/kaddressbook/kaddressbookmain.h @@ -72,6 +72,2 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface public slots: -#ifndef DESKTOP_VERSION - void show(); -#endif - void showMinimized () ; diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index ffa37a5..3f6f69d 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -70,7 +70,3 @@ int main( int argc, char **argv ) a.showMainWidget(m ); - m->showFullScreen(); - int min = 20; - if ( QApplication::desktop()->width() > 320 ) - min += 20; - m->setGeometry( 0,0,QApplication::desktop()->width(), QApplication::desktop()->height() - min ); + m->showMaximized(); |