anpstudio 0.1.0
ANP Studio — Analytic Network Process desktop application
Loading...
Searching...
No Matches
results_panel.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <QWidget>
9#include <string>
10#include <utility>
11#include <vector>
12
13#include "anpcpp/matrix.hpp"
14
15class Document;
16class QTabWidget;
17class QTableWidget;
18class QComboBox;
19class QLineEdit;
20class QLabel;
21class QPushButton;
22
26class ResultsPanel : public QWidget {
27 Q_OBJECT
28public:
29 explicit ResultsPanel(Document* doc, QWidget* parent = nullptr);
30
32 [[nodiscard]] QComboBox* synthesisKindBox() const { return synthKind_; }
33 [[nodiscard]] QLineEdit* customExprEdit() const { return customExpr_; }
34 [[nodiscard]] QPushButton* calculateButton() const { return calcButton_; }
35 [[nodiscard]] QLabel* staleLabel() const { return staleLabel_; }
36
37public slots:
38 void calculate();
39 void refreshSynthesisControls();
40 void refreshStaleBadge();
41
42signals:
43 void alternativesUpdated(const std::vector<std::pair<QString, double>>& ranked);
44
45private slots:
46 void onSynthesisKindChanged(int index);
47 void onCustomExprEdited();
48
49private:
50 void fillMatrix(QTableWidget* table,
51 const anpcpp::Matrix& m,
52 const std::vector<std::string>& rowLabels,
53 const std::vector<std::string>& colLabels);
54 void fillVector(QTableWidget* table,
55 const anpcpp::Vector& v,
56 const std::vector<std::string>& labels);
57
58 Document* doc_ = nullptr;
59 QComboBox* synthKind_ = nullptr;
60 QLineEdit* customExpr_ = nullptr;
61 QPushButton* calcButton_ = nullptr;
62 QLabel* staleLabel_ = nullptr;
63 QWidget* controlsHost_ = nullptr;
64 QTabWidget* tabs_ = nullptr;
65 QTableWidget* unscaled_ = nullptr;
66 QTableWidget* clusterW_ = nullptr;
67 QTableWidget* scaled_ = nullptr;
68 QTableWidget* limit_ = nullptr;
69 QTableWidget* global_ = nullptr;
70 QTableWidget* alts_ = nullptr;
71};
Owns the root anpcpp::AnpNetwork, undo stack, file path, and dirty flag.
Definition document.hpp:23
Displays supermatrices, limit matrix, and alternative scores.
Definition results_panel.hpp:26
QComboBox * synthesisKindBox() const
Definition results_panel.hpp:32