73 lines
2.5 KiB
C++
73 lines
2.5 KiB
C++
#ifndef EDITPDFWIDGET_H
|
|
#define EDITPDFWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QVBoxLayout>
|
|
#include <QTabWidget>
|
|
#include "documentprocessor.h"
|
|
#include "../model/titleinscriptionsmodel.h"
|
|
|
|
class MainController;
|
|
class SpecificationController;
|
|
class SpecificationTableModel;
|
|
|
|
class EditPDFWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit EditPDFWidget(QWidget *parent = nullptr);
|
|
explicit EditPDFWidget(MainController *controller, QWidget *parent = nullptr);
|
|
|
|
// Методы для работы с данными
|
|
void setData(ComponentTableModel *componentModel, ProjectParamTableModel *projectParamModel);
|
|
void updateAllViews();
|
|
|
|
// Методы для работы с надписями титульного листа
|
|
TitleInscriptionsModel* getTitleInscriptionsModel() const;
|
|
|
|
// Методы для работы с перечнем элементов
|
|
PerechenTableModel* getPerechenTableModel() const;
|
|
|
|
// Методы для экспорта
|
|
bool exportCurrentDocument(const QString &filePath = QString());
|
|
bool exportAllDocuments(const QString &basePath = QString());
|
|
|
|
private:
|
|
void setUp();
|
|
void setWidgets();
|
|
void setUpLayout();
|
|
void setUpConnections();
|
|
|
|
QTabWidget* m_tabWidget;
|
|
|
|
// Процессоры документов
|
|
PerechenProcessor* m_perechenProcessor;
|
|
SpecificationProcessor* m_specificationProcessor;
|
|
SpecificationPCBProcessor* m_specificationPCBProcessor;
|
|
VedomostProcessor* m_vedomostProcessor;
|
|
SimpleListProcessor* m_simpleListProcessor;
|
|
|
|
// Виджеты документов
|
|
DocumentEditWidget* m_perechenEditWidget;
|
|
DocumentEditWidget* m_specificationEditWidget;
|
|
DocumentEditWidget* m_specificationPCBEditWidget;
|
|
DocumentEditWidget* m_vedomostEditWidget;
|
|
DocumentEditWidget* m_simpleListEditWidget;
|
|
|
|
// Модели данных
|
|
ComponentTableModel* m_componentModel;
|
|
ProjectParamTableModel* m_projectParamModel;
|
|
MainController* m_controller;
|
|
|
|
signals:
|
|
// Сигнал изменения типа документа для синхронизации с PreviewPdfWidget
|
|
void documentTypeChanged(const QString &documentType);
|
|
|
|
// TODO: Добавить сигналы экспорта когда будет реализован экспорт
|
|
// signals:
|
|
// void documentExported(const QString &documentType, const QString &filePath);
|
|
// void exportError(const QString &documentType, const QString &error);
|
|
};
|
|
|
|
#endif // EDITPDFWIDGET_H
|