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

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 - 2006 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 KPTSTANDARDWORKTIMEDIALOG_H
00021 #define KPTSTANDARDWORKTIMEDIALOG_H
00022 
00023 #include "ui_standardworktimedialogbase.h"
00024 
00025 #include "kptcalendar.h"
00026 
00027 #include <kdialog.h>
00028 
00029 #include <QString>
00030 #include <QWidget>
00031 
00032 class KMacroCommand;
00033 
00034 namespace KPlato
00035 {
00036 
00037 class Project;
00038 class Part;
00039 class IntervalEditImpl;
00040 
00041 class StandardWorktimeDialogImpl : public QWidget, public Ui::StandardWorktimeDialogBase {
00042     Q_OBJECT
00043 public:
00044     StandardWorktimeDialogImpl ( StandardWorktime *std, QWidget *parent);
00045 
00046     StandardWorktime *standardWorktime() { return m_std; }
00047     double inYear() const { return m_year; }
00048     double inMonth() const { return m_month; }
00049     double inWeek() const { return m_week; }
00050     double inDay() const { return m_day; }
00051     
00052 private slots:
00053     void slotCheckAllFieldsFilled();
00054     void slotEnableButtonOk(bool on);
00055 
00056     void slotYearChanged(double);
00057     void slotMonthChanged(double);
00058     void slotWeekChanged(double);
00059     void slotDayChanged(double);
00060     void slotIntervalChanged();
00061     void slotApplyClicked();
00062     void slotEnableButtonApply(bool);
00063     void slotWeekdaySelected();
00064     void slotStateChanged(int);
00065 signals:
00066     void obligatedFieldsFilled(bool yes);
00067     void enableButtonOk(bool);
00068 
00069 private:
00070     StandardWorktime *m_std;
00071     double m_year;
00072     double m_month;
00073     double m_week;
00074     double m_day;
00075     IntervalEditImpl *m_intervalEdit;
00076 };
00077 
00078 class StandardWorktimeDialog : public KDialog {
00079     Q_OBJECT
00080 public:
00081     StandardWorktimeDialog(Project &project, QWidget *parent=0, const char *name=0);
00082     
00083     KMacroCommand *buildCommand(Part *part);
00084 
00085 protected slots:
00086     void slotOk();
00087     
00088 private:
00089     Project &project;
00090     StandardWorktimeDialogImpl *dia;
00091     StandardWorktime *m_original;
00092 };
00093 
00094 } //KPlato namespace
00095 
00096 #endif // STANDARDWORKTIMEDIALOG_H

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