Make increments separator more visually separated from regular increments.
--HG-- branch : develop
This commit is contained in:
parent
522fd798ad
commit
816db0a7bb
|
@ -293,7 +293,8 @@ void DialogIncrements::ShowHeaderUnits(QTableWidget *table, int column, const QS
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogIncrements::AddCell(QTableWidget *table, const QString &text, int row, int column, int aligment, bool ok)
|
||||
QTableWidgetItem * DialogIncrements::AddCell(QTableWidget *table, const QString &text, int row, int column,
|
||||
int aligment, bool ok)
|
||||
{
|
||||
SCASSERT(table != nullptr)
|
||||
|
||||
|
@ -313,6 +314,21 @@ void DialogIncrements::AddCell(QTableWidget *table, const QString &text, int row
|
|||
}
|
||||
|
||||
table->setItem(row, column, item);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QTableWidgetItem* DialogIncrements::AddSeparatorCell(QTableWidget *table, const QString &text, int row, int column,
|
||||
int aligment, bool ok)
|
||||
{
|
||||
QTableWidgetItem *item = AddCell(table, text, row, column, aligment, ok);
|
||||
|
||||
QFont itemFont = item->font();
|
||||
itemFont.setBold(true);
|
||||
itemFont.setItalic(true);
|
||||
item->setFont(itemFont);
|
||||
return item;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -896,8 +912,8 @@ void DialogIncrements::FillIncrementsTable(QTableWidget *table,
|
|||
}
|
||||
else if (incr->GetType() == VarType::IncrementSeparator)
|
||||
{
|
||||
AddCell(table, incr->GetName(), currentRow, 0, Qt::AlignVCenter); // name
|
||||
AddCell(table, incr->GetDescription(), currentRow, 1, Qt::AlignCenter); // name
|
||||
AddSeparatorCell(table, incr->GetName(), currentRow, 0, Qt::AlignVCenter); // name
|
||||
AddCell(table, incr->GetDescription(), currentRow, 1, Qt::AlignCenter); // description
|
||||
table->setSpan(currentRow, 1, 1, 2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,10 @@ private:
|
|||
void ShowUnits();
|
||||
void ShowHeaderUnits(QTableWidget *table, int column, const QString &unit);
|
||||
|
||||
void AddCell(QTableWidget *table, const QString &text, int row, int column, int aligment, bool ok = true);
|
||||
QTableWidgetItem* AddCell(QTableWidget *table, const QString &text, int row, int column, int aligment,
|
||||
bool ok = true);
|
||||
QTableWidgetItem* AddSeparatorCell(QTableWidget *table, const QString &text, int row, int column, int aligment,
|
||||
bool ok = true);
|
||||
|
||||
QString GetCustomName() const;
|
||||
QString ClearIncrementName(const QString &name) const;
|
||||
|
|
Loading…
Reference in New Issue
Block a user