mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Refact common
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Name">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
@@ -61,7 +61,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Btn">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnOK">
|
||||
<property name="sizePolicy">
|
||||
|
||||
@@ -58,52 +58,6 @@ void EditorTrainees::on_btnNewGroup_clicked()
|
||||
}
|
||||
|
||||
return;
|
||||
/*
|
||||
if(int id_group = dbLMS->newGroup())
|
||||
{
|
||||
loadTraineesFromDB();
|
||||
setCurrentGroup(id_group);
|
||||
|
||||
DialogEditGroup dlg(this);
|
||||
|
||||
Group group = dbLMS->getGroup(id_group);
|
||||
if(group.getID() == 0)
|
||||
return;
|
||||
|
||||
dlg.setGroup(group);
|
||||
|
||||
while (true)
|
||||
{
|
||||
switch( dlg.exec() )
|
||||
{
|
||||
case QDialog::Accepted:
|
||||
{
|
||||
Group group_edit = dlg.getGroup();
|
||||
|
||||
if(int id_edit = dbLMS->editGroup(group_edit))
|
||||
{//Отредактировано
|
||||
loadTraineesFromDB();
|
||||
setCurrentGroup(id_edit);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
dlg.setGroup(group_edit);
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
case QDialog::Rejected:
|
||||
dbLMS->delGroup(id_group);
|
||||
loadTraineesFromDB();
|
||||
return;
|
||||
default:
|
||||
dbLMS->delGroup(id_group);
|
||||
loadTraineesFromDB();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void EditorTrainees::on_btnDeleteGroup_clicked()
|
||||
|
||||
@@ -19,6 +19,8 @@ PersonalCardTrainee::PersonalCardTrainee(ConnectorToServer* connectorToServer, M
|
||||
|
||||
ui->lblName->setObjectName("PersonalCard_lblName");
|
||||
|
||||
ui->lblLoginIn->setVisible(false);
|
||||
|
||||
ammTasksWidget_personal = new AMMtasksWidget(connectorToServer, TypeListTreeAMMFIM::listForTrainee, this);
|
||||
fimTasksWidget_personal = new FIMtasksWidget(connectorToServer, TypeListTreeAMMFIM::listForTrainee, this);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_TraineeChat">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_Trainee">
|
||||
<property name="sizePolicy">
|
||||
@@ -30,8 +30,29 @@
|
||||
<string>Trainee</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_AssAMM">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Assigned AMM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblCntAMM">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Name">
|
||||
<item>
|
||||
<widget class="QLabel" name="lblName">
|
||||
<property name="text">
|
||||
@@ -60,71 +81,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Last login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblLoginTime">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Assigned FIM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblCntFIM">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Assigned AMM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblCntAMM">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item row="6" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Simulator">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
@@ -144,8 +102,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item row="8" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Exit">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
@@ -165,6 +123,62 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="Line" name="line_1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_AssFIM">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Assigned FIM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblCntFIM">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Login">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Last login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblLoginTime">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -183,7 +197,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="groupBox_Tasks">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -197,9 +211,9 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<widget class="QWidget" name="tab_AMM">
|
||||
<attribute name="title">
|
||||
<string>AMM</string>
|
||||
</attribute>
|
||||
@@ -211,7 +225,7 @@
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_AMMcommon">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="text">
|
||||
<string>List</string>
|
||||
</property>
|
||||
@@ -236,7 +250,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<widget class="QWidget" name="tab_FIM">
|
||||
<attribute name="title">
|
||||
<string>FIM</string>
|
||||
</attribute>
|
||||
|
||||
@@ -44,8 +44,6 @@ void TraineesView::loadTraineesFromDB()
|
||||
ItemGroup->setIcon(ColumnsTreeUsers::clmn_Name, QIcon(QStringLiteral(":/resources/icons/group.png")));
|
||||
setItemColor(ItemGroup, QColor(220, 220, 220));
|
||||
|
||||
//ItemGroup->set Property("greenButton", QVariant(true));
|
||||
//((QAbstractItemView*)ItemGroup)->setIconSize(QSize(32, 32));
|
||||
|
||||
//Обучаемые
|
||||
for(Trainee trainee : listTrainees)
|
||||
|
||||
@@ -30,12 +30,7 @@ public:
|
||||
protected:
|
||||
void changeEvent(QEvent * event) override;
|
||||
|
||||
Q_SIGNALS:
|
||||
//сигнал о блокировке авторизации
|
||||
//void signal_BlockAutorization(bool block);
|
||||
|
||||
public Q_SLOTS:
|
||||
//void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
|
||||
void on_btnEditorTrainees_clicked();
|
||||
void on_btnPersonalCard_clicked();
|
||||
private Q_SLOTS:
|
||||
|
||||
Reference in New Issue
Block a user