Continue new summary feature

Header name is now well translated.
Open the good dialog from the properties dock widget
This commit is contained in:
Claveau Joshua
2020-06-21 16:00:14 +02:00
parent edb5217b31
commit 64f3001c86
10 changed files with 113 additions and 62 deletions

View File

@@ -118,7 +118,7 @@ void ElementQueryWidget::setQuery(const QString &query)
QString select = query;
select.remove(0,7); //Remove SELECT
select.truncate(select.indexOf("FROM")); //Truncate at FROM
select.replace(" ", ""); //Remove withe space
select.replace(" ", ""); //Remove white space
//Get the select -> the item in the right list
QStringList split = select.split(",");
@@ -367,25 +367,6 @@ QString ElementQueryWidget::queryStr() const
return q;
}
/**
* @brief ElementQueryWidget::header
* @return the name of each selected item is a QStringList.
* You can use the QStringList as header string of a table filled by the returned value of the query ElementQueryWidget::queryStr() to project database.
*/
QStringList ElementQueryWidget::header() const
{
//Made a string list with the colomns (keys) choosen by the user
QStringList headers;
int row = 0;
while (auto *item = ui->m_choosen_list->item(row))
{
headers.append(item->data(Qt::DisplayRole).toString());
++row;
}
return headers;
}
/**
* @brief ElementQueryWidget::updateQueryLine
*/