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 TQt, and distribute the resulting executable, 00023 without including the source code for TQt in the source distribution. 00024 */ 00025 #ifndef KODIALOGMANAGER_H 00026 #define KODIALOGMANAGER_H 00027 00028 #include <tqobject.h> 00029 #include <tqptrlist.h> 00030 00031 namespace KCal{class CalFilter; } 00032 class CalendarView; 00033 class KCMultiDialog; 00034 class TDEConfigureDialog; 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 namespace KOrg { class AgendaView; } 00044 00045 using namespace KCal; 00046 00051 class KODialogManager : public TQObject 00052 { 00053 Q_OBJECT 00054 00055 public: 00056 KODialogManager( CalendarView * ); 00057 virtual ~KODialogManager(); 00058 00060 KOIncidenceEditor *getEditor( Incidence * ); 00062 KOEventEditor *getEventEditor(); 00064 KOTodoEditor *getTodoEditor(); 00066 KOJournalEditor *getJournalEditor(); 00067 void connectEditor( KOIncidenceEditor*editor ); 00068 00069 void updateSearchDialog(); 00070 00071 void connectTypeAhead( KOEventEditor *editor, KOrg::AgendaView *agenda ); 00072 00073 static void errorSaveIncidence( TQWidget *parent, Incidence *incidence ); 00074 00075 public slots: 00076 void showOptionsDialog(); 00077 void showCategoryEditDialog(); 00078 void showSearchDialog(); 00079 void showArchiveDialog(); 00080 void showFilterEditDialog(TQPtrList<CalFilter> *filters); 00081 00082 private: 00083 class DialogManagerVisitor; 00084 class EditorDialogVisitor; 00085 00086 CalendarView *mMainView; 00087 00088 KCMultiDialog *mOptionsDialog; 00089 // TDEConfigureDialog *mOptionsDialog; 00090 KPIM::CategoryEditDialog *mCategoryEditDialog; 00091 SearchDialog *mSearchDialog; 00092 ArchiveDialog *mArchiveDialog; 00093 FilterEditDialog *mFilterEditDialog; 00094 }; 00095 00096 #endif