File indexing completed on 2024-05-12 16:39:25
0001 /* This file is part of the KDE project 0002 Copyright (C) 2009, 2011 Dag Andersen <danders@get2net.dk> 0003 Copyright (C) 2019 Dag Andersen <danders@get2net.dk> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KPLATOWORK_TASKCOMPLETIONDIALOG_H 0022 #define KPLATOWORK_TASKCOMPLETIONDIALOG_H 0023 0024 #include "planwork_export.h" 0025 #include "ui_taskcompletionpanel.h" 0026 0027 #include "workpackage.h" 0028 0029 #include "kptusedefforteditor.h" 0030 0031 #include <KoDialog.h> 0032 0033 #include <QWidget> 0034 0035 class KUndo2Command; 0036 0037 namespace KPlato { 0038 class ScheduleManager; 0039 class TaskProgressPanel; 0040 } 0041 0042 namespace KPlatoWork 0043 { 0044 0045 class TaskCompletionPanel; 0046 0047 class PLANWORK_EXPORT TaskCompletionDialog : public KoDialog 0048 { 0049 Q_OBJECT 0050 public: 0051 explicit TaskCompletionDialog(WorkPackage &package, ScheduleManager *sm, QWidget *parent=0); 0052 0053 KUndo2Command *buildCommand(); 0054 0055 protected Q_SLOTS: 0056 void slotChanged(bool); 0057 0058 private: 0059 TaskCompletionPanel *m_panel; 0060 }; 0061 0062 class PLANWORK_EXPORT TaskCompletionPanel : public QWidget 0063 { 0064 Q_OBJECT 0065 public: 0066 explicit TaskCompletionPanel(WorkPackage &package, ScheduleManager *sm, QWidget *parent=0); 0067 0068 KUndo2Command *buildCommand(); 0069 0070 void enableWidgets(); 0071 0072 Q_SIGNALS: 0073 void changed(bool); 0074 0075 public Q_SLOTS: 0076 void slotChanged(); 0077 0078 private: 0079 KPlato::TaskProgressPanel *m_panel; 0080 }; 0081 0082 } //KPlatoWork namespace 0083 0084 0085 #endif