summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewmanager.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/viewmanager.cpp30
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
@@ -50,7 +50,10 @@ $Id$
#include <qaction.h>
#include <qmessagebox.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QDropEvent>
#include <kconfigbase.h>
#endif //KAB_EMBEDDED
@@ -61,7 +64,8 @@ $Id$
#include <qlayout.h>
#include <qapplication.h>
-#include <qwidgetstack.h>
+#include <QDesktopWidget>
+#include <q3widgetstack.h>
#include <kabc/addressbook.h>
#include "filtereditdialog.h"
@@ -117,7 +121,7 @@ void ViewManager::restoreSettings()
// been modified by global settings
QString _oldgroup = mCore->config()->group();
- QDictIterator<KAddressBookView> it( mViewDict );
+ Q3DictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
it.current()->readConfig( mCore->config() );
@@ -131,7 +135,7 @@ void ViewManager::saveSettings()
{
QString _oldgroup = mCore->config()->group();
- QDictIterator<KAddressBookView> it( mViewDict );
+ Q3DictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
#ifdef DESKTOP_VERSION
@@ -161,7 +165,7 @@ QStringList ViewManager::selectedUids() const
QStringList ViewManager::selectedEmails() const
{
if ( mActiveView )
- return mActiveView->selectedEmails();
+ return QStringList(mActiveView->selectedEmails());
else
return QStringList();
}
@@ -556,7 +560,7 @@ void ViewManager::startDrag()
addrList.append( mCore->addressBook()->findByUid( *iter ) );
KMultipleDrag *drag = new KMultipleDrag( this );
- drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) );
+ drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) );
KABC::Addressee::List::Iterator it;
QStringList vcards;
for ( it = addrList.begin(); it != addrList.end(); ++it ) {
@@ -659,9 +663,9 @@ void ViewManager::initActions()
//US <Separator/>
#ifdef KAB_EMBEDDED
- QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu();
- QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu();
- QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu();
+ Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu();
+ Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu();
+ Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu();
#endif //KAB_EMBEDDED
mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" );
@@ -738,11 +742,11 @@ void ViewManager::initActions()
void ViewManager::initGUI()
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
- mViewWidgetStack = new QWidgetStack( this );
+ Q3HBoxLayout *layout = new Q3HBoxLayout( this, 0, 0 );
+ mViewWidgetStack = new Q3WidgetStack( this );
layout->addWidget( mViewWidgetStack );
}
-#ifndef KAB_EMBEDDED
-#include "viewmanager.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_viewmanager.cpp"
#endif //KAB_EMBEDDED