File indexing completed on 2024-04-28 16:24:35
0001 /* This file is part of the KDE project 0002 Copyright (C) 2005, 2007 Dag Andersen <danders@get2net.dk> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 0021 #ifndef KPTCONTEXT_H 0022 #define KPTCONTEXT_H 0023 0024 #include <QString> 0025 #include <QStringList> 0026 0027 #include <KoXmlReader.h> 0028 0029 namespace KPlato 0030 { 0031 0032 class View; 0033 0034 class Context { 0035 public: 0036 Context(); 0037 virtual ~Context(); 0038 0039 virtual bool load(const KoXmlDocument &doc); 0040 virtual QDomDocument save(const View *view) const; 0041 const KoXmlElement &context() const; 0042 bool isLoaded() const { return m_contextLoaded; } 0043 0044 bool setContent(const QString &str); 0045 0046 QDomDocument document() const; 0047 0048 // View 0049 QString currentView; 0050 int currentEstimateType; 0051 long currentSchedule; 0052 bool actionViewExpected; 0053 bool actionViewOptimistic; 0054 bool actionViewPessimistic; 0055 0056 struct Ganttview { 0057 int ganttviewsize; 0058 int taskviewsize; 0059 QString currentNode; 0060 bool showResources; 0061 bool showTaskName; 0062 bool showTaskLinks; 0063 bool showProgress; 0064 bool showPositiveFloat; 0065 bool showCriticalTasks; 0066 bool showCriticalPath; 0067 bool showNoInformation; 0068 QStringList closedNodes; 0069 } ganttview; 0070 0071 struct Pertview { 0072 } pertview; 0073 0074 struct Resourceview { 0075 } resourceview; 0076 0077 struct Accountsview { 0078 int accountsviewsize; 0079 int periodviewsize; 0080 QDate date; 0081 int period; 0082 bool cumulative; 0083 QStringList closedItems; 0084 } accountsview; 0085 0086 struct Reportview { 0087 } reportview; 0088 0089 private: 0090 bool m_contextLoaded; 0091 KoXmlElement m_context; 0092 KoXmlDocument m_document; 0093 QDomDocument m_qDomDocument; 0094 }; 0095 0096 } //KPlato namespace 0097 0098 #endif //CONTEXT_H