Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/viewmanager.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index b5d9419..5cfe3ad 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -49,9 +49,12 @@ $Id$ | |||
49 | #include "kaddressbookview.h" | 49 | #include "kaddressbookview.h" |
50 | 50 | ||
51 | #include <qaction.h> | 51 | #include <qaction.h> |
52 | #include <qmessagebox.h> | 52 | #include <qmessagebox.h> |
53 | #include <qpopupmenu.h> | 53 | #include <q3popupmenu.h> |
54 | //Added by qt3to4: | ||
55 | #include <Q3HBoxLayout> | ||
56 | #include <QDropEvent> | ||
54 | #include <kconfigbase.h> | 57 | #include <kconfigbase.h> |
55 | 58 | ||
56 | #endif //KAB_EMBEDDED | 59 | #endif //KAB_EMBEDDED |
57 | 60 | ||
@@ -60,9 +63,10 @@ $Id$ | |||
60 | #include <kactionclasses.h> | 63 | #include <kactionclasses.h> |
61 | 64 | ||
62 | #include <qlayout.h> | 65 | #include <qlayout.h> |
63 | #include <qapplication.h> | 66 | #include <qapplication.h> |
64 | #include <qwidgetstack.h> | 67 | #include <QDesktopWidget> |
68 | #include <q3widgetstack.h> | ||
65 | 69 | ||
66 | #include <kabc/addressbook.h> | 70 | #include <kabc/addressbook.h> |
67 | #include "filtereditdialog.h" | 71 | #include "filtereditdialog.h" |
68 | #include "addviewdialog.h" | 72 | #include "addviewdialog.h" |
@@ -116,9 +120,9 @@ void ViewManager::restoreSettings() | |||
116 | // Tell the views to reread their config, since they may have | 120 | // Tell the views to reread their config, since they may have |
117 | // been modified by global settings | 121 | // been modified by global settings |
118 | QString _oldgroup = mCore->config()->group(); | 122 | QString _oldgroup = mCore->config()->group(); |
119 | 123 | ||
120 | QDictIterator<KAddressBookView> it( mViewDict ); | 124 | Q3DictIterator<KAddressBookView> it( mViewDict ); |
121 | for ( it.toFirst(); it.current(); ++it ) { | 125 | for ( it.toFirst(); it.current(); ++it ) { |
122 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); | 126 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); |
123 | it.current()->readConfig( mCore->config() ); | 127 | it.current()->readConfig( mCore->config() ); |
124 | } | 128 | } |
@@ -130,9 +134,9 @@ void ViewManager::restoreSettings() | |||
130 | void ViewManager::saveSettings() | 134 | void ViewManager::saveSettings() |
131 | { | 135 | { |
132 | QString _oldgroup = mCore->config()->group(); | 136 | QString _oldgroup = mCore->config()->group(); |
133 | 137 | ||
134 | QDictIterator<KAddressBookView> it( mViewDict ); | 138 | Q3DictIterator<KAddressBookView> it( mViewDict ); |
135 | for ( it.toFirst(); it.current(); ++it ) { | 139 | for ( it.toFirst(); it.current(); ++it ) { |
136 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); | 140 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); |
137 | #ifdef DESKTOP_VERSION | 141 | #ifdef DESKTOP_VERSION |
138 | (*it)->writeConfig( mCore->config() ); | 142 | (*it)->writeConfig( mCore->config() ); |
@@ -160,9 +164,9 @@ QStringList ViewManager::selectedUids() const | |||
160 | 164 | ||
161 | QStringList ViewManager::selectedEmails() const | 165 | QStringList ViewManager::selectedEmails() const |
162 | { | 166 | { |
163 | if ( mActiveView ) | 167 | if ( mActiveView ) |
164 | return mActiveView->selectedEmails(); | 168 | return QStringList(mActiveView->selectedEmails()); |
165 | else | 169 | else |
166 | return QStringList(); | 170 | return QStringList(); |
167 | } | 171 | } |
168 | 172 | ||
@@ -555,9 +559,9 @@ void ViewManager::startDrag() | |||
555 | for ( iter = uidList.begin(); iter != uidList.end(); ++iter ) | 559 | for ( iter = uidList.begin(); iter != uidList.end(); ++iter ) |
556 | addrList.append( mCore->addressBook()->findByUid( *iter ) ); | 560 | addrList.append( mCore->addressBook()->findByUid( *iter ) ); |
557 | 561 | ||
558 | KMultipleDrag *drag = new KMultipleDrag( this ); | 562 | KMultipleDrag *drag = new KMultipleDrag( this ); |
559 | drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); | 563 | drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); |
560 | KABC::Addressee::List::Iterator it; | 564 | KABC::Addressee::List::Iterator it; |
561 | QStringList vcards; | 565 | QStringList vcards; |
562 | for ( it = addrList.begin(); it != addrList.end(); ++it ) { | 566 | for ( it = addrList.begin(); it != addrList.end(); ++it ) { |
563 | QString vcard = QString::null; | 567 | QString vcard = QString::null; |
@@ -658,11 +662,11 @@ void ViewManager::initActions() | |||
658 | //US <ActionList name="view_loadedviews"/> | 662 | //US <ActionList name="view_loadedviews"/> |
659 | //US <Separator/> | 663 | //US <Separator/> |
660 | 664 | ||
661 | #ifdef KAB_EMBEDDED | 665 | #ifdef KAB_EMBEDDED |
662 | QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu(); | 666 | Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu(); |
663 | QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); | 667 | Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu(); |
664 | QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu(); | 668 | Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu(); |
665 | #endif //KAB_EMBEDDED | 669 | #endif //KAB_EMBEDDED |
666 | 670 | ||
667 | mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" ); | 671 | mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" ); |
668 | #if KDE_VERSION >= 309 | 672 | #if KDE_VERSION >= 309 |
@@ -737,12 +741,12 @@ void ViewManager::initActions() | |||
737 | } | 741 | } |
738 | 742 | ||
739 | void ViewManager::initGUI() | 743 | void ViewManager::initGUI() |
740 | { | 744 | { |
741 | QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); | 745 | Q3HBoxLayout *layout = new Q3HBoxLayout( this, 0, 0 ); |
742 | mViewWidgetStack = new QWidgetStack( this ); | 746 | mViewWidgetStack = new Q3WidgetStack( this ); |
743 | layout->addWidget( mViewWidgetStack ); | 747 | layout->addWidget( mViewWidgetStack ); |
744 | } | 748 | } |
745 | 749 | ||
746 | #ifndef KAB_EMBEDDED | 750 | #ifndef KAB_EMBEDDED_ |
747 | #include "viewmanager.moc" | 751 | #include "moc_viewmanager.cpp" |
748 | #endif //KAB_EMBEDDED | 752 | #endif //KAB_EMBEDDED |