• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Generic Shell
 

KDevelop Generic Shell

  • src
projectsession.h
1 /***************************************************************************
2  projectsession.h - description
3  -------------------
4  begin : 30 Nov 2002
5  copyright : (C) 2002 by Falk Brettschneider
6  email : falk@kdevelop.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef _PROJECTSESSION_H_
18 #define _PROJECTSESSION_H_
19 
20 #include <tqobject.h>
21 #include <tqdom.h>
22 #include <tqdict.h>
23 #include <tqvaluelist.h>
24 
25 class TQWidget;
26 class KURL;
27 class KDevPlugin;
28 
35 class ProjectSession : public TQObject
36 {
37  Q_OBJECT
38 
39 // methods
40 public:
41  ProjectSession();
42  virtual ~ProjectSession();
43 
45  bool saveToFile(const TQString& fileName, const TQValueList<KDevPlugin*> plugins );
46 
48  bool restoreFromFile(const TQString& fileName, const TQValueList<KDevPlugin*> plugins );
49 
50 signals:
51  void sig_restoreMainWindowProperties(const TQDomElement* el);
52  void sig_saveMainWindowProperties(TQDomElement* el);
53 
54  void sig_restoreAdditionalViewProperties(const TQString& viewName, const TQDomElement* el);
55  void sig_saveAdditionalViewProperties(const TQString& viewName, TQDomElement* el);
56 
57 private slots:
61  void loadDocument();
62 
63 private:
65  void recreateDocs(TQDomElement& el);
67  void recreateViews(KURL& url, TQDomElement docEl, bool activate);
69  void initXMLTree();
70 
71 // attributes
72 private:
74  TQDomDocument domdoc;
75 
76  struct DocumentData
77  {
78  DocumentData() : line(0) {}
79  KURL url;
80  int line;
81  TQString type;
82  bool activate;
83  TQString encoding;
84  };
85 
86  TQValueList<DocumentData> _docDataList;
87 
88 };
89 
90 #endif // _PROJECTSESSION_H_
ProjectSession
This class stores and restores the last situation before the certain project was closed.
Definition: projectsession.h:35
ProjectSession::saveToFile
bool saveToFile(const TQString &fileName, const TQValueList< KDevPlugin *> plugins)
Opens the .kdevses file and saves the project session in XML format to it.
Definition: projectsession.cpp:233
ProjectSession::restoreFromFile
bool restoreFromFile(const TQString &fileName, const TQValueList< KDevPlugin *> plugins)
Opens the .kdevses file and loads the project session from it.
Definition: projectsession.cpp:71

KDevelop Generic Shell

Skip menu "KDevelop Generic Shell"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Generic Shell

Skip menu "KDevelop Generic Shell"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Generic Shell by doxygen 1.8.13
This website is maintained by Timothy Pearson.