mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#ifndef COMMONVIEW_H
|
|
#define COMMONVIEW_H
|
|
|
|
#include <QTreeWidget>
|
|
#include <QTranslator>
|
|
#include "instructorsAndTrainees_global.h"
|
|
|
|
//Родительский класс представления БД Инструкторов/Обучаемых (самого верхнего уровня)
|
|
|
|
class CommonView : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum TypeView
|
|
{
|
|
onlyView,
|
|
control
|
|
};
|
|
|
|
public:
|
|
CommonView(TypeView type, bool adminMode, QWidget *parent = nullptr);
|
|
|
|
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:
|
|
QTreeWidget* treeWidget;
|
|
TypeView typeView;
|
|
bool archiveVisible;
|
|
bool notLoggedInVisible;
|
|
bool adminMode;
|
|
|
|
protected:
|
|
QTranslator qtLanguageTranslator;
|
|
};
|
|
|
|
#endif // COMMONVIEW_H
|