kplato

kpttaskcostpanel.h
1/* This file is part of the KDE project
2 Copyright (C) 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 Cost 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 Cost Public License for more details.
13
14 You should have received a copy of the GNU Library Cost 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 KPTTASKCOSTPANEL_H
21#define KPTTASKCOSTPANEL_H
22
23#include "kpttaskcostpanelbase.h"
24
25class KCommand;
26
27namespace KPlato
28{
29
30class TaskCostPanel;
31class Account;
32class Accounts;
33class Part;
34class Task;
35
36class TaskCostPanelImpl : public TaskCostPanelBase {
37 TQ_OBJECT
38
39public:
40 TaskCostPanelImpl(TQWidget *parent=0, const char *name=0);
41
42signals:
43 void changed();
44
45public slots:
46 void slotChanged();
47};
48
49class TaskCostPanel : public TaskCostPanelImpl {
50 TQ_OBJECT
51
52public:
53 TaskCostPanel(Task &task, Accounts &accounts, TQWidget *parent=0, const char *name=0);
54
55 KCommand *buildCommand(Part *part);
56
57 bool ok();
58
59 void setStartValues(Task &task);
60
61protected:
62 void setCurrentItem(TQComboBox *box, TQString name);
63
64private:
65 Task &m_task;
66 Accounts &m_accounts;
67 TQStringList m_accountList;
68 Account *m_oldrunning;
69 Account *m_oldstartup;
70 Account *m_oldshutdown;
71};
72
73} //KPlato namespace
74
75#endif // TASKCOSTPANEL_H