kplato

kpttaskgeneralpanel.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 KPTTASKGENERALPANEL_H
21#define KPTTASKGENERALPANEL_H
22
23#include "kpttaskgeneralpanelbase.h"
24#include "kptduration.h"
25
26class KMacroCommand;
27
28namespace KPlato
29{
30
31class TaskGeneralPanel;
32class RequestResourcesPanel;
33class Part;
34class Task;
35class StandardWorktime;
36
37class TaskGeneralPanelImpl : public TaskGeneralPanelBase
38{
39 TQ_OBJECT
40
41public:
42 TaskGeneralPanelImpl(TQWidget *parent, const char *name);
43
44 virtual int schedulingType() const;
45 virtual int estimationType() const;
46 virtual int optimistic() const;
47 virtual int pessimistic();
48 virtual Duration estimationValue();
49 virtual TQDateTime startDateTime();
50 virtual TQDateTime endDateTime();
51 virtual TQTime startTime() const;
52 virtual TQTime endTime();
53 virtual TQDate startDate();
54 virtual TQDate endDate();
55 virtual int risktype() const;
56public slots:
57 virtual void setSchedulingType( int type );
58 virtual void changeLeader();
59 virtual void setEstimationType( int type );
60 virtual void setOptimistic( int value );
61 virtual void setPessimistic( int value );
62 virtual void enableDateTime( int scheduleType );
63 virtual void estimationTypeChanged( int type );
64 virtual void setEstimate( const Duration & duration );
65 virtual void setEstimateType( int type );
66 virtual void checkAllFieldsFilled();
67 virtual void setEstimateFields( int mask );
68 virtual void setEstimateScales( double day );
69 virtual void setEstimateFieldUnit( int field, TQString unit );
70 virtual void startDateChanged();
71 virtual void startTimeChanged( const TQTime & time );
72 virtual void endDateChanged();
73 virtual void endTimeChanged( const TQTime & time );
74 virtual void scheduleTypeChanged( int value );
75 virtual void setStartTime( const TQTime & time );
76 virtual void setEndTime( const TQTime & time );
77 virtual void setStartDateTime( const TQDateTime & dt );
78 virtual void setEndDateTime( const TQDateTime & dt );
79 virtual void setStartDate( const TQDate & date );
80 virtual void setEndDate( const TQDate & date );
81 virtual void setRisktype( int r );
82
83signals:
84 void obligatedFieldsFilled( bool );
85 void schedulingTypeChanged( int );
86 void changed();
87
88protected:
89 bool useTime;
90};
91
92class TaskGeneralPanel : public TaskGeneralPanelImpl {
93 TQ_OBJECT
94
95public:
96 TaskGeneralPanel(Task &task, StandardWorktime *workTime=0, bool baseline=false, TQWidget *parent=0, const char *name=0);
97
98 KMacroCommand *buildCommand(Part *part);
99
100 bool ok();
101
102 void setStartValues(Task &task, StandardWorktime *workTime=0);
103
104public slots:
105 virtual void estimationTypeChanged(int type);
106 virtual void scheduleTypeChanged(int value);
107
108private:
109 Task &m_task;
110 double m_dayLength;
111
112 Duration m_effort;
113 Duration m_duration;
114};
115
116} //KPlato namespace
117
118#endif // TASKGENERALPANEL_H
A task in the scheduling software is represented by this class.
Definition kpttask.h:40