kplato

kpttaskprogresspanel.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 - 2005 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 KPTTASKPROGRESSPANEL_H
21#define KPTTASKPROGRESSPANEL_H
22
23#include "kpttaskprogresspanelbase.h"
24#include "kpttask.h"
25
26class KCommand;
27
28namespace KPlato
29{
30
31class Part;
32class StandardWorktime;
33
34class TaskProgressPanelImpl : public TaskProgressPanelBase {
35 TQ_OBJECT
36
37public:
38 TaskProgressPanelImpl(TQWidget *parent=0, const char *name=0, WFlags f=0);
39
40 void enableWidgets();
41
42signals:
43 void changed();
44
45public slots:
46 void slotChanged();
47 void slotStartedChanged(bool state);
48 void slotFinishedChanged(bool state);
49 void slotPercentFinishedChanged(int value);
50};
51
52class TaskProgressPanel : public TaskProgressPanelImpl {
53 TQ_OBJECT
54
55public:
56 TaskProgressPanel(Task &task, StandardWorktime *workTime=0, TQWidget *parent=0, const char *name=0);
57
58 KCommand *buildCommand(Part *part);
59
60 bool ok();
61
62protected:
63 void setEstimateScales( int day );
64
65private:
66 Task &m_task;
67 int m_dayLength;
68 struct Task::Progress m_progress;
69};
70
71} //KPlato namespace
72
73#endif // TASKPROGRESSPANEL_H