kplato
kptstandardworktimedialog.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KPTSTANDARDWORKTIMEDIALOG_H
00021 #define KPTSTANDARDWORKTIMEDIALOG_H
00022
00023 #include "standardworktimedialogbase.h"
00024 #include "kptcalendar.h"
00025
00026 #include <kdialogbase.h>
00027
00028 #include <qstring.h>
00029
00030 class KMacroCommand;
00031
00032 namespace KPlato
00033 {
00034
00035 class Project;
00036 class Part;
00037 class IntervalEditImpl;
00038
00039 class StandardWorktimeDialogImpl : public StandardWorktimeDialogBase {
00040 Q_OBJECT
00041 public:
00042 StandardWorktimeDialogImpl ( StandardWorktime *std, QWidget *parent);
00043
00044 StandardWorktime *standardWorktime() { return m_std; }
00045 double inYear() const { return m_year; }
00046 double inMonth() const { return m_month; }
00047 double inWeek() const { return m_week; }
00048 double inDay() const { return m_day; }
00049
00050 private slots:
00051 void slotCheckAllFieldsFilled();
00052 void slotEnableButtonOk(bool on);
00053
00054 void slotYearChanged(double);
00055 void slotMonthChanged(double);
00056 void slotWeekChanged(double);
00057 void slotDayChanged(double);
00058 void slotIntervalChanged();
00059 void slotApplyClicked();
00060 void slotEnableButtonApply(bool);
00061 void slotWeekdaySelected();
00062 void slotStateChanged(int);
00063 signals:
00064 void obligatedFieldsFilled(bool yes);
00065 void enableButtonOk(bool);
00066
00067 private:
00068 StandardWorktime *m_std;
00069 double m_year;
00070 double m_month;
00071 double m_week;
00072 double m_day;
00073 IntervalEditImpl *m_intervalEdit;
00074 };
00075
00076 class StandardWorktimeDialog : public KDialogBase {
00077 Q_OBJECT
00078 public:
00079 StandardWorktimeDialog(Project &project, QWidget *parent=0, const char *name=0);
00080
00081 KMacroCommand *buildCommand(Part *part);
00082
00083 protected slots:
00084 void slotOk();
00085
00086 private:
00087 Project &project;
00088 StandardWorktimeDialogImpl *dia;
00089 StandardWorktime *m_original;
00090 };
00091
00092 }
00093
00094 #endif // STANDARDWORKTIMEDIALOG_H
|