kplato

kptrelationdialog.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002 The koffice team <koffice@kde.org>
00003    Copyright (C) 2003, 2004 Dag Andersen <danders@get2net.dk>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library 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 GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KPTRELATIONDIALOG_H
00022 #define KPTRELATIONDIALOG_H
00023 
00024 #include <kdialogbase.h>
00025 
00026 class QButtonGroup;
00027 class KCommand;
00028 
00029 namespace KPlato
00030 {
00031 
00032 class RelationPanel;
00033 class DurationWidget;
00034 
00035 class Node;
00036 class Relation;
00037 class Part;
00038 class ModifyRelationTypeCmd;
00039 
00040 class AddRelationDialog : public KDialogBase 
00041 {
00042     Q_OBJECT
00043 public:
00044     AddRelationDialog(Relation *rel, QWidget *p, QString caption=QString::null, int buttons=Ok|Cancel, const char *n=0);
00045     
00046     virtual KCommand *buildCommand(Part *part);
00047 
00048 protected slots:
00049     void slotOk();
00050     void lagChanged();
00051     void typeClicked(int);
00052 
00053 protected:
00054     RelationPanel *m_panel;
00055     QButtonGroup *relationType;
00056     Relation *m_relation;
00057     DurationWidget *m_lag;
00058 };
00059 
00060 
00061 class ModifyRelationDialog : public AddRelationDialog 
00062 {
00063     Q_OBJECT
00064 public:
00065     ModifyRelationDialog(Relation *rel, QWidget *p=0, const char *n=0);
00066 
00067     virtual KCommand *buildCommand(Part *part);
00068     bool relationIsDeleted() { return m_deleted; }
00069     
00070 protected slots:
00071     void slotUser1();
00072 
00073 private:
00074     bool m_deleted;
00075 };
00076 
00077 }  //KPlato namespace
00078 
00079 #endif // RELATIONDIALOG_H
KDE Home | KDE Accessibility Home | Description of Access Keys