File indexing completed on 2024-04-21 14:46:30

0001 /*
0002     SPDX-FileCopyrightText: 2011 Rafał Kułaga <rl.kulaga@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "ui_foveditordialog.h"
0010 
0011 #include <QDialog>
0012 #include <QFrame>
0013 
0014 class PrintingWizard;
0015 
0016 /**
0017  * \class FovEditorDialogUI
0018  * \brief User interface for FOV Editor Dialog.
0019  * \author Rafał Kułaga
0020  */
0021 class FovEditorDialogUI : public QFrame, public Ui::FovEditorDialog
0022 {
0023     Q_OBJECT
0024   public:
0025     /**
0026      * \brief Constructor.
0027      */
0028     explicit FovEditorDialogUI(QWidget *parent = nullptr);
0029 };
0030 
0031 /**
0032  * \class FovEditorDialog
0033  * \brief Class representing FOV Editor Dialog which enables user to edit FOV snapshots.
0034  * \author Rafał Kułaga
0035  */
0036 class FovEditorDialog : public QDialog
0037 {
0038     Q_OBJECT
0039   public:
0040     /**
0041      * \brief Constructor.
0042      */
0043     explicit FovEditorDialog(PrintingWizard *wizard, QWidget *parent = nullptr);
0044 
0045   private slots:
0046     /**
0047      * \brief Slot: switch to next FOV snapshot.
0048      */
0049     void slotNextFov();
0050 
0051     /**
0052      * \brief Slot: switch to previous FOV snapshot.
0053      */
0054     void slotPreviousFov();
0055 
0056     /**
0057      * \brief Slot: recapture current FOV snapshot.
0058      */
0059     void slotCaptureAgain();
0060 
0061     /**
0062      * \brief Slot: delete current FOV snapshot.
0063      */
0064     void slotDelete();
0065 
0066     /**
0067      * \brief Slot: save description of the current FOV snapshot.
0068      */
0069     void slotSaveDescription();
0070 
0071     /**
0072      * \brief Slot: open "Save file" dialog to choose file name and format to save image.
0073      */
0074     void slotSaveImage();
0075 
0076   private:
0077     /**
0078      * \brief Setup widget properties.
0079      */
0080     void setupWidgets();
0081 
0082     /**
0083      * \brief Setup signal-slot connections.
0084      */
0085     void setupConnections();
0086 
0087     /**
0088      * \brief Update buttons.
0089      */
0090     void updateButtons();
0091 
0092     /**
0093      * \brief Update image description.
0094      */
0095     void updateDescriptions();
0096 
0097     /**
0098      * \brief Update FOV image.
0099      */
0100     void updateFovImage();
0101 
0102     PrintingWizard *m_ParentWizard { nullptr };
0103     FovEditorDialogUI *m_EditorUi { nullptr };
0104 
0105     int m_CurrentIndex { 0 };
0106 };