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
@@ -41,3 +41,13 @@ $Id$
#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>
@@ -49,6 +59,6 @@ $Id$
#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>
@@ -90,3 +100,3 @@ $Id$
-#include <qapp.h>
+#include <qapplication.h>
#include <qmenubar.h>
@@ -131,8 +141,8 @@ $Id$
#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>
@@ -177,3 +187,3 @@ class KABCatPrefs : public QDialog
setCaption( i18n("Manage new Categories") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
@@ -182,3 +192,3 @@ class KABCatPrefs : public QDialog
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 );
@@ -209,3 +219,3 @@ class KABFormatPrefs : public QDialog
setCaption( i18n("Set formatted name") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
@@ -214,3 +224,3 @@ class KABFormatPrefs : public QDialog
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 );
@@ -247,3 +257,3 @@ class KAex2phonePrefs : public QDialog
setCaption( i18n("Export to phone options") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
@@ -252,5 +262,5 @@ class KAex2phonePrefs : public QDialog
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 );
@@ -258,3 +268,3 @@ class KAex2phonePrefs : public QDialog
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Connection: "), temphb );
@@ -262,3 +272,3 @@ class KAex2phonePrefs : public QDialog
lay->addWidget( temphb );
- temphb = new QHBox( this );
+ temphb = new Q3HBox( this );
new QLabel( i18n("Model(opt.): "), temphb );
@@ -269,3 +279,3 @@ class KAex2phonePrefs : public QDialog
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 );
@@ -409,3 +419,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
}
-void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
+void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data )
{
@@ -423,5 +433,5 @@ void KABCore::loadDataAfterStart()
#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() )
@@ -455,3 +465,3 @@ KABCore::~KABCore()
}
-void KABCore::receive( const QCString& cmsg, const QByteArray& data )
+void KABCore::receive( const Q3CString& cmsg, const QByteArray& data )
{
@@ -459,3 +469,3 @@ void KABCore::receive( const QCString& cmsg, const QByteArray& data )
if ( cmsg == "setDocument(QString)" ) {
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
QString fileName;
@@ -482,3 +492,3 @@ void KABCore::toggleBeamReceive( )
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
@@ -562,3 +572,3 @@ void KABCore::restoreSettings()
#endif
- QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
+ Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
if ( true /*splitterSize.count() == 0*/ ) {
@@ -652,6 +662,6 @@ 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;
@@ -797,3 +807,3 @@ void KABCore::mailVCard( const QStringList& uids )
- if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
+ if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully
KABC::VCardConverter converter;
@@ -803,4 +813,4 @@ void KABCore::mailVCard( const QStringList& uids )
- QTextStream t( &outFile ); // use a text stream
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream t( &outFile ); // use a text stream
+ t.setEncoding( Q3TextStream::UnicodeUTF8 );
t << vcard;
@@ -1018,7 +1028,7 @@ void KABCore::beamVCard(const QStringList& uids)
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();
@@ -1299,6 +1309,6 @@ 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;
@@ -1858,3 +1868,3 @@ void KABCore::initGUI()
#ifndef KAB_EMBEDDED
- QHBoxLayout *topLayout = new QHBoxLayout( this );
+ Q3HBoxLayout *topLayout = new Q3HBoxLayout( this );
topLayout->setSpacing( KDialogBase::spacingHint() );
@@ -1866,3 +1876,3 @@ void KABCore::initGUI()
- QVBox *viewSpace = new QVBox( mDetailsSplitter );
+ Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter );
mIncSearchWidget = new IncSearchWidget( viewSpace );
@@ -1890,10 +1900,10 @@ void KABCore::initGUI()
// 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 );
@@ -1902,3 +1912,3 @@ void KABCore::initGUI()
- QBoxLayout *topLayout;
+ Q3BoxLayout *topLayout;
@@ -1911,3 +1921,3 @@ void KABCore::initGUI()
#ifdef DESKTOP_VERSION
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
@@ -1926,3 +1936,3 @@ void KABCore::initGUI()
if ( QApplication::desktop()->width() > 480 ) {
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
@@ -1931,3 +1941,3 @@ void KABCore::initGUI()
- topLayout = new QHBoxLayout( this );
+ topLayout = new Q3HBoxLayout( this );
mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
@@ -2036,3 +2046,3 @@ void KABCore::initActions()
//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" );
@@ -2043,6 +2053,6 @@ void KABCore::initActions()
- 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" );
@@ -2085,18 +2095,18 @@ void KABCore::initActions()
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(),
@@ -2113,3 +2123,3 @@ void KABCore::initActions()
mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
- Key_Delete, this, SLOT( deleteContacts() ),
+ Qt::Key_Delete, this, SLOT( deleteContacts() ),
actionCollection(), "edit_delete" );
@@ -2248,5 +2258,5 @@ void KABCore::addActionsManually()
#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 );
@@ -2278,3 +2288,3 @@ void KABCore::addActionsManually()
QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
- QPopupMenu *popupBarTB = new QPopupMenu( this );
+ Q3PopupMenu *popupBarTB = new Q3PopupMenu( this );
menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
@@ -2633,3 +2643,3 @@ void KABCore::configureResources()
{
- KRES::KCMKResources dlg( this, "" , 0 );
+ KRES::KCMKResources dlg( this, "" , QStringList() );
@@ -2729,3 +2739,3 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
}
- QProgressBar bar(count,0 );
+ Q3ProgressBar bar(count,0 );
int w = 300;
@@ -2910,3 +2920,3 @@ KABC::Addressee KABCore::getLastSyncAddressee()
lse.setRevision( mLastAddressbookSync );
- lse.setCategories( i18n("SyncEvent") );
+ lse.setCategories( QStringList(i18n("SyncEvent")) );
mAddressBook->insertAddressee( lse );
@@ -3101,3 +3111,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
addresseeRSync.setRevision( mLastAddressbookSync );
- addresseeRSync.setCategories( i18n("SyncAddressee") );
+ addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) );
}