summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.h
Unidiff
Diffstat (limited to 'korganizer/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 71c069b..d8018b6 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -7,166 +7,168 @@
7#include <qfile.h> 7#include <qfile.h>
8#include <qmenubar.h> 8#include <qmenubar.h>
9#include <qtextstream.h> 9#include <qtextstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11 11
12#include <libkcal/incidence.h> 12#include <libkcal/incidence.h>
13#include <ksyncmanager.h> 13#include <ksyncmanager.h>
14#include <kpopupmenu.h> 14#include <kpopupmenu.h>
15#ifndef DESKTOP_VERSION 15#ifndef DESKTOP_VERSION
16#include <qcopchannel_qws.h> 16#include <qcopchannel_qws.h>
17#endif 17#endif
18class QAction; 18class QAction;
19class CalendarView; 19class CalendarView;
20class KSyncProfile; 20class KSyncProfile;
21#ifdef DESKTOP_VERSION 21#ifdef DESKTOP_VERSION
22 22
23#define QPEToolBar QToolBar 23#define QPEToolBar QToolBar
24#endif 24#endif
25class QPEToolBar; 25class QPEToolBar;
26 26
27 27
28namespace KCal { 28namespace KCal {
29class CalendarLocal; 29class CalendarLocal;
30} 30}
31 31
32using namespace KCal; 32using namespace KCal;
33 33
34class MainWindow : public QMainWindow 34class MainWindow : public QMainWindow
35{ 35{
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 MainWindow( QWidget *parent = 0, const char *name = 0 ); 38 MainWindow( QWidget *parent = 0, const char *name = 0 );
39 ~MainWindow(); 39 ~MainWindow();
40 bool beamReceiveEnabled(); 40 bool beamReceiveEnabled();
41 static QString defaultFileName(); 41 static QString defaultFileName();
42 static QString syncFileName(); 42 static QString syncFileName();
43 static QString resourcePath(); 43 static QString resourcePath();
44 public slots: 44 public slots:
45 void setUsesBigPixmaps ( bool ); 45 void setUsesBigPixmaps ( bool );
46 void setCaption ( const QString & ); 46 void setCaption ( const QString & );
47 void updateWeekNum(const KCal::DateList &); 47 void updateWeekNum(const KCal::DateList &);
48 void updateWeek(QDate); 48 void updateWeek(QDate);
49 void updateFilterToolbar(); 49 void updateFilterToolbar();
50 virtual void showMaximized (); 50 virtual void showMaximized ();
51 void configureAgenda( int ); 51 void configureAgenda( int );
52 void recieve( const QCString& msg, const QByteArray& data ); 52 void recieve( const QCString& msg, const QByteArray& data );
53 void receiveStart( const QCString& msg, const QByteArray& data ); 53 void receiveStart( const QCString& msg, const QByteArray& data );
54 protected slots: 54 protected slots:
55 void autoSaveWarning();
55 void loadDataAfterStart(); 56 void loadDataAfterStart();
56 void calHint(); 57 void calHint();
57 void startMultiSync(); 58 void startMultiSync();
58 void setCaptionToDates(); 59 void setCaptionToDates();
59 void weekAction(); 60 void weekAction();
60 void about(); 61 void about();
61 void licence(); 62 void licence();
62 void faq(); 63 void faq();
63 void usertrans(); 64 void usertrans();
64 void features(); 65 void features();
65 void synchowto(); 66 void synchowto();
66 void storagehowto(); 67 void storagehowto();
67 void timetrackinghowto(); 68 void timetrackinghowto();
68 void kdesynchowto(); 69 void kdesynchowto();
69 void multisynchowto(); 70 void multisynchowto();
70 void whatsNew(); 71 void whatsNew();
71 void keyBindings(); 72 void keyBindings();
72 void aboutAutoSaving();; 73 void aboutAutoSaving();;
73 void aboutKnownBugs(); 74 void aboutKnownBugs();
74 75
75 void processIncidenceSelection( Incidence * ); 76 void processIncidenceSelection( Incidence * );
76 77
77 void importQtopia(); 78 void importQtopia();
78 void importBday(); 79 void importBday();
79 void importOL(); 80 void importOL();
80 void importIcal(); 81 void importIcal();
81 void importFile( QString, bool ); 82 void importFile( QString, bool );
82 void quickImportIcal(); 83 void quickImportIcal();
83 84
84 void slotModifiedChanged( bool ); 85 void slotModifiedChanged( bool );
85 86
86 void save(); 87 void save();
87 void backupAllFiles(); 88 void backupAllFiles();
88 void saveStopTimer(); 89 void saveStopTimer();
89 void configureToolBar( int ); 90 void configureToolBar( int );
90 void printSel(); 91 void printSel();
91 void printCal(); 92 void printCal();
92 void printListView(); 93 void printListView();
93 void saveCalendar(); 94 void saveCalendar();
94 void loadCalendar(); 95 void loadCalendar();
95 void exportVCalendar(); 96 void exportVCalendar();
96 void exportICalendar(); 97 void exportICalendar();
97 void exportCalendar( bool ); 98 void exportCalendar( bool );
98 void fillFilterMenu(); 99 void fillFilterMenu();
99 void fillFilterMenuTB(); 100 void fillFilterMenuTB();
100 void selectFilter( int ); 101 void selectFilter( int );
101 void fillFilterMenuPopup(); 102 void fillFilterMenuPopup();
102 void selectFilterPopup( int ); 103 void selectFilterPopup( int );
103 void exportToPhone( int ); 104 void exportToPhone( int );
104 void toggleBeamReceive(); 105 void toggleBeamReceive();
105 void disableBR(bool); 106 void disableBR(bool);
106 signals: 107 signals:
107 void selectWeek ( int ); 108 void selectWeek ( int );
108 private slots: 109 private slots:
109 void slotResetFocus(); 110 void slotResetFocus();
110 void slotResetFocusLoop(); 111 void slotResetFocusLoop();
111 void showConfigureAgenda(); 112 void showConfigureAgenda();
112 void getFile( bool ); 113 void getFile( bool );
113 void syncFileRequest(); 114 void syncFileRequest();
114 115
115 protected: 116 protected:
116 int mFocusLoop; 117 int mFocusLoop;
117 void hideEvent ( QHideEvent * ); 118 void hideEvent ( QHideEvent * );
118 QString sentSyncFile(); 119 QString sentSyncFile();
119 void displayText( QString, QString); 120 void displayText( QString, QString);
120 void enableIncidenceActions( bool ); 121 void enableIncidenceActions( bool );
121 bool askForQuitOnSaveError(); 122 bool askForQuitOnSaveError();
122 123
123 private: 124 private:
124 125 bool mAutoSaveDisabled;
126 bool checkAutosave();
125 QCString mCStringMess; 127 QCString mCStringMess;
126 QByteArray mByteData; 128 QByteArray mByteData;
127 129
128 //void setMenuBar( QMenuBar * ); 130 //void setMenuBar( QMenuBar * );
129 bool mBRdisabled; 131 bool mBRdisabled;
130#ifndef DESKTOP_VERSION 132#ifndef DESKTOP_VERSION
131 QCopChannel* infrared; 133 QCopChannel* infrared;
132#endif 134#endif
133 QAction* brAction; 135 QAction* brAction;
134 KSyncManager* mSyncManager; 136 KSyncManager* mSyncManager;
135 bool mClosed; 137 bool mClosed;
136 void saveOnClose(); 138 void saveOnClose();
137 bool mFlagKeyPressed; 139 bool mFlagKeyPressed;
138 bool mBlockAtStartup; 140 bool mBlockAtStartup;
139 KMenuBar *menuBar1; 141 KMenuBar *menuBar1;
140 QPEToolBar *iconToolBar; 142 QPEToolBar *iconToolBar;
141 QPEToolBar *viewToolBar; 143 QPEToolBar *viewToolBar;
142 QPEToolBar *navigatorToolBar; 144 QPEToolBar *navigatorToolBar;
143 QPEToolBar *filterToolBar; 145 QPEToolBar *filterToolBar;
144 KMenuBar *filterMenubar; 146 KMenuBar *filterMenubar;
145 QPopupMenu * filterPopupMenu; 147 QPopupMenu * filterPopupMenu;
146 QPopupMenu * mCurrentItemMenu; 148 QPopupMenu * mCurrentItemMenu;
147 void initActions(); 149 void initActions();
148 void setDefaultPreferences(); 150 void setDefaultPreferences();
149 void resizeEvent( QResizeEvent* e); 151 void resizeEvent( QResizeEvent* e);
150 void keyPressEvent ( QKeyEvent * ) ; 152 void keyPressEvent ( QKeyEvent * ) ;
151 void keyReleaseEvent ( QKeyEvent * ) ; 153 void keyReleaseEvent ( QKeyEvent * ) ;
152 QPopupMenu *configureToolBarMenu; 154 QPopupMenu *configureToolBarMenu;
153 QPopupMenu *selectFilterMenu; 155 QPopupMenu *selectFilterMenu;
154 QPopupMenu *selectFilterMenuTB; 156 QPopupMenu *selectFilterMenuTB;
155 QPopupMenu *configureAgendaMenu, *syncMenu; 157 QPopupMenu *configureAgendaMenu, *syncMenu;
156 CalendarLocal *mCalendar; 158 CalendarLocal *mCalendar;
157 CalendarView *mView; 159 CalendarView *mView;
158 QAction *mNewSubTodoAction; 160 QAction *mNewSubTodoAction;
159 QAction *mWeekAction; 161 QAction *mWeekAction;
160 QFont mWeekFont; 162 QFont mWeekFont;
161 QPixmap mWeekPixmap; 163 QPixmap mWeekPixmap;
162 QColor mWeekBgColor; 164 QColor mWeekBgColor;
163 165
164 QAction *mShowAction; 166 QAction *mShowAction;
165 QAction *mEditAction; 167 QAction *mEditAction;
166 QAction *mDeleteAction; 168 QAction *mDeleteAction;
167 QAction *mCloneAction; 169 QAction *mCloneAction;
168 QAction *mMoveAction; 170 QAction *mMoveAction;
169 QAction *mBeamAction; 171 QAction *mBeamAction;
170 QAction *mCancelAction; 172 QAction *mCancelAction;
171 QAction *mPrintSelAction; 173 QAction *mPrintSelAction;
172 174