-rw-r--r-- | korganizer/calendarview.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index cdce072..0144ba4 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -1,98 +1,99 @@ /* This file is part of KOrganizer. Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef CALENDARVIEW_H #define CALENDARVIEW_H #include <qframe.h> #include <qlayout.h> #include <qwidget.h> #include <qptrlist.h> #include <qvbox.h> #include <qmap.h> #ifndef DESKTOP_VERSION #include <qtopia/ir.h> #else #define Ir char #endif #include <libkcal/calendar.h> #include <libkcal/scheduler.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <KDGanttMinimizeSplitter.h> #include <korganizer/calendarviewbase.h> #include <ksyncmanager.h> +//#include <koprefs.h> class QWidgetStack; class QSplitter; - +class KopiCalendarFile; class CalPrinter; class KOFilterView; class KOCalEditView; class KOViewManager; class KODialogManager; class KOTodoView; class KDateNavigator; class DateNavigatorContainer; class DateNavigator; class KOIncidenceEditor; class KDatePicker; class ResourceView; class KOEventEditor; class KOTodoEditor ; class KOEventViewerDialog; class KOBeamPrefs; class KSyncProfile; class AlarmDialog; class KCal::Attendee; namespace KCal { class FileStorage; } using namespace KCal; /** This is the main calendar widget. It provides the different vies on t he calendar data as well as the date navigator. It also handles synchronisation of the different views and controls the different dialogs like preferences, event editor, search dialog etc. @short main calendar view widget @author Cornelius Schumacher */ #include <qtextbrowser.h> #include <qtextcodec.h> class MissedAlarmTextBrowser : public QTextBrowser { Q_OBJECT public: MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); ~MissedAlarmTextBrowser(); void setSource(const QString & n); private: Incidence * getNextInc(QDateTime start ); QPtrList<Incidence> mAlarms; signals: @@ -177,96 +178,100 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void todoSelected( bool ); /** Emitted, when clipboard content changes. Parameter indicates if paste is possible or not. */ void pasteEnabled(bool); /** Emitted, when the number of incoming messages has changed. */ void numIncomingChanged(int); /** Emitted, when the number of outgoing messages has changed. */ void numOutgoingChanged(int); /** Send status message, which can e.g. be displayed in the status bar. */ void statusMessage(const QString &); void calendarViewExpanded( bool ); void updateSearchDialog(); public slots: void checkAlarms(); void slotprintSelInc(); void showNextAlarms(); void showOpenError(); void watchSavedFile(); void recheckTimerAlarm(); void checkNextTimerAlarm(); void addAlarm(const QDateTime &qdt, const QString ¬i ); void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); void removeAlarm(const QDateTime &qdt, const QString ¬i ); /** options dialog made a changed to the configuration. we catch this * and notify all widgets which need to update their configuration. */ void updateConfig(); void insertBirthdays(const QString& uid, const QStringList& birthdayList, const QStringList& anniversaryList, const QStringList& realNameList, const QStringList& emailList, const QStringList& assembledNameList, const QStringList& uidList); /** Load calendar from file \a filename. If \a merge is true, load calendar into existing one, if it is false, clear calendar, before loading. Return true, if calendar could be successfully loaded. */ bool openCalendar(QString filename, bool merge=false); + bool loadCalendars(); + bool saveCalendars(); + bool restoreCalendarSettings(); + bool addCalendar( KopiCalendarFile * ); bool syncCalendar(QString filename,int mode = 0 ); /** Save calendar data to file. Return true if calendar could be successfully saved. */ bool saveCalendar(QString filename); /** Close calendar. Clear calendar data and reset views to display an empty calendar. */ void closeCalendar(); /** Archive old events of calendar */ void archiveCalendar(); void showIncidence(); void editIncidence(); void editIncidenceDescription(); void deleteIncidence(); void cloneIncidence(); void moveIncidence(); void beamIncidence(); void toggleCancelIncidence(); /** create an editeventwin with supplied date/time, and if bool is true, * make the event take all day. */ void newEvent(QDateTime, QDateTime, bool allDay ); void newEvent(QDateTime, QDateTime); void newEvent(QDateTime fh); void newEvent(QDate dt); /** create new event without having a date hint. Takes current date as default hint. */ void newEvent(); void newFloatingEvent(); /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ void showIncidence(Incidence *); void showIncidence(QString uid); /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ void editIncidence(Incidence *); /** Delete the supplied incidence. It calls the correct deleteXXX method*/ void deleteIncidence(Incidence *); void cloneIncidence(Incidence *); void cancelIncidence(Incidence *); /** Create an editor for the supplied event. */ void editEvent(Event *); |