mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Prepare: On changeCurrentTitleBlockTemplate combobox load the fields of the template to additional_fields_
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2114 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1329,6 +1329,24 @@ QString TitleBlockTemplate::interpreteVariables(const QString &string, const Dia
|
||||
return(interpreted_string);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Get list of variables
|
||||
@return The list of string with variables
|
||||
*/
|
||||
QStringList TitleBlockTemplate::listOfVariables() {
|
||||
QStringList list;
|
||||
// run through each individual cell
|
||||
for (int j = 0 ; j < rows_heights_.count() ; ++ j) {
|
||||
for (int i = 0 ; i < columns_width_.count() ; ++ i) {
|
||||
if (cells_[i][j] -> spanner_cell || cells_[i][j] -> cell_type == TitleBlockCell::EmptyCell) continue;
|
||||
// TODO: not works on all cases...
|
||||
list << cells_[i][j] -> value.name().replace("%","");
|
||||
}
|
||||
}
|
||||
qDebug() << list;
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
This method uses a \a painter to render the \a text of a \a cell
|
||||
into the \a cell_rect rectangle.
|
||||
|
||||
Reference in New Issue
Block a user