summaryrefslogtreecommitdiffstats
path: root/src/projectmanager.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /src/projectmanager.h
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/projectmanager.h')
-rw-r--r--src/projectmanager.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/src/projectmanager.h b/src/projectmanager.h
new file mode 100644
index 00000000..1cfb07d6
--- /dev/null
+++ b/src/projectmanager.h
@@ -0,0 +1,111 @@
+#ifndef __PROJECTMANAGER_H__
+#define __PROJECTMANAGER_H__
+
+
+#include <qstring.h>
+#include <qobject.h>
+#include <qdict.h>
+
+
+#include <kxmlguiclient.h>
+#include <kservice.h>
+#include <kurl.h>
+
+class KAction;
+class KSelectAction;
+class KService;
+class ProjectInfo;
+class ProjectSession;
+class KRecentFilesAction;
+class KDevPlugin;
+
+
+class ProjectInfo
+{
+public:
+ KURL m_projectURL;
+ QDomDocument m_document;
+ QString m_profileName;
+ QString m_projectName;
+ QString m_projectPlugin, m_language, m_activeLanguage, m_vcsPlugin;
+ QStringList m_ignoreParts, m_keywords;
+
+ QString sessionFile() const;
+};
+
+/**
+Project manager.
+Loads and unloads projects.
+*/
+class ProjectManager : public QObject, public KXMLGUIClient
+{
+ Q_OBJECT
+
+public:
+
+ ~ProjectManager();
+
+ static QString projectDirectory( const QString& path, bool absolute );
+
+ static ProjectManager *getInstance();
+
+ void loadSettings();
+ void saveSettings();
+ void loadDefaultProject();
+
+ bool projectLoaded() const;
+
+ KURL projectFile() const;
+ QString projectName() const;
+
+ void createActions( KActionCollection* ac );
+
+ ProjectSession* projectSession() const;
+
+public slots:
+ bool loadProject( const KURL& url);
+ bool loadKDevelop2Project( const KURL& url);
+ bool closeProject( bool exiting = false );
+
+private slots:
+ void slotOpenProject();
+ void slotProjectOptions();
+
+ void slotLoadProject();
+
+ void loadLocalParts();
+
+private:
+ ProjectManager();
+
+ void setupActions();
+ void getGeneralInfo();
+
+ bool loadProjectFile();
+ bool saveProjectFile();
+
+ bool loadProjectPart();
+ void unloadProjectPart();
+
+ bool loadLanguageSupport(const QString& lang);
+ void unloadLanguageSupport();
+
+// QString profileByAttributes(const QString &language, const QStringList &keywords);
+
+ ProjectInfo *m_info;
+
+ KAction *m_closeProjectAction, *m_projectOptionsAction;
+ KRecentFilesAction *m_openRecentProjectAction;
+
+ static ProjectManager *s_instance;
+
+ ProjectSession* m_pProjectSession;
+
+ KDevPlugin *m_vcsPlugin;
+ QString m_vcsName;
+
+ QString m_oldProfileName;
+};
+
+
+#endif