roviz  0.7
Code Documentation of roviz
sql_workspace.h
1 #ifndef SQL_WORKSPACE_H
2 #define SQL_WORKSPACE_H
3 
4 #include "abstract_workspace.h"
5 
7 {
8  Q_OBJECT
9  Q_PROPERTY(int port READ port WRITE setPort USER true)
10  Q_PROPERTY(QString user READ user WRITE setUser USER true)
11  Q_PROPERTY(QString password READ password WRITE setPassword USER true)
12  Q_PROPERTY(QString host READ host WRITE setHost USER true)
13  Q_PROPERTY(QString database READ database WRITE setDatabase USER true)
14 
15 public:
16  Q_INVOKABLE SqlWorkspace();
17  ~SqlWorkspace();
18 
19  void init() Q_DECL_OVERRIDE;
20  void update() Q_DECL_OVERRIDE;
21  bool compare(const QSharedPointer<AbstractWorkspace>& otherWorkspace) const Q_DECL_OVERRIDE;
22  bool save() Q_DECL_OVERRIDE;
23  bool test() Q_DECL_OVERRIDE;
24  bool deleteProject(const QSharedPointer<AbstractProject>& project) Q_DECL_OVERRIDE;
25  bool deleteWorkspace(bool deleteProjects = false) Q_DECL_OVERRIDE;
26 
27  int port() const;
28  void setPort(int port);
29  QString user() const;
30  void setUser(const QString& user);
31  QString password() const;
32  void setPassword(const QString& password);
33  QString host() const;
34  void setHost(const QString& host);
35  QString database() const;
36  void setDatabase(const QString& database);
37  QString sourceInformation() const;
38  void setSourceInformation(const QString& sourceInformation);
39 
40 private:
41  int _port;
42  QString _user;
43  QString _password;
44  QString _host;
45  QString _database;
46  QString _sourceInformation;
47  void initProjectList();
48 };
49 #endif // SQL_WORKSPACE_H
bool test() Q_DECL_OVERRIDE
Workspace test procedure. The Test-Procedure is defined by the specific workspace class...
Definition: sql_workspace.cpp:27
Definition: sql_workspace.h:6
bool deleteProject(const QSharedPointer< AbstractProject > &project) Q_DECL_OVERRIDE
Delete a project and remove it from workspace.
Definition: sql_workspace.cpp:32
QSharedPointer< AbstractProject > project(QString connectionString) const
Definition: abstract_workspace.cpp:165
bool save() Q_DECL_OVERRIDE
Save workspace with all settings.
Definition: sql_workspace.cpp:22
void update() Q_DECL_OVERRIDE
Update the workspace after property changes.
Definition: sql_workspace.cpp:17
bool deleteWorkspace(bool deleteProjects=false) Q_DECL_OVERRIDE
Delete workspace. The function deletes this workspace and all included projects, if the deleteProject...
Definition: sql_workspace.cpp:38
void init() Q_DECL_OVERRIDE
Initialize the Workspace and set isValid flag. This function must be called, otherwise the workspace ...
Definition: sql_workspace.cpp:12
Definition: abstract_workspace.h:23
bool compare(const QSharedPointer< AbstractWorkspace > &otherWorkspace) const Q_DECL_OVERRIDE
Compare a other Workspace source with this Workspace source (not the Object adress).
Definition: sql_workspace.cpp:45