-
Notifications
You must be signed in to change notification settings - Fork 3
/
TableItemProject.cpp
39 lines (33 loc) · 972 Bytes
/
TableItemProject.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "TableItemProject.h"
#include "ui_TableItemProject.h"
TableItemProject::TableItemProject(QWidget *parent) :
QWidget(parent),
ui(new Ui::TableItemProject)
{
ui->setupUi(this);
}
TableItemProject::~TableItemProject()
{
delete ui;
}
void TableItemProject::setProject(RedmineConnector::Project *project)
{
this->m_project = project;
ui->labelProject->setText(this->m_project->name());
ui->labelIssues->setText(tr("%n issues", "", this->m_project->issues().size()));
}
RedmineConnector::Project* TableItemProject::project()
{
return this->m_project;
}
void TableItemProject::setIsCurrentItem(bool isCurrent)
{
QFont font = ui->labelProject->font();
font.setBold(isCurrent);
ui->labelProject->setFont(font);
if( isCurrent ) {
ui->tableWidgetProject->setStyleSheet(QString::fromLatin1("background-color: rgba(200, 220, 255);"));
} else {
ui->tableWidgetProject->setStyleSheet(QString());
}
}