mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-10 01:49:59 +01:00
Mod doc set style de same
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
#include <QRegularExpression>
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::ElementQueryWidget
|
||||
* @param parent
|
||||
*/
|
||||
@brief ElementQueryWidget::ElementQueryWidget
|
||||
@param parent
|
||||
*/
|
||||
ElementQueryWidget::ElementQueryWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ElementQueryWidget)
|
||||
@@ -96,18 +96,18 @@ ElementQueryWidget::ElementQueryWidget(QWidget *parent) :
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::~ElementQueryWidget
|
||||
*/
|
||||
@brief ElementQueryWidget::~ElementQueryWidget
|
||||
*/
|
||||
ElementQueryWidget::~ElementQueryWidget() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::setQuery
|
||||
* @param query
|
||||
* Set the current query to @query.
|
||||
* If it's possible, rebuild the state of the widget from the query
|
||||
*/
|
||||
@brief ElementQueryWidget::setQuery
|
||||
@param query
|
||||
Set the current query to @query.
|
||||
If it's possible, rebuild the state of the widget from the query
|
||||
*/
|
||||
void ElementQueryWidget::setQuery(const QString &query)
|
||||
{
|
||||
if (query.startsWith("SELECT"))
|
||||
@@ -271,9 +271,9 @@ void ElementQueryWidget::setQuery(const QString &query)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::queryStr
|
||||
* @return The current query
|
||||
*/
|
||||
@brief ElementQueryWidget::queryStr
|
||||
@return The current query
|
||||
*/
|
||||
QString ElementQueryWidget::queryStr() const
|
||||
{
|
||||
//User define is own query
|
||||
@@ -370,16 +370,16 @@ QString ElementQueryWidget::queryStr() const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::updateQueryLine
|
||||
*/
|
||||
@brief ElementQueryWidget::updateQueryLine
|
||||
*/
|
||||
void ElementQueryWidget::updateQueryLine() {
|
||||
ui->m_sql_query->setText(queryStr());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::selectedKeys
|
||||
* @return the current keys of selected infos to be exported
|
||||
*/
|
||||
@brief ElementQueryWidget::selectedKeys
|
||||
@return the current keys of selected infos to be exported
|
||||
*/
|
||||
QStringList ElementQueryWidget::selectedKeys() const
|
||||
{
|
||||
//Made a string list with the colomns (keys) choosen by the user
|
||||
@@ -395,8 +395,8 @@ QStringList ElementQueryWidget::selectedKeys() const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::setUpItems
|
||||
*/
|
||||
@brief ElementQueryWidget::setUpItems
|
||||
*/
|
||||
void ElementQueryWidget::setUpItems()
|
||||
{
|
||||
for(QString key : QETApp::elementInfoKeys())
|
||||
@@ -419,18 +419,18 @@ void ElementQueryWidget::setUpItems()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::FilterFor
|
||||
* @param key
|
||||
* @return the filter associated to key
|
||||
*/
|
||||
@brief ElementQueryWidget::FilterFor
|
||||
@param key
|
||||
@return the filter associated to key
|
||||
*/
|
||||
QPair<int, QString> ElementQueryWidget::FilterFor(const QString &key) const {
|
||||
return m_filter.value(key, qMakePair(0, QString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::fillSavedQuery
|
||||
* Fill the combobox of saved queries
|
||||
*/
|
||||
@brief ElementQueryWidget::fillSavedQuery
|
||||
Fill the combobox of saved queries
|
||||
*/
|
||||
void ElementQueryWidget::fillSavedQuery()
|
||||
{
|
||||
QFile file(QETApp::configDir() + "/nomenclature.json");
|
||||
@@ -446,8 +446,8 @@ void ElementQueryWidget::fillSavedQuery()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_up_pb_clicked
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_up_pb_clicked
|
||||
*/
|
||||
void ElementQueryWidget::on_m_up_pb_clicked()
|
||||
{
|
||||
auto row = ui->m_choosen_list->currentRow();
|
||||
@@ -463,8 +463,8 @@ void ElementQueryWidget::on_m_up_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_add_pb_clicked
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_add_pb_clicked
|
||||
*/
|
||||
void ElementQueryWidget::on_m_add_pb_clicked()
|
||||
{
|
||||
if (auto *item = ui->m_var_list->takeItem(ui->m_var_list->currentRow())) {
|
||||
@@ -475,8 +475,8 @@ void ElementQueryWidget::on_m_add_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_remove_pb_clicked
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_remove_pb_clicked
|
||||
*/
|
||||
void ElementQueryWidget::on_m_remove_pb_clicked()
|
||||
{
|
||||
if (auto *item = ui->m_choosen_list->takeItem(ui->m_choosen_list->currentRow())) {
|
||||
@@ -487,8 +487,8 @@ void ElementQueryWidget::on_m_remove_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_down_pb_clicked
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_down_pb_clicked
|
||||
*/
|
||||
void ElementQueryWidget::on_m_down_pb_clicked()
|
||||
{
|
||||
auto row = ui->m_choosen_list->currentRow();
|
||||
@@ -504,8 +504,8 @@ void ElementQueryWidget::on_m_down_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_edit_sql_query_cb_clicked
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_edit_sql_query_cb_clicked
|
||||
*/
|
||||
void ElementQueryWidget::on_m_edit_sql_query_cb_clicked()
|
||||
{
|
||||
ui->m_sql_query->setEnabled(ui->m_edit_sql_query_cb->isChecked());
|
||||
@@ -524,9 +524,9 @@ void ElementQueryWidget::on_m_edit_sql_query_cb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_filter_le_textEdited
|
||||
* @param arg1
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_filter_le_textEdited
|
||||
@param arg1
|
||||
*/
|
||||
void ElementQueryWidget::on_m_filter_le_textEdited(const QString &arg1)
|
||||
{
|
||||
if (auto item = ui->m_choosen_list->currentItem())
|
||||
@@ -541,9 +541,9 @@ void ElementQueryWidget::on_m_filter_le_textEdited(const QString &arg1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_filter_type_cb_activated
|
||||
* @param index
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_filter_type_cb_activated
|
||||
@param index
|
||||
*/
|
||||
void ElementQueryWidget::on_m_filter_type_cb_activated(int index)
|
||||
{
|
||||
if (auto item = ui->m_choosen_list->currentItem())
|
||||
@@ -559,9 +559,9 @@ void ElementQueryWidget::on_m_filter_type_cb_activated(int index)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_load_pb_clicked
|
||||
* Load a query from nomenclature.json file
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_load_pb_clicked
|
||||
Load a query from nomenclature.json file
|
||||
*/
|
||||
void ElementQueryWidget::on_m_load_pb_clicked()
|
||||
{
|
||||
auto name = ui->m_conf_cb->currentText();
|
||||
@@ -589,9 +589,9 @@ void ElementQueryWidget::on_m_load_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::on_m_save_current_conf_pb_clicked
|
||||
* Save the actual query to nomenclature.json file
|
||||
*/
|
||||
@brief ElementQueryWidget::on_m_save_current_conf_pb_clicked
|
||||
Save the actual query to nomenclature.json file
|
||||
*/
|
||||
void ElementQueryWidget::on_m_save_current_conf_pb_clicked()
|
||||
{
|
||||
QFile file_(QETApp::configDir() + "/nomenclature.json");
|
||||
@@ -648,9 +648,9 @@ void ElementQueryWidget::on_m_choosen_list_itemDoubleClicked(QListWidgetItem *it
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementQueryWidget::reset
|
||||
* Clear this widget aka set to initial state
|
||||
*/
|
||||
@brief ElementQueryWidget::reset
|
||||
Clear this widget aka set to initial state
|
||||
*/
|
||||
void ElementQueryWidget::reset()
|
||||
{
|
||||
//Ugly hack to force to remove all selected infos
|
||||
|
||||
@@ -28,10 +28,10 @@ class ElementQueryWidget;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The ElementQueryWidget class
|
||||
* A widget use to edit a sql query for get element information
|
||||
* This widget only work to get information from ProjectDataBase
|
||||
*/
|
||||
@brief The ElementQueryWidget class
|
||||
A widget use to edit a sql query for get element information
|
||||
This widget only work to get information from ProjectDataBase
|
||||
*/
|
||||
class ElementQueryWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#include <QListWidgetItem>
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::SummaryQueryWidget
|
||||
* @param parent
|
||||
*/
|
||||
@brief SummaryQueryWidget::SummaryQueryWidget
|
||||
@param parent
|
||||
*/
|
||||
SummaryQueryWidget::SummaryQueryWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SummaryQueryWidget)
|
||||
@@ -39,17 +39,17 @@ SummaryQueryWidget::SummaryQueryWidget(QWidget *parent) :
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::~SummaryQueryWidget
|
||||
*/
|
||||
@brief SummaryQueryWidget::~SummaryQueryWidget
|
||||
*/
|
||||
SummaryQueryWidget::~SummaryQueryWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::queryStr
|
||||
* @return The current query string
|
||||
*/
|
||||
@brief SummaryQueryWidget::queryStr
|
||||
@return The current query string
|
||||
*/
|
||||
QString SummaryQueryWidget::queryStr() const
|
||||
{
|
||||
//User define is own query
|
||||
@@ -80,11 +80,11 @@ QString SummaryQueryWidget::queryStr() const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::setQuery
|
||||
* @param query
|
||||
* set the current query to @query.
|
||||
* If it's possible, rebuild the state of the widget from the query
|
||||
*/
|
||||
@brief SummaryQueryWidget::setQuery
|
||||
@param query
|
||||
set the current query to @query.
|
||||
If it's possible, rebuild the state of the widget from the query
|
||||
*/
|
||||
void SummaryQueryWidget::setQuery(const QString &query)
|
||||
{
|
||||
if (query.startsWith("SELECT"))
|
||||
@@ -114,8 +114,8 @@ void SummaryQueryWidget::setQuery(const QString &query)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::setUpItems
|
||||
*/
|
||||
@brief SummaryQueryWidget::setUpItems
|
||||
*/
|
||||
void SummaryQueryWidget::setUpItems()
|
||||
{
|
||||
for (auto key : QETApp::diagramInfoKeys())
|
||||
@@ -133,9 +133,9 @@ void SummaryQueryWidget::setUpItems()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::fillSavedQuery
|
||||
* Fill the combo box of the saved query
|
||||
*/
|
||||
@brief SummaryQueryWidget::fillSavedQuery
|
||||
Fill the combo box of the saved query
|
||||
*/
|
||||
void SummaryQueryWidget::fillSavedQuery()
|
||||
{
|
||||
QFile file(QETApp::configDir() + "/summary.json");
|
||||
@@ -151,16 +151,16 @@ void SummaryQueryWidget::fillSavedQuery()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::updateQueryLine
|
||||
*/
|
||||
@brief SummaryQueryWidget::updateQueryLine
|
||||
*/
|
||||
void SummaryQueryWidget::updateQueryLine() {
|
||||
ui->m_user_query_le->setText(queryStr());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::selectedKeys
|
||||
* @return
|
||||
*/
|
||||
@brief SummaryQueryWidget::selectedKeys
|
||||
@return
|
||||
*/
|
||||
QStringList SummaryQueryWidget::selectedKeys() const
|
||||
{
|
||||
//Made a string list with the colomns (keys) choosen by the user
|
||||
@@ -176,9 +176,9 @@ QStringList SummaryQueryWidget::selectedKeys() const
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_available_list_itemDoubleClicked
|
||||
* @param item
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_available_list_itemDoubleClicked
|
||||
@param item
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_available_list_itemDoubleClicked(QListWidgetItem *item)
|
||||
{
|
||||
Q_UNUSED(item)
|
||||
@@ -186,9 +186,9 @@ void SummaryQueryWidget::on_m_available_list_itemDoubleClicked(QListWidgetItem *
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked
|
||||
* @param item
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked
|
||||
@param item
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked(QListWidgetItem *item)
|
||||
{
|
||||
Q_UNUSED(item)
|
||||
@@ -196,8 +196,8 @@ void SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked(QListWidgetItem *it
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_up_pb_clicked
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_up_pb_clicked
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_up_pb_clicked()
|
||||
{
|
||||
auto row = ui->m_choosen_list->currentRow();
|
||||
@@ -213,8 +213,8 @@ void SummaryQueryWidget::on_m_up_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_add_pb_clicked
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_add_pb_clicked
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_add_pb_clicked()
|
||||
{
|
||||
if (auto *item = ui->m_available_list->takeItem(ui->m_available_list->currentRow())) {
|
||||
@@ -225,8 +225,8 @@ void SummaryQueryWidget::on_m_add_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_remove_pb_clicked
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_remove_pb_clicked
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_remove_pb_clicked()
|
||||
{
|
||||
if (auto *item = ui->m_choosen_list->takeItem(ui->m_choosen_list->currentRow())) {
|
||||
@@ -237,8 +237,8 @@ void SummaryQueryWidget::on_m_remove_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_down_pb_clicked
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_down_pb_clicked
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_down_pb_clicked()
|
||||
{
|
||||
auto row = ui->m_choosen_list->currentRow();
|
||||
@@ -254,8 +254,8 @@ void SummaryQueryWidget::on_m_down_pb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::on_m_edit_sql_query_cb_clicked
|
||||
*/
|
||||
@brief SummaryQueryWidget::on_m_edit_sql_query_cb_clicked
|
||||
*/
|
||||
void SummaryQueryWidget::on_m_edit_sql_query_cb_clicked()
|
||||
{
|
||||
ui->m_user_query_le->setEnabled(ui->m_edit_sql_query_cb->isChecked());
|
||||
@@ -273,9 +273,9 @@ void SummaryQueryWidget::on_m_edit_sql_query_cb_clicked()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::reset
|
||||
* Clear this widget aka set to initial state
|
||||
*/
|
||||
@brief SummaryQueryWidget::reset
|
||||
Clear this widget aka set to initial state
|
||||
*/
|
||||
void SummaryQueryWidget::reset()
|
||||
{
|
||||
//Ugly hack to force to remove all selected infos
|
||||
@@ -286,8 +286,8 @@ void SummaryQueryWidget::reset()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::saveConfig
|
||||
*/
|
||||
@brief SummaryQueryWidget::saveConfig
|
||||
*/
|
||||
void SummaryQueryWidget::saveConfig()
|
||||
{
|
||||
QFile file_(QETApp::configDir() + "/summary.json");
|
||||
@@ -316,8 +316,8 @@ void SummaryQueryWidget::saveConfig()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SummaryQueryWidget::loadConfig
|
||||
*/
|
||||
@brief SummaryQueryWidget::loadConfig
|
||||
*/
|
||||
void SummaryQueryWidget::loadConfig()
|
||||
{
|
||||
auto name = ui->m_config_gb->selectedText();
|
||||
|
||||
Reference in New Issue
Block a user