summaryrefslogtreecommitdiffstats
path: root/korganizer/resourceview.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /korganizer/resourceview.h
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/resourceview.h')
-rw-r--r--korganizer/resourceview.h61
1 files changed, 29 insertions, 32 deletions
diff --git a/korganizer/resourceview.h b/korganizer/resourceview.h
index f34d0cf22..ee4060272 100644
--- a/korganizer/resourceview.h
+++ b/korganizer/resourceview.h
@@ -27,11 +27,11 @@
#include "calendarview.h"
-#include <libkcal/resourcecalendar.h>
#include <tqlistview.h>
namespace KCal {
-class CalendarResources;
+ class CalendarResources;
+ class ResourceCalendar;
}
using namespace KCal;
class KListView;
@@ -41,16 +41,15 @@ class TQPushButton;
class ResourceViewFactory : public CalendarViewExtension::Factory
{
public:
- ResourceViewFactory( KCal::CalendarResources *calendar,
- CalendarView *view );
+ ResourceViewFactory( CalendarResources *calendar, CalendarView *view );
CalendarViewExtension *create( TQWidget * );
ResourceView *resourceView() const;
private:
- KCal::CalendarResources *mCalendar;
- CalendarView *mView;
+ CalendarResources *mCalendar;
+ CalendarView *mCalendarView;
ResourceView *mResourceView;
};
@@ -58,18 +57,15 @@ class ResourceViewFactory : public CalendarViewExtension::Factory
class ResourceItem : public QCheckListItem
{
public:
- ResourceItem( KCal::ResourceCalendar *resource, ResourceView *view,
- KListView *parent );
- ResourceItem( KCal::ResourceCalendar *resource, const TQString& sub,
- const TQString& label, ResourceView *view,
- ResourceItem* parent );
+ ResourceItem( ResourceCalendar *resource, ResourceView *view, KListView *parent );
+ ResourceItem( ResourceCalendar *resource, const TQString &identifier,
+ const TQString &label, ResourceView *view, ResourceItem *parent );
- KCal::ResourceCalendar *resource() { return mResource; }
+ ResourceCalendar *resource() { return mResource; }
const TQString& resourceIdentifier() { return mResourceIdentifier; }
bool isSubresource() const { return mIsSubresource; }
void createSubresourceItems();
void setStandardResource( bool std );
-
void update();
virtual void paintCell(TQPainter *p, const TQColorGroup &cg,
@@ -77,15 +73,15 @@ class ResourceItem : public QCheckListItem
void setResourceColor(TQColor& color);
TQColor &resourceColor() {return mResourceColor;}
+
protected:
void stateChange( bool active );
-
void setGuiState();
TQColor mResourceColor;
private:
- KCal::ResourceCalendar *mResource;
- ResourceView *mView;
+ ResourceCalendar *mResource;
+ ResourceView *mResourceView;
bool mBlockStateChange;
bool mIsSubresource;
TQString mResourceIdentifier;
@@ -100,45 +96,45 @@ class ResourceView : public CalendarViewExtension
{
Q_OBJECT
public:
- ResourceView( KCal::CalendarResources *calendar, TQWidget *parent = 0,
- const char *name = 0 );
+ ResourceView( CalendarResources *calendar, CalendarView *view,
+ TQWidget *parent = 0, const char *name = 0 );
~ResourceView();
- KCal::CalendarResources *calendar() const { return mCalendar; }
+ CalendarResources *calendar() const { return mCalendar; }
void updateView();
void emitResourcesChanged();
- void requestClose( ResourceCalendar * );
+ void requestClose( ResourceCalendar *resource );
void showButtons( bool visible );
public slots:
- void addResourceItem( ResourceCalendar * );
- void updateResourceItem( ResourceCalendar * );
+ void addResourceItem( ResourceCalendar *resource );
+ void updateResourceItem( ResourceCalendar *resource );
signals:
void resourcesChanged();
protected:
- ResourceItem *findItem( ResourceCalendar * );
- ResourceItem *findItemByIdentifier( const TQString& id );
+ ResourceItem *findItem( ResourceCalendar *resource );
+ ResourceItem *findItemByIdentifier( const TQString &identifier );
ResourceItem *currentItem();
protected slots:
void addResource();
void removeResource();
void editResource();
- void currentChanged( TQListViewItem* );
- void slotSubresourceAdded( ResourceCalendar *, const TQString &,
- const TQString &resource,const TQString& label );
+ void currentChanged( TQListViewItem *lvitem );
+ void slotSubresourceAdded( ResourceCalendar *resource, const TQString &type,
+ const TQString &identifier, const TQString &label );
- void slotSubresourceRemoved( ResourceCalendar *, const TQString &,
- const TQString & );
- void closeResource( ResourceCalendar * );
+ void slotSubresourceRemoved( ResourceCalendar *resource, const TQString &type,
+ const TQString &identifier );
+ void closeResource( ResourceCalendar *resource );
- void contextMenuRequested ( TQListViewItem *i, const TQPoint &pos, int );
+ void contextMenuRequested ( TQListViewItem *lvitem, const TQPoint &pos, int );
void assignColor();
void disableColor();
@@ -152,7 +148,8 @@ class ResourceView : public CalendarViewExtension
private:
KListView *mListView;
- KCal::CalendarResources *mCalendar;
+ CalendarResources *mCalendar;
+ CalendarView *mCalendarView;
TQPushButton *mAddButton;
TQPushButton *mDeleteButton;
TQPushButton *mEditButton;