mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Переделано под один мега-проект LMS с общим CMakeLists.txt
This commit is contained in:
71
InstructorsAndTrainees/commonview.h
Normal file
71
InstructorsAndTrainees/commonview.h
Normal file
@@ -0,0 +1,71 @@
|
||||
#ifndef COMMONVIEW_H
|
||||
#define COMMONVIEW_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QTranslator>
|
||||
#include <QMutex>
|
||||
#include "instructorsAndTrainees_global.h"
|
||||
#include "connectortoserver.h"
|
||||
|
||||
//Родительский класс представления БД Инструкторов/Обучаемых (самого верхнего уровня)
|
||||
|
||||
class CommonView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum TypeView
|
||||
{
|
||||
onlyView,
|
||||
control
|
||||
};
|
||||
|
||||
enum TypeObject
|
||||
{
|
||||
objInstructor,
|
||||
objTrainee,
|
||||
objGroup
|
||||
};
|
||||
|
||||
public:
|
||||
CommonView(ConnectorToServer* connectorToServer, TypeView type, QWidget *parent = nullptr);
|
||||
|
||||
public:
|
||||
void setAdminMode(bool adminMode)
|
||||
{
|
||||
this->adminMode = adminMode;
|
||||
}
|
||||
void setAuthComplited(bool authComplited)
|
||||
{
|
||||
this->authComplited = authComplited;
|
||||
}
|
||||
|
||||
protected:
|
||||
void setArchiveVisible(bool archiveVisible)
|
||||
{
|
||||
this->archiveVisible = archiveVisible;
|
||||
}
|
||||
void setNotLoggedInVisible(bool notLoggedInVisible)
|
||||
{
|
||||
this->notLoggedInVisible = notLoggedInVisible;
|
||||
}
|
||||
|
||||
void setItemColorArchive(QTreeWidgetItem* item);
|
||||
void setItemColorNoArchive(QTreeWidgetItem* item);
|
||||
|
||||
void setItemColor(QTreeWidgetItem* item, QColor color);
|
||||
|
||||
protected:
|
||||
ConnectorToServer* connectorToServer;
|
||||
QTreeWidget* treeWidget;
|
||||
QMutex mtxTreeWidget;
|
||||
TypeView typeView;
|
||||
bool archiveVisible;
|
||||
bool notLoggedInVisible;
|
||||
bool adminMode;
|
||||
bool authComplited;
|
||||
int lastCurrentID;
|
||||
TypeObject typeObject;
|
||||
};
|
||||
|
||||
#endif // COMMONVIEW_H
|
||||
Reference in New Issue
Block a user