00001
00002
00003 #ifndef PROJECTDIALOG_H
00004 #define PROJECTDIALOG_H
00005
00006 #include <qfont.h>
00007 #include <qtextedit.h>
00008 #include <qcheckbox.h>
00009 #include <kdeversion.h>
00010 #if KDE_VERSION > 0x030104
00011 #include <kdatetimewidget.h>
00012 #endif
00013 #include "Worksheet.h"
00014 #include "Dialog.h"
00015
00016 class ProjectDialog: public Dialog
00017 {
00018 Q_OBJECT
00019 public:
00020 ProjectDialog(MainWin *mw, const char *name);
00021 public slots:
00022 QString Title() { return titlele->text(); }
00023 void setTitle(QString t) { titlele->setText(t); }
00024 QString Author() { return authorle->text(); }
00025 void setAuthor(QString t) { authorle->setText(t); }
00026 QDateTime Created() {
00027 #if KDE_VERSION > 0x030104
00028 return created->dateTime();
00029 #endif
00030 return QDateTime::currentDateTime();
00031 }
00032 void setCreated(QDateTime dt) {
00033 #if KDE_VERSION > 0x030104
00034 created->setDateTime(dt);
00035 #endif
00036 }
00037 QDateTime Modified() {
00038 #if KDE_VERSION > 0x030104
00039 return modified->dateTime();
00040 #endif
00041 return QDateTime::currentDateTime();
00042 }
00043 void setModified(QDateTime dt) {
00044 #if KDE_VERSION > 0x030104
00045 modified->setDateTime(dt);
00046 #endif
00047 }
00048 QString Notes() { return noteste->text(); }
00049 void setNotes(QString n) { noteste->setText(n); }
00050
00051 void Apply() { apply_clicked(); }
00052 private:
00053 Project *project;
00054 KLineEdit *titlele, *authorle;
00055 QTextEdit *noteste;
00056 #if KDE_VERSION > 0x030104
00057 KDateTimeWidget *created, *modified;
00058 #endif
00059 private slots:
00060 void ok_clicked() { apply_clicked(); accept(); }
00061 void apply_clicked();
00062 };
00063
00064 #endif //PROJECTDIALOG_H