Переделано под один мега-проект LMS с общим CMakeLists.txt

This commit is contained in:
krivoshein
2025-01-15 12:34:56 +03:00
parent 3064818931
commit 1c93b1f94d
219 changed files with 68 additions and 51 deletions

View 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