korganizer
kodialogmanager.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2001,2004 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 00021 As a special exception, permission is given to link this program 00022 with any edition of Qt, and distribute the resulting executable, 00023 without including the source code for Qt in the source distribution. 00024 */ 00025 #ifndef KODIALOGMANAGER_H 00026 #define KODIALOGMANAGER_H 00027 00028 #include <qobject.h> 00029 #include <qptrlist.h> 00030 00031 namespace KCal{class CalFilter; } 00032 class CalendarView; 00033 class KCMultiDialog; 00034 class KConfigureDialog; 00035 namespace KPIM { class CategoryEditDialog; } 00036 class KOIncidenceEditor; 00037 class KOEventEditor; 00038 class KOTodoEditor; 00039 class KOJournalEditor; 00040 class SearchDialog; 00041 class ArchiveDialog; 00042 class FilterEditDialog; 00043 class KOAgendaView; 00044 00045 using namespace KCal; 00046 00051 class KODialogManager : public QObject 00052 { 00053 Q_OBJECT 00054 public: 00055 KODialogManager( CalendarView * ); 00056 virtual ~KODialogManager(); 00057 00059 KOIncidenceEditor *getEditor( Incidence * ); 00061 KOEventEditor *getEventEditor(); 00063 KOTodoEditor *getTodoEditor(); 00065 KOJournalEditor *getJournalEditor(); 00066 void connectEditor( KOIncidenceEditor*editor ); 00067 00068 void updateSearchDialog(); 00069 00070 void connectTypeAhead( KOEventEditor *editor, KOAgendaView *agenda ); 00071 00072 static void errorSaveIncidence( QWidget *parent, Incidence *incidence ); 00073 00074 public slots: 00075 void showOptionsDialog(); 00076 void showCategoryEditDialog(); 00077 void showSearchDialog(); 00078 void showArchiveDialog(); 00079 void showFilterEditDialog(QPtrList<CalFilter> *filters); 00080 00081 private: 00082 class DialogManagerVisitor; 00083 class EditorDialogVisitor; 00084 00085 CalendarView *mMainView; 00086 00087 KCMultiDialog *mOptionsDialog; 00088 // KConfigureDialog *mOptionsDialog; 00089 KPIM::CategoryEditDialog *mCategoryEditDialog; 00090 SearchDialog *mSearchDialog; 00091 ArchiveDialog *mArchiveDialog; 00092 FilterEditDialog *mFilterEditDialog; 00093 }; 00094 00095 #endif