summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp10
-rw-r--r--korganizer/mainwindow.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 357154e..7aa3b60 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1037,97 +1037,101 @@ void MainWindow::initActions()
1037 icon = loadPixmap( pathString + "print" ); 1037 icon = loadPixmap( pathString + "print" );
1038 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1038 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1039 action->addTo( beamMenu_X ); 1039 action->addTo( beamMenu_X );
1040 connect( action, SIGNAL( activated() ), 1040 connect( action, SIGNAL( activated() ),
1041 this, SLOT( printSel() ) ); 1041 this, SLOT( printSel() ) );
1042 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1042 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1043 action->addTo( beamMenu_X ); 1043 action->addTo( beamMenu_X );
1044 connect( action, SIGNAL( activated() ), 1044 connect( action, SIGNAL( activated() ),
1045 mView->viewManager(), SLOT( slotprintWNV() ) ); 1045 mView->viewManager(), SLOT( slotprintWNV() ) );
1046 1046
1047 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1047 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1048 action->addTo( beamMenu_X ); 1048 action->addTo( beamMenu_X );
1049 connect( action, SIGNAL( activated() ), 1049 connect( action, SIGNAL( activated() ),
1050 mView, SLOT( slotprintSelInc() ) ); 1050 mView, SLOT( slotprintSelInc() ) );
1051 1051
1052 1052
1053 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1053 importMenu->insertItem( i18n("Print"), beamMenu_X );
1054#endif 1054#endif
1055 importMenu->insertSeparator(); 1055 importMenu->insertSeparator();
1056 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1056 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1057 this ); 1057 this );
1058 action->addTo( importMenu ); 1058 action->addTo( importMenu );
1059 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1059 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1060 importMenu->insertSeparator(); 1060 importMenu->insertSeparator();
1061 action = new QAction( "beam all", i18n("Save"), 0, 1061 action = new QAction( "beam all", i18n("Save"), 0,
1062 this ); 1062 this );
1063 action->addTo( importMenu ); 1063 action->addTo( importMenu );
1064 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1064 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1065 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1065 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1066 this ); 1066 this );
1067 action->addTo( importMenu ); 1067 action->addTo( importMenu );
1068 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1068 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1069 1069
1070 //menuBar->insertItem( "Configure",configureMenu ); 1070 //menuBar->insertItem( "Configure",configureMenu );
1071 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1071 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1072 icon = loadPixmap( "korganizer/korganizer" ); 1072 icon = loadPixmap( "korganizer/korganizer" );
1073 1073
1074 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1074 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1075 action->addTo( helpMenu ); 1075 action->addTo( helpMenu );
1076 connect( action, SIGNAL( activated() ), 1076 connect( action, SIGNAL( activated() ),
1077 SLOT( whatsNew() ) ); 1077 SLOT( whatsNew() ) );
1078 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1078 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1079 action->addTo( helpMenu ); 1079 action->addTo( helpMenu );
1080 connect( action, SIGNAL( activated() ), 1080 connect( action, SIGNAL( activated() ),
1081 SLOT( features() ) ); 1081 SLOT( features() ) );
1082 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1082 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1083 action->addTo( helpMenu ); 1083 action->addTo( helpMenu );
1084 connect( action, SIGNAL( activated() ), 1084 connect( action, SIGNAL( activated() ),
1085 SLOT( keyBindings() ) ); 1085 SLOT( keyBindings() ) );
1086 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1087 action->addTo( helpMenu );
1088 connect( action, SIGNAL( activated() ),
1089 SLOT( storagehowto() ) );
1086 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1090 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1087 action->addTo( helpMenu ); 1091 action->addTo( helpMenu );
1088 connect( action, SIGNAL( activated() ), 1092 connect( action, SIGNAL( activated() ),
1089 SLOT( synchowto() ) ); 1093 SLOT( synchowto() ) );
1090 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1094 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1091 action->addTo( helpMenu ); 1095 action->addTo( helpMenu );
1092 connect( action, SIGNAL( activated() ), 1096 connect( action, SIGNAL( activated() ),
1093 SLOT( kdesynchowto() ) ); 1097 SLOT( kdesynchowto() ) );
1094 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1098 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1095 action->addTo( helpMenu ); 1099 action->addTo( helpMenu );
1096 connect( action, SIGNAL( activated() ), 1100 connect( action, SIGNAL( activated() ),
1097 SLOT( multisynchowto() ) ); 1101 SLOT( multisynchowto() ) );
1098 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1102 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1099 action->addTo( helpMenu ); 1103 action->addTo( helpMenu );
1100 connect( action, SIGNAL( activated() ), 1104 connect( action, SIGNAL( activated() ),
1101 SLOT( aboutAutoSaving() ) ); 1105 SLOT( aboutAutoSaving() ) );
1102 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1106 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1103 action->addTo( helpMenu ); 1107 action->addTo( helpMenu );
1104 connect( action, SIGNAL( activated() ), 1108 connect( action, SIGNAL( activated() ),
1105 SLOT( aboutKnownBugs() ) ); 1109 SLOT( aboutKnownBugs() ) );
1106 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1110 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1107 action->addTo( helpMenu ); 1111 action->addTo( helpMenu );
1108 connect( action, SIGNAL( activated() ), 1112 connect( action, SIGNAL( activated() ),
1109 SLOT( usertrans() ) ); 1113 SLOT( usertrans() ) );
1110 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1114 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1111 action->addTo( helpMenu ); 1115 action->addTo( helpMenu );
1112 connect( action, SIGNAL( activated() ), 1116 connect( action, SIGNAL( activated() ),
1113 SLOT( faq() ) ); 1117 SLOT( faq() ) );
1114 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1118 action = new QAction( "licence", i18n("Licence..."), 0, this );
1115 action->addTo( helpMenu ); 1119 action->addTo( helpMenu );
1116 connect( action, SIGNAL( activated() ), 1120 connect( action, SIGNAL( activated() ),
1117 SLOT( licence() ) ); 1121 SLOT( licence() ) );
1118 action = new QAction( "about", i18n("About..."), 0, this ); 1122 action = new QAction( "about", i18n("About..."), 0, this );
1119 action->addTo( helpMenu ); 1123 action->addTo( helpMenu );
1120 connect( action, SIGNAL( activated() ), 1124 connect( action, SIGNAL( activated() ),
1121 SLOT( about() ) ); 1125 SLOT( about() ) );
1122 //menuBar->insertSeparator(); 1126 //menuBar->insertSeparator();
1123 1127
1124 // ****************************************************** 1128 // ******************************************************
1125 // menubar icons 1129 // menubar icons
1126 1130
1127 1131
1128 1132
1129 //menuBar->insertItem( iconToolBar ); 1133 //menuBar->insertItem( iconToolBar );
1130 //xdays_action 1134 //xdays_action
1131 if (p-> mShowIconNewEvent) 1135 if (p-> mShowIconNewEvent)
1132 ne_action->addTo( iconToolBar ); 1136 ne_action->addTo( iconToolBar );
1133 if (p->mShowIconNewTodo ) 1137 if (p->mShowIconNewTodo )
@@ -1348,96 +1352,100 @@ void MainWindow::exportToPhone( int mode )
1348} 1352}
1349 1353
1350 1354
1351void MainWindow::setDefaultPreferences() 1355void MainWindow::setDefaultPreferences()
1352{ 1356{
1353 KOPrefs *p = KOPrefs::instance(); 1357 KOPrefs *p = KOPrefs::instance();
1354 1358
1355 p->mCompactDialogs = true; 1359 p->mCompactDialogs = true;
1356 p->mConfirm = true; 1360 p->mConfirm = true;
1357 // p->mEnableQuickTodo = false; 1361 // p->mEnableQuickTodo = false;
1358 1362
1359} 1363}
1360 1364
1361QString MainWindow::resourcePath() 1365QString MainWindow::resourcePath()
1362{ 1366{
1363 return KGlobal::iconLoader()->iconPath(); 1367 return KGlobal::iconLoader()->iconPath();
1364} 1368}
1365 1369
1366void MainWindow::displayText( QString text ,QString cap ) 1370void MainWindow::displayText( QString text ,QString cap )
1367{ 1371{
1368 QDialog dia( this, "name", true ); ; 1372 QDialog dia( this, "name", true ); ;
1369 dia.setCaption( cap ); 1373 dia.setCaption( cap );
1370 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1374 QVBoxLayout* lay = new QVBoxLayout( &dia );
1371 lay->setSpacing( 3 ); 1375 lay->setSpacing( 3 );
1372 lay->setMargin( 3 ); 1376 lay->setMargin( 3 );
1373 QTextBrowser tb ( &dia ); 1377 QTextBrowser tb ( &dia );
1374 lay->addWidget( &tb ); 1378 lay->addWidget( &tb );
1375 tb.setText( text ); 1379 tb.setText( text );
1376#ifdef DESKTOP_VERSION 1380#ifdef DESKTOP_VERSION
1377 dia.resize( 640, 480); 1381 dia.resize( 640, 480);
1378#else 1382#else
1379 dia.showMaximized(); 1383 dia.showMaximized();
1380#endif 1384#endif
1381 dia.exec(); 1385 dia.exec();
1382} 1386}
1383 1387
1384void MainWindow::features() 1388void MainWindow::features()
1385{ 1389{
1386 1390
1387 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); 1391 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" );
1388} 1392}
1389 1393
1390void MainWindow::usertrans() 1394void MainWindow::usertrans()
1391{ 1395{
1392 1396
1393 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); 1397 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" );
1394} 1398}
1395 1399
1400void MainWindow::storagehowto()
1401{
1402 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
1403}
1396void MainWindow::kdesynchowto() 1404void MainWindow::kdesynchowto()
1397{ 1405{
1398 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1406 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1399} 1407}
1400void MainWindow::multisynchowto() 1408void MainWindow::multisynchowto()
1401{ 1409{
1402 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1410 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1403} 1411}
1404void MainWindow::synchowto() 1412void MainWindow::synchowto()
1405{ 1413{
1406 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1414 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1407} 1415}
1408void MainWindow::faq() 1416void MainWindow::faq()
1409{ 1417{
1410 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1418 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1411 1419
1412} 1420}
1413void MainWindow::whatsNew() 1421void MainWindow::whatsNew()
1414{ 1422{
1415 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1423 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1416 1424
1417} 1425}
1418void MainWindow::licence() 1426void MainWindow::licence()
1419{ 1427{
1420 KApplication::showLicence(); 1428 KApplication::showLicence();
1421 1429
1422} 1430}
1423void MainWindow::about() 1431void MainWindow::about()
1424{ 1432{
1425 QString version; 1433 QString version;
1426#include <../version> 1434#include <../version>
1427 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1435 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1428 i18n("KOrganizer/Platform-independent\n") + 1436 i18n("KOrganizer/Platform-independent\n") +
1429 "(KO/Pi) " + version + " - " + 1437 "(KO/Pi) " + version + " - " +
1430 1438
1431#ifdef DESKTOP_VERSION 1439#ifdef DESKTOP_VERSION
1432 i18n("Desktop Edition\n") + 1440 i18n("Desktop Edition\n") +
1433#else 1441#else
1434 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1442 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1435#endif 1443#endif
1436 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1444 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1437} 1445}
1438void MainWindow::keyBindings() 1446void MainWindow::keyBindings()
1439{ 1447{
1440 QString cap = i18n("KO/Pi Keys + Colors"); 1448 QString cap = i18n("KO/Pi Keys + Colors");
1441 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1449 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1442 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1450 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1443 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + 1451 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 4d1753f..3151f50 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -22,96 +22,97 @@ class KSyncProfile;
22 22
23#define QPEToolBar QToolBar 23#define QPEToolBar QToolBar
24#define QPEMenuBar QMenuBar 24#define QPEMenuBar QMenuBar
25#endif 25#endif
26class QPEToolBar; 26class QPEToolBar;
27class QPEMenuBar; 27class QPEMenuBar;
28 28
29 29
30namespace KCal { 30namespace KCal {
31class CalendarLocal; 31class CalendarLocal;
32} 32}
33 33
34class KOMenuBar : public QMenuBar 34class KOMenuBar : public QMenuBar
35{ 35{
36 public: 36 public:
37 KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;} 37 KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;}
38 QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );} 38 QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );}
39}; 39};
40 40
41using namespace KCal; 41using namespace KCal;
42 42
43class MainWindow : public QMainWindow 43class MainWindow : public QMainWindow
44{ 44{
45 Q_OBJECT 45 Q_OBJECT
46 public: 46 public:
47 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); 47 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
48 ~MainWindow(); 48 ~MainWindow();
49 bool beamReceiveEnabled(); 49 bool beamReceiveEnabled();
50 static QString defaultFileName(); 50 static QString defaultFileName();
51 static QString syncFileName(); 51 static QString syncFileName();
52 static QString resourcePath(); 52 static QString resourcePath();
53 public slots: 53 public slots:
54 void setCaption ( const QString & ); 54 void setCaption ( const QString & );
55 void updateWeekNum(const KCal::DateList &); 55 void updateWeekNum(const KCal::DateList &);
56 void updateWeek(QDate); 56 void updateWeek(QDate);
57 void updateFilterToolbar(); 57 void updateFilterToolbar();
58 virtual void showMaximized (); 58 virtual void showMaximized ();
59 void configureAgenda( int ); 59 void configureAgenda( int );
60 void recieve( const QCString& msg, const QByteArray& data ); 60 void recieve( const QCString& msg, const QByteArray& data );
61 protected slots: 61 protected slots:
62 void setCaptionToDates(); 62 void setCaptionToDates();
63 void weekAction(); 63 void weekAction();
64 void about(); 64 void about();
65 void licence(); 65 void licence();
66 void faq(); 66 void faq();
67 void usertrans(); 67 void usertrans();
68 void features(); 68 void features();
69 void synchowto(); 69 void synchowto();
70 void storagehowto();
70 void kdesynchowto(); 71 void kdesynchowto();
71 void multisynchowto(); 72 void multisynchowto();
72 void whatsNew(); 73 void whatsNew();
73 void keyBindings(); 74 void keyBindings();
74 void aboutAutoSaving();; 75 void aboutAutoSaving();;
75 void aboutKnownBugs(); 76 void aboutKnownBugs();
76 77
77 void processIncidenceSelection( Incidence * ); 78 void processIncidenceSelection( Incidence * );
78 79
79 void importQtopia(); 80 void importQtopia();
80 void importBday(); 81 void importBday();
81 void importOL(); 82 void importOL();
82 void importIcal(); 83 void importIcal();
83 void importFile( QString, bool ); 84 void importFile( QString, bool );
84 void quickImportIcal(); 85 void quickImportIcal();
85 86
86 void slotModifiedChanged( bool ); 87 void slotModifiedChanged( bool );
87 88
88 void save(); 89 void save();
89 void saveStopTimer(); 90 void saveStopTimer();
90 void configureToolBar( int ); 91 void configureToolBar( int );
91 void printSel(); 92 void printSel();
92 void printCal(); 93 void printCal();
93 void saveCalendar(); 94 void saveCalendar();
94 void loadCalendar(); 95 void loadCalendar();
95 void exportVCalendar(); 96 void exportVCalendar();
96 void fillFilterMenu(); 97 void fillFilterMenu();
97 void fillFilterMenuTB(); 98 void fillFilterMenuTB();
98 void selectFilter( int ); 99 void selectFilter( int );
99 void fillFilterMenuPopup(); 100 void fillFilterMenuPopup();
100 void selectFilterPopup( int ); 101 void selectFilterPopup( int );
101 void exportToPhone( int ); 102 void exportToPhone( int );
102 void toggleBeamReceive(); 103 void toggleBeamReceive();
103 void disableBR(bool); 104 void disableBR(bool);
104 signals: 105 signals:
105 void selectWeek ( int ); 106 void selectWeek ( int );
106 private slots: 107 private slots:
107 void showConfigureAgenda(); 108 void showConfigureAgenda();
108 void getFile( bool ); 109 void getFile( bool );
109 void syncFileRequest(); 110 void syncFileRequest();
110 111
111 protected: 112 protected:
112 void hideEvent ( QHideEvent * ); 113 void hideEvent ( QHideEvent * );
113 QString sentSyncFile(); 114 QString sentSyncFile();
114 void displayText( QString, QString); 115 void displayText( QString, QString);
115 void enableIncidenceActions( bool ); 116 void enableIncidenceActions( bool );
116 117
117 private: 118 private: