25 #ifndef KORG_RESOURCEVIEW_H 26 #define KORG_RESOURCEVIEW_H 28 #include "calendarview.h" 30 #include <tqlistview.h> 41 class ResourceViewFactory : public CalendarViewExtension::Factory 46 CalendarViewExtension *create( TQWidget * ); 57 class ResourceItem : public TQCheckListItem 62 const TQString &label, ResourceView *view, ResourceItem *parent ); 65 const TQString& resourceIdentifier() { return mResourceIdentifier; } 66 bool isSubresource() const { return mIsSubresource; } 67 void createSubresourceItems(); 68 void setStandardResource( bool std ); 71 virtual void paintCell(TQPainter *p, const TQColorGroup &cg, 72 int column, int width, int alignment); 74 void setResourceColor(TQColor& color); 75 TQColor &resourceColor() { return mResourceColor;} 78 void stateChange( bool active ); 80 TQColor mResourceColor; 85 bool mBlockStateChange; 87 TQString mResourceIdentifier; 88 bool mSubItemsCreated; 89 bool mIsStandardResource; 101 TQWidget *parent = 0, const char *name = 0 ); 108 void emitResourcesChanged(); 112 void showButtons( bool visible ); 119 void resourcesChanged(); 123 ResourceItem *findItemByIdentifier( const TQString &identifier ); 124 ResourceItem *currentItem(); 128 void removeResource(); 130 void currentChanged( TQListViewItem *lvitem ); 131 void slotSubresourceAdded( ResourceCalendar *resource, const TQString &type, 132 const TQString &identifier, const TQString &label ); 134 void slotSubresourceRemoved( ResourceCalendar *resource, const TQString &type, 135 const TQString &identifier ); 138 void contextMenuRequested ( TQListViewItem *lvitem, const TQPoint &pos, int ); 144 void reloadResource(); 148 void updateResourceList(); 151 TDEListView *mListView; 154 TQPushButton *mAddButton; 155 TQPushButton *mDeleteButton; 156 TQPushButton *mEditButton; 157 TQPtrList<ResourceCalendar> mResourcesToClose;
This class provides a view of calendar resources.
bool view(TQWidget *parent, Attachment *attachment)
This is the main calendar widget.
|