summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp46
-rw-r--r--kaddressbook/kabcore.h2
-rw-r--r--kaddressbook/kaddressbookmain.cpp19
-rw-r--r--kaddressbook/kaddressbookmain.h4
-rw-r--r--kaddressbook/mainembedded.cpp8
5 files changed, 41 insertions, 38 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3e578bc..70ab6b7 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -127,5 +127,5 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
//mActionCollection = new KActionCollection(this);
#endif //KAB_EMBEDDED
-
+ mExtensionBarSplitter = 0;
mIsPart = !parent->inherits( "KAddressBookMain" );
@@ -224,5 +224,5 @@ void KABCore::restoreSettings()
mActionDetails->setChecked( state );
setDetailsVisible( state );
- QValueList<int> splitterSize = KABPrefs::instance()->mExtensionsSplitter;
+ QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
if ( splitterSize.count() == 0 ) {
splitterSize.append( width() / 2 );
@@ -230,4 +230,13 @@ 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
QValueList<int> splitterSize = KABPrefs::instance()->mExtensionsSplitter;
@@ -258,7 +267,8 @@ 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
@@ -1144,5 +1154,19 @@ void KABCore::initGUI()
// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
-
+#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 ) {
topLayout = new QHBoxLayout( this );
@@ -1162,5 +1186,5 @@ void KABCore::initGUI()
mExtensionManager = new ExtensionManager( this, mMiniSplitter );
-
+#endif
//eh->hide();
// topLayout->addWidget(mExtensionManager );
@@ -1487,4 +1511,5 @@ void KABCore::addActionsManually()
mActionAboutKAddressbook->plug( helpMenu );
+
if (QApplication::desktop()->width() > 320 ) {
@@ -1492,8 +1517,11 @@ void KABCore::addActionsManually()
mActionSave->plug( tb );
mViewManager->getFilterAction()->plug ( tb);
- if (QApplication::desktop()->width() > 480 )
- mActionDelete->plug( tb );
+ 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
@@ -345,5 +345,5 @@ class KABCore : public QWidget
ViewManager *mViewManager;
// QSplitter *mDetailsSplitter;
- //QSplitter *mExtensionBarSplitter;
+ KDGanttMinimizeSplitter *mExtensionBarSplitter;
ViewContainer *mDetails;
KDGanttMinimizeSplitter* mMiniSplitter;
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 92c32ca..8ebb93a 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -93,22 +93,5 @@ 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 ()
{
diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h
index 81ae09c..cf6f899 100644
--- a/kaddressbook/kaddressbookmain.h
+++ b/kaddressbook/kaddressbookmain.h
@@ -71,8 +71,4 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
public slots:
-#ifndef DESKTOP_VERSION
- void show();
-#endif
-
void showMinimized () ;
virtual void addEmail( QString addr );
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index ffa37a5..3f6f69d 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -69,10 +69,6 @@ int main( int argc, char **argv )
#ifndef DESKTOP_VERSION
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();
+
#else
a.setMainWidget(m );