summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index ee092b9..84cc448 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -48,200 +48,199 @@
48#include <kdebug.h> 48#include <kdebug.h>
49#include <klocale.h> 49#include <klocale.h>
50#include <kglobal.h> 50#include <kglobal.h>
51#include <kfontdialog.h> 51#include <kfontdialog.h>
52#include <kmessagebox.h> 52#include <kmessagebox.h>
53#include <kcolordialog.h> 53#include <kcolordialog.h>
54#include <kiconloader.h> 54#include <kiconloader.h>
55#include <kemailsettings.h> 55#include <kemailsettings.h>
56#include <kstandarddirs.h> 56#include <kstandarddirs.h>
57#include <kfiledialog.h> 57#include <kfiledialog.h>
58#include <kmessagebox.h> 58#include <kmessagebox.h>
59 59
60//#include <kurlrequester.h> 60//#include <kurlrequester.h>
61#include <klineedit.h> 61#include <klineedit.h>
62#include "ksyncprofile.h" 62#include "ksyncprofile.h"
63 63
64 64
65//#include "koprefs.h" 65//#include "koprefs.h"
66 66
67#include "ksyncprefsdialog.h" 67#include "ksyncprefsdialog.h"
68//#include "koglobals.h" 68//#include "koglobals.h"
69 69
70 70
71KSyncPrefsDialog::KSyncPrefsDialog(QWidget *parent, char *name, bool modal) : 71KSyncPrefsDialog::KSyncPrefsDialog(QWidget *parent, char *name, bool modal) :
72 KDialog(parent,name,true) 72 KDialog(parent,name,true)
73{ 73{
74 74
75 setCaption( i18n("Synchronization Preferences")); 75 setCaption( i18n("Synchronization Preferences"));
76 76
77 mSyncProfiles.setAutoDelete( true ); 77 mSyncProfiles.setAutoDelete( true );
78 setupSyncAlgTab(); 78 setupSyncAlgTab();
79} 79}
80 80
81 81
82KSyncPrefsDialog::~KSyncPrefsDialog() 82KSyncPrefsDialog::~KSyncPrefsDialog()
83{ 83{
84} 84}
85 85
86void KSyncPrefsDialog::setupSyncAlgTab() 86void KSyncPrefsDialog::setupSyncAlgTab()
87{ 87{
88 QLabel * lab; 88 QLabel * lab;
89 //QFrame *page = addPage(i18n("Sync Prefs"),0,0); 89 //QFrame *page = addPage(i18n("Sync Prefs"),0,0);
90 QVBox * mainbox = new QVBox( this ); 90 QVBox * mainbox = new QVBox( this );
91 QScrollView* sv = new QScrollView( mainbox ); 91 QScrollView* sv = new QScrollView( mainbox );
92 QHBoxLayout * lay = new QHBoxLayout( this ); 92 QHBoxLayout * lay = new QHBoxLayout( this );
93 lay->addWidget( mainbox ); 93 lay->addWidget( mainbox );
94 QHBox * b_box = new QHBox( mainbox ); 94 QHBox * b_box = new QHBox( mainbox );
95 95
96 QPushButton* button = new QPushButton( i18n("Ok"), b_box ); 96 QPushButton* button = new QPushButton( i18n("Ok"), b_box );
97 connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); 97 connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) );
98 button = new QPushButton( i18n("Cancel"), b_box ); 98 button = new QPushButton( i18n("Cancel"), b_box );
99 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); 99 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
100 //QBoxLayout * sl = new QVBoxLayout(this ); 100 //QBoxLayout * sl = new QVBoxLayout(this );
101 //sl->addWidget ( sv ); 101 //sl->addWidget ( sv );
102 sv->setResizePolicy ( QScrollView::AutoOneFit ); 102 sv->setResizePolicy ( QScrollView::AutoOneFit );
103 QFrame *topFrame = new QFrame ( sv ); 103 QFrame *topFrame = new QFrame ( sv );
104 sv->addChild( topFrame ); 104 sv->addChild( topFrame );
105 mSetupSyncAlgTab = topFrame; 105 mSetupSyncAlgTab = topFrame;
106 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 106 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
107 topLayout->setSpacing(spacingHint()); 107 topLayout->setSpacing(spacingHint());
108 topLayout->setMargin(marginHint()); 108 topLayout->setMargin(marginHint());
109 109
110 //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame); 110 //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame);
111 int iii = 0; 111 int iii = 0;
112 //topLayout->addMultiCellWidget(lab , iii,iii,0,1); 112 //topLayout->addMultiCellWidget(lab , iii,iii,0,1);
113 //++iii; 113 //++iii;
114 114
115 mMyMachineName = new QLineEdit(topFrame); 115 mMyMachineName = new QLineEdit(topFrame);
116 lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame); 116 lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame);
117 topLayout->addWidget(lab ,iii,0); 117 topLayout->addWidget(lab ,iii,0);
118 topLayout->addWidget(mMyMachineName,iii,1); 118 topLayout->addWidget(mMyMachineName,iii,1);
119 ++iii; 119 ++iii;
120 120
121 QHBox* buttonbox = new QHBox( topFrame); 121 QHBox* buttonbox = new QHBox( topFrame);
122 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); 122 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
123 ++iii; 123 ++iii;
124 button = new QPushButton( i18n("New profile"), buttonbox ); 124 button = new QPushButton( i18n("New profile"), buttonbox );
125 connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); 125 connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) );
126 126
127 button = new QPushButton( i18n("Clone profile"), buttonbox ); 127 button = new QPushButton( i18n("Clone profile"), buttonbox );
128 connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) ); 128 connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) );
129 129
130 button = new QPushButton( i18n("Delete profile"), buttonbox ); 130 button = new QPushButton( i18n("Delete profile"), buttonbox );
131 connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) ); 131 connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) );
132 132
133 mProfileBox = new QComboBox(topFrame); 133 mProfileBox = new QComboBox(topFrame);
134 mProfileBox->setEditable ( true ); 134 mProfileBox->setEditable ( true );
135 mProfileBox->setInsertionPolicy(QComboBox::NoInsertion); 135 mProfileBox->setInsertionPolicy(QComboBox::NoInsertion);
136 connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); 136 connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) );
137 connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); 137 connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) );
138 138
139 lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); 139 lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame);
140 topLayout->addWidget(lab ,iii,0); 140 topLayout->addWidget(lab ,iii,0);
141 topLayout->addWidget(mProfileBox, iii,1); 141 topLayout->addWidget(mProfileBox, iii,1);
142 ++iii; 142 ++iii;
143 143
144 mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); 144 QHBox *iims = new QHBox( topFrame );
145 topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); 145 new QLabel( i18n("Include in multiple "), iims );
146 ++iii; 146 mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
147 mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); 147 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
148 topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); 148 mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims );
149 ++iii; 149 new QLabel( i18n(" sync"), iims );
150 mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame ); 150 topLayout->addMultiCellWidget(iims, iii,iii,0,1);
151 topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1);
152 ++iii; 151 ++iii;
153 152
154 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 153 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
155 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); 154 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
156 ++iii; 155 ++iii;
157 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); 156 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
158 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 157 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
159 ++iii; 158 ++iii;
160 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); 159 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
161 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); 160 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
162 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); 161 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr );
163 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); 162 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr );
164 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); 163 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr );
165 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); 164 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr );
166 // both = new QRadioButton ( i18n("Take both on conflict"), gr ); 165 // both = new QRadioButton ( i18n("Take both on conflict"), gr );
167 166
168 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); 167 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
169 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); 168 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
170 ++iii; 169 ++iii;
171 170
172 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); 171 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
173 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 172 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
174 ++iii; 173 ++iii;
175 174
176 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame ); 175 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame );
177 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 176 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
178 ++iii; 177 ++iii;
179 178
180 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame ); 179 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame );
181 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 180 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
182 ++iii; 181 ++iii;
183 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0); 182 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0);
184 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); 183 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame);
185 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 184 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
186 ++iii; 185 ++iii;
187 186
188 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 187 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
189 gr = proGr; 188 gr = proGr;
190 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 189 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
191 ++iii; 190 ++iii;
192 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 191 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
193 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr ); 192 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr );
194 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 193 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
195 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 194 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
196 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 195 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
197 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 196 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
198 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 197 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
199 198
200 199
201 phoneWidget = new QVBox( topFrame); 200 phoneWidget = new QVBox( topFrame);
202 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 201 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
203 ++iii; 202 ++iii;
204 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); 203 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
205 QHBox* temphb = new QHBox( phoneWidget ); 204 QHBox* temphb = new QHBox( phoneWidget );
206 new QLabel( i18n("I/O device: "), temphb ); 205 new QLabel( i18n("I/O device: "), temphb );
207 mPhoneDevice = new QLineEdit( temphb); 206 mPhoneDevice = new QLineEdit( temphb);
208 button = new QPushButton( i18n("Help..."), temphb ); 207 button = new QPushButton( i18n("Help..."), temphb );
209 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); 208 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
210 209
211 210
212 temphb = new QHBox( phoneWidget ); 211 temphb = new QHBox( phoneWidget );
213 new QLabel( i18n("Connection: "), temphb ); 212 new QLabel( i18n("Connection: "), temphb );
214 mPhoneConnection = new QLineEdit( temphb); 213 mPhoneConnection = new QLineEdit( temphb);
215 button = new QPushButton( i18n("Help..."), temphb ); 214 button = new QPushButton( i18n("Help..."), temphb );
216 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); 215 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
217 216
218 217
219 temphb = new QHBox( phoneWidget ); 218 temphb = new QHBox( phoneWidget );
220 new QLabel( i18n("Model(opt.): "), temphb ); 219 new QLabel( i18n("Model(opt.): "), temphb );
221 mPhoneModel = new QLineEdit( temphb); 220 mPhoneModel = new QLineEdit( temphb);
222 button = new QPushButton( i18n("Help..."), temphb ); 221 button = new QPushButton( i18n("Help..."), temphb );
223 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); 222 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
224 223
225 // *** local 224 // *** local
226 localFileWidget = new QVBox( topFrame); 225 localFileWidget = new QVBox( topFrame);
227 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); 226 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
228 ++iii; 227 ++iii;
229 temphb = new QHBox( localFileWidget ); 228 temphb = new QHBox( localFileWidget );
230 229
231 lab = new QLabel( i18n("Local file Cal:"), temphb ); 230 lab = new QLabel( i18n("Local file Cal:"), temphb );
232 lab = new QLabel( i18n("Local file ABook:"), temphb ); 231 lab = new QLabel( i18n("Local file ABook:"), temphb );
233 lab = new QLabel( i18n("Local file PWMgr:"), temphb ); 232 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
234 temphb = new QHBox( localFileWidget ); 233 temphb = new QHBox( localFileWidget );
235 button = new QPushButton( i18n("Choose..."), temphb ); 234 button = new QPushButton( i18n("Choose..."), temphb );
236 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); 235 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
237 button = new QPushButton( i18n("Choose..."), temphb ); 236 button = new QPushButton( i18n("Choose..."), temphb );
238 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); 237 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
239 button = new QPushButton( i18n("Choose..."), temphb ); 238 button = new QPushButton( i18n("Choose..."), temphb );
240 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); 239 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
241 temphb = new QHBox( localFileWidget ); 240 temphb = new QHBox( localFileWidget );
242 241
243 mRemoteFile = new QLineEdit( temphb); 242 mRemoteFile = new QLineEdit( temphb);
244 mRemoteFileAB = new QLineEdit( temphb); 243 mRemoteFileAB = new QLineEdit( temphb);
245 mRemoteFilePWM = new QLineEdit( temphb); 244 mRemoteFilePWM = new QLineEdit( temphb);
246 245
247 // *** remote 246 // *** remote