summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorrecurrence.h
Side-by-side diff
Diffstat (limited to 'korganizer/koeditorrecurrence.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorrecurrence.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 4f0f0b2..2b59085 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -16,204 +16,207 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOEDITORRECURRENCE_H
#define _KOEDITORRECURRENCE_H
#include <qframe.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qmultilineedit.h>
#include <qlistview.h>
#include <qradiobutton.h>
#include <kdialogbase.h>
#include <libkcal/event.h>
#include "ktimeedit.h"
class QWidgetStack;
class QSpinBox;
class KDateEdit;
using namespace KCal;
class RecurBase : public QWidget
{
public:
RecurBase( QWidget *parent = 0, const char *name = 0 );
void setFrequency( int );
int frequency();
QWidget *frequencyEdit();
private:
QSpinBox *mFrequencyEdit;
};
class RecurDaily : public RecurBase
{
public:
RecurDaily( QWidget *parent = 0, const char *name = 0 );
};
class RecurWeekly : public RecurBase
{
public:
RecurWeekly( QWidget *parent = 0, const char *name = 0 );
void setDays( const QBitArray & );
QBitArray days();
private:
QCheckBox *mDayBoxes[7];
};
class RecurMonthly : public RecurBase
{
public:
RecurMonthly( QWidget *parent = 0, const char *name = 0 );
void setByDay( int day );
void setByPos( int count, int weekday );
bool byDay();
bool byPos();
int day();
int count();
int weekday();
private:
QRadioButton *mByDayRadio;
QComboBox *mByDayCombo;
QRadioButton *mByPosRadio;
QComboBox *mByPosCountCombo;
QComboBox *mByPosWeekdayCombo;
};
class RecurYearly : public RecurBase
{
public:
RecurYearly( QWidget *parent = 0, const char *name = 0 );
- void setByDay();
- void setByMonth( int month );
+ void setByDay( int doy );
+ void setByMonth( int month, int day );
bool byMonth();
bool byDay();
int month();
+ int day();
private:
+ int mDay;
QRadioButton *mByMonthRadio;
QComboBox *mByMonthCombo;
-
+ QLabel* mByDayLabel;
+ QLabel* mDayOfLabel;
QRadioButton *mByDayRadio;
};
class RecurrenceChooser : public QWidget
{
Q_OBJECT
public:
RecurrenceChooser( QWidget *parent = 0, const char *name = 0 );
enum { Daily, Weekly, Monthly, Yearly };
void setType( int );
int type();
signals:
void chosen( int );
protected slots:
void emitChoice();
private:
QComboBox *mTypeCombo;
QRadioButton *mDailyButton;
QRadioButton *mWeeklyButton;
QRadioButton *mMonthlyButton;
QRadioButton *mYearlyButton;
};
class ExceptionsBase
{
public:
virtual void setDefaults( const QDateTime &from ) = 0;
virtual void setDates( const DateList & ) = 0;
virtual DateList dates() = 0;
};
class ExceptionsWidget : public QWidget, public ExceptionsBase
{
Q_OBJECT
public:
ExceptionsWidget( QWidget *parent = 0, const char *name = 0 );
void setDefaults( const QDateTime &from );
void setDates( const DateList & );
DateList dates();
protected slots:
void addException();
void changeException();
void deleteException();
private:
KDateEdit *mExceptionDateEdit;
QListBox *mExceptionList;
DateList mExceptionDates;
};
class ExceptionsDialog : public KDialogBase, public ExceptionsBase
{
public:
ExceptionsDialog( QWidget *parent, const char *name = 0 );
void setDefaults( const QDateTime &from );
void setDates( const DateList & );
DateList dates();
private:
ExceptionsWidget *mExceptions;
};
class RecurrenceRangeBase
{
public:
virtual void setDefaults( const QDateTime &from ) = 0;
virtual void setDuration( int ) = 0;
virtual int duration() = 0;
virtual void setEndDate( const QDate & ) = 0;
virtual QDate endDate() = 0;
virtual void setDateTimes( const QDateTime &start,
const QDateTime &end = QDateTime() ) = 0;
};
class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
{
Q_OBJECT
public:
RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 );
void setDefaults( const QDateTime &from );