author | zautrix <zautrix> | 2004-11-08 23:23:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-08 23:23:02 (UTC) |
commit | c20c85c383cb36c7ece87af9e3a60d14b36a9de5 (patch) (unidiff) | |
tree | ec1d983fbeb9b719f1871683b47862b528e50c0d /kaddressbook | |
parent | d92ceb39af0bf0c655b68cb166dfea44cd688f1c (diff) | |
download | kdepimpi-c20c85c383cb36c7ece87af9e3a60d14b36a9de5.zip kdepimpi-c20c85c383cb36c7ece87af9e3a60d14b36a9de5.tar.gz kdepimpi-c20c85c383cb36c7ece87af9e3a60d14b36a9de5.tar.bz2 |
fixed orientation change in kapi
-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 1 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 30 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
3 files changed, 23 insertions, 9 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 78eaf65..dd2121a 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp | |||
@@ -47,24 +47,25 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) | |||
47 | #ifdef DESKTOP_VERSION | 47 | #ifdef DESKTOP_VERSION |
48 | QLabel *label = new QLabel( i18n( "Search:" ), this ); | 48 | QLabel *label = new QLabel( i18n( "Search:" ), this ); |
49 | label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); | 49 | label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); |
50 | layout->addWidget( label ); | 50 | layout->addWidget( label ); |
51 | #endif //KAB_EMBEDDED | 51 | #endif //KAB_EMBEDDED |
52 | 52 | ||
53 | mSearchText = new KLineEdit( this ); | 53 | mSearchText = new KLineEdit( this ); |
54 | layout->addWidget( mSearchText ); | 54 | layout->addWidget( mSearchText ); |
55 | // #ifdef KAB_EMBEDDED | 55 | // #ifdef KAB_EMBEDDED |
56 | // if (KGlobal::getOrientation() == KGlobal::Portrait) | 56 | // if (KGlobal::getOrientation() == KGlobal::Portrait) |
57 | // mSearchText->setMaximumWidth(30); | 57 | // mSearchText->setMaximumWidth(30); |
58 | // #endif //KAB_EMBEDDED | 58 | // #endif //KAB_EMBEDDED |
59 | //mSearchText->setMaximumWidth(60); | ||
59 | 60 | ||
60 | 61 | ||
61 | mFieldCombo = new QComboBox( false, this ); | 62 | mFieldCombo = new QComboBox( false, this ); |
62 | layout->addWidget( mFieldCombo ); | 63 | layout->addWidget( mFieldCombo ); |
63 | mFieldCombo->setMaximumHeight( 34 ); | 64 | mFieldCombo->setMaximumHeight( 34 ); |
64 | QToolTip::add( mFieldCombo, i18n( "Select Incremental Search Field" ) ); | 65 | QToolTip::add( mFieldCombo, i18n( "Select Incremental Search Field" ) ); |
65 | 66 | ||
66 | // #ifndef KAB_EMBEDDED | 67 | // #ifndef KAB_EMBEDDED |
67 | // resize( QSize(420, 50).expandedTo( sizeHint() ) ); | 68 | // resize( QSize(420, 50).expandedTo( sizeHint() ) ); |
68 | // #else //KAB_EMBEDDED | 69 | // #else //KAB_EMBEDDED |
69 | // resize( QSize(30, 10).expandedTo( sizeHint() ) ); | 70 | // resize( QSize(30, 10).expandedTo( sizeHint() ) ); |
70 | // #endif //KAB_EMBEDDED | 71 | // #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 7acf1ee..a6fc677 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -352,30 +352,30 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
352 | mMessageTimer = new QTimer( this ); | 352 | mMessageTimer = new QTimer( this ); |
353 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); | 353 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); |
354 | mEditorDialog = 0; | 354 | mEditorDialog = 0; |
355 | createAddresseeEditorDialog( this ); | 355 | createAddresseeEditorDialog( this ); |
356 | setModified( false ); | 356 | setModified( false ); |
357 | mBRdisabled = false; | 357 | mBRdisabled = false; |
358 | #ifndef DESKTOP_VERSION | 358 | #ifndef DESKTOP_VERSION |
359 | infrared = 0; | 359 | infrared = 0; |
360 | #endif | 360 | #endif |
361 | //toggleBeamReceive( ); | 361 | //toggleBeamReceive( ); |
362 | 362 | ||
363 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi | 363 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi |
364 | QTimer::singleShot( 1000, this , SLOT ( updateToolBar())); | 364 | QTimer::singleShot( 10000, this , SLOT ( updateToolBar())); |
365 | } | 365 | } |
366 | 366 | ||
367 | void KABCore::updateToolBar() | 367 | void KABCore::updateToolBar() |
368 | { | 368 | { |
369 | mMainWindow->toolBar()->repaint(); | 369 | mMainWindow->toolBar()->update(); |
370 | } | 370 | } |
371 | KABCore::~KABCore() | 371 | KABCore::~KABCore() |
372 | { | 372 | { |
373 | // save(); | 373 | // save(); |
374 | //saveSettings(); | 374 | //saveSettings(); |
375 | //KABPrefs::instance()->writeConfig(); | 375 | //KABPrefs::instance()->writeConfig(); |
376 | delete AddresseeConfig::instance(); | 376 | delete AddresseeConfig::instance(); |
377 | mAddressBook = 0; | 377 | mAddressBook = 0; |
378 | KABC::StdAddressBook::close(); | 378 | KABC::StdAddressBook::close(); |
379 | 379 | ||
380 | delete syncManager; | 380 | delete syncManager; |
381 | #ifndef DESKTOP_VERSION | 381 | #ifndef DESKTOP_VERSION |
@@ -768,43 +768,55 @@ void KABCore::beamMySelf() | |||
768 | if (!a.isEmpty()) | 768 | if (!a.isEmpty()) |
769 | { | 769 | { |
770 | QStringList uids; | 770 | QStringList uids; |
771 | uids << a.uid(); | 771 | uids << a.uid(); |
772 | 772 | ||
773 | beamVCard(uids); | 773 | beamVCard(uids); |
774 | } else { | 774 | } else { |
775 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); | 775 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); |
776 | 776 | ||
777 | 777 | ||
778 | } | 778 | } |
779 | } | 779 | } |
780 | void KABCore::updateMainWindow() | ||
781 | { | ||
782 | |||
783 | mMainWindow->showMaximized(); | ||
784 | mMainWindow->update(); | ||
785 | } | ||
780 | void KABCore::resizeEvent(QResizeEvent* e ) | 786 | void KABCore::resizeEvent(QResizeEvent* e ) |
781 | { | 787 | { |
782 | if ( !mMiniSplitter ) | 788 | if ( !mMiniSplitter ) |
783 | return; | 789 | return; |
784 | if ( QApplication::desktop()->width() >= 480 ) { | 790 | if ( QApplication::desktop()->width() >= 480 ) { |
785 | int fac = QApplication::desktop()->width()/QApplication::desktop()->height(); | 791 | if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 |
786 | if ( fac > 0 ) { // e.g. 640x480 | ||
787 | if ( mMiniSplitter->orientation() == Qt::Vertical ) { | 792 | if ( mMiniSplitter->orientation() == Qt::Vertical ) { |
788 | mMiniSplitter->setOrientation( Qt::Horizontal); | 793 | mMiniSplitter->setOrientation( Qt::Horizontal); |
789 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 794 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
790 | if ( QApplication::desktop()->width() <= 640 ) | 795 | if ( QApplication::desktop()->width() <= 640 ) { |
791 | topLevelWidget()->showMaximized(); | 796 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); |
797 | mViewManager->getFilterAction()->setComboWidth( 150 ); | ||
798 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); | ||
799 | } | ||
792 | } | 800 | } |
793 | } else {// e.g. 480x640 | 801 | } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 |
794 | if ( mMiniSplitter->orientation() == Qt::Horizontal ) { | 802 | if ( mMiniSplitter->orientation() == Qt::Horizontal ) { |
795 | mMiniSplitter->setOrientation( Qt::Vertical ); | 803 | mMiniSplitter->setOrientation( Qt::Vertical ); |
796 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 804 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
797 | if ( QApplication::desktop()->width() <= 640 ) | 805 | if ( QApplication::desktop()->width() <= 640 ) { |
798 | topLevelWidget()->showMaximized(); | 806 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); |
807 | mMainWindow->showMinimized(); | ||
808 | mViewManager->getFilterAction()->setComboWidth( 0 ); | ||
809 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); | ||
810 | } | ||
799 | } | 811 | } |
800 | } | 812 | } |
801 | } | 813 | } |
802 | 814 | ||
803 | } | 815 | } |
804 | void KABCore::export2phone() | 816 | void KABCore::export2phone() |
805 | { | 817 | { |
806 | 818 | ||
807 | QStringList uids; | 819 | QStringList uids; |
808 | XXPortSelectDialog dlg( this, false, this ); | 820 | XXPortSelectDialog dlg( this, false, this ); |
809 | if ( dlg.exec() ) | 821 | if ( dlg.exec() ) |
810 | uids = dlg.uids(); | 822 | uids = dlg.uids(); |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index fe2d3a2..88e83f0 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -352,24 +352,25 @@ class KABCore : public QWidget, public KSyncInterface | |||
352 | signals: | 352 | signals: |
353 | void contactSelected( const QString &name ); | 353 | void contactSelected( const QString &name ); |
354 | void contactSelected( const QPixmap &pixmap ); | 354 | void contactSelected( const QPixmap &pixmap ); |
355 | public slots: | 355 | public slots: |
356 | void recieve(QString cmsg ); | 356 | void recieve(QString cmsg ); |
357 | void getFile( bool success ); | 357 | void getFile( bool success ); |
358 | void syncFileRequest(); | 358 | void syncFileRequest(); |
359 | void setDetailsVisible( bool visible ); | 359 | void setDetailsVisible( bool visible ); |
360 | void setDetailsToState(); | 360 | void setDetailsToState(); |
361 | // void slotSyncMenu( int ); | 361 | // void slotSyncMenu( int ); |
362 | private slots: | 362 | private slots: |
363 | void updateToolBar(); | 363 | void updateToolBar(); |
364 | void updateMainWindow(); | ||
364 | void receive( const QCString& cmsg, const QByteArray& data ); | 365 | void receive( const QCString& cmsg, const QByteArray& data ); |
365 | void toggleBeamReceive( ); | 366 | void toggleBeamReceive( ); |
366 | void disableBR(bool); | 367 | void disableBR(bool); |
367 | void setJumpButtonBarVisible( bool visible ); | 368 | void setJumpButtonBarVisible( bool visible ); |
368 | void setCaptionBack(); | 369 | void setCaptionBack(); |
369 | void importFromOL(); | 370 | void importFromOL(); |
370 | void extensionModified( const KABC::Addressee::List &list ); | 371 | void extensionModified( const KABC::Addressee::List &list ); |
371 | void extensionChanged( int id ); | 372 | void extensionChanged( int id ); |
372 | void clipboardDataChanged(); | 373 | void clipboardDataChanged(); |
373 | void updateActionMenu(); | 374 | void updateActionMenu(); |
374 | void configureKeyBindings(); | 375 | void configureKeyBindings(); |
375 | void removeVoice(); | 376 | void removeVoice(); |