summaryrefslogtreecommitdiffstats
path: root/korganizer/interfaces
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/interfaces
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/interfaces')
-rw-r--r--korganizer/interfaces/calendar/calendardecoration.desktop1
-rw-r--r--korganizer/interfaces/calendar/calendarplugin.desktop4
-rw-r--r--korganizer/interfaces/korganizer/baseview.h95
-rw-r--r--korganizer/interfaces/korganizer/corehelper.h3
-rw-r--r--korganizer/interfaces/korganizer/incidencechangerbase.h39
-rw-r--r--korganizer/interfaces/korganizer/korganizerpart.desktop1
-rw-r--r--korganizer/interfaces/korganizer/korgprintplugin.desktop1
-rw-r--r--korganizer/interfaces/korganizer/mainwindow.h4
8 files changed, 100 insertions, 48 deletions
diff --git a/korganizer/interfaces/calendar/calendardecoration.desktop b/korganizer/interfaces/calendar/calendardecoration.desktop
index e9763878e..b44db80ad 100644
--- a/korganizer/interfaces/calendar/calendardecoration.desktop
+++ b/korganizer/interfaces/calendar/calendardecoration.desktop
@@ -28,7 +28,6 @@ Comment[hu]=Naptármegjelenési bővítőmodul
Comment[is]=Íforrit til að skreyta texta dagatals
Comment[it]=Plugin di decorazione del calendario
Comment[ja]=カレンダー装飾プラグイン
-Comment[ka]=კალენდრის გაფორმების მოდული
Comment[kk]=Күнтізбені безендіру модулі
Comment[km]=កម្មវិធី​ជំនួយ​សម្រាប់​តុបតែង​ប្រតិទិន
Comment[lt]=vCalendar dekoracijų priedas
diff --git a/korganizer/interfaces/calendar/calendarplugin.desktop b/korganizer/interfaces/calendar/calendarplugin.desktop
index 765fced76..d5c0ab560 100644
--- a/korganizer/interfaces/calendar/calendarplugin.desktop
+++ b/korganizer/interfaces/calendar/calendarplugin.desktop
@@ -30,7 +30,6 @@ Comment[hu]=Naptárkezelő bővítőmodul
Comment[is]=Dagatals íforrit
Comment[it]=Plugin calendario
Comment[ja]=カレンダープラグイン
-Comment[ka]=კალენდრის მოდული
Comment[kk]=Күнтізбе модулі
Comment[km]=កម្មវិធី​ជំនួយ​ប្រតិទិន
Comment[ko]=달력 플러그인
@@ -61,8 +60,7 @@ Comment[tg]=Модул барои тақвимот
Comment[th]=โปรแกรมเสริมบันทึกประจำวัน
Comment[tr]=Takvim Eklentisi
Comment[uk]=Втулок календаря
-Comment[uz]=Kalendar plagini
-Comment[uz@cyrillic]=Календар плагини
+Comment[uz]=Календар плагини
Comment[ven]=U pulaga ha khalenda
Comment[vi]=Plugin lịch
Comment[xh]=Ikhalenda ye Plugin
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index 64fbd72b5..6d60a0a5f 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -2,7 +2,7 @@
This file is part of the KOrganizer interfaces.
Copyright (c) 1999,2001,2003 Cornelius Schumacher <schumacher@kde.org>
- Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
+ Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -38,17 +38,19 @@
using namespace KCal;
-namespace KCal { class Calendar; }
+namespace KCal {
+ class Calendar;
+ class ResourceCalendar;
+}
namespace KOrg {
-
/**
- This class provides an interface for all views being displayed within the main
- calendar view. It has functions to update the view, to specify date range and
- other display parameter and to return selected objects. An important class,
- which inherits KOBaseView is KOEventView, which provides the interface for all
- views of event data like the agenda or the month view.
+ This class provides an interface for all views being displayed within the
+ main calendar view. It has functions to update the view, to specify date
+ range and other display parameter and to return selected objects. An
+ important class, which inherits KOBaseView is KOEventView, which provides
+ the interface for all views of event data like the agenda or the month view.
@short Base class for calendar views
@author Preston Brown, Cornelius Schumacher
@@ -56,7 +58,7 @@ namespace KOrg {
*/
class KDE_EXPORT BaseView : public QWidget
{
- Q_OBJECT
+ Q_OBJECT
public:
/**
Constructs a view.
@@ -66,21 +68,41 @@ class KDE_EXPORT BaseView : public QWidget
@param parent parent widget.
@param name name of this widget.
*/
- BaseView( Calendar *cal, TQWidget *parent = 0,
- const char *name = 0 )
- : TQWidget( parent, name ), mCalendar( cal ), mChanger( 0 ) {}
+ BaseView( Calendar *cal, TQWidget *parent = 0, const char *name = 0 )
+ : TQWidget( parent, name ),
+ mReadOnly( false ), mCalendar( cal ), mResource( 0 ), mChanger( 0 ) {}
/**
Destructor. Views will do view-specific cleanups here.
*/
virtual ~BaseView() {}
+ /** Flag indicating if the view is read-only */
+ void setReadOnly( bool readonly ) { mReadOnly = readonly; }
+ bool readOnly() { return mReadOnly; }
+
virtual void setCalendar( Calendar *cal ) { mCalendar = cal; }
/**
Return calendar object of this view.
*/
virtual Calendar *calendar() { return mCalendar; }
+ virtual void setResource( ResourceCalendar *res, const TQString &subResource )
+ {
+ mResource = res;
+ mSubResource = subResource;
+ }
+
+ /**
+ Return resourceCalendar of this view.
+ */
+ ResourceCalendar *resourceCalendar() { return mResource; }
+
+ /**
+ Return subResourceCalendar of this view.
+ */
+ TQString subResourceCalendar() const { return mSubResource; }
+
/**
@return a list of selected events. Most views can probably only
select a single event at a time, but some may be able to select
@@ -93,7 +115,19 @@ class KDE_EXPORT BaseView : public QWidget
select a single event at a time, but some may be able to select
more than one.
*/
- virtual DateList selectedDates() = 0;
+ virtual DateList selectedIncidenceDates() = 0;
+
+ /**
+ Returns the start of the selection, or an invalid TQDateTime if there is no selection
+ or the view doesn't support selecting cells.
+ */
+ virtual TQDateTime selectionStart() { return TQDateTime(); }
+
+ /**
+ Returns the end of the selection, or an invalid TQDateTime if there is no selection
+ or the view doesn't support selecting cells.
+ */
+ virtual TQDateTime selectionEnd() { return TQDateTime(); }
virtual CalPrinterBase::PrintType printType()
{
@@ -108,6 +142,11 @@ class KDE_EXPORT BaseView : public QWidget
/** Return if this view is a view for displaying events. */
virtual bool isEventView() { return false; }
+ /** Returns true if the view supports navigation through the date navigator
+ ( selecting a date range, changing month, changing year, etc. )
+ */
+ virtual bool supportsDateNavigation() const { return false; }
+
public slots:
/**
Show incidences for the given date range. The date range actually shown may be
@@ -124,8 +163,9 @@ class KDE_EXPORT BaseView : public QWidget
show all given events.
@param incidenceList a list of incidences to show.
+ @param date is the TQDate on which the incidences are being shown.
*/
- virtual void showIncidences( const Incidence::List &incidenceList ) = 0;
+ virtual void showIncidences( const Incidence::List &incidenceList, const TQDate &date ) = 0;
/**
Updates the current display to reflect changes that may have happened
@@ -166,19 +206,19 @@ class KDE_EXPORT BaseView : public QWidget
virtual bool eventDurationHint(TQDateTime &/*startDt*/, TQDateTime &/*endDt*/, bool &/*allDay*/) { return false; }
signals:
- void incidenceSelected( Incidence * );
+ void incidenceSelected( Incidence *, const TQDate & );
/**
* instructs the receiver to show the incidence in read-only mode.
*/
- void showIncidenceSignal(Incidence *);
+ void showIncidenceSignal( Incidence *, const TQDate & );
/**
* instructs the receiver to begin editing the incidence specified in
* some manner. Doesn't make sense to connect to more than one
* receiver.
*/
- void editIncidenceSignal(Incidence *);
+ void editIncidenceSignal( Incidence *, const TQDate & );
/**
* instructs the receiver to delete the Incidence in some manner; some
@@ -220,31 +260,40 @@ class KDE_EXPORT BaseView : public QWidget
* instructs the receiver to create a new event. Doesn't make
* sense to connect to more than one receiver.
*/
- void newEventSignal();
+ void newEventSignal( ResourceCalendar *res, const TQString &subResource );
/**
* instructs the receiver to create a new event with the specified beginning
* time. Doesn't make sense to connect to more than one receiver.
*/
- void newEventSignal( const TQDate & );
+ void newEventSignal( ResourceCalendar *res, const TQString &subResource,
+ const TQDate & );
/**
* instructs the receiver to create a new event with the specified beginning
* time. Doesn't make sense to connect to more than one receiver.
*/
- void newEventSignal( const TQDateTime & );
+ void newEventSignal( ResourceCalendar *res, const TQString &subResource,
+ const TQDateTime & );
/**
* instructs the receiver to create a new event, with the specified
* beginning end ending times. Doesn't make sense to connect to more
* than one receiver.
*/
- void newEventSignal( const TQDateTime &, const TQDateTime & );
+ void newEventSignal( ResourceCalendar *res, const TQString &subResource,
+ const TQDateTime &, const TQDateTime & );
- void newTodoSignal( const TQDate & );
+ void newTodoSignal( ResourceCalendar *res,const TQString &subResource,
+ const TQDate & );
void newSubTodoSignal( Todo * );
- void newJournalSignal( const TQDate & );
+ void newJournalSignal( ResourceCalendar *res,const TQString &subResource,
+ const TQDate & );
private:
+ bool mReadOnly;
Calendar *mCalendar;
+ ResourceCalendar *mResource;
+ TQString mSubResource;
+
protected:
IncidenceChangerBase *mChanger;
};
diff --git a/korganizer/interfaces/korganizer/corehelper.h b/korganizer/interfaces/korganizer/corehelper.h
index 53b5d9fb2..8c69a1adc 100644
--- a/korganizer/interfaces/korganizer/corehelper.h
+++ b/korganizer/interfaces/korganizer/corehelper.h
@@ -37,8 +37,7 @@ class CoreHelper
public:
CoreHelper() {}
virtual ~CoreHelper() {}
-
- virtual TQColor defaultEventColor() = 0;
+
virtual TQColor textColor( const TQColor &bgColor ) = 0;
virtual TQColor categoryColor( const TQStringList &cats ) = 0;
virtual TQString holidayString( const TQDate &dt ) = 0;
diff --git a/korganizer/interfaces/korganizer/incidencechangerbase.h b/korganizer/interfaces/korganizer/incidencechangerbase.h
index f482388c5..e7c133056 100644
--- a/korganizer/interfaces/korganizer/incidencechangerbase.h
+++ b/korganizer/interfaces/korganizer/incidencechangerbase.h
@@ -21,13 +21,16 @@
#ifndef KORG_INCIDENCECHANGERBASE_H
#define KORG_INCIDENCECHANGERBASE_H
+#include "korganizer/koglobals.h"
#include <libkcal/scheduler.h>
+#include <libkcal/incidence.h>
#include <tqobject.h>
class TQWidget;
namespace KCal {
-class Calendar;
-class Incidence;
+ class Calendar;
+ class Incidence;
+ class ResourceCalendar;
}
using namespace KCal;
@@ -42,25 +45,29 @@ public:
virtual ~IncidenceChangerBase() {}
virtual bool sendGroupwareMessage( Incidence *incidence,
- KCal::Scheduler::Method method, bool deleting = false ) = 0;
+ KCal::Scheduler::Method method,
+ KOGlobals::HowChanged action,
+ TQWidget *parent ) = 0;
- virtual bool beginChange( Incidence * incidence ) = 0;
- virtual bool endChange( Incidence *incidence ) = 0;
+ virtual bool beginChange( Incidence *incidence,
+ ResourceCalendar *res, const TQString &subRes ) = 0;
+ virtual bool endChange( Incidence *incidence,
+ ResourceCalendar *res, const TQString &subRes ) = 0;
- virtual bool addIncidence( Incidence *incidence, TQWidget *parent = 0 ) = 0;
- virtual bool changeIncidence( Incidence *newinc, Incidence *oldinc,
- int action = -1 ) = 0;
- virtual bool deleteIncidence( Incidence *incidence ) = 0;
- virtual bool cutIncidence( Incidence *incidence ) = 0;
+ virtual bool addIncidence( Incidence *incidence,
+ ResourceCalendar *res, const TQString &subRes,
+ TQWidget *parent ) = 0;
+
+ virtual bool changeIncidence( Incidence *oldinc, Incidence *newinc,
+ KOGlobals::WhatChanged, TQWidget *parent ) = 0;
+ virtual bool deleteIncidence( Incidence *incidence, TQWidget *parent ) = 0;
+
+ virtual bool cutIncidences( const Incidence::List &incidences, TQWidget *parent ) = 0;
+ virtual bool cutIncidence( Incidence *incidence, TQWidget *parent ) = 0;
-/*
- static bool incidencesEqual( Incidence *inc1, Incidence *inc2 );
- static bool assignIncidence( Incidence *inc1, Incidence *inc2 );
-*/
signals:
void incidenceAdded( Incidence * );
- void incidenceChanged( Incidence *oldInc, Incidence *newInc, int );
- void incidenceChanged( Incidence *oldInc, Incidence *newInc );
+ void incidenceChanged( Incidence *oldInc, Incidence *newInc, KOGlobals::WhatChanged );
void incidenceToBeDeleted( Incidence * );
void incidenceDeleted( Incidence * );
diff --git a/korganizer/interfaces/korganizer/korganizerpart.desktop b/korganizer/interfaces/korganizer/korganizerpart.desktop
index 7cb419dea..c1b84659d 100644
--- a/korganizer/interfaces/korganizer/korganizerpart.desktop
+++ b/korganizer/interfaces/korganizer/korganizerpart.desktop
@@ -25,7 +25,6 @@ Comment[hu]=KOrganizer objektum
Comment[is]=KOrganizer hluti
Comment[it]=Parte di KOrganizer
Comment[ja]=KOrganizer パート
-Comment[ka]=KOrganizer კომპონენტი
Comment[kk]=KOrganizer бөлшегі
Comment[km]=ផ្នែក​របស់ KOrganizer
Comment[lt]=KOrganizer dalis
diff --git a/korganizer/interfaces/korganizer/korgprintplugin.desktop b/korganizer/interfaces/korganizer/korgprintplugin.desktop
index ffa520d36..05cbd1b91 100644
--- a/korganizer/interfaces/korganizer/korgprintplugin.desktop
+++ b/korganizer/interfaces/korganizer/korgprintplugin.desktop
@@ -25,7 +25,6 @@ Comment[hu]=KOrganizer objektum
Comment[is]=KOrganizer hluti
Comment[it]=Parte di KOrganizer
Comment[ja]=KOrganizer パート
-Comment[ka]=KOrganizer კომპონენტი
Comment[kk]=KOrganizer бөлшегі
Comment[km]=ផ្នែក​របស់ KOrganizer
Comment[lt]=KOrganizer dalis
diff --git a/korganizer/interfaces/korganizer/mainwindow.h b/korganizer/interfaces/korganizer/mainwindow.h
index 3343470aa..dcda1bee5 100644
--- a/korganizer/interfaces/korganizer/mainwindow.h
+++ b/korganizer/interfaces/korganizer/mainwindow.h
@@ -87,9 +87,11 @@ class MainWindow
*/
virtual void setTitle() = 0;
- void setHasDocument( bool d ) { mDocument = d; }
+ void setHasDocument( bool d ) { mDocument = d; }
bool hasDocument() const { return mDocument; }
+ virtual bool isCurrentlyActivePart() = 0;
+
private:
bool mDocument;
};