kateprojectmanager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __KATE_PROJECTMANAGER_H__
00020 #define __KATE_PROJECTMANAGER_H__
00021
00022 #include "katemain.h"
00023 #include "../interfaces/project.h"
00024 #include "../interfaces/projectmanager.h"
00025
00026 #include <qobject.h>
00027 #include <qvaluelist.h>
00028 #include <qptrlist.h>
00029 #include <qstringlist.h>
00030 #include <ktrader.h>
00031 #include <qguardedptr.h>
00032 #include <kdialogbase.h>
00033
00034 class KComboBox;
00035 class KLineEdit;
00036 class KURLRequester;
00037
00038 class KateInternalProjectData
00039 {
00040 public:
00041 class KateProjectManager *proMan;
00042 QString fileName;
00043 };
00044
00045 class ProjectPluginInfo
00046 {
00047 public:
00048 KService::Ptr service;
00049 QString projectType;
00050 };
00051
00052 class ProjectInfo
00053 {
00054 public:
00055 QString type;
00056 QString name;
00057 QString fileName;
00058 };
00059
00060 typedef QPtrList<ProjectPluginInfo> ProjectPluginList;
00061
00062 class KateProjectManager : public QObject
00063 {
00064 Q_OBJECT
00065
00066 public:
00067 KateProjectManager(QObject *parent);
00068 ~KateProjectManager();
00069
00070 Kate::ProjectManager *projectManager ()const { return m_projectManager; };
00071
00072 Kate::Project *create (const QString &type, const QString &name, const QString &filename);
00073
00074 Kate::Project *open (const QString &filename);
00075
00076 bool close (Kate::Project *project, bool force = false);
00077
00078 Kate::Project *project (uint n = 0);
00079
00080 uint projects ();
00081
00082 Kate::ProjectPlugin *createPlugin (Kate::Project *project);
00083
00084 void enableProjectGUI (Kate::Project *project, class KateMainWindow *win);
00085 void disableProjectGUI (Kate::Project *project, class KateMainWindow *win);
00086
00087 ProjectInfo *newProjectDialog (QWidget *parent);
00088
00089 QStringList pluginStringList ();
00090
00091 void setCurrentProject (Kate::Project *project);
00092
00093 bool queryCloseAll ();
00094 bool closeAll ();
00095
00096 void saveProjectList (class KConfig *config);
00097 void restoreProjectList (class KConfig *config);
00098
00099 private:
00100 Kate::ProjectManager *m_projectManager;
00101
00102 void setupPluginList ();
00103
00104 ProjectPluginList m_pluginList;
00105
00106
00107 QPtrList<Kate::Project> m_projects;
00108 QGuardedPtr<Kate::Project> m_currentProject;
00109 };
00110
00111 class KateProjectDialogNew : public KDialogBase
00112 {
00113 Q_OBJECT
00114 public:
00115 KateProjectDialogNew (QWidget *parent, KateProjectManager *projectMan);
00116 ~KateProjectDialogNew ();
00117
00118 int exec();
00119
00120 private slots:
00121 void slotTextChanged();
00122
00123 private:
00124 KateProjectManager *m_projectMan;
00125
00126 KComboBox *m_typeCombo;
00127 KLineEdit *m_nameEdit;
00128 KURLRequester *m_urlRequester;
00129
00130 public:
00131 QString type;
00132 QString name;
00133 QString fileName;
00134 };
00135
00136 #endif
This file is part of the documentation for kate Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Apr 11 13:44:49 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003