mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
37 lines
855 B
C++
37 lines
855 B
C++
#include "commonview.h"
|
|
|
|
|
|
CommonView::CommonView(TypeView type, QWidget *parent):
|
|
QWidget(parent),
|
|
treeWidget(nullptr),
|
|
typeView(type),
|
|
archiveVisible(false),
|
|
notLoggedInVisible(false)
|
|
{
|
|
|
|
}
|
|
|
|
void CommonView::setItemColorArchive(QTreeWidgetItem *item)
|
|
{
|
|
int columnCount = treeWidget->columnCount();
|
|
|
|
for (int i = 0; i < columnCount; i++)
|
|
item->setBackground(i, QBrush(QColor(220, 220, 220)));
|
|
}
|
|
|
|
void CommonView::setItemColorNoArchive(QTreeWidgetItem *item)
|
|
{
|
|
int columnCount = treeWidget->columnCount();
|
|
|
|
for (int i = 0; i < columnCount; i++)
|
|
item->setBackground(i, QBrush(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);
|
|
}
|