mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
32 lines
679 B
C++
32 lines
679 B
C++
#include "commonview.h"
|
|
|
|
|
|
CommonView::CommonView(TypeView type, bool adminMode, QWidget *parent):
|
|
QWidget(parent),
|
|
treeWidget(nullptr),
|
|
typeView(type),
|
|
archiveVisible(false),
|
|
notLoggedInVisible(false),
|
|
adminMode(adminMode)
|
|
{
|
|
|
|
}
|
|
|
|
void CommonView::setItemColorArchive(QTreeWidgetItem *item)
|
|
{
|
|
setItemColor(item,QColor(220, 220, 220));
|
|
}
|
|
|
|
void CommonView::setItemColorNoArchive(QTreeWidgetItem *item)
|
|
{
|
|
setItemColor(item,QColor(255, 255, 255));
|
|
}
|
|
|
|
void CommonView::setItemColor(QTreeWidgetItem *item, QColor color)
|
|
{
|
|
int columnCount = treeWidget->columnCount();
|
|
|
|
for (int i = 0; i < columnCount; i++)
|
|
item->setBackground(i, color);
|
|
}
|