QElectroTech
0.8-dev
|
The projectDataBase class This class wrap a sqlite data base where you can find several thing about the content of a project. More...
#include <projectdatabase.h>
Inherits QObject.
Signals | |
void | dataBaseUpdated () |
Public Member Functions | |
projectDataBase (QETProject *project, QObject *parent=nullptr) | |
projectDataBase::projectDataBase Default constructor More... | |
virtual | ~projectDataBase () override |
projectDataBase::~projectDataBase Destructor More... | |
void | updateDB () |
projectDataBase::updateDB Up to date the content of the data base. Emit the signal dataBaseUpdated More... | |
QETProject * | project () const |
projectDataBase::project More... | |
QSqlQuery | newQuery (const QString &query=QString()) |
projectDataBase::newQuery More... | |
void | addElement (Element *element) |
projectDataBase::addElement More... | |
void | removeElement (Element *element) |
projectDataBase::removeElement More... | |
void | elementInfoChanged (Element *element) |
projectDataBase::elementInfoChanged More... | |
void | addDiagram (Diagram *diagram) |
void | removeDiagram (Diagram *diagram) |
Static Public Member Functions | |
static void | exportDb (projectDataBase *db, QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString()) |
projectDataBase::exportDb More... | |
Private Member Functions | |
projectDataBase (QETProject *project, const QString &connection_name, const QString &path, QObject *parent=nullptr) | |
bool | createDataBase (const QString &connection_name=QString(), const QString &name=QString()) |
projectDataBase::createDataBase Create the data base More... | |
void | createElementNomenclatureView () |
projectDataBase::createElementNomenclatureView More... | |
void | createSummaryView () |
projectDataBase::createSummaryView More... | |
void | populateDiagramTable () |
void | populateElementTable () |
projectDataBase::populateElementTable Populate the element table More... | |
void | populateElementInfoTable () |
projectDataBase::populateElementsTable Populate the elements table More... | |
void | populateDiagramInfoTable () |
void | prepareQuery () |
Static Private Member Functions | |
static QHash< QString, QString > | elementInfoToString (Element *elmt) |
projectDataBase::elementInfoToString More... | |
Private Attributes | |
QPointer< QETProject > | m_project |
QSqlDatabase | m_data_base |
QSqlQuery | m_insert_elements_query |
QSqlQuery | m_insert_element_info_query |
QSqlQuery | m_remove_element_query |
QSqlQuery | m_update_element_query |
QSqlQuery | m_insert_diagram_query |
QSqlQuery | m_remove_diagram_query |
QSqlQuery | m_insert_diagram_info_query |
The projectDataBase class This class wrap a sqlite data base where you can find several thing about the content of a project.
projectDataBase::projectDataBase | ( | QETProject * | project, |
QObject * | parent = nullptr |
||
) |
projectDataBase::projectDataBase Default constructor
project | : project from the database work |
parent | : parent QObject |
|
private |
|
overridevirtual |
projectDataBase::~projectDataBase Destructor
void projectDataBase::addDiagram | ( | Diagram * | diagram | ) |
void projectDataBase::addElement | ( | Element * | element | ) |
element |
|
private |
projectDataBase::createDataBase Create the data base
|
private |
|
private |
|
signal |
void projectDataBase::elementInfoChanged | ( | Element * | element | ) |
projectDataBase::elementInfoChanged
element |
|
staticprivate |
projectDataBase::elementInfoToString
elmt |
|
static |
db | |
parent | |
caption | |
dir |
QSqlQuery projectDataBase::newQuery | ( | const QString & | query = QString() | ) |
|
private |
|
private |
|
private |
projectDataBase::populateElementsTable Populate the elements table
|
private |
projectDataBase::populateElementTable Populate the element table
|
private |
QETProject * projectDataBase::project | ( | ) | const |
void projectDataBase::removeDiagram | ( | Diagram * | diagram | ) |
void projectDataBase::removeElement | ( | Element * | element | ) |
projectDataBase::removeElement
element |
void projectDataBase::updateDB | ( | ) |
projectDataBase::updateDB Up to date the content of the data base. Emit the signal dataBaseUpdated
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |