summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp146
1 files changed, 78 insertions, 68 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index ab2824c..03b44d1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -34,28 +34,38 @@ $Id$
#include <klocale.h>
#include <kfiledialog.h>
#include <qtimer.h>
#include <qlabel.h>
#include <qregexp.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
-#include <qprogressbar.h>
+#include <q3progressbar.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QPixmap>
+#include <Q3ValueList>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+#include <Q3CString>
+#include <Q3PopupMenu>
+#include <Q3PtrList>
#include <libkdepim/phoneaccess.h>
#ifndef KAB_EMBEDDED
#include <qclipboard.h>
#include <qdir.h>
#include <qfile.h>
#include <qapplicaton.h>
-#include <qprogressbar.h>
+#include <q3progressbar.h>
#include <qlayout.h>
#include <qregexp.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <kabc/addresseelist.h>
#include <kabc/errorhandler.h>
#include <kabc/resource.h>
#include <kabc/vcardconverter.h>
#include <kapplication.h>
#include <kactionclasses.h>
#include <kcmultidialog.h>
#include <kdebug.h>
@@ -83,17 +93,17 @@ $Id$
#include <kapplication.h>
#include "KDGanttMinimizeSplitter.h"
#include "kaddressbookmain.h"
#include "kactioncollection.h"
#include "addresseedialog.h"
//US
#include <addresseeview.h>
-#include <qapp.h>
+#include <qapplication.h>
#include <qmenubar.h>
//#include <qtoolbar.h>
#include <qmessagebox.h>
#include <kdebug.h>
#include <kiconloader.h> // needed for SmallIcon
#include <kresources/kcmkresources.h>
#include <ktoolbar.h>
#include <kprefsdialog.h>
@@ -124,22 +134,22 @@ $Id$
#include <picture.h>
#include <resource.h>
//US#include <qsplitter.h>
#include <qmap.h>
#include <qdir.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qlayout.h>
#include <qclipboard.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkdepim/categoryeditdialog.h>
#include <kabc/vcardconverter.h>
#include "addresseeutil.h"
#include "undocmds.h"
@@ -170,22 +180,22 @@ $Id$
class KABCatPrefs : public QDialog
{
public:
KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Manage new Categories") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
lay->addWidget( lab );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
addCatBut = new QRadioButton(i18n("Add to category list"), format );
new QRadioButton(i18n("Remove from addressees"), format );
addCatBut->setChecked( true );
QPushButton * ok = new QPushButton( i18n("OK"), this );
lay->addWidget( ok );
QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
@@ -202,22 +212,22 @@ private:
class KABFormatPrefs : public QDialog
{
public:
KABFormatPrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Set formatted name") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
lay->addWidget( lab );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Set formatted name to:"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
simple = new QRadioButton(i18n("Simple: James Bond"), format );
full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format );
reverse = new QRadioButton(i18n("Reverse: Bond, James"), format );
company = new QRadioButton(i18n("Organization: MI6"), format );
simple->setChecked( true );
setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this);
@@ -240,39 +250,39 @@ public:
class KAex2phonePrefs : public QDialog
{
public:
KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Export to phone options") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel *lab;
lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
- lab->setAlignment (AlignHCenter );
- QHBox* temphb;
- temphb = new QHBox( this );
+ lab->setAlignment (Qt::AlignHCenter );
+ Q3HBox* temphb;
+ temphb = new Q3HBox( this );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Model(opt.): "), temphb );
mPhoneModel = new QLineEdit( temphb);
lay->addWidget( temphb );
// mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
// lay->addWidget( mWriteToSim );
lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
- lab->setAlignment (AlignHCenter);
+ lab->setAlignment (Qt::AlignHCenter);
QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
lay->addWidget( ok );
QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
lay->addWidget( cancel );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
resize( 220, 240 );
@@ -402,33 +412,33 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
infrared = 0;
#endif
//toggleBeamReceive( );
mMainWindow->toolBar()->show();
// we have a toolbar repainting error on the Zaurus when starting KA/Pi
//QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
}
-void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
+void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data )
{
//qDebug("KO: QCOP start message received: %s ", cmsg.data() );
mCStringMess = cmsg;
mByteData = data;
}
void KABCore::loadDataAfterStart()
{
//qDebug("KABCore::loadDataAfterStart() ");
((StdAddressBook*)mAddressBook)->init( true );
mViewManager->refreshView();
#ifndef DESKTOP_VERSION
- disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
+ disconnect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT (receiveStart ( const Q3CString &, const QByteArray & )));
- QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
+ QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & )));
if ( !mCStringMess.isEmpty() )
ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
#endif
// QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
setCaptionBack();
}
void KABCore::updateToolBar()
{
@@ -448,21 +458,21 @@ KABCore::~KABCore()
KABC::StdAddressBook::close();
delete syncManager;
#ifndef DESKTOP_VERSION
if ( infrared )
delete infrared;
#endif
}
-void KABCore::receive( const QCString& cmsg, const QByteArray& data )
+void KABCore::receive( const Q3CString& cmsg, const QByteArray& data )
{
//qDebug("KA: QCOP message received: %s ", cmsg.data() );
if ( cmsg == "setDocument(QString)" ) {
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
QString fileName;
stream >> fileName;
recieve( fileName );
return;
}
}
void KABCore::toggleBeamReceive( )
{
@@ -475,17 +485,17 @@ void KABCore::toggleBeamReceive( )
infrared = 0;
mActionBR->setChecked(false);
return;
}
qDebug("KA: AB enable BeamReceive ");
mActionBR->setChecked(true);
infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
- QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
+ QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(receive( const Q3CString&, const QByteArray& )));
#endif
}
void KABCore::disableBR(bool b)
{
#ifndef DESKTOP_VERSION
if ( b ) {
@@ -555,17 +565,17 @@ void KABCore::restoreSettings()
int wid = width();
if ( wid < 10 )
wid = 400;
#else
int wid = QApplication::desktop()->width();
if ( wid < 640 )
wid = QApplication::desktop()->height();
#endif
- QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
+ Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
if ( true /*splitterSize.count() == 0*/ ) {
splitterSize.append( wid / 2 );
splitterSize.append( wid / 2 );
}
mMiniSplitter->setSizes( splitterSize );
if ( mExtensionBarSplitter ) {
//splitterSize = KABPrefs::instance()->mExtensionsSplitter;
if ( true /*splitterSize.count() == 0*/ ) {
@@ -645,20 +655,20 @@ KABC::Field *KABCore::currentSearchField() const
QStringList KABCore::selectedUIDs() const
{
return mViewManager->selectedUids();
}
KABC::Resource *KABCore::requestResource( QWidget *parent )
{
- QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
+ Q3PtrList<KABC::Resource> kabcResources = addressBook()->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ Q3PtrList<KRES::Resource> kresResources;
+ Q3PtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
while ( ( resource = resIt.current() ) != 0 ) {
++resIt;
if ( !resource->readOnly() ) {
KRES::Resource *res = static_cast<KRES::Resource*>( resource );
if ( res )
kresResources.append( res );
}
@@ -790,24 +800,24 @@ void KABCore::mailVCard( const QStringList& uids )
continue;
QString name = a.givenName() + "_" + a.familyName() + ".vcf";
QString fileName = dirName + "/" + name;
QFile outFile(fileName);
- if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
+ if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully
KABC::VCardConverter converter;
QString vcard;
converter.addresseeToVCard( a, vcard );
- QTextStream t( &outFile ); // use a text stream
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream t( &outFile ); // use a text stream
+ t.setEncoding( Q3TextStream::UnicodeUTF8 );
t << vcard;
outFile.close();
urls.append( fileName );
}
}
@@ -1011,21 +1021,21 @@ void KABCore::beamVCard(const QStringList& uids)
datastream +=vcard.mid( start, next - start);
datastream +=vcard.mid( next+5,sep -next -5 ).upper();
start = sep;
}
datastream += vcard.mid( start,vcard.length() );
}
#ifndef DESKTOP_VERSION
QFile outFile(fileName);
- if ( outFile.open(IO_WriteOnly) ) {
+ if ( outFile.open(QIODevice::WriteOnly) ) {
datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
- QTextStream t( &outFile ); // use a text stream
+ Q3TextStream t( &outFile ); // use a text stream
//t.setEncoding( QTextStream::UnicodeUTF8 );
- t.setEncoding( QTextStream::Latin1 );
+ t.setEncoding( Q3TextStream::Latin1 );
t <<datastream.latin1();
outFile.close();
Ir *ir = new Ir( this );
connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
ir->send( fileName, description, "text/x-vCard" );
} else {
qDebug("KA: Error open temp beam file ");
return;
@@ -1292,20 +1302,20 @@ void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails )
mDetails->setAddressee( addr );
setModified( true );
}
void KABCore::newContact()
{
- QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
+ Q3PtrList<KABC::Resource> kabcResources = mAddressBook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> it( kabcResources );
+ Q3PtrList<KRES::Resource> kresResources;
+ Q3PtrListIterator<KABC::Resource> it( kabcResources );
KABC::Resource *resource;
while ( ( resource = it.current() ) != 0 ) {
++it;
if ( !resource->readOnly() ) {
KRES::Resource *res = static_cast<KRES::Resource*>( resource );
if ( res )
kresResources.append( res );
}
@@ -1851,25 +1861,25 @@ AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
void KABCore::slotEditorDestroyed( const QString &uid )
{
//mEditorDict.remove( uid );
}
void KABCore::initGUI()
{
#ifndef KAB_EMBEDDED
- QHBoxLayout *topLayout = new QHBoxLayout( this );
+ Q3HBoxLayout *topLayout = new Q3HBoxLayout( this );
topLayout->setSpacing( KDialogBase::spacingHint() );
mExtensionBarSplitter = new QSplitter( this );
mExtensionBarSplitter->setOrientation( Qt::Vertical );
mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
- QVBox *viewSpace = new QVBox( mDetailsSplitter );
+ Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter );
mIncSearchWidget = new IncSearchWidget( viewSpace );
connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
SLOT( incrementalSearch( const QString& ) ) );
mViewManager = new ViewManager( this, viewSpace );
viewSpace->setStretchFactor( mViewManager, 1 );
mDetails = new ViewContainer( mDetailsSplitter );
@@ -1883,58 +1893,58 @@ void KABCore::initGUI()
topLayout->addWidget( mJumpButtonBar );
//topLayout->setStretchFactor( mJumpButtonBar, 1 );
mXXPortManager = new XXPortManager( this, this );
#else //KAB_EMBEDDED
//US initialize viewMenu before settingup viewmanager.
// Viewmanager needs this menu to plugin submenues.
- viewMenu = new QPopupMenu( this );
- settingsMenu = new QPopupMenu( this );
+ viewMenu = new Q3PopupMenu( this );
+ settingsMenu = new Q3PopupMenu( this );
//filterMenu = new QPopupMenu( this );
- ImportMenu = new QPopupMenu( this );
- ExportMenu = new QPopupMenu( this );
- syncMenu = new QPopupMenu( this );
- changeMenu= new QPopupMenu( this );
- beamMenu= new QPopupMenu( this );
+ ImportMenu = new Q3PopupMenu( this );
+ ExportMenu = new Q3PopupMenu( this );
+ syncMenu = new Q3PopupMenu( this );
+ changeMenu= new Q3PopupMenu( this );
+ beamMenu= new Q3PopupMenu( this );
//US since we have no splitter for the embedded system, setup
// a layout with two frames. One left and one right.
- QBoxLayout *topLayout;
+ Q3BoxLayout *topLayout;
// = new QHBoxLayout( this );
// QBoxLayout *topLayout = (QBoxLayout*)layout();
// QWidget *mainBox = new QWidget( this );
// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
#ifdef DESKTOP_VERSION
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( 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 );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
} else {
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
}
topLayout->addWidget(mMiniSplitter );
mViewManager = new ViewManager( this, mMiniSplitter );
mDetails = new ViewContainer( mMiniSplitter );
@@ -2029,27 +2039,27 @@ void KABCore::initActions()
connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
SLOT( clipboardDataChanged() ) );
#endif //KAB_EMBEDDED
// file menu
mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
//mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
- mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
+ mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", Qt::CTRL + Qt::Key_P, mViewManager,
SLOT( printView() ), actionCollection(), "kaddressbook_print" );
mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
- mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
+ mActionSave = new KAction( i18n( "&Save" ), "filesave", Qt::CTRL+Qt::Key_S, this,
SLOT( save() ), actionCollection(), "file_sync" );
- mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
+ mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", Qt::CTRL+Qt::Key_N, this,
SLOT( newContact() ), actionCollection(), "file_new_contact" );
mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
this, SLOT( mailVCard() ),
actionCollection(), "file_mail_vcard");
mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this,
SLOT( export2phone() ), actionCollection(),
@@ -2078,45 +2088,45 @@ void KABCore::initActions()
// mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
mMainWindow, SLOT( exit() ),
actionCollection(), "quit" );
#endif //KAB_EMBEDDED
// edit menu
if ( mIsPart ) {
- mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
+ mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", Qt::CTRL + Qt::Key_C, this,
SLOT( copyContacts() ), actionCollection(),
"kaddressbook_copy" );
- mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
+ mActionCut = new KAction( i18n( "Cu&t" ), "editcut", Qt::CTRL + Qt::Key_X, this,
SLOT( cutContacts() ), actionCollection(),
"kaddressbook_cut" );
- mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
+ mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", Qt::CTRL + Qt::Key_V, this,
SLOT( pasteContacts() ), actionCollection(),
"kaddressbook_paste" );
- mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
+ mActionSelectAll = new KAction( i18n( "Select &All" ), Qt::CTRL + Qt::Key_A, this,
SLOT( selectAllContacts() ), actionCollection(),
"kaddressbook_select_all" );
- mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
+ mActionUndo = new KAction( i18n( "&Undo" ), "undo", Qt::CTRL + Qt::Key_Z, this,
SLOT( undo() ), actionCollection(),
"kaddressbook_undo" );
- mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
+ mActionRedo = new KAction( i18n( "Re&do" ), "redo", Qt::CTRL + Qt::SHIFT + Qt::Key_Z,
this, SLOT( redo() ), actionCollection(),
"kaddressbook_redo" );
} else {
mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
}
mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
- Key_Delete, this, SLOT( deleteContacts() ),
+ Qt::Key_Delete, this, SLOT( deleteContacts() ),
actionCollection(), "edit_delete" );
mActionUndo->setEnabled( false );
mActionRedo->setEnabled( false );
// settings menu
#ifdef KAB_EMBEDDED
//US special menuentry to configure the addressbook resources. On KDE
@@ -2241,19 +2251,19 @@ void KABCore::initActions()
//US we need this function, to plug all actions into the correct menues.
// KDE uses a XML format to plug the actions, but we work her without this overhead.
void KABCore::addActionsManually()
{
//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
#ifdef KAB_EMBEDDED
- QPopupMenu *fileMenu = new QPopupMenu( this );
- QPopupMenu *editMenu = new QPopupMenu( this );
- QPopupMenu *helpMenu = new QPopupMenu( this );
+ Q3PopupMenu *fileMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *editMenu = new Q3PopupMenu( this );
+ Q3PopupMenu *helpMenu = new Q3PopupMenu( this );
KToolBar* tb = mMainWindow->toolBar();
mMainWindow->setToolBarsMovable (false );
#ifndef DESKTOP_VERSION
if ( KABPrefs::instance()->mFullMenuBarVisible ) {
#endif
QMenuBar* mb = mMainWindow->menuBar();
@@ -2271,17 +2281,17 @@ void KABCore::addActionsManually()
//mb->insertItem( i18n("&Change"), changeMenu );
mb->insertItem( i18n("&Help"), helpMenu );
mIncSearchWidget = new IncSearchWidget( tb );
// tb->insertWidget(-1, 0, mIncSearchWidget);
#ifndef DESKTOP_VERSION
} else {
//US setup toolbar
QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
- QPopupMenu *popupBarTB = new QPopupMenu( this );
+ Q3PopupMenu *popupBarTB = new Q3PopupMenu( this );
menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
tb->insertWidget(-1, 0, menuBarTB);
mIncSearchWidget = new IncSearchWidget( tb );
tb->enableMoving(false);
popupBarTB->insertItem( i18n("&File"), fileMenu );
popupBarTB->insertItem( i18n("&Edit"), editMenu );
popupBarTB->insertItem( i18n("&View"), viewMenu );
popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
@@ -2626,17 +2636,17 @@ void KABCore::configureKeyBindings()
#else //KAB_EMBEDDED
qDebug("KABCore::configureKeyBindings() not implemented");
#endif //KAB_EMBEDDED
}
#ifdef KAB_EMBEDDED
void KABCore::configureResources()
{
- KRES::KCMKResources dlg( this, "" , 0 );
+ KRES::KCMKResources dlg( this, "" , QStringList() );
if ( !dlg.exec() )
return;
KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
}
#endif //KAB_EMBEDDED
@@ -2722,17 +2732,17 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
QStringList uidList;
KABC::AddressBook::Iterator it;
int count = 0;
for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
++count;
}
- QProgressBar bar(count,0 );
+ Q3ProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
@@ -2903,17 +2913,17 @@ KABC::Addressee KABCore::getLastSyncAddressee()
if (lse.isEmpty()) {
qDebug("KA: Creating new last-syncAddressee ");
lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
QString sum = "";
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
sum = "E: ";
lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
lse.setRevision( mLastAddressbookSync );
- lse.setCategories( i18n("SyncEvent") );
+ lse.setCategories( QStringList(i18n("SyncEvent")) );
mAddressBook->insertAddressee( lse );
}
return lse;
}
int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full )
{
//void setZaurusId(int id);
@@ -3094,17 +3104,17 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
} else {
//qDebug("FULLDATE 1");
fullDateRange = true;
Addressee newAdd;
addresseeRSync = newAdd;
addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
addresseeRSync.setRevision( mLastAddressbookSync );
- addresseeRSync.setCategories( i18n("SyncAddressee") );
+ addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) );
}
}
if ( addresseeLSync.revision() == mLastAddressbookSync ) {
// qDebug("FULLDATE 2");
fullDateRange = true;
}
if ( ! fullDateRange ) {
if ( addresseeLSync.revision() != addresseeRSync.revision() ) {