Files
RRJServer/DB_IaT/InstructorsAndTrainees/commonview.cpp
2024-11-25 15:25:55 +03:00

34 lines
777 B
C++

#include "commonview.h"
CommonView::CommonView(InterfaceDataBaseLMS* dbLMS, TypeView type, QWidget *parent):
QWidget(parent),
dbLMS(dbLMS),
treeWidget(nullptr),
typeView(type),
archiveVisible(false),
notLoggedInVisible(false),
adminMode(false),
authComplited(false)
{
treeWidget = new QTreeWidget();
}
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 < item->columnCount(); i++)
item->setBackground(i, color);
}