karm

edittaskdialog.h
1/*
2 * karm
3 * This file only: Copyright (C) 1999 Espen Sand, espensa@online.no
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20
21#ifndef KARM_EDIT_TASK_DIALOG_H
22#define KARM_EDIT_TASK_DIALOG_H
23
24#include <vector>
25
26#include <kdialogbase.h>
27#include <tqcheckbox.h>
28
29#include "desktoplist.h"
30
31class TQComboBox;
32class TQLabel;
33class TQLineEdit;
34class TQRadioButton;
35class TQString;
36
37class KArmTimeWidget;
38
43class EditTaskDialog : public KDialogBase
44{
45 TQ_OBJECT
46
47
48 public:
49 EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=0);
50 void setTask(const TQString &name, long time, long sessionTime);
51 TQString taskName() const;
52
53 // return user choices
54 void status( long *time, long *timeDiff,
55 long *session, long *sessionDiff,
56 DesktopList *desktopList) const;
57
58 private slots:
59 void slotAbsolutePressed();
60 void slotRelativePressed();
61 void slotAutoTrackingPressed();
62
63 private:
64 TQLineEdit* _name;
65 KArmTimeWidget* _timeTW;
66 KArmTimeWidget* _sessionTW;
67 KArmTimeWidget* _diffTW;
68 TQComboBox* _operator;
69 std::vector<TQCheckBox*> _deskBox; // we only need an array, but ISO forbids
70 // passing an array as a function argument
71
72 long origTime;
73 long origSession;
74
75 TQRadioButton *_absoluteRB;
76 TQRadioButton *_relativeRB;
77
78 TQCheckBox *_desktopCB;
79 int desktopCount;
80
81 TQLabel* _timeLA;
82 TQLabel* _sessionLA;
83};
84
85
86
87
88
89#endif // KARM_EDIT_TASK_DIALOG
90
Dialog to add a new task or edit an existing task.
Widget used for entering minutes and seconds with validation.
Definition: ktimewidget.h:14