anpstudio 0.4.0
ANP Studio — Analytic Network Process desktop application
Loading...
Searching...
No Matches
analysis_panel.hpp
Go to the documentation of this file.
1
7#pragma once
8
9#include <QWidget>
10#include <QVector>
11#include <utility>
12
13class Document;
14class QTextBrowser;
15class QComboBox;
16class QSlider;
17class QDoubleSpinBox;
18class QStackedWidget;
19class QTableWidget;
20class QSpinBox;
21class QTreeWidget;
22class QTreeWidgetItem;
24class ConsensusAnalysisWidget;
25
29class AnalysisPanel : public QWidget {
30 Q_OBJECT
31public:
32 enum class Page {
33 Synthesis = 0,
34 SensOverview,
35 SensInteractive,
36 SensGlobal,
37 InflOverview,
38 InflRaw,
39 InflRank,
40 InflMarginal,
41 InflTotal,
42 Perspective,
43 Consensus,
44 };
45
46 explicit AnalysisPanel(Document* doc, QWidget* parent = nullptr);
47
48public slots:
49 void refresh();
50
51protected:
52 void showEvent(QShowEvent* event) override;
53
54private slots:
55 void onNavItemActivated(QTreeWidgetItem* item, int column);
56 void onNavCurrentChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
57 void onOverviewAnchorClicked(const QUrl& url);
58 void onInfluenceParamsChanged();
59 void onPerspectiveParamsChanged();
60
61private:
62 void buildNavTree();
63 void updateSubnetNavVisibility();
64 void selectNavForPage(Page page, const QString& anchor = QString());
65 void navigateTo(Page page, const QString& anchor = QString());
66 void rebuildSensWrtNodes();
67 void rebuildInfluenceWrtNodes();
68 void refreshSynthesisHtml();
69 void refreshSensitivity();
70 void refreshInfluence();
71 void refreshPerspective();
72 void fillWrtCombo(QComboBox* combo, const QString& prefer);
73
74 [[nodiscard]] std::vector<std::pair<QString, double>> altScoresAtP(
75 const QString& wrt,
76 double p) const;
77
78 Document* doc_ = nullptr;
79 QTreeWidget* nav_ = nullptr;
80 QStackedWidget* stack_ = nullptr;
81
82 QTreeWidgetItem* synthItem_ = nullptr;
83 QTreeWidgetItem* subnetNavItem_ = nullptr;
84 QString synthAnchor_;
85
86 QTextBrowser* synthBrowser_ = nullptr;
87 QTextBrowser* sensOverview_ = nullptr;
88 QTextBrowser* inflOverview_ = nullptr;
89
90 QComboBox* sensWrtInteractive_ = nullptr;
91 QSlider* sensSlider_ = nullptr;
92 QDoubleSpinBox* sensPSpin_ = nullptr;
93 SensitivityChartWidget* sensChartInteractive_ = nullptr;
94
95 QComboBox* sensWrtGlobal_ = nullptr;
96 SensitivityChartWidget* sensChartGlobal_ = nullptr;
97
98 QComboBox* inflWrtRaw_ = nullptr;
99 QDoubleSpinBox* inflDeltaUp_ = nullptr;
100 QDoubleSpinBox* inflDeltaDown_ = nullptr;
101 QSpinBox* inflDecimals_ = nullptr;
102 QTableWidget* inflTableRaw_ = nullptr;
103
104 QTableWidget* inflTableRank_ = nullptr;
105
106 QTableWidget* inflTableMarginal_ = nullptr;
107
108 QDoubleSpinBox* inflDeltaTotal_ = nullptr;
109 QTableWidget* inflTableTotal_ = nullptr;
110
111 QSpinBox* perspDecimals_ = nullptr;
112 QTableWidget* perspTable_ = nullptr;
113
114 ConsensusAnalysisWidget* consensus_ = nullptr;
115
116 bool updating_ = false;
117 bool navigating_ = false;
119 bool heavyStale_ = true;
120};
Full Analysis stage: hierarchical left nav and stacked calculation panes.
Definition analysis_panel.hpp:29
Owns the root anpcpp::AnpNetwork, undo stack, file path, and dirty flag.
Definition document.hpp:71
Paints Interactive horizontal bars or Global multi-series line charts.
Definition sensitivity_chart_widget.hpp:16