/** * @RDE_HEADER@ * HMI Plugin for Observer Controller - PDF Folder Content * $Id$ * $HeadURL$ * $Author$ * Created by Steve Kemayou, SLSE, 2022-07-07 */ #pragma once #include #include #include #include #include #include #include #include #include #define ZOOM_DEFAULT 1.0 namespace Ui { class FolderContentEditDialog; } namespace OcSituationClient { class FolderContentEditDialog : public LtsWidgets::LtsDialog , protected OcBaseDownload::Interface::Ftc::OcPdfDownloadReplyHandler { Q_OBJECT public: explicit FolderContentEditDialog(QWidget *parent = nullptr); ~FolderContentEditDialog(); bool init(LtsSession::LtsSessionDataDds *session); void setDefaultFileSystemPath(QString path = QStringLiteral("")); QString getFileSysPath(){return m_filesysPath;} void initPdfWidow(); void onOcPdfDownloadReply(const Core::FunctionReplyObject &replyObject) override final; private slots: void onDeleteFile(); void onPreviewFile(); void setPage(int pageNo); int getNumPages() const; int getCurPage() const; void setZoomFactor(double zoomFactor); void setRotation(int rotation); void onSelectionChanged(); void onOcPdfDownloadClicked(); signals: void currentPageChanged(int curPage); void rotationChanged(int rotation); private: void retranslate(); void enaDisa(); Ui::FolderContentEditDialog *m_ui; LtsSession::LtsSessionDataDds *m_session; std::shared_ptr m_obdFtc; QFileSystemModel *m_fileSystemModel{nullptr}; QString m_filesysPath{}; NGL::PDFWidget *m_pdfWidget{nullptr}; int m_pageNo{-1}; double m_zoomFactor{ZOOM_DEFAULT}; int m_rotation; // degree QSortFilterProxyModel *m_proxymodel; QString m_currViewPath; QSortFilterProxyModel *m_sortProxyModel{nullptr}; LtsUtils::RequestHelper *m_requestHelper{nullptr}; LOGGER_T m_logger; }; }// namespace FileManagement