mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
41 lines
997 B
C++
41 lines
997 B
C++
#include "commonview.h"
|
|
#include <QFile>
|
|
#include <QMessageBox>
|
|
|
|
|
|
CommonView::CommonView(ConnectorToServer* connectorToServer, TypeView type, QWidget *parent):
|
|
QWidget(parent),
|
|
connectorToServer(connectorToServer),
|
|
treeWidget(nullptr),
|
|
typeView(type),
|
|
archiveVisible(false),
|
|
notLoggedInVisible(false),
|
|
adminMode(false),
|
|
authComplited(false),
|
|
lastCurrentID(0),
|
|
typeObject(TypeObject::objInstructor)
|
|
{
|
|
treeWidget = new QTreeWidget();
|
|
|
|
//treeWidget->setIconSize(QSize(20, 20));
|
|
treeWidget->setFocusPolicy(Qt::FocusPolicy::NoFocus);
|
|
|
|
//updateMyStyleSheet();
|
|
}
|
|
|
|
void CommonView::setItemColorArchive(QTreeWidgetItem *item)
|
|
{
|
|
setItemColor(item,QColor(240, 240, 240));
|
|
}
|
|
|
|
void CommonView::setItemColorNoArchive(QTreeWidgetItem *item)
|
|
{
|
|
setItemColor(item,QColor(255, 255, 255));
|
|
}
|
|
|
|
void CommonView::setItemColor(QTreeWidgetItem *item, QColor color)
|
|
{
|
|
for (int i = 0; i < item->columnCount(); i++)
|
|
item->setBackground(i, color);
|
|
}
|