Skip to content

Commit

Permalink
Add icon pay in table of billings
Browse files Browse the repository at this point in the history
  • Loading branch information
aroquemaurel committed Mar 6, 2015
1 parent 4568061 commit ff8320e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion documents/LaTexTemplate
2 changes: 1 addition & 1 deletion fact-team.github.io
3 changes: 2 additions & 1 deletion src/gui/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ void MainWindow::updateTableBillings(const int idProject, const int row)
ui->tblQuotes->setColumnWidth(2, 200);
ui->tblQuotes->setColumnWidth(3, 300);
ui->tblQuotes->setColumnWidth(4, 100);
ui->tblQuotes->setColumnWidth(5, 50);
ui->tblQuotes->setColumnWidth(5, 100);

if (row > -1) {
ui->tblQuotes->selectRow(row);
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/gui/widgets/widgetsmodels/billingstablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int Gui::Widgets::WdgModels::BillingsTableModel::columnCount(
QVariant Gui::Widgets::WdgModels::BillingsTableModel::data(
const QModelIndex &index, int role) const
{
if (role != Qt::DisplayRole && role != Qt::EditRole || index.row() == -1) {
if (role != Qt::DisplayRole && role != Qt::EditRole && role != Qt::DecorationRole || index.row() == -1) {
return QVariant();
}

Expand All @@ -38,9 +38,9 @@ QVariant Gui::Widgets::WdgModels::BillingsTableModel::data(
case 4: return billing.getDate();
case 5:
if (billing.isPaid()) {
return "Payée";
return QImage(":/icons/img/img32/ok_pay.png").scaled(30,30);
} else {
return "";
return QVariant();
}
break;
default: return QVariant();
Expand Down
1 change: 1 addition & 0 deletions src/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<file>img/coffee_level3.png</file>
<file>img/coffee_level4.png</file>
<file>img/coffee_ready.png</file>
<file>img/img32/ok_pay.png</file>
</qresource>
<qresource prefix="/">
<file>../icons/img/256/remove_contributory.png</file>
Expand Down
Binary file added src/img/img32/ok_pay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/QTestRunner
Submodule QTestRunner updated 1 files
+6 −1 main.cpp

0 comments on commit ff8320e

Please sign in to comment.