kplato

kptstandardworktimedialog.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 - 2006 Dag Andersen <danders@get2net.dk>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation;
7 version 2 of the License.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KPTSTANDARDWORKTIMEDIALOG_H
21#define KPTSTANDARDWORKTIMEDIALOG_H
22
23#include "standardworktimedialogbase.h"
24#include "kptcalendar.h"
25
26#include <kdialogbase.h>
27
28#include <tqstring.h>
29
30class KMacroCommand;
31
32namespace KPlato
33{
34
35class Project;
36class Part;
37class IntervalEditImpl;
38
39class StandardWorktimeDialogImpl : public StandardWorktimeDialogBase {
40 TQ_OBJECT
41
42public:
43 StandardWorktimeDialogImpl ( StandardWorktime *std, TQWidget *parent);
44
45 StandardWorktime *standardWorktime() { return m_std; }
46 double inYear() const { return m_year; }
47 double inMonth() const { return m_month; }
48 double inWeek() const { return m_week; }
49 double inDay() const { return m_day; }
50
51private slots:
52 void slotCheckAllFieldsFilled();
53 void slotEnableButtonOk(bool on);
54
55 void slotYearChanged(double);
56 void slotMonthChanged(double);
57 void slotWeekChanged(double);
58 void slotDayChanged(double);
59 void slotIntervalChanged();
60 void slotApplyClicked();
61 void slotEnableButtonApply(bool);
62 void slotWeekdaySelected();
63 void slotStateChanged(int);
64signals:
65 void obligatedFieldsFilled(bool yes);
66 void enableButtonOk(bool);
67
68private:
69 StandardWorktime *m_std;
70 double m_year;
71 double m_month;
72 double m_week;
73 double m_day;
74 IntervalEditImpl *m_intervalEdit;
75};
76
77class StandardWorktimeDialog : public KDialogBase {
78 TQ_OBJECT
79
80public:
81 StandardWorktimeDialog(Project &project, TQWidget *parent=0, const char *name=0);
82
83 KMacroCommand *buildCommand(Part *part);
84
85protected slots:
86 void slotOk();
87
88private:
89 Project &project;
90 StandardWorktimeDialogImpl *dia;
91 StandardWorktime *m_original;
92};
93
94} //KPlato namespace
95
96#endif // STANDARDWORKTIMEDIALOG_H
Project is the main node in a project, it contains child nodes and possibly sub-projects.
Definition kptproject.h:52