author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/mainwindow.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/mainwindow.cpp | 316 |
1 files changed, 163 insertions, 153 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 69ccde1..2004939 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,24 +1,25 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qpopupmenu.h> | 4 | #include <Q3Action> |
5 | #include <q3popupmenu.h> | ||
5 | #include <qpainter.h> | 6 | #include <qpainter.h> |
6 | #include <qwhatsthis.h> | 7 | #include <q3whatsthis.h> |
7 | #include <qpushbutton.h> | 8 | #include <qpushbutton.h> |
8 | #include <qmessagebox.h> | 9 | #include <qmessagebox.h> |
9 | #include <qlineedit.h> | 10 | #include <qlineedit.h> |
10 | #include <qtextcodec.h> | 11 | #include <qtextcodec.h> |
11 | #include <qfile.h> | 12 | #include <qfile.h> |
12 | #include <qdir.h> | 13 | #include <qdir.h> |
13 | #include <qapp.h> | 14 | #include <qapplication.h> |
14 | #include <qfileinfo.h> | 15 | #include <qfileinfo.h> |
15 | #include <qlabel.h> | 16 | #include <qlabel.h> |
16 | #include <qspinbox.h> | 17 | #include <qspinbox.h> |
17 | #include <qcheckbox.h> | 18 | #include <qcheckbox.h> |
18 | #include <qmap.h> | 19 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 20 | #include <qmatrix.h> |
20 | #include <qtextbrowser.h> | 21 | #include <q3textbrowser.h> |
21 | #include <qtextstream.h> | 22 | #include <q3textstream.h> |
22 | #ifndef DESKTOP_VERSION | 23 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 24 | #include <qpe/global.h> |
24 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
@@ -28,8 +29,17 @@ | |||
28 | #include <qtopia/qcopenvelope_qws.h> | 29 | #include <qtopia/qcopenvelope_qws.h> |
29 | //#include <unistd.h> // for sleep | 30 | //#include <unistd.h> // for sleep |
30 | #else | 31 | #else |
31 | #include <qtoolbar.h> | 32 | #include <q3toolbar.h> |
32 | #include <qapplication.h> | 33 | #include <qapplication.h> |
34 | //Added by qt3to4: | ||
35 | #include <QResizeEvent> | ||
36 | #include <QPixmap> | ||
37 | #include <QCloseEvent> | ||
38 | #include <QKeyEvent> | ||
39 | #include <Q3VBoxLayout> | ||
40 | #include <QHideEvent> | ||
41 | #include <Q3CString> | ||
42 | #include <Q3PtrList> | ||
33 | //#include <resource.h> | 43 | //#include <resource.h> |
34 | 44 | ||
35 | #endif | 45 | #endif |
@@ -80,35 +90,35 @@ class KOex2phonePrefs : public QDialog | |||
80 | QDialog( parent, name, true ) | 90 | QDialog( parent, name, true ) |
81 | { | 91 | { |
82 | setCaption( i18n("Export to phone options") ); | 92 | setCaption( i18n("Export to phone options") ); |
83 | QVBoxLayout* lay = new QVBoxLayout( this ); | 93 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
84 | lay->setSpacing( 3 ); | 94 | lay->setSpacing( 3 ); |
85 | lay->setMargin( 3 ); | 95 | lay->setMargin( 3 ); |
86 | QLabel *lab; | 96 | QLabel *lab; |
87 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 97 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
88 | lab->setAlignment (AlignHCenter ); | 98 | lab->setAlignment (Qt::AlignHCenter ); |
89 | QHBox* temphb; | 99 | Q3HBox* temphb; |
90 | temphb = new QHBox( this ); | 100 | temphb = new Q3HBox( this ); |
91 | new QLabel( i18n("I/O device: "), temphb ); | 101 | new QLabel( i18n("I/O device: "), temphb ); |
92 | mPhoneDevice = new QLineEdit( temphb); | 102 | mPhoneDevice = new QLineEdit( temphb); |
93 | lay->addWidget( temphb ); | 103 | lay->addWidget( temphb ); |
94 | temphb = new QHBox( this ); | 104 | temphb = new Q3HBox( this ); |
95 | new QLabel( i18n("Connection: "), temphb ); | 105 | new QLabel( i18n("Connection: "), temphb ); |
96 | mPhoneConnection = new QLineEdit( temphb); | 106 | mPhoneConnection = new QLineEdit( temphb); |
97 | lay->addWidget( temphb ); | 107 | lay->addWidget( temphb ); |
98 | temphb = new QHBox( this ); | 108 | temphb = new Q3HBox( this ); |
99 | new QLabel( i18n("Model(opt.): "), temphb ); | 109 | new QLabel( i18n("Model(opt.): "), temphb ); |
100 | mPhoneModel = new QLineEdit( temphb); | 110 | mPhoneModel = new QLineEdit( temphb); |
101 | lay->addWidget( temphb ); | 111 | lay->addWidget( temphb ); |
102 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 112 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
103 | mWriteBackFuture->setChecked( true ); | 113 | mWriteBackFuture->setChecked( true ); |
104 | lay->addWidget( mWriteBackFuture ); | 114 | lay->addWidget( mWriteBackFuture ); |
105 | temphb = new QHBox( this ); | 115 | temphb = new Q3HBox( this ); |
106 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 116 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
107 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 117 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
108 | mWriteBackFutureWeeks->setValue( 8 ); | 118 | mWriteBackFutureWeeks->setValue( 8 ); |
109 | lay->addWidget( temphb ); | 119 | lay->addWidget( temphb ); |
110 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 120 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
111 | lab->setAlignment (AlignHCenter ); | 121 | lab->setAlignment (Qt::AlignHCenter ); |
112 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 122 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
113 | lay->addWidget( ok ); | 123 | lay->addWidget( ok ); |
114 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 124 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
@@ -134,7 +144,7 @@ QPixmap* sgListViewJournalPix; | |||
134 | 144 | ||
135 | int globalFlagBlockStartup; | 145 | int globalFlagBlockStartup; |
136 | MainWindow::MainWindow( QWidget *parent, const char *name ) : | 146 | MainWindow::MainWindow( QWidget *parent, const char *name ) : |
137 | QMainWindow( parent, name ) | 147 | Q3MainWindow( parent, name ) |
138 | { | 148 | { |
139 | sgListViewCompletedPix[5] = &listviewPix; | 149 | sgListViewCompletedPix[5] = &listviewPix; |
140 | sgListViewCompletedPix[0] = &listviewPix0; | 150 | sgListViewCompletedPix[0] = &listviewPix0; |
@@ -185,18 +195,18 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
185 | p->mCurrentDisplayedView = 0; | 195 | p->mCurrentDisplayedView = 0; |
186 | if ( p->mHourSize > 22 ) | 196 | if ( p->mHourSize > 22 ) |
187 | p->mHourSize = 22; | 197 | p->mHourSize = 22; |
188 | QMainWindow::ToolBarDock tbd; | 198 | Qt::ToolBarDock tbd; |
189 | if ( p->mToolBarHor ) { | 199 | if ( p->mToolBarHor ) { |
190 | if ( p->mToolBarUp ) | 200 | if ( p->mToolBarUp ) |
191 | tbd = Bottom; | 201 | tbd = Qt::Bottom; |
192 | else | 202 | else |
193 | tbd = Top; | 203 | tbd = Qt::Top; |
194 | } | 204 | } |
195 | else { | 205 | else { |
196 | if ( p->mToolBarUp ) | 206 | if ( p->mToolBarUp ) |
197 | tbd = Right; | 207 | tbd = Qt::Right; |
198 | else | 208 | else |
199 | tbd = Left; | 209 | tbd = Qt::Left; |
200 | } | 210 | } |
201 | if ( KOPrefs::instance()->mUseAppColors ) | 211 | if ( KOPrefs::instance()->mUseAppColors ) |
202 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 212 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
@@ -213,15 +223,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
213 | { | 223 | { |
214 | if ( p->mToolBarHorF ) { | 224 | if ( p->mToolBarHorF ) { |
215 | if ( p->mToolBarUpF ) | 225 | if ( p->mToolBarUpF ) |
216 | tbd = Bottom; | 226 | tbd = Qt::Bottom; |
217 | else | 227 | else |
218 | tbd = Top; | 228 | tbd = Qt::Top; |
219 | } | 229 | } |
220 | else { | 230 | else { |
221 | if ( p->mToolBarUpF ) | 231 | if ( p->mToolBarUpF ) |
222 | tbd = Right; | 232 | tbd = Qt::Right; |
223 | else | 233 | else |
224 | tbd = Left; | 234 | tbd = Qt::Left; |
225 | } | 235 | } |
226 | filterToolBar = new QPEToolBar ( this ); | 236 | filterToolBar = new QPEToolBar ( this ); |
227 | filterMenubar = new KMenuBar( 0 ); | 237 | filterMenubar = new KMenuBar( 0 ); |
@@ -230,7 +240,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
230 | filterToolBar->setFocusPolicy( NoFocus ); | 240 | filterToolBar->setFocusPolicy( NoFocus ); |
231 | filterMenubar->setFocusPolicy( NoFocus ); | 241 | filterMenubar->setFocusPolicy( NoFocus ); |
232 | #endif | 242 | #endif |
233 | filterPopupMenu = new QPopupMenu( this ); | 243 | filterPopupMenu = new Q3PopupMenu( this ); |
234 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 244 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
235 | QString addTest = "A"; | 245 | QString addTest = "A"; |
236 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 246 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
@@ -259,29 +269,29 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
259 | #endif | 269 | #endif |
260 | if ( p->mToolBarHorV ) { | 270 | if ( p->mToolBarHorV ) { |
261 | if ( p->mToolBarUpV ) | 271 | if ( p->mToolBarUpV ) |
262 | tbd = Bottom; | 272 | tbd = Qt::Bottom; |
263 | else | 273 | else |
264 | tbd = Top; | 274 | tbd = Qt::Top; |
265 | } | 275 | } |
266 | else { | 276 | else { |
267 | if ( p->mToolBarUpV ) | 277 | if ( p->mToolBarUpV ) |
268 | tbd = Right; | 278 | tbd = Qt::Right; |
269 | else | 279 | else |
270 | tbd = Left; | 280 | tbd = Qt::Left; |
271 | } | 281 | } |
272 | viewToolBar = new QPEToolBar( this ); | 282 | viewToolBar = new QPEToolBar( this ); |
273 | addToolBar (viewToolBar , tbd ); | 283 | addToolBar (viewToolBar , tbd ); |
274 | if ( p->mToolBarHorN ) { | 284 | if ( p->mToolBarHorN ) { |
275 | if ( p->mToolBarUpN ) | 285 | if ( p->mToolBarUpN ) |
276 | tbd = Bottom; | 286 | tbd = Qt::Bottom; |
277 | else | 287 | else |
278 | tbd = Top; | 288 | tbd = Qt::Top; |
279 | } | 289 | } |
280 | else { | 290 | else { |
281 | if ( p->mToolBarUpN ) | 291 | if ( p->mToolBarUpN ) |
282 | tbd = Right; | 292 | tbd = Qt::Right; |
283 | else | 293 | else |
284 | tbd = Left; | 294 | tbd = Qt::Left; |
285 | } | 295 | } |
286 | navigatorToolBar = new QPEToolBar( this ); | 296 | navigatorToolBar = new QPEToolBar( this ); |
287 | addToolBar (navigatorToolBar , tbd ); | 297 | addToolBar (navigatorToolBar , tbd ); |
@@ -440,9 +450,9 @@ void MainWindow::loadDataAfterStart() | |||
440 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 450 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
441 | SLOT( slotModifiedChanged( bool ) ) ); | 451 | SLOT( slotModifiedChanged( bool ) ) ); |
442 | #ifndef DESKTOP_VERSION | 452 | #ifndef DESKTOP_VERSION |
443 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 453 | connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & ))); |
444 | connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); | 454 | connect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(recieve( const Q3CString&, const QByteArray& ))); |
445 | disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); | 455 | disconnect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(receiveStart( const Q3CString&, const QByteArray& ))); |
446 | if ( !mCStringMess.isEmpty() ) | 456 | if ( !mCStringMess.isEmpty() ) |
447 | recieve( mCStringMess, mByteData ); | 457 | recieve( mCStringMess, mByteData ); |
448 | #endif | 458 | #endif |
@@ -509,7 +519,7 @@ void MainWindow::toggleBeamReceive() | |||
509 | qDebug("KO: Enable BeamReceive "); | 519 | qDebug("KO: Enable BeamReceive "); |
510 | brAction->setOn(true); | 520 | brAction->setOn(true); |
511 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 521 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
512 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 522 | QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(recieve( const Q3CString&, const QByteArray& ))); |
513 | #endif | 523 | #endif |
514 | } | 524 | } |
515 | void MainWindow::showMaximized () | 525 | void MainWindow::showMaximized () |
@@ -600,22 +610,22 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
600 | 610 | ||
601 | 611 | ||
602 | } | 612 | } |
603 | void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) | 613 | void MainWindow::receiveStart( const Q3CString& cmsg, const QByteArray& data ) |
604 | { | 614 | { |
605 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); | 615 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); |
606 | mCStringMess = cmsg; | 616 | mCStringMess = cmsg; |
607 | mByteData = data; | 617 | mByteData = data; |
608 | } | 618 | } |
609 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 619 | void MainWindow::recieve( const Q3CString& cmsg, const QByteArray& data ) |
610 | { | 620 | { |
611 | QDataStream stream( data, IO_ReadOnly ); | 621 | QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); |
612 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 622 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
613 | //QString datamess; | 623 | //QString datamess; |
614 | //qDebug("message "); | 624 | //qDebug("message "); |
615 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 625 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
616 | 626 | ||
617 | if ( cmsg == "setDocument(QString)" ) { | 627 | if ( cmsg == "setDocument(QString)" ) { |
618 | QDataStream stream( data, IO_ReadOnly ); | 628 | QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); |
619 | QString fileName; | 629 | QString fileName; |
620 | stream >> fileName; | 630 | stream >> fileName; |
621 | //qDebug("filename %s ", fileName.latin1()); | 631 | //qDebug("filename %s ", fileName.latin1()); |
@@ -744,21 +754,21 @@ void MainWindow::initActions() | |||
744 | KOPrefs *p = KOPrefs::instance(); | 754 | KOPrefs *p = KOPrefs::instance(); |
745 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 755 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
746 | 756 | ||
747 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 757 | Q3PopupMenu *viewMenu = new Q3PopupMenu( this ); |
748 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 758 | Q3PopupMenu *actionMenu = new Q3PopupMenu( this ); |
749 | mCurrentItemMenu = new QPopupMenu ( this ); | 759 | mCurrentItemMenu = new Q3PopupMenu ( this ); |
750 | QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); | 760 | Q3PopupMenu *nextConflictMenu = new Q3PopupMenu ( this ); |
751 | QPopupMenu *importMenu = new QPopupMenu( this ); | 761 | Q3PopupMenu *importMenu = new Q3PopupMenu( this ); |
752 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 762 | Q3PopupMenu *importMenu_X = new Q3PopupMenu( this ); |
753 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 763 | Q3PopupMenu *exportMenu_X = new Q3PopupMenu( this ); |
754 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 764 | Q3PopupMenu *beamMenu_X = new Q3PopupMenu( this ); |
755 | selectFilterMenu = new QPopupMenu( this ); | 765 | selectFilterMenu = new Q3PopupMenu( this ); |
756 | selectFilterMenu->setCheckable( true ); | 766 | selectFilterMenu->setCheckable( true ); |
757 | syncMenu = new QPopupMenu( this ); | 767 | syncMenu = new Q3PopupMenu( this ); |
758 | configureAgendaMenu = new QPopupMenu( this ); | 768 | configureAgendaMenu = new Q3PopupMenu( this ); |
759 | configureToolBarMenu = new QPopupMenu( this ); | 769 | configureToolBarMenu = new Q3PopupMenu( this ); |
760 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 770 | Q3PopupMenu *helpMenu = new Q3PopupMenu( this ); |
761 | QIconSet icon; | 771 | QIcon icon; |
762 | int pixWid = 22, pixHei = 22; | 772 | int pixWid = 22, pixHei = 22; |
763 | QString pathString = ""; | 773 | QString pathString = ""; |
764 | if ( !p->mToolBarMiniIcons ) { | 774 | if ( !p->mToolBarMiniIcons ) { |
@@ -791,7 +801,7 @@ void MainWindow::initActions() | |||
791 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 801 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
792 | } else { | 802 | } else { |
793 | menuBar1 = new KMenuBar( iconToolBar ); | 803 | menuBar1 = new KMenuBar( iconToolBar ); |
794 | QPopupMenu *menuBar = new QPopupMenu( this ); | 804 | Q3PopupMenu *menuBar = new Q3PopupMenu( this ); |
795 | icon = loadPixmap( pathString + "z_menu" ); | 805 | icon = loadPixmap( pathString + "z_menu" ); |
796 | menuBar1->insertItem( icon.pixmap(), menuBar); | 806 | menuBar1->insertItem( icon.pixmap(), menuBar); |
797 | //menuBar1->insertItem( i18n("ME"), menuBar); | 807 | //menuBar1->insertItem( i18n("ME"), menuBar); |
@@ -818,7 +828,7 @@ void MainWindow::initActions() | |||
818 | mWeekPixmap.resize( pixWid , pixHei ); | 828 | mWeekPixmap.resize( pixWid , pixHei ); |
819 | mWeekPixmap.fill( mWeekBgColor ); | 829 | mWeekPixmap.fill( mWeekBgColor ); |
820 | icon = mWeekPixmap; | 830 | icon = mWeekPixmap; |
821 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 831 | mWeekAction = new Q3Action( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
822 | if ( p-> mShowIconWeekNum ) | 832 | if ( p-> mShowIconWeekNum ) |
823 | mWeekAction->addTo( iconToolBar ); | 833 | mWeekAction->addTo( iconToolBar ); |
824 | mWeekFont = font(); | 834 | mWeekFont = font(); |
@@ -840,18 +850,18 @@ void MainWindow::initActions() | |||
840 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 850 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
841 | if ( p->mShowIconFilterview ) { | 851 | if ( p->mShowIconFilterview ) { |
842 | icon = loadPixmap( pathString + "filter" ); | 852 | icon = loadPixmap( pathString + "filter" ); |
843 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); | 853 | actionFilterMenuTB = new Q3Action( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); |
844 | connect( actionFilterMenuTB, SIGNAL( activated() ), | 854 | connect( actionFilterMenuTB, SIGNAL( activated() ), |
845 | this, SLOT( fillFilterMenuTB() ) ); | 855 | this, SLOT( fillFilterMenuTB() ) ); |
846 | actionFilterMenuTB->addTo( iconToolBar ); | 856 | actionFilterMenuTB->addTo( iconToolBar ); |
847 | selectFilterMenuTB = new QPopupMenu( this ); | 857 | selectFilterMenuTB = new Q3PopupMenu( this ); |
848 | selectFilterMenuTB->setCheckable( true ); | 858 | selectFilterMenuTB->setCheckable( true ); |
849 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 859 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
850 | } | 860 | } |
851 | 861 | ||
852 | //#endif | 862 | //#endif |
853 | // ****************** | 863 | // ****************** |
854 | QAction *action; | 864 | Q3Action *action; |
855 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 865 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
856 | configureToolBarMenu->setCheckable( true ); | 866 | configureToolBarMenu->setCheckable( true ); |
857 | 867 | ||
@@ -866,35 +876,35 @@ void MainWindow::initActions() | |||
866 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 876 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
867 | this, SLOT( showConfigureAgenda( ) ) ); | 877 | this, SLOT( showConfigureAgenda( ) ) ); |
868 | icon = loadPixmap( pathString + "today" ); | 878 | icon = loadPixmap( pathString + "today" ); |
869 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 879 | Q3Action* today_action = new Q3Action( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
870 | today_action->addTo( actionMenu ); | 880 | today_action->addTo( actionMenu ); |
871 | connect( today_action, SIGNAL( activated() ), | 881 | connect( today_action, SIGNAL( activated() ), |
872 | mView, SLOT( goToday() ) ); | 882 | mView, SLOT( goToday() ) ); |
873 | 883 | ||
874 | icon = loadPixmap( pathString + "picker" ); | 884 | icon = loadPixmap( pathString + "picker" ); |
875 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); | 885 | Q3Action* dPickerAction = new Q3Action( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); |
876 | dPickerAction->addTo( actionMenu ); | 886 | dPickerAction->addTo( actionMenu ); |
877 | connect( dPickerAction, SIGNAL( activated() ), | 887 | connect( dPickerAction, SIGNAL( activated() ), |
878 | mView, SLOT( showDatePicker() ) ); | 888 | mView, SLOT( showDatePicker() ) ); |
879 | 889 | ||
880 | icon = loadPixmap( pathString + "search" ); | 890 | icon = loadPixmap( pathString + "search" ); |
881 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 891 | Q3Action* search_action = new Q3Action( i18n("Search"), icon, i18n("Search..."), 0, this ); |
882 | search_action->addTo( actionMenu ); | 892 | search_action->addTo( actionMenu ); |
883 | connect( search_action, SIGNAL( activated() ), | 893 | connect( search_action, SIGNAL( activated() ), |
884 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 894 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
885 | actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); | 895 | actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); |
886 | 896 | ||
887 | action = new QAction( "Undo Delete", i18n("All events"), 0, this ); | 897 | action = new Q3Action( "Undo Delete", i18n("All events"), 0, this ); |
888 | action->addTo( nextConflictMenu ); | 898 | action->addTo( nextConflictMenu ); |
889 | connect( action, SIGNAL( activated() ), | 899 | connect( action, SIGNAL( activated() ), |
890 | mView, SLOT( conflictAll() ) ); | 900 | mView, SLOT( conflictAll() ) ); |
891 | 901 | ||
892 | action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); | 902 | action = new Q3Action( "Undo Delete", i18n("Allday events"), 0, this ); |
893 | action->addTo( nextConflictMenu ); | 903 | action->addTo( nextConflictMenu ); |
894 | connect( action, SIGNAL( activated() ), | 904 | connect( action, SIGNAL( activated() ), |
895 | mView, SLOT( conflictAllday() ) ); | 905 | mView, SLOT( conflictAllday() ) ); |
896 | 906 | ||
897 | action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); | 907 | action = new Q3Action( "Undo Delete", i18n("Events with time"), 0, this ); |
898 | action->addTo( nextConflictMenu ); | 908 | action->addTo( nextConflictMenu ); |
899 | connect( action, SIGNAL( activated() ), | 909 | connect( action, SIGNAL( activated() ), |
900 | mView, SLOT( conflictNotAll() ) ); | 910 | mView, SLOT( conflictNotAll() ) ); |
@@ -902,16 +912,16 @@ void MainWindow::initActions() | |||
902 | actionMenu->insertSeparator(); | 912 | actionMenu->insertSeparator(); |
903 | 913 | ||
904 | icon = loadPixmap( pathString + "newevent" ); | 914 | icon = loadPixmap( pathString + "newevent" ); |
905 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 915 | Q3Action* ne_action = new Q3Action( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
906 | ne_action->addTo( mCurrentItemMenu ); | 916 | ne_action->addTo( mCurrentItemMenu ); |
907 | connect( ne_action, SIGNAL( activated() ), | 917 | connect( ne_action, SIGNAL( activated() ), |
908 | mView, SLOT( newEvent() ) ); | 918 | mView, SLOT( newEvent() ) ); |
909 | icon = loadPixmap( pathString + "newtodo" ); | 919 | icon = loadPixmap( pathString + "newtodo" ); |
910 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 920 | Q3Action* nt_action = new Q3Action( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
911 | nt_action->addTo( mCurrentItemMenu ); | 921 | nt_action->addTo( mCurrentItemMenu ); |
912 | connect( nt_action, SIGNAL( activated() ), | 922 | connect( nt_action, SIGNAL( activated() ), |
913 | mView, SLOT( newTodo() ) ); | 923 | mView, SLOT( newTodo() ) ); |
914 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 924 | mNewSubTodoAction = new Q3Action( "new_subtodo", i18n("New Sub-Todo..."), 0, |
915 | this ); | 925 | this ); |
916 | mNewSubTodoAction->addTo( mCurrentItemMenu ); | 926 | mNewSubTodoAction->addTo( mCurrentItemMenu ); |
917 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 927 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
@@ -930,44 +940,44 @@ void MainWindow::initActions() | |||
930 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 940 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
931 | 941 | ||
932 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); | 942 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); |
933 | mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); | 943 | mShowAction = new Q3Action( "show_incidence", i18n("Show"), 0, this ); |
934 | mShowAction->addTo( mCurrentItemMenu ); | 944 | mShowAction->addTo( mCurrentItemMenu ); |
935 | connect( mShowAction, SIGNAL( activated() ), | 945 | connect( mShowAction, SIGNAL( activated() ), |
936 | mView, SLOT( showIncidence() ) ); | 946 | mView, SLOT( showIncidence() ) ); |
937 | 947 | ||
938 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 948 | mEditAction = new Q3Action( "edit_incidence", i18n("Edit..."), 0, this ); |
939 | mEditAction->addTo( mCurrentItemMenu ); | 949 | mEditAction->addTo( mCurrentItemMenu ); |
940 | connect( mEditAction, SIGNAL( activated() ), | 950 | connect( mEditAction, SIGNAL( activated() ), |
941 | mView, SLOT( editIncidence() ) ); | 951 | mView, SLOT( editIncidence() ) ); |
942 | 952 | ||
943 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 953 | mDeleteAction = new Q3Action( "delete_incidence", i18n("Delete..."), 0, this ); |
944 | mDeleteAction->addTo( mCurrentItemMenu ); | 954 | mDeleteAction->addTo( mCurrentItemMenu ); |
945 | connect( mDeleteAction, SIGNAL( activated() ), | 955 | connect( mDeleteAction, SIGNAL( activated() ), |
946 | mView, SLOT( deleteIncidence() ) ); | 956 | mView, SLOT( deleteIncidence() ) ); |
947 | 957 | ||
948 | 958 | ||
949 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 959 | mCloneAction = new Q3Action( "clone_incidence", i18n("Clone..."), 0, this ); |
950 | mCloneAction->addTo( mCurrentItemMenu ); | 960 | mCloneAction->addTo( mCurrentItemMenu ); |
951 | connect( mCloneAction, SIGNAL( activated() ), | 961 | connect( mCloneAction, SIGNAL( activated() ), |
952 | mView, SLOT( cloneIncidence() ) ); | 962 | mView, SLOT( cloneIncidence() ) ); |
953 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 963 | mMoveAction = new Q3Action( "Move_incidence", i18n("Move..."), 0, this ); |
954 | mMoveAction->addTo( mCurrentItemMenu ); | 964 | mMoveAction->addTo( mCurrentItemMenu ); |
955 | connect( mMoveAction, SIGNAL( activated() ), | 965 | connect( mMoveAction, SIGNAL( activated() ), |
956 | mView, SLOT( moveIncidence() ) ); | 966 | mView, SLOT( moveIncidence() ) ); |
957 | #ifndef DESKTOP_VERSION | 967 | #ifndef DESKTOP_VERSION |
958 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 968 | mBeamAction = new Q3Action( "Beam_incidence", i18n("Beam..."), 0, this ); |
959 | mBeamAction->addTo(mCurrentItemMenu ); | 969 | mBeamAction->addTo(mCurrentItemMenu ); |
960 | connect( mBeamAction, SIGNAL( activated() ), | 970 | connect( mBeamAction, SIGNAL( activated() ), |
961 | mView, SLOT( beamIncidence() ) ); | 971 | mView, SLOT( beamIncidence() ) ); |
962 | #endif | 972 | #endif |
963 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 973 | mCancelAction = new Q3Action( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
964 | mCancelAction->addTo( mCurrentItemMenu ); | 974 | mCancelAction->addTo( mCurrentItemMenu ); |
965 | connect( mCancelAction, SIGNAL( activated() ), | 975 | connect( mCancelAction, SIGNAL( activated() ), |
966 | mView, SLOT( toggleCancelIncidence() ) ); | 976 | mView, SLOT( toggleCancelIncidence() ) ); |
967 | 977 | ||
968 | 978 | ||
969 | mCurrentItemMenu->insertSeparator(); | 979 | mCurrentItemMenu->insertSeparator(); |
970 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 980 | action = new Q3Action( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
971 | action->addTo( mCurrentItemMenu ); | 981 | action->addTo( mCurrentItemMenu ); |
972 | connect( action, SIGNAL( activated() ), | 982 | connect( action, SIGNAL( activated() ), |
973 | mView, SLOT( undo_delete() ) ); | 983 | mView, SLOT( undo_delete() ) ); |
@@ -979,7 +989,7 @@ void MainWindow::initActions() | |||
979 | icon = SmallIcon("1leftrightarrow" ); | 989 | icon = SmallIcon("1leftrightarrow" ); |
980 | } | 990 | } |
981 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 991 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
982 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 992 | Q3Action* FSaction = new Q3Action( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
983 | FSaction->addTo( viewMenu ); | 993 | FSaction->addTo( viewMenu ); |
984 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 994 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
985 | 995 | ||
@@ -987,21 +997,21 @@ void MainWindow::initActions() | |||
987 | icon = loadPixmap( pathString + "filter" ); | 997 | icon = loadPixmap( pathString + "filter" ); |
988 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 998 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
989 | icon = loadPixmap( pathString + "configure" ); | 999 | icon = loadPixmap( pathString + "configure" ); |
990 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); | 1000 | action = new Q3Action( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); |
991 | action->addTo( viewMenu ); | 1001 | action->addTo( viewMenu ); |
992 | connect( action, SIGNAL( activated() ), | 1002 | connect( action, SIGNAL( activated() ), |
993 | mView, SLOT( toggleFilter() ) ); | 1003 | mView, SLOT( toggleFilter() ) ); |
994 | mToggleFilter = action; | 1004 | mToggleFilter = action; |
995 | icon = loadPixmap( pathString + "navi" ); | 1005 | icon = loadPixmap( pathString + "navi" ); |
996 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 1006 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
997 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 1007 | action = new Q3Action( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
998 | action->addTo( viewMenu ); | 1008 | action->addTo( viewMenu ); |
999 | connect( action, SIGNAL( activated() ), | 1009 | connect( action, SIGNAL( activated() ), |
1000 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 1010 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
1001 | mToggleNav = action ; | 1011 | mToggleNav = action ; |
1002 | icon = loadPixmap( pathString + "allday" ); | 1012 | icon = loadPixmap( pathString + "allday" ); |
1003 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 1013 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
1004 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 1014 | action = new Q3Action( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
1005 | action->addTo( viewMenu ); | 1015 | action->addTo( viewMenu ); |
1006 | connect( action, SIGNAL( activated() ), | 1016 | connect( action, SIGNAL( activated() ), |
1007 | mView, SLOT( toggleAllDaySize() ) ); | 1017 | mView, SLOT( toggleAllDaySize() ) ); |
@@ -1031,14 +1041,14 @@ void MainWindow::initActions() | |||
1031 | 1041 | ||
1032 | icon = loadPixmap( pathString + "whatsnext" ); | 1042 | icon = loadPixmap( pathString + "whatsnext" ); |
1033 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 1043 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
1034 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 1044 | Q3Action* whatsnext_action = new Q3Action( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
1035 | whatsnext_action->addTo( viewMenu ); | 1045 | whatsnext_action->addTo( viewMenu ); |
1036 | connect( whatsnext_action, SIGNAL( activated() ), | 1046 | connect( whatsnext_action, SIGNAL( activated() ), |
1037 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 1047 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
1038 | 1048 | ||
1039 | icon = loadPixmap( pathString + "xdays" ); | 1049 | icon = loadPixmap( pathString + "xdays" ); |
1040 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 1050 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
1041 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 1051 | Q3Action* xdays_action = new Q3Action( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
1042 | xdays_action->addTo( viewMenu ); | 1052 | xdays_action->addTo( viewMenu ); |
1043 | connect( xdays_action, SIGNAL( activated() ), | 1053 | connect( xdays_action, SIGNAL( activated() ), |
1044 | mView->viewManager(), SLOT( showNextXView() ) ); | 1054 | mView->viewManager(), SLOT( showNextXView() ) ); |
@@ -1046,7 +1056,7 @@ void MainWindow::initActions() | |||
1046 | 1056 | ||
1047 | icon = loadPixmap( pathString + "journal" ); | 1057 | icon = loadPixmap( pathString + "journal" ); |
1048 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 1058 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
1049 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 1059 | Q3Action* viewjournal_action = new Q3Action( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
1050 | viewjournal_action->addTo( viewMenu ); | 1060 | viewjournal_action->addTo( viewMenu ); |
1051 | connect( viewjournal_action, SIGNAL( activated() ), | 1061 | connect( viewjournal_action, SIGNAL( activated() ), |
1052 | mView->viewManager(), SLOT( showJournalView() ) ); | 1062 | mView->viewManager(), SLOT( showJournalView() ) ); |
@@ -1054,7 +1064,7 @@ void MainWindow::initActions() | |||
1054 | 1064 | ||
1055 | icon = loadPixmap( pathString + "day" ); | 1065 | icon = loadPixmap( pathString + "day" ); |
1056 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 1066 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
1057 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 1067 | Q3Action* day1_action = new Q3Action( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
1058 | day1_action->addTo( viewMenu ); | 1068 | day1_action->addTo( viewMenu ); |
1059 | // action->addTo( toolBar ); | 1069 | // action->addTo( toolBar ); |
1060 | connect( day1_action, SIGNAL( activated() ), | 1070 | connect( day1_action, SIGNAL( activated() ), |
@@ -1062,42 +1072,42 @@ void MainWindow::initActions() | |||
1062 | 1072 | ||
1063 | icon = loadPixmap( pathString + "workweek" ); | 1073 | icon = loadPixmap( pathString + "workweek" ); |
1064 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 1074 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
1065 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 1075 | Q3Action* day5_action = new Q3Action( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
1066 | day5_action->addTo( viewMenu ); | 1076 | day5_action->addTo( viewMenu ); |
1067 | connect( day5_action, SIGNAL( activated() ), | 1077 | connect( day5_action, SIGNAL( activated() ), |
1068 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 1078 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
1069 | 1079 | ||
1070 | icon = loadPixmap( pathString + "week" ); | 1080 | icon = loadPixmap( pathString + "week" ); |
1071 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 1081 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
1072 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 1082 | Q3Action* day7_action = new Q3Action( i18n("Week"), icon, i18n("Week"), 0, this ); |
1073 | day7_action->addTo( viewMenu ); | 1083 | day7_action->addTo( viewMenu ); |
1074 | connect( day7_action, SIGNAL( activated() ), | 1084 | connect( day7_action, SIGNAL( activated() ), |
1075 | mView->viewManager(), SLOT( showWeekView() ) ); | 1085 | mView->viewManager(), SLOT( showWeekView() ) ); |
1076 | 1086 | ||
1077 | icon = loadPixmap( pathString + "workweek2" ); | 1087 | icon = loadPixmap( pathString + "workweek2" ); |
1078 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 1088 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
1079 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 1089 | Q3Action* day6_action = new Q3Action( i18n("List week"), icon, i18n("List week"), 0, this ); |
1080 | day6_action->addTo( viewMenu ); | 1090 | day6_action->addTo( viewMenu ); |
1081 | connect( day6_action, SIGNAL( activated() ), | 1091 | connect( day6_action, SIGNAL( activated() ), |
1082 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 1092 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
1083 | 1093 | ||
1084 | icon = loadPixmap( pathString + "month" ); | 1094 | icon = loadPixmap( pathString + "month" ); |
1085 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 1095 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
1086 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 1096 | Q3Action* month_action = new Q3Action( i18n("Month"), icon, i18n("Month"), 0, this ); |
1087 | month_action->addTo( viewMenu ); | 1097 | month_action->addTo( viewMenu ); |
1088 | connect( month_action, SIGNAL( activated() ), | 1098 | connect( month_action, SIGNAL( activated() ), |
1089 | mView->viewManager(), SLOT( showMonthView() ) ); | 1099 | mView->viewManager(), SLOT( showMonthView() ) ); |
1090 | 1100 | ||
1091 | icon = loadPixmap( pathString + "list" ); | 1101 | icon = loadPixmap( pathString + "list" ); |
1092 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 1102 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
1093 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 1103 | Q3Action* showlist_action = new Q3Action( i18n("List View"), icon, i18n("List View"), 0, this ); |
1094 | showlist_action->addTo( viewMenu ); | 1104 | showlist_action->addTo( viewMenu ); |
1095 | connect( showlist_action, SIGNAL( activated() ), | 1105 | connect( showlist_action, SIGNAL( activated() ), |
1096 | mView->viewManager(), SLOT( showListView() ) ); | 1106 | mView->viewManager(), SLOT( showListView() ) ); |
1097 | 1107 | ||
1098 | icon = loadPixmap( pathString + "todo" ); | 1108 | icon = loadPixmap( pathString + "todo" ); |
1099 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 1109 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
1100 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 1110 | Q3Action* todoview_action = new Q3Action( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
1101 | todoview_action->addTo( viewMenu ); | 1111 | todoview_action->addTo( viewMenu ); |
1102 | connect( todoview_action, SIGNAL( activated() ), | 1112 | connect( todoview_action, SIGNAL( activated() ), |
1103 | mView->viewManager(), SLOT( showTodoView() ) ); | 1113 | mView->viewManager(), SLOT( showTodoView() ) ); |
@@ -1105,7 +1115,7 @@ void MainWindow::initActions() | |||
1105 | 1115 | ||
1106 | 1116 | ||
1107 | #if 0 | 1117 | #if 0 |
1108 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 1118 | action = new Q3Action( "view_timespan", "Time Span", 0, this ); |
1109 | action->addTo( viewMenu ); | 1119 | action->addTo( viewMenu ); |
1110 | connect( action, SIGNAL( activated() ), | 1120 | connect( action, SIGNAL( activated() ), |
1111 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 1121 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
@@ -1113,7 +1123,7 @@ void MainWindow::initActions() | |||
1113 | 1123 | ||
1114 | 1124 | ||
1115 | 1125 | ||
1116 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, | 1126 | action = new Q3Action( "purge_completed", i18n("Purge Completed..."), 0, |
1117 | this ); | 1127 | this ); |
1118 | action->addTo( actionMenu ); | 1128 | action->addTo( actionMenu ); |
1119 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 1129 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
@@ -1125,12 +1135,12 @@ void MainWindow::initActions() | |||
1125 | 1135 | ||
1126 | 1136 | ||
1127 | actionMenu->insertSeparator(); | 1137 | actionMenu->insertSeparator(); |
1128 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, | 1138 | action = new Q3Action( "manage cat", i18n("Edit category list..."), 0, |
1129 | this ); | 1139 | this ); |
1130 | action->addTo( actionMenu ); | 1140 | action->addTo( actionMenu ); |
1131 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); | 1141 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); |
1132 | 1142 | ||
1133 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1143 | action = new Q3Action( "manage cat", i18n("Manage new categories..."), 0, |
1134 | this ); | 1144 | this ); |
1135 | action->addTo( actionMenu ); | 1145 | action->addTo( actionMenu ); |
1136 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1146 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
@@ -1138,15 +1148,15 @@ void MainWindow::initActions() | |||
1138 | 1148 | ||
1139 | actionMenu->insertSeparator(); | 1149 | actionMenu->insertSeparator(); |
1140 | icon = loadPixmap( pathString + "configure" ); | 1150 | icon = loadPixmap( pathString + "configure" ); |
1141 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); | 1151 | action = new Q3Action( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); |
1142 | action->addTo( actionMenu ); | 1152 | action->addTo( actionMenu ); |
1143 | connect( action, SIGNAL( activated() ), | 1153 | connect( action, SIGNAL( activated() ), |
1144 | mView, SLOT( edit_options() ) ); | 1154 | mView, SLOT( edit_options() ) ); |
1145 | action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); | 1155 | action = new Q3Action( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); |
1146 | action->addTo( actionMenu ); | 1156 | action->addTo( actionMenu ); |
1147 | connect( action, SIGNAL( activated() ), | 1157 | connect( action, SIGNAL( activated() ), |
1148 | this, SLOT( calHint() ) ); | 1158 | this, SLOT( calHint() ) ); |
1149 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); | 1159 | action = new Q3Action( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); |
1150 | action->addTo( actionMenu ); | 1160 | action->addTo( actionMenu ); |
1151 | connect( action, SIGNAL( activated() ), | 1161 | connect( action, SIGNAL( activated() ), |
1152 | mView, SLOT( edit_global_options() ) ); | 1162 | mView, SLOT( edit_global_options() ) ); |
@@ -1155,29 +1165,29 @@ void MainWindow::initActions() | |||
1155 | 1165 | ||
1156 | } | 1166 | } |
1157 | // actionMenu->insertSeparator(); | 1167 | // actionMenu->insertSeparator(); |
1158 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 1168 | action = new Q3Action( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
1159 | this ); | 1169 | this ); |
1160 | action->addTo( importMenu_X ); | 1170 | action->addTo( importMenu_X ); |
1161 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 1171 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
1162 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 1172 | action = new Q3Action( "import_quick", i18n("Import last file"), 0, |
1163 | this ); | 1173 | this ); |
1164 | action->addTo( importMenu_X ); | 1174 | action->addTo( importMenu_X ); |
1165 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 1175 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
1166 | importMenu_X->insertSeparator(); | 1176 | importMenu_X->insertSeparator(); |
1167 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 1177 | action = new Q3Action( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
1168 | this ); | 1178 | this ); |
1169 | action->addTo( importMenu_X ); | 1179 | action->addTo( importMenu_X ); |
1170 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 1180 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
1171 | //#ifndef DESKTOP_VERSION | 1181 | //#ifndef DESKTOP_VERSION |
1172 | importMenu_X->insertSeparator(); | 1182 | importMenu_X->insertSeparator(); |
1173 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 1183 | action = new Q3Action( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
1174 | this ); | 1184 | this ); |
1175 | action->addTo( importMenu_X ); | 1185 | action->addTo( importMenu_X ); |
1176 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 1186 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
1177 | //#else | 1187 | //#else |
1178 | #ifdef _OL_IMPORT_ | 1188 | #ifdef _OL_IMPORT_ |
1179 | importMenu_X->insertSeparator(); | 1189 | importMenu_X->insertSeparator(); |
1180 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 1190 | action = new Q3Action( "import_ol", i18n("Import from OL"), 0, |
1181 | this ); | 1191 | this ); |
1182 | action->addTo( importMenu_X ); | 1192 | action->addTo( importMenu_X ); |
1183 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 1193 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
@@ -1186,30 +1196,30 @@ void MainWindow::initActions() | |||
1186 | 1196 | ||
1187 | //importMenu->insertSeparator(); | 1197 | //importMenu->insertSeparator(); |
1188 | #if 0 | 1198 | #if 0 |
1189 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 1199 | action = new Q3Action( "load_cal", i18n("Load Calendar Backup"), 0, |
1190 | this ); | 1200 | this ); |
1191 | action->addTo( importMenu ); | 1201 | action->addTo( importMenu ); |
1192 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 1202 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
1193 | #endif | 1203 | #endif |
1194 | action = new QAction( "save_cal", i18n("Save Backup..."), 0, | 1204 | action = new Q3Action( "save_cal", i18n("Save Backup..."), 0, |
1195 | this ); | 1205 | this ); |
1196 | action->addTo( importMenu ); | 1206 | action->addTo( importMenu ); |
1197 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 1207 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
1198 | importMenu->insertSeparator(); | 1208 | importMenu->insertSeparator(); |
1199 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 1209 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
1200 | //importMenu->insertSeparator(); | 1210 | //importMenu->insertSeparator(); |
1201 | action = new QAction( "export ical", i18n("Export All Data"), 0, | 1211 | action = new Q3Action( "export ical", i18n("Export All Data"), 0, |
1202 | this ); | 1212 | this ); |
1203 | action->addTo( exportMenu_X ); | 1213 | action->addTo( exportMenu_X ); |
1204 | connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) ); | 1214 | connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) ); |
1205 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 1215 | action = new Q3Action( "import_qtopia", i18n("Export VCalendar"), 0, |
1206 | this ); | 1216 | this ); |
1207 | action->addTo( exportMenu_X ); | 1217 | action->addTo( exportMenu_X ); |
1208 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 1218 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
1209 | 1219 | ||
1210 | 1220 | ||
1211 | //LR | 1221 | //LR |
1212 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 1222 | Q3PopupMenu *ex2phone = new Q3PopupMenu( this ); |
1213 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1223 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1214 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1224 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1215 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 1225 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
@@ -1219,18 +1229,18 @@ void MainWindow::initActions() | |||
1219 | mPrintSelAction = 0; | 1229 | mPrintSelAction = 0; |
1220 | #ifndef DESKTOP_VERSION | 1230 | #ifndef DESKTOP_VERSION |
1221 | //importMenu->insertSeparator(); | 1231 | //importMenu->insertSeparator(); |
1222 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 1232 | brAction = new Q3Action( "beam toggle", i18n("Beam receive enabled"), 0, |
1223 | this ); | 1233 | this ); |
1224 | brAction->addTo( beamMenu_X ); | 1234 | brAction->addTo( beamMenu_X ); |
1225 | brAction->setToggleAction (true ) ; | 1235 | brAction->setToggleAction (true ) ; |
1226 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 1236 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
1227 | 1237 | ||
1228 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 1238 | action = new Q3Action( "beam all", i18n("Beam complete calendar..."), 0, |
1229 | this ); | 1239 | this ); |
1230 | action->addTo( beamMenu_X ); | 1240 | action->addTo( beamMenu_X ); |
1231 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 1241 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
1232 | 1242 | ||
1233 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1243 | action = new Q3Action( "beam all", i18n("Beam filtered calendar..."), 0, |
1234 | this ); | 1244 | this ); |
1235 | action->addTo( beamMenu_X ); | 1245 | action->addTo( beamMenu_X ); |
1236 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1246 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
@@ -1238,31 +1248,31 @@ void MainWindow::initActions() | |||
1238 | #else | 1248 | #else |
1239 | //importMenu->insertSeparator(); | 1249 | //importMenu->insertSeparator(); |
1240 | icon = loadPixmap( pathString + "print" ); | 1250 | icon = loadPixmap( pathString + "print" ); |
1241 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1251 | action = new Q3Action( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1242 | action->addTo( beamMenu_X ); | 1252 | action->addTo( beamMenu_X ); |
1243 | connect( action, SIGNAL( activated() ), | 1253 | connect( action, SIGNAL( activated() ), |
1244 | this, SLOT( printCal() ) ); | 1254 | this, SLOT( printCal() ) ); |
1245 | 1255 | ||
1246 | icon = loadPixmap( pathString + "week" ); | 1256 | icon = loadPixmap( pathString + "week" ); |
1247 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1257 | action = new Q3Action( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1248 | action->addTo( beamMenu_X ); | 1258 | action->addTo( beamMenu_X ); |
1249 | connect( action, SIGNAL( activated() ), | 1259 | connect( action, SIGNAL( activated() ), |
1250 | this, SLOT( printSel() ) ); | 1260 | this, SLOT( printSel() ) ); |
1251 | icon = loadPixmap( pathString + "whatsnext" ); | 1261 | icon = loadPixmap( pathString + "whatsnext" ); |
1252 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 1262 | action = new Q3Action( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
1253 | action->addTo( beamMenu_X ); | 1263 | action->addTo( beamMenu_X ); |
1254 | connect( action, SIGNAL( activated() ), | 1264 | connect( action, SIGNAL( activated() ), |
1255 | mView->viewManager(), SLOT( slotprintWNV() ) ); | 1265 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1256 | 1266 | ||
1257 | 1267 | ||
1258 | icon = loadPixmap( pathString + "list" ); | 1268 | icon = loadPixmap( pathString + "list" ); |
1259 | action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); | 1269 | action = new Q3Action( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); |
1260 | action->addTo( beamMenu_X ); | 1270 | action->addTo( beamMenu_X ); |
1261 | connect( action, SIGNAL( activated() ), | 1271 | connect( action, SIGNAL( activated() ), |
1262 | this, SLOT( printListView() ) ); | 1272 | this, SLOT( printListView() ) ); |
1263 | 1273 | ||
1264 | icon = loadPixmap( pathString + "newevent" ); | 1274 | icon = loadPixmap( pathString + "newevent" ); |
1265 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | 1275 | action = new Q3Action( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); |
1266 | action->addTo( beamMenu_X ); | 1276 | action->addTo( beamMenu_X ); |
1267 | connect( action, SIGNAL( activated() ), | 1277 | connect( action, SIGNAL( activated() ), |
1268 | mView, SLOT( slotprintSelInc() ) ); | 1278 | mView, SLOT( slotprintSelInc() ) ); |
@@ -1271,11 +1281,11 @@ void MainWindow::initActions() | |||
1271 | #endif | 1281 | #endif |
1272 | 1282 | ||
1273 | importMenu->insertSeparator(); | 1283 | importMenu->insertSeparator(); |
1274 | action = new QAction( "beam all", i18n("Save"), 0, | 1284 | action = new Q3Action( "beam all", i18n("Save"), 0, |
1275 | this ); | 1285 | this ); |
1276 | action->addTo( importMenu ); | 1286 | action->addTo( importMenu ); |
1277 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1287 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1278 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1288 | action = new Q3Action( "beam all", i18n("Exit (+save)"), 0, |
1279 | this ); | 1289 | this ); |
1280 | action->addTo( importMenu ); | 1290 | action->addTo( importMenu ); |
1281 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1291 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
@@ -1284,59 +1294,59 @@ void MainWindow::initActions() | |||
1284 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1294 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1285 | icon = loadPixmap( "korganizer/korganizer" ); | 1295 | icon = loadPixmap( "korganizer/korganizer" ); |
1286 | 1296 | ||
1287 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1297 | action = new Q3Action( "Whats New", i18n("What's new?"), 0,this ); |
1288 | action->addTo( helpMenu ); | 1298 | action->addTo( helpMenu ); |
1289 | connect( action, SIGNAL( activated() ), | 1299 | connect( action, SIGNAL( activated() ), |
1290 | SLOT( whatsNew() ) ); | 1300 | SLOT( whatsNew() ) ); |
1291 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 1301 | action = new Q3Action( "featureHowto", i18n("Features + hints..."), 0,this ); |
1292 | action->addTo( helpMenu ); | 1302 | action->addTo( helpMenu ); |
1293 | connect( action, SIGNAL( activated() ), | 1303 | connect( action, SIGNAL( activated() ), |
1294 | SLOT( features() ) ); | 1304 | SLOT( features() ) ); |
1295 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 1305 | action = new Q3Action( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
1296 | action->addTo( helpMenu ); | 1306 | action->addTo( helpMenu ); |
1297 | connect( action, SIGNAL( activated() ), | 1307 | connect( action, SIGNAL( activated() ), |
1298 | SLOT( keyBindings() ) ); | 1308 | SLOT( keyBindings() ) ); |
1299 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); | 1309 | action = new Q3Action( "Storage Howto", i18n("Storage HowTo..."), 0,this ); |
1300 | action->addTo( helpMenu ); | 1310 | action->addTo( helpMenu ); |
1301 | connect( action, SIGNAL( activated() ), | 1311 | connect( action, SIGNAL( activated() ), |
1302 | SLOT( storagehowto() ) ); | 1312 | SLOT( storagehowto() ) ); |
1303 | action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); | 1313 | action = new Q3Action( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); |
1304 | action->addTo( helpMenu ); | 1314 | action->addTo( helpMenu ); |
1305 | connect( action, SIGNAL( activated() ), | 1315 | connect( action, SIGNAL( activated() ), |
1306 | SLOT( timetrackinghowto() ) ); | 1316 | SLOT( timetrackinghowto() ) ); |
1307 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 1317 | action = new Q3Action( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
1308 | action->addTo( helpMenu ); | 1318 | action->addTo( helpMenu ); |
1309 | connect( action, SIGNAL( activated() ), | 1319 | connect( action, SIGNAL( activated() ), |
1310 | SLOT( synchowto() ) ); | 1320 | SLOT( synchowto() ) ); |
1311 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 1321 | action = new Q3Action( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
1312 | action->addTo( helpMenu ); | 1322 | action->addTo( helpMenu ); |
1313 | connect( action, SIGNAL( activated() ), | 1323 | connect( action, SIGNAL( activated() ), |
1314 | SLOT( kdesynchowto() ) ); | 1324 | SLOT( kdesynchowto() ) ); |
1315 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 1325 | action = new Q3Action( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
1316 | action->addTo( helpMenu ); | 1326 | action->addTo( helpMenu ); |
1317 | connect( action, SIGNAL( activated() ), | 1327 | connect( action, SIGNAL( activated() ), |
1318 | SLOT( multisynchowto() ) ); | 1328 | SLOT( multisynchowto() ) ); |
1319 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 1329 | action = new Q3Action( "Auto saving", i18n("Auto saving..."), 0, this ); |
1320 | action->addTo( helpMenu ); | 1330 | action->addTo( helpMenu ); |
1321 | connect( action, SIGNAL( activated() ), | 1331 | connect( action, SIGNAL( activated() ), |
1322 | SLOT( aboutAutoSaving() ) ); | 1332 | SLOT( aboutAutoSaving() ) ); |
1323 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 1333 | action = new Q3Action( "Problemd", i18n("Known Problems..."), 0,this ); |
1324 | action->addTo( helpMenu ); | 1334 | action->addTo( helpMenu ); |
1325 | connect( action, SIGNAL( activated() ), | 1335 | connect( action, SIGNAL( activated() ), |
1326 | SLOT( aboutKnownBugs() ) ); | 1336 | SLOT( aboutKnownBugs() ) ); |
1327 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 1337 | action = new Q3Action( "Translate Howto", i18n("User translation..."), 0,this ); |
1328 | action->addTo( helpMenu ); | 1338 | action->addTo( helpMenu ); |
1329 | connect( action, SIGNAL( activated() ), | 1339 | connect( action, SIGNAL( activated() ), |
1330 | SLOT( usertrans() ) ); | 1340 | SLOT( usertrans() ) ); |
1331 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 1341 | action = new Q3Action( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
1332 | action->addTo( helpMenu ); | 1342 | action->addTo( helpMenu ); |
1333 | connect( action, SIGNAL( activated() ), | 1343 | connect( action, SIGNAL( activated() ), |
1334 | SLOT( faq() ) ); | 1344 | SLOT( faq() ) ); |
1335 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 1345 | action = new Q3Action( "licence", i18n("Licence..."), 0, this ); |
1336 | action->addTo( helpMenu ); | 1346 | action->addTo( helpMenu ); |
1337 | connect( action, SIGNAL( activated() ), | 1347 | connect( action, SIGNAL( activated() ), |
1338 | SLOT( licence() ) ); | 1348 | SLOT( licence() ) ); |
1339 | action = new QAction( "about", i18n("About..."), 0, this ); | 1349 | action = new Q3Action( "about", i18n("About..."), 0, this ); |
1340 | action->addTo( helpMenu ); | 1350 | action->addTo( helpMenu ); |
1341 | connect( action, SIGNAL( activated() ), | 1351 | connect( action, SIGNAL( activated() ), |
1342 | SLOT( about() ) ); | 1352 | SLOT( about() ) ); |
@@ -1356,7 +1366,7 @@ void MainWindow::initActions() | |||
1356 | if (p-> mShowIconSearch) | 1366 | if (p-> mShowIconSearch) |
1357 | search_action->addTo( iconToolBar ); | 1367 | search_action->addTo( iconToolBar ); |
1358 | if (p-> mShowIconWhatsThis) | 1368 | if (p-> mShowIconWhatsThis) |
1359 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1369 | Q3WhatsThis::whatsThisButton ( iconToolBar ); |
1360 | if (p-> mShowIconNext) | 1370 | if (p-> mShowIconNext) |
1361 | whatsnext_action->addTo( viewToolBar ); | 1371 | whatsnext_action->addTo( viewToolBar ); |
1362 | if (p-> mShowIconNextDays) | 1372 | if (p-> mShowIconNextDays) |
@@ -1381,7 +1391,7 @@ void MainWindow::initActions() | |||
1381 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1391 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1382 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); | 1392 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1383 | if (p-> mShowIconBackFast) { | 1393 | if (p-> mShowIconBackFast) { |
1384 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1394 | action = new Q3Action( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1385 | connect( action, SIGNAL( activated() ), | 1395 | connect( action, SIGNAL( activated() ), |
1386 | mView, SLOT( goPreviousMonth() ) ); | 1396 | mView, SLOT( goPreviousMonth() ) ); |
1387 | action->addTo( navigatorToolBar ); | 1397 | action->addTo( navigatorToolBar ); |
@@ -1389,7 +1399,7 @@ void MainWindow::initActions() | |||
1389 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1399 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1390 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); | 1400 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1391 | if (p-> mShowIconBack) { | 1401 | if (p-> mShowIconBack) { |
1392 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1402 | action = new Q3Action( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1393 | connect( action, SIGNAL( activated() ), | 1403 | connect( action, SIGNAL( activated() ), |
1394 | mView, SLOT( goPrevious() ) ); | 1404 | mView, SLOT( goPrevious() ) ); |
1395 | action->addTo( navigatorToolBar ); | 1405 | action->addTo( navigatorToolBar ); |
@@ -1401,7 +1411,7 @@ void MainWindow::initActions() | |||
1401 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1411 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1402 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1412 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1403 | if (p-> mShowIconForward) { | 1413 | if (p-> mShowIconForward) { |
1404 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1414 | action = new Q3Action( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1405 | connect( action, SIGNAL( activated() ), | 1415 | connect( action, SIGNAL( activated() ), |
1406 | mView, SLOT( goNext() ) ); | 1416 | mView, SLOT( goNext() ) ); |
1407 | action->addTo( navigatorToolBar ); | 1417 | action->addTo( navigatorToolBar ); |
@@ -1409,7 +1419,7 @@ void MainWindow::initActions() | |||
1409 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1419 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1410 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1420 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1411 | if (p-> mShowIconForwardFast) { | 1421 | if (p-> mShowIconForwardFast) { |
1412 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1422 | action = new Q3Action( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1413 | connect( action, SIGNAL( activated() ), | 1423 | connect( action, SIGNAL( activated() ), |
1414 | mView, SLOT( goNextMonth() ) ); | 1424 | mView, SLOT( goNextMonth() ) ); |
1415 | action->addTo( navigatorToolBar ); | 1425 | action->addTo( navigatorToolBar ); |
@@ -1524,7 +1534,7 @@ void MainWindow::exportToPhone( int mode ) | |||
1524 | int inFuture = 0; | 1534 | int inFuture = 0; |
1525 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1535 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1526 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1536 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1527 | QPtrList<Incidence> delSel; | 1537 | Q3PtrList<Incidence> delSel; |
1528 | if ( mode == 1 ) | 1538 | if ( mode == 1 ) |
1529 | delSel = mCalendar->rawIncidences(); | 1539 | delSel = mCalendar->rawIncidences(); |
1530 | if ( mode == 2 ) | 1540 | if ( mode == 2 ) |
@@ -1595,10 +1605,10 @@ void MainWindow::displayText( QString text ,QString cap ) | |||
1595 | { | 1605 | { |
1596 | QDialog dia( this, "name", true ); ; | 1606 | QDialog dia( this, "name", true ); ; |
1597 | dia.setCaption( cap ); | 1607 | dia.setCaption( cap ); |
1598 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1608 | Q3VBoxLayout* lay = new Q3VBoxLayout( &dia ); |
1599 | lay->setSpacing( 3 ); | 1609 | lay->setSpacing( 3 ); |
1600 | lay->setMargin( 3 ); | 1610 | lay->setMargin( 3 ); |
1601 | QTextBrowser tb ( &dia ); | 1611 | Q3TextBrowser tb ( &dia ); |
1602 | lay->addWidget( &tb ); | 1612 | lay->addWidget( &tb ); |
1603 | tb.setText( text ); | 1613 | tb.setText( text ); |
1604 | #ifdef DESKTOP_VERSION | 1614 | #ifdef DESKTOP_VERSION |
@@ -1777,9 +1787,9 @@ void MainWindow::updateWeek(QDate seda) | |||
1777 | mWeekPixmap.fill( mWeekBgColor ); | 1787 | mWeekPixmap.fill( mWeekBgColor ); |
1778 | QPainter p ( &mWeekPixmap ); | 1788 | QPainter p ( &mWeekPixmap ); |
1779 | p.setFont( mWeekFont ); | 1789 | p.setFont( mWeekFont ); |
1780 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1790 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),Qt::AlignCenter, QString::number( weekNum) ); |
1781 | p.end(); | 1791 | p.end(); |
1782 | QIconSet icon3 ( mWeekPixmap ); | 1792 | QIcon icon3 ( mWeekPixmap ); |
1783 | mWeekAction->setIconSet ( icon3 ); | 1793 | mWeekAction->setIconSet ( icon3 ); |
1784 | 1794 | ||
1785 | } | 1795 | } |
@@ -1812,7 +1822,7 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1812 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1822 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1813 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { | 1823 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { |
1814 | bool ok; | 1824 | bool ok; |
1815 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | 1825 | QDateTime noc = incidence->getNextOccurence( (QDateTime)mView->startDate().addDays(-1), &ok ); |
1816 | if ( ok ) { | 1826 | if ( ok ) { |
1817 | int years = noc.date().year() - incidence->dtStart().date().year(); | 1827 | int years = noc.date().year() - incidence->dtStart().date().year(); |
1818 | startString += i18n(" (%1 y.)"). arg( years ); | 1828 | startString += i18n(" (%1 y.)"). arg( years ); |
@@ -1846,13 +1856,13 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1846 | static QPixmap jP = SmallIcon( "journal" ); | 1856 | static QPixmap jP = SmallIcon( "journal" ); |
1847 | static QPixmap eP = SmallIcon( "newevent" ); | 1857 | static QPixmap eP = SmallIcon( "newevent" ); |
1848 | static QPixmap tP = SmallIcon( "newtodo" ); | 1858 | static QPixmap tP = SmallIcon( "newtodo" ); |
1849 | QIconSet icon; | 1859 | QIcon icon; |
1850 | if ( incidence->typeID() == todoID ) | 1860 | if ( incidence->typeID() == todoID ) |
1851 | icon = QIconSet ( tP ); | 1861 | icon = QIcon ( tP ); |
1852 | else if ( incidence->typeID() == eventID ) | 1862 | else if ( incidence->typeID() == eventID ) |
1853 | icon = QIconSet ( eP ); | 1863 | icon = QIcon ( eP ); |
1854 | else if ( incidence->typeID() == journalID ) | 1864 | else if ( incidence->typeID() == journalID ) |
1855 | icon = QIconSet ( jP ); | 1865 | icon = QIcon ( jP ); |
1856 | mPrintSelAction->setIconSet ( icon ); | 1866 | mPrintSelAction->setIconSet ( icon ); |
1857 | #endif | 1867 | #endif |
1858 | } | 1868 | } |
@@ -2045,7 +2055,7 @@ void MainWindow::backupAllFiles() | |||
2045 | } else if ( retval == 1 ){ | 2055 | } else if ( retval == 1 ){ |
2046 | qDebug("KO: Backup created."); | 2056 | qDebug("KO: Backup created."); |
2047 | // backup ok | 2057 | // backup ok |
2048 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2058 | Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2049 | KopiCalendarFile * cal = calendars.first(); | 2059 | KopiCalendarFile * cal = calendars.first(); |
2050 | cal = calendars.next(); | 2060 | cal = calendars.next(); |
2051 | while ( cal ) { | 2061 | while ( cal ) { |
@@ -2341,7 +2351,7 @@ void MainWindow::fillFilterMenuTB() | |||
2341 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); | 2351 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); |
2342 | 2352 | ||
2343 | selectFilterMenuTB->insertSeparator(); | 2353 | selectFilterMenuTB->insertSeparator(); |
2344 | QPtrList<CalFilter> fili = mView->filters(); | 2354 | Q3PtrList<CalFilter> fili = mView->filters(); |
2345 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2355 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2346 | CalFilter *filter = fili.first(); | 2356 | CalFilter *filter = fili.first(); |
2347 | int iii = 2; | 2357 | int iii = 2; |
@@ -2386,7 +2396,7 @@ void MainWindow::fillFilterMenu() | |||
2386 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); | 2396 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); |
2387 | 2397 | ||
2388 | selectFilterMenu->insertSeparator(); | 2398 | selectFilterMenu->insertSeparator(); |
2389 | QPtrList<CalFilter> fili = mView->filters(); | 2399 | Q3PtrList<CalFilter> fili = mView->filters(); |
2390 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2400 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2391 | CalFilter *filter = fili.first(); | 2401 | CalFilter *filter = fili.first(); |
2392 | int iii = 2; | 2402 | int iii = 2; |
@@ -2407,7 +2417,7 @@ void MainWindow::fillFilterMenuPopup() | |||
2407 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); | 2417 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); |
2408 | 2418 | ||
2409 | filterPopupMenu->insertSeparator(); | 2419 | filterPopupMenu->insertSeparator(); |
2410 | QPtrList<CalFilter> fili = mView->filters(); | 2420 | Q3PtrList<CalFilter> fili = mView->filters(); |
2411 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2421 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2412 | CalFilter *filter = fili.first(); | 2422 | CalFilter *filter = fili.first(); |
2413 | int iii = 1; | 2423 | int iii = 1; |
@@ -2819,5 +2829,5 @@ void MainWindow::resizeEvent( QResizeEvent* e) | |||
2819 | } | 2829 | } |
2820 | } | 2830 | } |
2821 | #endif | 2831 | #endif |
2822 | QMainWindow::resizeEvent( e); | 2832 | Q3MainWindow::resizeEvent( e); |
2823 | } | 2833 | } |