karm

edittaskdialog.h
00001 /*
00002  *   karm
00003  *   This file only: Copyright (C) 1999  Espen Sand, espensa@online.no
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  *
00019  */
00020 
00021 #ifndef KARM_EDIT_TASK_DIALOG_H
00022 #define KARM_EDIT_TASK_DIALOG_H
00023 
00024 #include <vector>
00025 
00026 #include <kdialogbase.h>
00027 #include <tqcheckbox.h>
00028 
00029 #include "desktoplist.h"
00030 
00031 class TQComboBox;
00032 class TQLabel;
00033 class TQLineEdit;
00034 class TQRadioButton;
00035 class TQString;
00036 
00037 class KArmTimeWidget;
00038 
00043 class EditTaskDialog : public KDialogBase
00044 {
00045   Q_OBJECT
00046   TQ_OBJECT
00047 
00048   public:
00049     EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=0);
00050     void setTask(const TQString &name, long time, long sessionTime);
00051     TQString taskName() const;
00052 
00053     // return user choices
00054     void status( long *time, long *timeDiff, 
00055                  long *session, long *sessionDiff, 
00056                  DesktopList *desktopList) const;
00057     
00058   private slots:
00059     void slotAbsolutePressed();
00060     void slotRelativePressed();
00061     void slotAutoTrackingPressed();
00062 
00063   private:
00064     TQLineEdit* _name;
00065     KArmTimeWidget* _timeTW;
00066     KArmTimeWidget* _sessionTW;
00067     KArmTimeWidget* _diffTW;
00068     TQComboBox* _operator;
00069     std::vector<TQCheckBox*> _deskBox; // we only need an array, but ISO forbids
00070                                  // passing an array as a function argument
00071 
00072     long origTime;
00073     long origSession;
00074 
00075     TQRadioButton *_absoluteRB;
00076     TQRadioButton *_relativeRB;
00077 
00078     TQCheckBox *_desktopCB;
00079     int desktopCount;
00080 
00081     TQLabel* _timeLA;
00082     TQLabel* _sessionLA;
00083 };
00084 
00085 
00086 
00087 
00088 
00089 #endif // KARM_EDIT_TASK_DIALOG
00090