QtLingo 1
QtLingo is an Application to make Qt Computer Translations easier
MyDatatables.h
Go to the documentation of this file.
1#ifndef MYDATATABLES_H
2#define MYDATATABLES_H
3
4#include <QObject>
5#include <QtDebug>
6#include "MyConstants.h"
7#include "MySqlDbtModel.h"
8#include "MyLanguageModel.h"
9
15{
16 public:
17 MyProjectClass(const QString &thisID, const QString &thisQtProjectName, const QString &thisQtProjectFolder, const QString &thisSourceFolder, const QString &thisDestinationFolder, const QString &thisHelpFolder, const QString &thisSourceLanguage, const QString &thisLanguageIDs, const QString &thisMake)
18 : myID{thisID}, myQtProjectName{thisQtProjectName}, myQtProjectFolder{thisQtProjectFolder}, mySourceFolder{thisSourceFolder}, myDoxyfileFolder{thisDestinationFolder}, myHelpFolder{thisHelpFolder}, mySourceLanguage{thisSourceLanguage}, myLanguageIDs{thisLanguageIDs}, myMake{thisMake} {}
19 // Getters
20 QString getID() const { return myID; }
21 QString getQtProjectName() const { return myQtProjectName; }
22 QString getQtProjectFolder() const { return myQtProjectFolder; }
23 QString getSourceFolder() const { return mySourceFolder; }
24 QString getDoxyfileFolder() const { return myDoxyfileFolder; }
25 QString getHelpFolder() const { return myHelpFolder; }
26 QString getSourceLanguage() const { return mySourceLanguage; }
27 QString getLanguageIDs() const { return myLanguageIDs; }
28 QString getMake() const { return myMake; }
29 // Setters
30 void setID(const QString &s) { myID = s; }
31 void setQtProjectName(const QString &s) { myQtProjectName = s; }
32 void setQtProjectFolder(const QString &s) { myQtProjectFolder = s; }
33 void setSourceFolder(const QString &s) { mySourceFolder = s; }
34 void setDoxyfileFolder(const QString &s) { myDoxyfileFolder = s; }
35 void setHelpFolder(const QString &s) { myHelpFolder = s; }
36 void setSourceLanguage(const QString &s) { mySourceLanguage = s; }
37 void setLanguageIDs(const QString &s) { myLanguageIDs = s; }
38 void setMake(const QString &s) { myMake = s; }
39
40 private:
41 QString myID, myQtProjectName, myQtProjectFolder, mySourceFolder, myDoxyfileFolder, myHelpFolder;
42 QString mySourceLanguage, myLanguageIDs, myMake;
43};
44
49class MyDatatables : public QObject
50{
51 Q_OBJECT
52 public:
53 explicit MyDatatables(MyLanguageModel *thisLanguageModel = nullptr, MyConstants *thisConstant = nullptr, QObject *parent = nullptr);
55 //
60 //
61 bool checkDatabase();
62 bool insertQtProjects();
63 bool addQtProject();
64 void deleteQtProject(const QString &thisID);
65 void saveQtProject();
66 //
67 void setProject(const QString &thisQtProjectName, const QString &thisQtProject, const QString &thisSecret, const QString &thisEnvironment, const QString &thisHelpFolder, const QString &thisSourceLanguage, const QString &thisLanguageIDs, const QString &thisMake);
68 // Query
69 QString getQtProjectNameSelectQueryID(const QString &thisWhereID);
71 QString getQtProjectFullSelectQueryID(const QString &thisWhereID);
72 QString getQtProjectNameByNameQuery(const QString &thisProject);
73 bool isQtProjectNameQuery(const QString &thisProjectName);
74 // Project Name
75 void setProjectName(const QString &thisProjectName);
76 QString getProjectName();
77 // Project ID
78 void setProjectID(const QString &thisProjectID);
79 QString getProjectID();
80 // Project Folder
81 void setProjectFolder(const QString &thisProjectFolder);
82 QString getProjectFolder();
83 // ComboBox SQL Value
84 void setComboBoxSqlValue(const QString &thisComboBoxSqlValue);
85 QString getComboBoxSqlValue();
86 // Is Debug Message
87 void setDebugMessage(bool thisState);
88 bool getDebugMessage();
89 void setMessage(const QString &thisMessage);
90
91 private:
92 QString myProjectID = "-1";
93 QString myComboBoxSqlValue = "-1";
94 QString myProjectFolder = "QtLingo";
95 QString myProjectName = "QtLingo";
96 bool isDebugMessage = true;
97 bool isSaveSettings = false;
98
99};
100#endif // MYDATATABLES_H
101
Constants are defined as const QString, starting with MY_ all capps.
Definition: MyConstants.h:12
My Datatables.
Definition: MyDatatables.h:50
QString getProjectID()
get Project ID
QString getQtProjectNameSelectQueryID(const QString &thisWhereID)
get Qt Projects Name Select Query ID
void setProjectName(const QString &thisProjectName)
set Project Name
QString getQtProjectFullSelectQueryID(const QString &thisWhereID)
get Qt Projects Full Select Query ID
void setDebugMessage(bool thisState)
set Debug Message
QString getQtProjectNameByNameQuery(const QString &thisProject)
get Qt Projects Name By Name Query
MyProjectClass * myProject
myProject
Definition: MyDatatables.h:56
void setProject(const QString &thisQtProjectName, const QString &thisQtProject, const QString &thisSecret, const QString &thisEnvironment, const QString &thisHelpFolder, const QString &thisSourceLanguage, const QString &thisLanguageIDs, const QString &thisMake)
set Project Sets all Variables used in the Configuarion Database in one Place: QtProjectFolder,...
QString getComboBoxSqlValue()
get ComboBox SqlValue
QString getQtProjectNameSelectQuery()
get Qt Projects Name Select Query
bool insertQtProjects()
insert Qt Project
bool checkDatabase()
check Database
void setComboBoxSqlValue(const QString &thisComboBoxSqlValue)
set ComboBox SqlValue
QString getProjectFolder()
get Project Folder
MySqlDbtModel * mySqlModel
mySqlModel
Definition: MyDatatables.h:57
MyConstants * myConstants
myConstants
Definition: MyDatatables.h:59
void saveQtProject()
save Qt Project
QString getProjectName()
get Project Name
void setProjectFolder(const QString &thisProjectFolder)
set Project Folder
void setProjectID(const QString &thisProjectID)
set Project ID
void deleteQtProject(const QString &thisID)
delete Qt Project
MyLanguageModel * myLanguageModel
myLanguageModel
Definition: MyDatatables.h:58
void setMessage(const QString &thisMessage)
set Message
bool isQtProjectNameQuery(const QString &thisProjectName)
is Qt Project Name Query
MyDatatables(MyLanguageModel *thisLanguageModel=nullptr, MyConstants *thisConstant=nullptr, QObject *parent=nullptr)
My Datatables Constructor. MyDatatables.
Definition: MyDatatables.cpp:7
bool getDebugMessage()
get Debug Message
bool addQtProject()
add Qt Project
~MyDatatables()
My Datatables Deconstructor. MyDatatables.
Abstact Model used for ComboBox. /class MyLanguageModel.
Project Class.
Definition: MyDatatables.h:15
QString getQtProjectName() const
Project Name of .pro file.
Definition: MyDatatables.h:21
void setID(const QString &s)
Definition: MyDatatables.h:30
QString getSourceLanguage() const
ComboBox of Languages.
Definition: MyDatatables.h:26
void setSourceLanguage(const QString &s)
Definition: MyDatatables.h:36
void setQtProjectName(const QString &s)
Definition: MyDatatables.h:31
QString getHelpFolder() const
Help Folder.
Definition: MyDatatables.h:25
QString getMake() const
qmake or cmake
Definition: MyDatatables.h:28
QString getLanguageIDs() const
Sum of Checkboxes.
Definition: MyDatatables.h:27
void setHelpFolder(const QString &s)
Definition: MyDatatables.h:35
QString getQtProjectFolder() const
Base Project Folder.
Definition: MyDatatables.h:22
void setMake(const QString &s)
Definition: MyDatatables.h:38
QString getSourceFolder() const
Source Folder.
Definition: MyDatatables.h:23
void setQtProjectFolder(const QString &s)
Definition: MyDatatables.h:32
QString getID() const
ID.
Definition: MyDatatables.h:20
void setSourceFolder(const QString &s)
Definition: MyDatatables.h:33
MyProjectClass(const QString &thisID, const QString &thisQtProjectName, const QString &thisQtProjectFolder, const QString &thisSourceFolder, const QString &thisDestinationFolder, const QString &thisHelpFolder, const QString &thisSourceLanguage, const QString &thisLanguageIDs, const QString &thisMake)
Definition: MyDatatables.h:17
void setDoxyfileFolder(const QString &s)
Definition: MyDatatables.h:34
QString getDoxyfileFolder() const
Doxyfile Folder.
Definition: MyDatatables.h:24
void setLanguageIDs(const QString &s)
Definition: MyDatatables.h:37
SQL Database Table Model.
Definition: MySqlDbtModel.h:21