ProjectSession Class Reference
This class stores and restores the last situation before the certain project was closed. More...
#include <projectsession.h>
Inheritance diagram for ProjectSession:

Signals | |
void | sig_restoreMainWindowProperties (const QDomElement *el) |
void | sig_saveMainWindowProperties (QDomElement *el) |
void | sig_restoreAdditionalViewProperties (const QString &viewName, const QDomElement *el) |
void | sig_saveAdditionalViewProperties (const QString &viewName, QDomElement *el) |
Public Member Functions | |
ProjectSession () | |
virtual | ~ProjectSession () |
bool | saveToFile (const QString &fileName, const QDict< KDevPlugin > &projectPlugins) |
Opens the .kdevses file and saves the project session in XML format to it. | |
bool | restoreFromFile (const QString &fileName, const QDict< KDevPlugin > &projectPlugins) |
Opens the .kdevses file and loads the project session from it. | |
Private Member Functions | |
void | recreateDocs (QDomElement &el) |
Restores the part of the project session that concerns to the documents (files). | |
void | recreateViews (KURL &url, QDomElement docEl) |
recreates views and their properties of a certain document. | |
void | initXMLTree () |
setup a valid XML file. | |
Private Attributes | |
QDomDocument | domdoc |
the XML document object controlling the XML tree. |
Detailed Description
This class stores and restores the last situation before the certain project was closed.Session stuff that is not related to a certain project doesn't belong to here; it must be saved in a program session which likely is "kdeveloprc".
Definition at line 34 of file projectsession.h.
Constructor & Destructor Documentation
|
Definition at line 40 of file projectsession.cpp. References initXMLTree(). |
|
Definition at line 46 of file projectsession.cpp. |
Member Function Documentation
|
setup a valid XML file.
Definition at line 51 of file projectsession.cpp. References domdoc. Referenced by ProjectSession(), restoreFromFile(), and saveToFile(). |
|
Restores the part of the project session that concerns to the documents (files).
Definition at line 122 of file projectsession.cpp. References KDevMainWindow::callCommand(), API::getInstance(), API::mainWindow(), recreateDocs(), and recreateViews(). Referenced by recreateDocs(), and restoreFromFile(). |
|
recreates views and their properties of a certain document.
Definition at line 159 of file projectsession.cpp. References PartController::editDocument(), PartController::getInstance(), recreateViews(), PartController::showDocument(), sig_restoreAdditionalViewProperties(), and KURL::url(). Referenced by recreateDocs(), and recreateViews(). |
|
Opens the .kdevses file and loads the project session from it.
Definition at line 69 of file projectsession.cpp. References domdoc, initXMLTree(), KXMLGUIClient::instance(), KInstance::instanceName(), recreateDocs(), restoreFromFile(), and KDevPlugin::restorePartialProjectSession(). Referenced by ProjectManager::loadProject(), and restoreFromFile(). |
|
Opens the .kdevses file and saves the project session in XML format to it.
Definition at line 208 of file projectsession.cpp. References DocumentationPart::context(), KTextEditor::ViewCursorInterface::cursorPosition(), domdoc, initXMLTree(), KXMLGUIClient::instance(), KInstance::instanceName(), KDevPlugin::savePartialProjectSession(), saveToFile(), sig_saveAdditionalViewProperties(), KURL::url(), KParts::ReadOnlyPart::url(), and KParts::Part::widget(). Referenced by ProjectManager::closeProject(), and saveToFile(). |
|
Referenced by recreateViews(). |
|
|
|
Referenced by saveToFile(). |
|
|
Member Data Documentation
|
the XML document object controlling the XML tree.
Definition at line 65 of file projectsession.h. Referenced by initXMLTree(), restoreFromFile(), and saveToFile(). |
The documentation for this class was generated from the following files: