anpstudio 0.1.0
ANP Studio — Analytic Network Process desktop application
Loading...
Searching...
No Matches
mainwindow.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <QMainWindow>
9
10class Document;
11class NetworkCanvas;
12class PairwisePanel;
13class ResultsPanel;
14class InspectorPanel;
16class RatingsPanel;
19class QStackedWidget;
20class QButtonGroup;
21class QWidget;
22class QHBoxLayout;
23class QAction;
24class QMenu;
25
29class MainWindow : public QMainWindow {
30 Q_OBJECT
31public:
32 enum class Stage { Structure = 0, Judgments = 1, Synthesis = 2 };
33
34 explicit MainWindow(QWidget* parent = nullptr);
35
36public slots:
37 void setStage(Stage stage);
38
39protected:
40 void closeEvent(QCloseEvent* event) override;
41
42private slots:
43 void newFile();
44 void openFile();
45 bool saveFile();
46 bool saveFileAs();
47 void updateTitle();
48 void updateBreadcrumb();
49 void calculate();
50 void onDocumentSelectionChanged(const QString& cluster, const QString& node);
51 void onJudgmentNodeSelected(const QString& parent,
52 const QString& destCluster,
53 bool ratings);
54 void onJudgmentClusterSelected(const QString& parent);
55 void onNodeActivated(const QString& name);
56 void openRecentFile();
57 void clearRecentFiles();
58 void rebuildRecentMenu();
59
60private:
61 [[nodiscard]] bool maybeSave();
62 [[nodiscard]] bool openPath(const QString& path);
63 void rememberRecentFile(const QString& path);
64 void buildStagePages();
65
66 static constexpr int kMaxRecentFiles = 10;
67
68 Document* doc_ = nullptr;
69 Stage stage_ = Stage::Structure;
70
71 QStackedWidget* stages_ = nullptr;
72 QButtonGroup* stageButtons_ = nullptr;
73 QWidget* breadcrumbBar_ = nullptr;
74 QHBoxLayout* breadcrumbLay_ = nullptr;
75 QAction* connectModeAction_ = nullptr;
76 QMenu* recentMenu_ = nullptr;
77
78 NetworkCanvas* canvas_ = nullptr;
79 InspectorPanel* inspector_ = nullptr;
80
81 JudgmentNavPanel* judgmentNav_ = nullptr;
82 PairwisePanel* pairwise_ = nullptr;
83 RatingsPanel* ratings_ = nullptr;
84 JudgmentPrioritiesPanel* judgmentPriorities_ = nullptr;
85 QStackedWidget* judgmentCenter_ = nullptr;
86
87 ResultsPanel* results_ = nullptr;
88 SynthesisSummaryPanel* synthesisSummary_ = nullptr;
89};
Owns the root anpcpp::AnpNetwork, undo stack, file path, and dirty flag.
Definition document.hpp:23
Property inspector for the selected cluster or node.
Definition inspector_panel.hpp:19
Horizontal judgment selector: Node|Cluster, Wrt, Other Cluster.
Definition judgment_nav_panel.hpp:22
Right-side Judgments chart of pairwise or ratings priorities.
Definition judgment_priorities_panel.hpp:21
Primary window: stages Structure / Judgments / Synthesis.
Definition mainwindow.hpp:29
Visual editor for clusters, nodes, and connections.
Definition network_canvas.hpp:29
Pairwise judgment editor with Matrix and Questionnaire views.
Definition pairwise_panel.hpp:26
Editor for RatingsPrioritizer scale definition and votes.
Definition ratings_panel.hpp:23
Displays supermatrices, limit matrix, and alternative scores.
Definition results_panel.hpp:26
Ranked alternatives summary and stale-results badge.
Definition synthesis_summary_panel.hpp:19