QElectroTech 0.100.0-dev
|
The projectDataBase class This class wraps a sqlite data base where you can find several things 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 | |
virtual | ~projectDataBase () override |
projectDataBase::~projectDataBase Destructor | |
void | updateDB () |
projectDataBase::updateDB Up to date the content of the data base. Emit the signal dataBaseUpdated | |
QETProject * | project () const |
projectDataBase::project | |
QSqlQuery | newQuery (const QString &query=QString()) |
projectDataBase::newQuery | |
void | addElement (Element *element) |
projectDataBase::addElement | |
void | removeElement (Element *element) |
projectDataBase::removeElement | |
void | elementInfoChanged (Element *element) |
projectDataBase::elementInfoChanged | |
void | elementInfoChanged (QList< Element * > elements) |
void | addDiagram (Diagram *diagram) |
void | removeDiagram (Diagram *diagram) |
void | diagramInfoChanged (Diagram *diagram) |
void | diagramOrderChanged () |
Private Member Functions | |
bool | createDataBase () |
projectDataBase::createDataBase Create the data base | |
void | createElementNomenclatureView () |
projectDataBase::createElementNomenclatureView | |
void | createSummaryView () |
projectDataBase::createSummaryView | |
void | populateDiagramTable () |
void | populateElementTable () |
projectDataBase::populateElementTable Populate the element table | |
void | populateElementInfoTable () |
projectDataBase::populateElementInfoTable Populate the element info table | |
void | populateDiagramInfoTable () |
void | prepareQuery () |
void | bindDiagramInfoValues (QSqlQuery &query, Diagram *diagram) |
Static Private Member Functions | |
static QHash< QString, QString > | elementInfoToString (Element *elmt) |
projectDataBase::elementInfoToString | |
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 |
QSqlQuery | m_update_diagram_info_query |
QSqlQuery | m_diagram_order_changed |
QSqlQuery | m_diagram_info_order_changed |
The projectDataBase class This class wraps a sqlite data base where you can find several things 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 |
|
overridevirtual |
projectDataBase::~projectDataBase Destructor
void projectDataBase::addDiagram | ( | Diagram * | diagram | ) |
void projectDataBase::addElement | ( | Element * | element | ) |
element |
|
private |
|
private |
projectDataBase::createDataBase Create the data base
|
private |
|
private |
|
signal |
void projectDataBase::diagramInfoChanged | ( | Diagram * | diagram | ) |
void projectDataBase::diagramOrderChanged | ( | ) |
void projectDataBase::elementInfoChanged | ( | Element * | element | ) |
projectDataBase::elementInfoChanged
element |
void projectDataBase::elementInfoChanged | ( | QList< Element * > | elements | ) |
|
staticprivate |
projectDataBase::elementInfoToString
elmt |
QSqlQuery projectDataBase::newQuery | ( | const QString & | query = QString() | ) |
|
private |
|
private |
|
private |
projectDataBase::populateElementInfoTable Populate the element info 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 |
|
private |
|
private |
|
private |