summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
authorzautrix <zautrix>2004-11-08 22:16:36 (UTC)
committer zautrix <zautrix>2004-11-08 22:16:36 (UTC)
commitd92ceb39af0bf0c655b68cb166dfea44cd688f1c (patch) (side-by-side diff)
treeb79b985969e4b6db6d4b1acacec6a62c8105e559 /kaddressbook/kabcore.cpp
parent4e06ab7da7f56f579010e93b1b9009ed9fd6a33e (diff)
downloadkdepimpi-d92ceb39af0bf0c655b68cb166dfea44cd688f1c.zip
kdepimpi-d92ceb39af0bf0c655b68cb166dfea44cd688f1c.tar.gz
kdepimpi-d92ceb39af0bf0c655b68cb166dfea44cd688f1c.tar.bz2
orientation change fix for kapi
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 7be5db8..7acf1ee 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -260,6 +260,7 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
{
// syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
// syncManager->setBlockSave(false);
+ mMiniSplitter = 0;
mExtensionBarSplitter = 0;
mIsPart = !parent->inherits( "KAddressBookMain" );
mAddressBook = KABC::StdAddressBook::self();
@@ -360,7 +361,7 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
//toggleBeamReceive( );
// we have a toolbar repainting error on the Zaurus when starting KA/Pi
- QTimer::singleShot( 1, this , SLOT ( updateToolBar()));
+ QTimer::singleShot( 1000, this , SLOT ( updateToolBar()));
}
void KABCore::updateToolBar()
@@ -776,9 +777,33 @@ void KABCore::beamMySelf()
}
}
+void KABCore::resizeEvent(QResizeEvent* e )
+{
+ if ( !mMiniSplitter )
+ return;
+ if ( QApplication::desktop()->width() >= 480 ) {
+ int fac = QApplication::desktop()->width()/QApplication::desktop()->height();
+ if ( fac > 0 ) { // e.g. 640x480
+ if ( mMiniSplitter->orientation() == Qt::Vertical ) {
+ mMiniSplitter->setOrientation( Qt::Horizontal);
+ mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
+ if ( QApplication::desktop()->width() <= 640 )
+ topLevelWidget()->showMaximized();
+ }
+ } else {// e.g. 480x640
+ if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
+ mMiniSplitter->setOrientation( Qt::Vertical );
+ mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
+ if ( QApplication::desktop()->width() <= 640 )
+ topLevelWidget()->showMaximized();
+ }
+ }
+ }
+}
void KABCore::export2phone()
{
+
QStringList uids;
XXPortSelectDialog dlg( this, false, this );
if ( dlg.exec() )