src/projectsession.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 projectsession.h - description 00003 ------------------- 00004 begin : 30 Nov 2002 00005 copyright : (C) 2002 by Falk Brettschneider 00006 email : falk@kdevelop.org 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef _PROJECTSESSION_H_ 00018 #define _PROJECTSESSION_H_ 00019 00020 #include <qobject.h> 00021 #include <qdom.h> 00022 #include <qdict.h> 00023 00024 class QWidget; 00025 class KURL; 00026 class KDevPlugin; 00027 00034 class ProjectSession : public QObject 00035 { 00036 Q_OBJECT 00037 // methods 00038 public: 00039 ProjectSession(); 00040 virtual ~ProjectSession(); 00041 00043 bool saveToFile(const QString& fileName, const QDict<KDevPlugin>& projectPlugins); 00045 bool restoreFromFile(const QString& fileName, const QDict<KDevPlugin>& projectPlugins); 00046 00047 signals: 00048 void sig_restoreMainWindowProperties(const QDomElement* el); 00049 void sig_saveMainWindowProperties(QDomElement* el); 00050 00051 void sig_restoreAdditionalViewProperties(const QString& viewName, const QDomElement* el); 00052 void sig_saveAdditionalViewProperties(const QString& viewName, QDomElement* el); 00053 00054 private: 00056 void recreateDocs(QDomElement& el); 00058 void recreateViews(KURL& url, QDomElement docEl); 00060 void initXMLTree(); 00061 00062 // attributes 00063 private: 00065 QDomDocument domdoc; 00066 }; 00067 00068 #endif // _PROJECTSESSION_H_