mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
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();
|
|
|
|
//treeWidget->header()->setStyleSheet(QStringLiteral("font-size: 10pt;"));
|
|
treeWidget->setStyleSheet(QStringLiteral("font-size: 10pt;"
|
|
"font-family: Tahoma;"));
|
|
|
|
treeWidget->setIconSize(QSize(20, 20));
|
|
}
|
|
|
|
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);
|
|
}
|