F:/KPlato/koffice/kplato/kpttaskdefaultpanel.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Dag Andersen <danders@get2net.dk>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation;
00007    version 2 of the License.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KPTTASKDEFAULTPANEL_H
00021 #define KPTTASKDEFAULTPANEL_H
00022 
00023 #include "ui_kptconfigtaskpanelbase.h"
00024 #include "kptduration.h"
00025 
00026 class KMacroCommand;
00027 
00028 namespace KPlato
00029 {
00030 
00031 class Part;
00032 class Task;
00033 class StandardWorktime;
00034 
00035 class ConfigTaskPanelImpl : public QWidget, public Ui_ConfigTaskPanelBase
00036 {
00037     Q_OBJECT
00038 public:
00039     ConfigTaskPanelImpl(QWidget *parent, const char *name);
00040     
00041     virtual int schedulingType() const;
00042     virtual int estimationType() const;
00043     virtual int optimistic() const;
00044     virtual int pessimistic();
00045     virtual Duration estimationValue();
00046     virtual QDateTime startDateTime();
00047     virtual QDateTime endDateTime();
00048     virtual QTime startTime() const;
00049     virtual QTime endTime();
00050     virtual QDate startDate();
00051     virtual QDate endDate();
00052 
00053     DurationWidget *estimate;
00054     
00055 public slots:
00056     virtual void setSchedulingType( int type );
00057     virtual void changeLeader();
00058     virtual void setEstimationType( int type );
00059     virtual void setOptimistic( int value );
00060     virtual void setPessimistic( int value );
00061     virtual void enableDateTime( int scheduleType );
00062     virtual void estimationTypeChanged( int type );
00063     virtual void setEstimate( const Duration & duration );
00064     virtual void setEstimateType( int type );
00065     virtual void checkAllFieldsFilled();
00066     virtual void setEstimateFields( int mask );
00067     virtual void setEstimateScales( double day );
00068     virtual void setEstimateFieldUnit( int field, QString unit );
00069     virtual void startDateChanged();
00070     virtual void startTimeChanged( const QTime & time );
00071     virtual void endDateChanged();
00072     virtual void endTimeChanged( const QTime & time );
00073     virtual void scheduleTypeChanged( int value );
00074     virtual void setStartTime( const QTime & time );
00075     virtual void setEndTime( const QTime & time );
00076     virtual void setStartDateTime( const QDateTime & dt );
00077     virtual void setEndDateTime( const QDateTime & dt );
00078     virtual void setStartDate( const QDate & date );
00079     virtual void setEndDate( const QDate & date );
00080 
00081 signals:
00082     void obligatedFieldsFilled( bool );
00083     void schedulingTypeChanged( int );
00084     void changed();
00085 
00086 protected:
00087     bool useTime;
00088 };
00089 
00090 class TaskDefaultPanel : public ConfigTaskPanelImpl {
00091     Q_OBJECT
00092 public:
00093     TaskDefaultPanel(Task &task, StandardWorktime *workTime=0, QWidget *parent=0, const char *name=0);
00094 
00095     KMacroCommand *buildCommand(Part *part);
00096 
00097     bool ok();
00098 
00099     void setStartValues(Task &task, StandardWorktime *workTime=0);
00100 
00101 public slots:
00102     virtual void estimationTypeChanged(int type);
00103     virtual void scheduleTypeChanged(int value);
00104     
00105 private:
00106     Task &m_task;
00107     double m_dayLength;
00108     
00109     Duration m_effort;
00110     Duration m_duration;
00111 };
00112 
00113 } //KPlato namespace
00114 
00115 #endif // TASKDEFAULTPANEL_H

Généré le Wed Nov 22 23:40:58 2006 pour KPlato par  doxygen 1.5.1-p1