mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-23 15:25:44 +03:00
207 lines
8.3 KiB
C++
207 lines
8.3 KiB
C++
#ifndef EDITORMAINWINDOW_H
|
||
#define EDITORMAINWINDOW_H
|
||
|
||
#include <QMainWindow>
|
||
#include <QLineEdit>
|
||
#include <QListWidget>
|
||
#include "s1000d_manager.h"
|
||
#include "ru_const.h"
|
||
#include "lyx.h"
|
||
#include "html.h"
|
||
#include "exportdialog.h"
|
||
#include "splashform.h"
|
||
#include <QTreeWidgetItem>
|
||
#include <QAbstractButton>
|
||
#include <QElapsedTimer>
|
||
|
||
QT_BEGIN_NAMESPACE
|
||
namespace Ui { class EditorMainWindow; }
|
||
QT_END_NAMESPACE
|
||
|
||
|
||
// figure 552
|
||
class EditorMainWindow : public QMainWindow
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
QString version = "вер. 1.15";
|
||
EditorMainWindow(QWidget *parent = nullptr);
|
||
~EditorMainWindow();
|
||
|
||
bool isProjectOpened;
|
||
bool isProjectModifyed;
|
||
S1000D_Manager SM;
|
||
LyX lyx;
|
||
HTML html;
|
||
RU_Const ru_const;
|
||
struct { QString lastOpenedFile; } config;
|
||
QDialog *logDialog; QListWidget* logDialogList;
|
||
SplashForm* splash;
|
||
ExportDialog* exportDlg;
|
||
|
||
int bugCnt=0;
|
||
QIcon iconFolder = QIcon(":new/Icons/folder.png");
|
||
QIcon iconFolder_ex = QIcon(":new/Icons/folder_exclamation.png");
|
||
QIcon iconDoc_head_blue = QIcon(":new/Icons/doc_head_blue.png");
|
||
QIcon iconDoc_head_blue_ex = QIcon(":new/Icons/doc_head_blue_exclamation.png");
|
||
QIcon iconSheep_up_arrow = QIcon(":/new/Icons/sheep_up_arrow.png");
|
||
bool DBG=true;
|
||
bool allowCodePageToSetItems = true;
|
||
bool allowCodePageToCallOnChangeComboBox = true;
|
||
bool allowDMCodePageToSetItems = true;
|
||
bool allowDMCodePageCallOnChangeComboBox = false;
|
||
bool allowDMLearningPageToSetItems = true;
|
||
bool allowDMLearningPageCallOnChangeLists = true;
|
||
bool isClearing = false;
|
||
QStringList tmpStrList;
|
||
QList<int> tmpIntList;
|
||
|
||
void openLyXFile(QString fileName);
|
||
void Save();
|
||
|
||
bool event(QEvent*);
|
||
bool eventFilter(QObject* obj, QEvent* ev);
|
||
void setIsModifyed(bool flag);
|
||
void fillTreeWidgetWithItems();
|
||
QList<QTreeWidgetItem *> makeTreeWidgetFromItems(QTreeWidgetItem *parent, QList<int> list);
|
||
void updateTreeWidgetNames();
|
||
void updateTreeWidgetNamesRecurs(QTreeWidgetItem *node);
|
||
void fillItemsFromTreeWidget(int parentInd, QTreeWidgetItem *node);
|
||
void treeWidgetNormalizeDMsAfterDrop(QTreeWidgetItem *node);
|
||
QTreeWidgetItem* getTreeWidgetItemByItemIndexRecurs(int itemInd, QTreeWidgetItem *node);
|
||
QTreeWidgetItem* getTreeWidgetItemByItemIndex(int itemInd);
|
||
QString delYYY(QString st);
|
||
void fillLearningPageWithData();
|
||
int getlcInteractionFromQuestRow(int row);
|
||
bool isCodingFilled();
|
||
bool isCodingFilledRecurs(QTreeWidgetItem* treeitem);
|
||
|
||
Q_SLOT void exportS1000D();
|
||
Q_SLOT void exportSCORM();
|
||
|
||
private slots:
|
||
void on_actionOpenFolder_triggered();
|
||
void on_treeWidget_itemSelectionChanged();
|
||
void on_actionAddPM_triggered();
|
||
void on_actionAddDM_triggered();
|
||
void on_splitter_splitterMoved(int pos, int index);
|
||
void on_actionSwitchToCodingPage_triggered();
|
||
void on_actionSwitchToDataPage_triggered();
|
||
void on_actionSaveProject_triggered();
|
||
|
||
void pmc_btn_pmIssuerPressed();
|
||
void pmc_btn_modelIdentCodePressed();
|
||
void pmc_cb_pmNumABC_Changed(int ind);
|
||
void pmc_cb_pmNum_Changed(int ind);
|
||
void pmc_cb_pmVolume_Changed(int ind);
|
||
void codePagePM_TitleChanged();
|
||
void codePagePM_EditChanged(QString newText);
|
||
void codePageDM_TitleChanged();
|
||
void codePageDM_EditChanged(QString newText);
|
||
|
||
void on_actionDeleteItem_triggered();
|
||
void on_dmc_btnBox_IsLearningDM_clicked(QAbstractButton *button);
|
||
void on_dmc_cb_InfoSets_currentIndexChanged(int index);
|
||
void on_dml_btnBox_question_clicked(QAbstractButton *aButton);
|
||
void on_dml_btnBox_answer_clicked(QAbstractButton *aButton);
|
||
void on_dml_lw_question_currentRowChanged(int newRow);
|
||
void on_dml_lw_question_itemChanged(QListWidgetItem *item);
|
||
void on_dml_lw_answer_itemChanged(QListWidgetItem *item);
|
||
void on_actionLyXImport_triggered();
|
||
void on_action_refreshFromLyX_triggered();
|
||
void on_actionOpenInBrowser_triggered();
|
||
void on_actionExit_triggered();
|
||
|
||
void on_S1000D_doc_dmc_linkActivated(const QString &link);
|
||
void on_label_33_linkActivated(const QString &link);
|
||
void on_action_regenHTML_triggered();
|
||
void on_action_Export_triggered();
|
||
void on_label_34_linkActivated(const QString &link);
|
||
void on_dmc_btn_Qual_clicked(bool checked);
|
||
void on_pmc_btn_Qual_clicked(bool checked);
|
||
|
||
void treeWidgetDrop();
|
||
|
||
|
||
private:
|
||
Ui::EditorMainWindow *ui;
|
||
void resizeEvent(QResizeEvent*);
|
||
};
|
||
#endif // EDITORMAINWINDOW_H
|
||
|
||
/*
|
||
<security securityClassification="01"/>
|
||
<issueInfo inWork="00" issueNumber="XXX"/>
|
||
<restrictionInfo> <copyright> <copyrightPara>© 2017 АО «Вертолеты России»
|
||
</copyrightPara></copyright></restri
|
||
<responsiblePartnerCompany enterpriseCode="CAGEC">
|
||
<enterpriseName>АО «ВСК»</enterpriseName>
|
||
</responsiblePartnerCompany>
|
||
<originator enterpriseCode="CAGEC">
|
||
<enterpriseName>Наименование компании-разработчика</
|
||
enterpriseName>
|
||
</originator>
|
||
|
||
|
||
|
||
Ссылки на модули данных [с BRDP-S1-00102 по BRDPS1-
|
||
00104, BRDP-S1-00107]
|
||
Использование атрибутов ссылок на модули данных dmRef:
|
||
- applicRefId — не обязательный
|
||
- id — запрещен
|
||
- changeMark, changeType, reasonForUpdateRefIds — запрещены
|
||
- referredFragment — запрещен
|
||
- securityClassification, commercialClassification — запрещены
|
||
- authorityName, authorityDocument — запрещены
|
||
Использование дочерних элементов элемента dmRef:
|
||
- behavior — запрещен
|
||
- issueInfo — запрещен
|
||
- language — запрещен
|
||
- dmTitle — обязательный
|
||
- issueDate — запрещен
|
||
|
||
Использование заголовков [BRDP-S1-00118, BRDP-S1-00120]
|
||
Контексты использования элемента title:
|
||
- элемент levelledPara — не обязательно, можно включать в уровнях с 6 по 8
|
||
- элемент table — обязательно
|
||
- элемент multimedia — обязательно
|
||
- элемент proceduralStep — не обязательно, можно включать в уровнях с 6 по 8
|
||
|
||
Использование иллюстраций и активных участков/хотспотов
|
||
[BRDP-S1-00125, BRDP-S1-00132]
|
||
Использование атрибутов элемента hotspot:
|
||
- applicRefId — не обязательный
|
||
- id — обязательный
|
||
- changeMark, changeType, reasonForUpdateRefIds — запрещены
|
||
- applicationStructureIdent — обязательный (уникальный идентификатор в SVG)
|
||
- applicationStructureName — обязательный (например, обозначение выноски 1,2,3 или
|
||
обозначение)
|
||
- hotspotType — обязательный (callout — выноска, detail — контур детали/элемента)
|
||
- hotspotTitle — обязательный
|
||
- objectDescr — не обязательный
|
||
- objectCoordinates — запрещен
|
||
- visibility — не обязательный
|
||
- securityClassification, commercialClassification, caveat — запрещены
|
||
|
||
BRDP-S1-00133]
|
||
9.1 Объявление мультимедийного объекта
|
||
Использование вложенных элементов multimedia:
|
||
- title — обязательный
|
||
Использование атрибутов элемента multimediaObject:
|
||
- fullscreen — запрещен
|
||
- multimediaObjectWidth — необязательный
|
||
- autoPlay — запрещен
|
||
- multimediaObjectHeight — необязательный
|
||
- multimediaType — обязательный
|
||
- runTimeDuration — запрещен
|
||
- showPluginControls — запрещен
|
||
Указание типа мультимедийного объекта выполняется с использованием атрибута
|
||
multimediaType и элемента parameter, смотри (Таблица 10).
|
||
Наличие одного элемента parameter обязательно, недопустимы 2 или более
|
||
элементов parameter c атрибутом parameterIdent=”contenttype”.
|
||
Таблица 10 Использование мультимедийных объектов. Идентификация типа объекта
|
||
|
||
|
||
*/
|