Formatting for basket and sales improved
This commit is contained in:
parent
cac9ee9e30
commit
3a635825ef
2 changed files with 8 additions and 3 deletions
|
@ -33,7 +33,10 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
|
|||
return myFixedFont;
|
||||
case 3:
|
||||
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
|
||||
myFixedFont.setBold(true);
|
||||
return myFixedFont;
|
||||
default:
|
||||
return myFont;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,12 +79,14 @@ QVariant SaleModel::data(const QModelIndex& index, int role) const
|
|||
|
||||
if (role == Qt::FontRole) {
|
||||
QFont myFont;
|
||||
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
|
||||
switch (index.column()) {
|
||||
case 0:
|
||||
return myFont;
|
||||
return myFixedFont;
|
||||
case 1:
|
||||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
myFixedFont.setBold(true);
|
||||
return myFixedFont;
|
||||
default:
|
||||
return myFont;
|
||||
}
|
||||
|
@ -108,7 +110,7 @@ QVariant SaleModel::data(const QModelIndex& index, int role) const
|
|||
Article* article = static_cast<Article*>(index.internalPointer());
|
||||
switch (index.column()) {
|
||||
case 0:
|
||||
return (std::string("Verk. ") + std::to_string(article->getSeller()->getSellerNo()) + " (" + article->getCompleteArticleNo() + ")").c_str();
|
||||
return (std::string("Verk. ") + article->getSeller()->getSellerNoAsString() + " (" + article->getCompleteArticleNo() + ")").c_str();
|
||||
case 1:
|
||||
return article->getPriceAsString().c_str();
|
||||
case 2:
|
||||
|
|
Loading…
Reference in a new issue