mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Переделано под один мега-проект LMS с общим CMakeLists.txt
This commit is contained in:
40
InstructorsAndTrainees/commonview.cpp
Normal file
40
InstructorsAndTrainees/commonview.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user