summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 1d62046..e4c067e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -106,76 +106,81 @@
106#include "koagendaview.h" 106#include "koagendaview.h"
107#include "kodialogmanager.h" 107#include "kodialogmanager.h"
108#include "outgoingdialog.h" 108#include "outgoingdialog.h"
109#include "incomingdialog.h" 109#include "incomingdialog.h"
110#include "statusdialog.h" 110#include "statusdialog.h"
111#include "kdatenavigator.h" 111#include "kdatenavigator.h"
112#include "kotodoview.h" 112#include "kotodoview.h"
113#include "datenavigator.h" 113#include "datenavigator.h"
114#include "resourceview.h" 114#include "resourceview.h"
115#include "navigatorbar.h" 115#include "navigatorbar.h"
116#include "searchdialog.h" 116#include "searchdialog.h"
117#include "mainwindow.h" 117#include "mainwindow.h"
118 118
119#include "calendarview.h" 119#include "calendarview.h"
120#ifndef DESKTOP_VERSION 120#ifndef DESKTOP_VERSION
121#include <qtopia/alarmserver.h> 121#include <qtopia/alarmserver.h>
122#endif 122#endif
123#ifndef _WIN32_ 123#ifndef _WIN32_
124#include <stdlib.h> 124#include <stdlib.h>
125#include <stdio.h> 125#include <stdio.h>
126#include <unistd.h> 126#include <unistd.h>
127#else 127#else
128#include <qprocess.h> 128#include <qprocess.h>
129#endif 129#endif
130#ifdef DESKTOP_VERSION
131#include <kabc/stdaddressbook.h>
132#endif
130using namespace KOrg; 133using namespace KOrg;
131using namespace KCal; 134using namespace KCal;
132extern int globalFlagBlockAgenda; 135extern int globalFlagBlockAgenda;
133extern int globalFlagBlockStartup; 136extern int globalFlagBlockStartup;
134 137
135 138
136 139
137class KOBeamPrefs : public QDialog 140class KOBeamPrefs : public QDialog
138{ 141{
139 public: 142 public:
140 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : 143 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
141 QDialog( parent, name, true ) 144 QDialog( parent, name, true )
142 { 145 {
143 setCaption( i18n("Beam Options") ); 146 setCaption( i18n("Beam Options") );
144 QVBoxLayout* lay = new QVBoxLayout( this ); 147 QVBoxLayout* lay = new QVBoxLayout( this );
145 lay->setSpacing( 3 ); 148 lay->setSpacing( 3 );
146 lay->setMargin( 3 ); 149 lay->setMargin( 3 );
147 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 150 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
148 lay->addWidget( format ); 151 lay->addWidget( format );
149 format->setExclusive ( true ) ; 152 format->setExclusive ( true ) ;
150 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 153 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
151 lay->addWidget( time ); time->setExclusive ( true ) ; 154 lay->addWidget( time ); time->setExclusive ( true ) ;
152 vcal = new QRadioButton(" vCalendar ", format ); 155 vcal = new QRadioButton(" vCalendar ", format );
153 ical = new QRadioButton(" iCalendar ", format ); 156 ical = new QRadioButton(" iCalendar ", format );
154 vcal->setChecked( true ); 157 vcal->setChecked( true );
155 tz = new QRadioButton(i18n(" With timezone "), time ); 158 tz = new QRadioButton(i18n(" With timezone "), time );
156 local = new QRadioButton(i18n(" Local time "), time ); 159 local = new QRadioButton(i18n(" Local time "), time );
157 tz->setChecked( true ); 160 tz->setChecked( true );#ifdef DESKTOP_VERSION
161#include <kabc/stdaddressbook.h>
162#endif
158 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); 163 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this );
159 lay->addWidget( ok ); 164 lay->addWidget( ok );
160 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 165 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
161 lay->addWidget( cancel ); 166 lay->addWidget( cancel );
162 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 167 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
163 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 168 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
164 resize( 200, 200 ); 169 resize( 200, 200 );
165 } 170 }
166 171
167 bool beamVcal() { return vcal->isChecked(); } 172 bool beamVcal() { return vcal->isChecked(); }
168 bool beamLocal() { return local->isChecked(); } 173 bool beamLocal() { return local->isChecked(); }
169private: 174private:
170 QRadioButton* vcal, *ical, *local, *tz; 175 QRadioButton* vcal, *ical, *local, *tz;
171}; 176};
172class KOCatPrefs : public QDialog 177class KOCatPrefs : public QDialog
173{ 178{
174 public: 179 public:
175 KOCatPrefs( QWidget *parent=0, const char *name=0 ) : 180 KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
176 QDialog( parent, name, true ) 181 QDialog( parent, name, true )
177 { 182 {
178 setCaption( i18n("Manage new Categories") ); 183 setCaption( i18n("Manage new Categories") );
179 QVBoxLayout* lay = new QVBoxLayout( this ); 184 QVBoxLayout* lay = new QVBoxLayout( this );
180 lay->setSpacing( 3 ); 185 lay->setSpacing( 3 );
181 lay->setMargin( 3 ); 186 lay->setMargin( 3 );
@@ -1309,49 +1314,48 @@ void CalendarView::syncExternal( int mode )
1309 lse->setDescription( "" ); 1314 lse->setDescription( "" );
1310 lse->setReadOnly( true ); 1315 lse->setReadOnly( true );
1311 } 1316 }
1312 } 1317 }
1313 } 1318 }
1314 setModified( true ); 1319 setModified( true );
1315 } else { 1320 } else {
1316 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; 1321 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ;
1317 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), 1322 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"),
1318 question, i18n("Ok")) ; 1323 question, i18n("Ok")) ;
1319 1324
1320 } 1325 }
1321 delete calendar; 1326 delete calendar;
1322 updateView(); 1327 updateView();
1323 return ;//syncOK; 1328 return ;//syncOK;
1324 1329
1325} 1330}
1326void CalendarView::syncSharp() 1331void CalendarView::syncSharp()
1327{ 1332{
1328 syncExternal( 0 ); 1333 syncExternal( 0 );
1329 1334
1330} 1335}
1331 1336
1332 1337
1333//#include <kabc/stdaddressbook.h>
1334bool CalendarView::importBday() 1338bool CalendarView::importBday()
1335{ 1339{
1336#ifndef KORG_NOKABC 1340#ifndef KORG_NOKABC
1337 1341
1338#ifdef DESKTOP_VERSION 1342#ifdef DESKTOP_VERSION
1339 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 1343 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
1340 KABC::AddressBook::Iterator it; 1344 KABC::AddressBook::Iterator it;
1341 int count = 0; 1345 int count = 0;
1342 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 1346 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
1343 ++count; 1347 ++count;
1344 } 1348 }
1345 QProgressBar bar(count,0 ); 1349 QProgressBar bar(count,0 );
1346 int w = 300; 1350 int w = 300;
1347 if ( QApplication::desktop()->width() < 320 ) 1351 if ( QApplication::desktop()->width() < 320 )
1348 w = 220; 1352 w = 220;
1349 int h = bar.sizeHint().height() ; 1353 int h = bar.sizeHint().height() ;
1350 int dw = QApplication::desktop()->width(); 1354 int dw = QApplication::desktop()->width();
1351 int dh = QApplication::desktop()->height(); 1355 int dh = QApplication::desktop()->height();
1352 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1356 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1353 bar.show(); 1357 bar.show();
1354 bar.setCaption (i18n("Reading addressbook - close to abort!") ); 1358 bar.setCaption (i18n("Reading addressbook - close to abort!") );
1355 qApp->processEvents(); 1359 qApp->processEvents();
1356 count = 0; 1360 count = 0;
1357 int addCount = 0; 1361 int addCount = 0;