summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 2f286e0..ec69b11 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,137 +1,138 @@
1#include <stdlib.h> 1#include <stdlib.h>
2 2
3#include <qaction.h> 3#include <qaction.h>
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qpainter.h> 5#include <qpainter.h>
6#include <qwhatsthis.h> 6#include <qwhatsthis.h>
7#include <qpushbutton.h> 7#include <qpushbutton.h>
8#include <qmessagebox.h> 8#include <qmessagebox.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10#include <qtextcodec.h> 10#include <qtextcodec.h>
11#include <qfile.h> 11#include <qfile.h>
12#include <qdir.h> 12#include <qdir.h>
13#include <qapp.h> 13#include <qapp.h>
14#include <qfileinfo.h> 14#include <qfileinfo.h>
15#include <qlabel.h> 15#include <qlabel.h>
16#include <qspinbox.h> 16#include <qspinbox.h>
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qmap.h> 18#include <qmap.h>
19#include <qwmatrix.h> 19#include <qwmatrix.h>
20#include <qtextbrowser.h> 20#include <qtextbrowser.h>
21#include <qtextstream.h> 21#include <qtextstream.h>
22#ifndef DESKTOP_VERSION 22#ifndef DESKTOP_VERSION
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/qpemenubar.h> 24#include <qpe/qpemenubar.h>
25#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qtopia/alarmserver.h> 28#include <qtopia/alarmserver.h>
29#include <qtopia/qcopenvelope_qws.h> 29#include <qtopia/qcopenvelope_qws.h>
30#include <unistd.h> // for sleep 30#include <unistd.h> // for sleep
31#else 31#else
32#include <qmenubar.h> 32#include <qmenubar.h>
33#include <qtoolbar.h> 33#include <qtoolbar.h>
34#include <qapplication.h> 34#include <qapplication.h>
35//#include <resource.h> 35//#include <resource.h>
36 36
37#endif 37#endif
38#include <libkcal/calendarlocal.h> 38#include <libkcal/calendarlocal.h>
39#include <libkcal/todo.h> 39#include <libkcal/todo.h>
40#include <libkcal/phoneformat.h> 40#include <libkcal/phoneformat.h>
41#include <libkdepim/ksyncprofile.h> 41#include <libkdepim/ksyncprofile.h>
42#include <libkdepim/phoneaccess.h>
42#include <libkcal/kincidenceformatter.h> 43#include <libkcal/kincidenceformatter.h>
43#include <libkdepim/kpimglobalprefs.h> 44#include <libkdepim/kpimglobalprefs.h>
44 45
45#include "calendarview.h" 46#include "calendarview.h"
46#include "koviewmanager.h" 47#include "koviewmanager.h"
47#include "datenavigator.h" 48#include "datenavigator.h"
48#include "koagendaview.h" 49#include "koagendaview.h"
49#include "koagenda.h" 50#include "koagenda.h"
50#include "kodialogmanager.h" 51#include "kodialogmanager.h"
51#include "kdialogbase.h" 52#include "kdialogbase.h"
52#include "kapplication.h" 53#include "kapplication.h"
53#include "kofilterview.h" 54#include "kofilterview.h"
54#include "kstandarddirs.h" 55#include "kstandarddirs.h"
55#include "koprefs.h" 56#include "koprefs.h"
56#include "kfiledialog.h" 57#include "kfiledialog.h"
57#include "koglobals.h" 58#include "koglobals.h"
58#include "kglobal.h" 59#include "kglobal.h"
59#include "klocale.h" 60#include "klocale.h"
60#include "kconfig.h" 61#include "kconfig.h"
61#include "simplealarmclient.h" 62#include "simplealarmclient.h"
62#include "externalapphandler.h" 63#include "externalapphandler.h"
63 64
64using namespace KCal; 65using namespace KCal;
65#ifndef _WIN32_ 66#ifndef _WIN32_
66#include <unistd.h> 67#include <unistd.h>
67#else 68#else
68#include "koimportoldialog.h" 69#include "koimportoldialog.h"
69#endif 70#endif
70#include "mainwindow.h" 71#include "mainwindow.h"
71 72
72class KOex2phonePrefs : public QDialog 73class KOex2phonePrefs : public QDialog
73{ 74{
74 public: 75 public:
75 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 76 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
76 QDialog( parent, name, true ) 77 QDialog( parent, name, true )
77 { 78 {
78 setCaption( i18n("Export to phone options") ); 79 setCaption( i18n("Export to phone options") );
79 QVBoxLayout* lay = new QVBoxLayout( this ); 80 QVBoxLayout* lay = new QVBoxLayout( this );
80 lay->setSpacing( 3 ); 81 lay->setSpacing( 3 );
81 lay->setMargin( 3 ); 82 lay->setMargin( 3 );
82 QLabel *lab; 83 QLabel *lab;
83 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 84 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
84 lab->setAlignment (AlignHCenter ); 85 lab->setAlignment (AlignHCenter );
85 QHBox* temphb; 86 QHBox* temphb;
86 temphb = new QHBox( this ); 87 temphb = new QHBox( this );
87 new QLabel( i18n("I/O device: "), temphb ); 88 new QLabel( i18n("I/O device: "), temphb );
88 mPhoneDevice = new QLineEdit( temphb); 89 mPhoneDevice = new QLineEdit( temphb);
89 lay->addWidget( temphb ); 90 lay->addWidget( temphb );
90 temphb = new QHBox( this ); 91 temphb = new QHBox( this );
91 new QLabel( i18n("Connection: "), temphb ); 92 new QLabel( i18n("Connection: "), temphb );
92 mPhoneConnection = new QLineEdit( temphb); 93 mPhoneConnection = new QLineEdit( temphb);
93 lay->addWidget( temphb ); 94 lay->addWidget( temphb );
94 temphb = new QHBox( this ); 95 temphb = new QHBox( this );
95 new QLabel( i18n("Model(opt.): "), temphb ); 96 new QLabel( i18n("Model(opt.): "), temphb );
96 mPhoneModel = new QLineEdit( temphb); 97 mPhoneModel = new QLineEdit( temphb);
97 lay->addWidget( temphb ); 98 lay->addWidget( temphb );
98 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 99 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
99 mWriteBackFuture->setChecked( true ); 100 mWriteBackFuture->setChecked( true );
100 lay->addWidget( mWriteBackFuture ); 101 lay->addWidget( mWriteBackFuture );
101 temphb = new QHBox( this ); 102 temphb = new QHBox( this );
102 new QLabel( i18n("Max. weeks in future: ") , temphb ); 103 new QLabel( i18n("Max. weeks in future: ") , temphb );
103 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 104 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
104 mWriteBackFutureWeeks->setValue( 8 ); 105 mWriteBackFutureWeeks->setValue( 8 );
105 lay->addWidget( temphb ); 106 lay->addWidget( temphb );
106 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 107 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
107 lab->setAlignment (AlignHCenter ); 108 lab->setAlignment (AlignHCenter );
108 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 109 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
109 lay->addWidget( ok ); 110 lay->addWidget( ok );
110 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 111 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
111 lay->addWidget( cancel ); 112 lay->addWidget( cancel );
112 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 113 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
113 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 114 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
114 resize( 220, 240 ); 115 resize( 220, 240 );
115 116
116 } 117 }
117 118
118public: 119public:
119 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 120 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
120 QCheckBox* mWriteBackFuture; 121 QCheckBox* mWriteBackFuture;
121 QSpinBox* mWriteBackFutureWeeks; 122 QSpinBox* mWriteBackFutureWeeks;
122}; 123};
123 124
124int globalFlagBlockStartup; 125int globalFlagBlockStartup;
125MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : 126MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
126 QMainWindow( parent, name ) 127 QMainWindow( parent, name )
127{ 128{
128 mPassWordPiSync = "abc"; 129 mPassWordPiSync = "abc";
129#ifdef DESKTOP_VERSION 130#ifdef DESKTOP_VERSION
130 setFont( QFont("Arial"), 14 ); 131 setFont( QFont("Arial"), 14 );
131#endif 132#endif
132 mSyncActionDialog = 0; 133 mSyncActionDialog = 0;
133 mServerSocket = 0; 134 mServerSocket = 0;
134 mClosed = false; 135 mClosed = false;
135 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 136 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
136 QString confFile = locateLocal("config","korganizerrc"); 137 QString confFile = locateLocal("config","korganizerrc");
137 QFileInfo finf ( confFile ); 138 QFileInfo finf ( confFile );
@@ -1139,194 +1140,194 @@ void MainWindow::slotSyncMenu( int action )
1139 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); 1140 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync();
1140 if ( action == 1000 ) { 1141 if ( action == 1000 ) {
1141 syncSharp(); 1142 syncSharp();
1142 1143
1143 } else if ( action == 1001 ) { 1144 } else if ( action == 1001 ) {
1144 syncLocalFile(); 1145 syncLocalFile();
1145 1146
1146 } else if ( action == 1002 ) { 1147 } else if ( action == 1002 ) {
1147 quickSyncLocalFile(); 1148 quickSyncLocalFile();
1148 1149
1149 } else if ( action >= 1003 ) { 1150 } else if ( action >= 1003 ) {
1150 if ( temp->getIsLocalFileSync() ) { 1151 if ( temp->getIsLocalFileSync() ) {
1151 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 1152 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
1152 KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); 1153 KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
1153 } else { 1154 } else {
1154 if ( temp->getIsPhoneSync() ) { 1155 if ( temp->getIsPhoneSync() ) {
1155 KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ; 1156 KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ;
1156 KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( ); 1157 KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( );
1157 KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( ); 1158 KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( );
1158 syncPhone(); 1159 syncPhone();
1159 } else if ( temp->getIsPiSync() ) { 1160 } else if ( temp->getIsPiSync() ) {
1160 mPassWordPiSync = temp->getRemotePw(); 1161 mPassWordPiSync = temp->getRemotePw();
1161 KOPrefs::instance()->mActiveSyncPort = temp->getRemotePort(); 1162 KOPrefs::instance()->mActiveSyncPort = temp->getRemotePort();
1162 KOPrefs::instance()->mActiveSyncIP = temp->getRemoteIP(); 1163 KOPrefs::instance()->mActiveSyncIP = temp->getRemoteIP();
1163 syncPi(); 1164 syncPi();
1164 } else 1165 } else
1165 syncRemote( temp ); 1166 syncRemote( temp );
1166 1167
1167 } 1168 }
1168 } 1169 }
1169 delete temp; 1170 delete temp;
1170 mBlockSaveFlag = false; 1171 mBlockSaveFlag = false;
1171} 1172}
1172void MainWindow::exportToPhone( int mode ) 1173void MainWindow::exportToPhone( int mode )
1173{ 1174{
1174 1175
1175 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1176 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1176 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1177 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1177 KOex2phonePrefs ex2phone; 1178 KOex2phonePrefs ex2phone;
1178 1179
1179 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1180 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1180 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1181 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1181 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1182 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1182 if ( mode == 1 ) 1183 if ( mode == 1 )
1183 ex2phone.setCaption(i18n("Export complete calendar")); 1184 ex2phone.setCaption(i18n("Export complete calendar"));
1184 if ( mode == 2 ) 1185 if ( mode == 2 )
1185 ex2phone.setCaption(i18n("Export filtered calendar")); 1186 ex2phone.setCaption(i18n("Export filtered calendar"));
1186 1187
1187 if ( !ex2phone.exec() ) { 1188 if ( !ex2phone.exec() ) {
1188 return; 1189 return;
1189 } 1190 }
1190 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1191 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1191 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1192 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1192 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1193 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1193 1194
1194 int inFuture = 0; 1195 int inFuture = 0;
1195 if ( ex2phone.mWriteBackFuture->isChecked() ) 1196 if ( ex2phone.mWriteBackFuture->isChecked() )
1196 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1197 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1197 QPtrList<Incidence> delSel; 1198 QPtrList<Incidence> delSel;
1198 if ( mode == 1 ) 1199 if ( mode == 1 )
1199 delSel = mCalendar->rawIncidences(); 1200 delSel = mCalendar->rawIncidences();
1200 if ( mode == 2 ) 1201 if ( mode == 2 )
1201 delSel = mCalendar->incidences(); 1202 delSel = mCalendar->incidences();
1202 CalendarLocal* cal = new CalendarLocal(); 1203 CalendarLocal* cal = new CalendarLocal();
1203 cal->setLocalTime(); 1204 cal->setLocalTime();
1204 Incidence *incidence = delSel.first(); 1205 Incidence *incidence = delSel.first();
1205 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1206 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1206 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1207 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1207 while ( incidence ) { 1208 while ( incidence ) {
1208 if ( incidence->type() != "Journal" ) { 1209 if ( incidence->type() != "Journal" ) {
1209 bool add = true; 1210 bool add = true;
1210 if ( inFuture ) { 1211 if ( inFuture ) {
1211 QDateTime dt; 1212 QDateTime dt;
1212 if ( incidence->type() == "Todo" ) { 1213 if ( incidence->type() == "Todo" ) {
1213 Todo * t = (Todo*)incidence; 1214 Todo * t = (Todo*)incidence;
1214 if ( t->hasDueDate() ) 1215 if ( t->hasDueDate() )
1215 dt = t->dtDue(); 1216 dt = t->dtDue();
1216 else 1217 else
1217 dt = cur.addSecs( 62 ); 1218 dt = cur.addSecs( 62 );
1218 } 1219 }
1219 else { 1220 else {
1220 bool ok; 1221 bool ok;
1221 dt = incidence->getNextOccurence( cur, &ok ); 1222 dt = incidence->getNextOccurence( cur, &ok );
1222 if ( !ok ) 1223 if ( !ok )
1223 dt = cur.addSecs( -62 ); 1224 dt = cur.addSecs( -62 );
1224 } 1225 }
1225 if ( dt < cur || dt > end ) { 1226 if ( dt < cur || dt > end ) {
1226 add = false; 1227 add = false;
1227 } 1228 }
1228 } 1229 }
1229 if ( add ) { 1230 if ( add ) {
1230 Incidence *in = incidence->clone(); 1231 Incidence *in = incidence->clone();
1231 cal->addIncidence( in ); 1232 cal->addIncidence( in );
1232 } 1233 }
1233 } 1234 }
1234 incidence = delSel.next(); 1235 incidence = delSel.next();
1235 } 1236 }
1236 PhoneFormat::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1237 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1237 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1238 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1238 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1239 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1239 1240
1240 setCaption( i18n("Writing to phone...")); 1241 setCaption( i18n("Writing to phone..."));
1241 if ( PhoneFormat::writeToPhone( cal ) ) 1242 if ( PhoneFormat::writeToPhone( cal ) )
1242 setCaption( i18n("Export to phone successful!")); 1243 setCaption( i18n("Export to phone successful!"));
1243 else 1244 else
1244 setCaption( i18n("Error exporting to phone!")); 1245 setCaption( i18n("Error exporting to phone!"));
1245 delete cal; 1246 delete cal;
1246} 1247}
1247 1248
1248 1249
1249void MainWindow::setDefaultPreferences() 1250void MainWindow::setDefaultPreferences()
1250{ 1251{
1251 KOPrefs *p = KOPrefs::instance(); 1252 KOPrefs *p = KOPrefs::instance();
1252 1253
1253 p->mCompactDialogs = true; 1254 p->mCompactDialogs = true;
1254 p->mConfirm = true; 1255 p->mConfirm = true;
1255 // p->mEnableQuickTodo = false; 1256 // p->mEnableQuickTodo = false;
1256 1257
1257} 1258}
1258 1259
1259QString MainWindow::resourcePath() 1260QString MainWindow::resourcePath()
1260{ 1261{
1261 return KGlobal::iconLoader()->iconPath(); 1262 return KGlobal::iconLoader()->iconPath();
1262} 1263}
1263 1264
1264void MainWindow::displayText( QString text ,QString cap ) 1265void MainWindow::displayText( QString text ,QString cap )
1265{ 1266{
1266 QDialog dia( this, "name", true ); ; 1267 QDialog dia( this, "name", true ); ;
1267 dia.setCaption( cap ); 1268 dia.setCaption( cap );
1268 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1269 QVBoxLayout* lay = new QVBoxLayout( &dia );
1269 lay->setSpacing( 3 ); 1270 lay->setSpacing( 3 );
1270 lay->setMargin( 3 ); 1271 lay->setMargin( 3 );
1271 QTextBrowser tb ( &dia ); 1272 QTextBrowser tb ( &dia );
1272 lay->addWidget( &tb ); 1273 lay->addWidget( &tb );
1273 tb.setText( text ); 1274 tb.setText( text );
1274#ifdef DESKTOP_VERSION 1275#ifdef DESKTOP_VERSION
1275 dia.resize( 640, 480); 1276 dia.resize( 640, 480);
1276#else 1277#else
1277 dia.showMaximized(); 1278 dia.showMaximized();
1278#endif 1279#endif
1279 dia.exec(); 1280 dia.exec();
1280} 1281}
1281void MainWindow::displayFile( QString fn, QString cap ) 1282void MainWindow::displayFile( QString fn, QString cap )
1282{ 1283{
1283 QString fileName = resourcePath() + fn; 1284 QString fileName = resourcePath() + fn;
1284 QString text; 1285 QString text;
1285 QFile file( fileName ); 1286 QFile file( fileName );
1286 if (!file.open( IO_ReadOnly ) ) { 1287 if (!file.open( IO_ReadOnly ) ) {
1287 return ; 1288 return ;
1288 1289
1289 } 1290 }
1290 QTextStream ts( &file ); 1291 QTextStream ts( &file );
1291 text = ts.read(); 1292 text = ts.read();
1292 file.close(); 1293 file.close();
1293 displayText( text, cap); 1294 displayText( text, cap);
1294} 1295}
1295void MainWindow::features() 1296void MainWindow::features()
1296{ 1297{
1297 1298
1298 displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); 1299 displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") );
1299} 1300}
1300 1301
1301void MainWindow::usertrans() 1302void MainWindow::usertrans()
1302{ 1303{
1303 1304
1304 displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); 1305 displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") );
1305} 1306}
1306 1307
1307void MainWindow::synchowto() 1308void MainWindow::synchowto()
1308{ 1309{
1309#if 0 1310#if 0
1310 QPtrList<Incidence> er = mCalendar->rawIncidences(); 1311 QPtrList<Incidence> er = mCalendar->rawIncidences();
1311 Incidence* inR = er.first(); 1312 Incidence* inR = er.first();
1312 VCalFormat vf; 1313 VCalFormat vf;
1313 QString strout; 1314 QString strout;
1314 while ( inR ) { 1315 while ( inR ) {
1315 if ( inR->type() == "Todo" ) 1316 if ( inR->type() == "Todo" )
1316 strout = vf.todoToString( (Todo *) inR ); 1317 strout = vf.todoToString( (Todo *) inR );
1317 if ( inR->type() == "Event" ) 1318 if ( inR->type() == "Event" )
1318 strout = vf.eventToString( (Event *) inR ); 1319 strout = vf.eventToString( (Event *) inR );
1319 qDebug("incidence: \n%s\n ente\n\n",strout.latin1() ); 1320 qDebug("incidence: \n%s\n ente\n\n",strout.latin1() );
1320 inR = er.next(); 1321 inR = er.next();
1321 } 1322 }
1322#endif 1323#endif
1323 displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); 1324 displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") );
1324} 1325}
1325void MainWindow::faq() 1326void MainWindow::faq()
1326{ 1327{
1327 displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); 1328 displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") );
1328 1329
1329} 1330}
1330void MainWindow::whatsNew() 1331void MainWindow::whatsNew()
1331{ 1332{
1332 displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") ); 1333 displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") );