korganizer Library API Documentation

resourceview.h

00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 #ifndef KORG_RESOURCEVIEW_H 00025 #define KORG_RESOURCEVIEW_H 00026 00027 #include "customlistviewitem.h" 00028 #include "calendarview.h" 00029 00030 #include <libkcal/resourcecalendar.h> 00031 #include <libkcal/calendarresources.h> 00032 00033 #include <klistview.h> 00034 00035 #include <qwidget.h> 00036 #include <qpushbutton.h> 00037 00038 class KListView; 00039 class ResourceView; 00040 00041 class ResourceViewFactory : public CalendarViewExtension::Factory 00042 { 00043 public: 00044 ResourceViewFactory( KCal::CalendarResources *calendar, 00045 CalendarView *view ); 00046 00047 CalendarViewExtension *create( QWidget * ); 00048 00049 private: 00050 KCal::CalendarResources *mCalendar; 00051 CalendarView *mView; 00052 }; 00053 00054 00055 class ResourceItem : public QCheckListItem 00056 { 00057 public: 00058 ResourceItem( KCal::ResourceCalendar *resource, ResourceView *view, 00059 KListView *parent ); 00060 00061 KCal::ResourceCalendar *resource() { return mResource; } 00062 00063 protected: 00064 void stateChange( bool active ); 00065 00066 private: 00067 KCal::ResourceCalendar *mResource; 00068 ResourceView *mView; 00069 bool mStartUp; 00070 }; 00071 00075 class ResourceView : public CalendarViewExtension 00076 { 00077 Q_OBJECT 00078 public: 00079 ResourceView( KCal::CalendarResourceManager *manager, QWidget *parent = 0, 00080 const char *name = 0); 00081 ~ResourceView(); 00082 00083 void updateView(); 00084 00085 void emitResourcesChanged(); 00086 00087 public slots: 00088 void addResourceItem( ResourceCalendar * ); 00089 00090 signals: 00091 void resourcesChanged(); 00092 00093 private slots: 00094 void addResource(); 00095 void removeResource(); 00096 void editResource(); 00097 void currentChanged( QListViewItem* ); 00098 00099 private: 00100 KListView *mListView; 00101 KCal::CalendarResourceManager *mManager; 00102 QPushButton *mAddButton; 00103 QPushButton *mDeleteButton; 00104 QPushButton *mEditButton; 00105 }; 00106 00107 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003