summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp130
1 files changed, 67 insertions, 63 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2b87298..fd5bbca 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -23,28 +23,32 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
-#include <qstrlist.h>
+#include <q3strlist.h>
#include <qapplication.h>
#include <qlayout.h>
-#include <qscrollview.h>
-#include <qvgroupbox.h>
-#include <qhgroupbox.h>
+#include <q3scrollview.h>
+#include <q3vgroupbox.h>
+#include <q3hgroupbox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -89,11 +93,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
{
QLabel * lab;
//QFrame *page = addPage(i18n("Sync Prefs"),0,0);
- QVBox * mainbox = new QVBox( this );
- QScrollView* sv = new QScrollView( mainbox );
- QHBoxLayout * lay = new QHBoxLayout( this );
+ Q3VBox * mainbox = new Q3VBox( this );
+ Q3ScrollView* sv = new Q3ScrollView( mainbox );
+ Q3HBoxLayout * lay = new Q3HBoxLayout( this );
lay->addWidget( mainbox );
- QHBox * b_box = new QHBox( mainbox );
+ Q3HBox * b_box = new Q3HBox( mainbox );
QPushButton* button = new QPushButton( i18n("Ok"), b_box );
connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) );
@@ -101,11 +105,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
//QBoxLayout * sl = new QVBoxLayout(this );
//sl->addWidget ( sv );
- sv->setResizePolicy ( QScrollView::AutoOneFit );
- QFrame *topFrame = new QFrame ( sv );
+ sv->setResizePolicy ( Q3ScrollView::AutoOneFit );
+ Q3Frame *topFrame = new Q3Frame ( sv );
sv->addChild( topFrame );
mSetupSyncAlgTab = topFrame;
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
@@ -120,7 +124,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
topLayout->addWidget(mMyMachineName,iii,1);
++iii;
- QHBox* buttonbox = new QHBox( topFrame);
+ Q3HBox* buttonbox = new Q3HBox( topFrame);
topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
++iii;
button = new QPushButton( i18n("New profile"), buttonbox );
@@ -145,7 +149,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
- QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame);
+ Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame);
new QLabel( i18n("Include in multiple "), iims );
mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
@@ -153,19 +157,19 @@ void KSyncPrefsDialog::setupSyncAlgTab()
new QLabel( i18n(" sync"), iims );
topLayout->addMultiCellWidget(iims, iii,iii,0,1);
++iii;
- QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame);
+ Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame);
topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
++iii;
- QButtonGroup* gr;
+ Q3ButtonGroup* gr;
{
- QVGroupBox* topFrame = gb0;
+ Q3VGroupBox* topFrame = gb0;
mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
//topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
//++iii;
- gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
+ gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
//topLayout->addMultiCellWidget(gr, iii,iii,0,1);
//++iii;
loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
@@ -181,21 +185,21 @@ void KSyncPrefsDialog::setupSyncAlgTab()
//++iii;
#if 0
- QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame);
+ Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame);
{
- QVBox * fibo2 = new QVBox ( gb51 );
+ Q3VBox * fibo2 = new Q3VBox ( gb51 );
new QLabel ( i18n("Calendar resources:"), fibo2 );
//mFilterInCal = new QComboBox( fibo2 );
- fibo2 = new QVBox ( gb51 );
+ fibo2 = new Q3VBox ( gb51 );
new QLabel ( i18n("Addressbook resources:"), fibo2 );
//mFilterInAB = new QComboBox( fibo2 );
}
#endif
- QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
- QVBox * fibo2 = new QVBox ( gb5 );
+ Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
+ Q3VBox * fibo2 = new Q3VBox ( gb5 );
new QLabel ( i18n("Incoming calendar filter:"), fibo2 );
mFilterInCal = new QComboBox( fibo2 );
- fibo2 = new QVBox ( gb5 );
+ fibo2 = new Q3VBox ( gb5 );
new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
mFilterInAB = new QComboBox( fibo2 );
@@ -203,17 +207,17 @@ void KSyncPrefsDialog::setupSyncAlgTab()
// topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
// ++iii;
- QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame);
+ Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame);
//topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
//++iii;
{
- QVGroupBox*topFrame = gb2;
+ Q3VGroupBox*topFrame = gb2;
mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
- QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
- QVBox * fibo = new QVBox ( gb4 );
+ Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
+ Q3VBox * fibo = new Q3VBox ( gb4 );
new QLabel ( i18n("Outgoing calendar filter:"), fibo );
mFilterOutCal = new QComboBox( fibo );
- fibo = new QVBox ( gb4 );
+ fibo = new Q3VBox ( gb4 );
new QLabel ( i18n("Outgoing addressbook filter:"), fibo );
mFilterOutAB = new QComboBox( fibo );
//topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
@@ -221,15 +225,15 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
//topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
//++iii;
- QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame);
+ Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame);
connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
new QLabel( i18n("From ") , gb3 );
- QHBox * tf1 = new QHBox ( gb3 );
+ Q3HBox * tf1 = new Q3HBox ( gb3 );
mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
mWriteBackPastWeeks->setMaximumWidth( 100 );
new QLabel( i18n(" weeks in the past to ") ,tf1 );
- QHBox * tf2 = new QHBox ( gb3 );
+ Q3HBox * tf2 = new Q3HBox ( gb3 );
mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
mWriteBackFutureWeeks->setMaximumWidth( 100 );
new QLabel( i18n(" weeks in the future ") , tf2 );
@@ -241,7 +245,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
}
- proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
+ proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
gr = proGr;
topLayout->addMultiCellWidget(gr, iii,iii,0,1);
++iii;
@@ -255,7 +259,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
- QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame);
+ Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame);
topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
++iii;
@@ -263,48 +267,48 @@ void KSyncPrefsDialog::setupSyncAlgTab()
// Profile kind specific settings
{
// *** phone *******************************
- QVGroupBox* topFrame = gb1;
- phoneWidget = new QVBox( topFrame);
+ Q3VGroupBox* topFrame = gb1;
+ phoneWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
//++iii;
mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
- QHBox* temphb = new QHBox( phoneWidget );
+ Q3HBox* temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
- temphb = new QHBox( phoneWidget );
+ temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
- temphb = new QHBox( phoneWidget );
+ temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("Model(opt.): "), temphb );
mPhoneModel = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
// *** local*******************************
- localFileWidget = new QVBox( topFrame);
+ localFileWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
lab = new QLabel( i18n("Local file Cal:"), temphb );
lab = new QLabel( i18n("Local file ABook:"), temphb );
lab = new QLabel( i18n("Local file PWMgr:"), temphb );
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
mRemoteFile = new QLineEdit( temphb);
mRemoteFileAB = new QLineEdit( temphb);
@@ -313,34 +317,34 @@ void KSyncPrefsDialog::setupSyncAlgTab()
// *** remote*******************************
- remoteFileWidget = new QVBox( topFrame);
+ remoteFileWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mRemotePrecommand = new QLineEdit(temphb);
mRemotePrecommandAB = new QLineEdit(temphb);
mRemotePrecommandPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mLocalTempFile = new QLineEdit(temphb);
mLocalTempFileAB = new QLineEdit(temphb);
mLocalTempFilePWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mRemotePostcommand = new QLineEdit(temphb );
mRemotePostcommandAB = new QLineEdit(temphb );
mRemotePostcommandPWM = new QLineEdit(temphb );
mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
button = new QPushButton( i18n("ssh/scp"), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
button = new QPushButton( i18n("ftp"), temphb );
@@ -348,37 +352,37 @@ void KSyncPrefsDialog::setupSyncAlgTab()
lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
// *** pi-sync*******************************
- piWidget = new QVBox( topFrame);
+ piWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemotePw = new QLineEdit(temphb);
mRemotePwAB = new QLineEdit(temphb);
mRemotePwPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemoteIP = new QLineEdit(temphb);
mRemoteIPAB = new QLineEdit(temphb);
mRemoteIPPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemotePort = new QLineEdit(temphb);
mRemotePortAB = new QLineEdit(temphb);
mRemotePortPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget);
- mTableBox = new QHBox( piWidget );
- mResTableKopi = new QTable( 1, 1, mTableBox );
- mResTableKapi = new QTable( 1, 1, mTableBox );
- mResTablePwmpi = new QTable( 1, 1, mTableBox );
+ mTableBox = new Q3HBox( piWidget );
+ mResTableKopi = new Q3Table( 1, 1, mTableBox );
+ mResTableKapi = new Q3Table( 1, 1, mTableBox );
+ mResTablePwmpi = new Q3Table( 1, 1, mTableBox );
mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") );
@@ -468,7 +472,7 @@ void KSyncPrefsDialog::slotOK()
}
int i;
for (i = 0; i < mSyncProfileNames.count(); ++ i) {
- if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) {
+ if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) {
KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
return;
}