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 QValueList< KDevPlugin * > plugins) |
Opens the .kdevses file and saves the project session in XML format to it. | |
bool | restoreFromFile (const QString &fileName, const QValueList< KDevPlugin * > plugins) |
Opens the .kdevses file and loads the project session from it. | |
Private Slots | |
void | loadDocument () |
This slot loads one document from _docDataList and sets a timer to load the next. | |
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, bool activate) |
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. | |
QValueList< DocumentData > | _docDataList |
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 35 of file projectsession.h.
Constructor & Destructor Documentation
|
Definition at line 41 of file projectsession.cpp. References initXMLTree(). |
|
Definition at line 47 of file projectsession.cpp. |
Member Function Documentation
|
setup a valid XML file.
Definition at line 52 of file projectsession.cpp. References domdoc. Referenced by ProjectSession(), restoreFromFile(), and saveToFile(). |
|
This slot loads one document from _docDataList and sets a timer to load the next.
Definition at line 415 of file projectsession.cpp. References _docDataList, ProjectSession::DocumentData::activate, PartController::editDocument(), PartController::editDocumentInternal(), PartController::getInstance(), ProjectSession::DocumentData::line, PartController::showDocument(), ProjectSession::DocumentData::type, and ProjectSession::DocumentData::url. Referenced by restoreFromFile(). |
|
Restores the part of the project session that concerns to the documents (files).
Definition at line 126 of file projectsession.cpp. References KDevMainWindow::callCommand(), API::getInstance(), k_funcinfo, kdDebug(), API::mainWindow(), and recreateViews(). Referenced by restoreFromFile(). |
|
recreates views and their properties of a certain document.
Definition at line 164 of file projectsession.cpp. References _docDataList, ProjectSession::DocumentData::activate, ProjectSession::DocumentData::line, ProjectSession::DocumentData::type, and ProjectSession::DocumentData::url. Referenced by recreateDocs(). |
|
Opens the .kdevses file and loads the project session from it.
Definition at line 70 of file projectsession.cpp. References domdoc, initXMLTree(), KXMLGUIClient::instance(), KInstance::instanceName(), loadDocument(), recreateDocs(), KDevPlugin::restorePartialProjectSession(), and KMessageBox::sorry(). Referenced by ProjectManager::slotLoadProject(). |
|
Opens the .kdevses file and saves the project session in XML format to it.
Definition at line 230 of file projectsession.cpp. References KTextEditor::ViewCursorInterface::cursorPosition(), domdoc, initXMLTree(), KXMLGUIClient::instance(), KInstance::instanceName(), KDevPlugin::savePartialProjectSession(), KURL::url(), KParts::ReadOnlyPart::url(), and KParts::Part::widget(). Referenced by ProjectManager::closeProject(). |
|
|
|
|
|
|
|
|
Member Data Documentation
|
Definition at line 84 of file projectsession.h. Referenced by loadDocument(), and recreateViews(). |
|
the XML document object controlling the XML tree.
Definition at line 73 of file projectsession.h. Referenced by initXMLTree(), restoreFromFile(), and saveToFile(). |
The documentation for this class was generated from the following files: