anpstudio 0.1.0
ANP Studio — Analytic Network Process desktop application
Loading...
Searching...
No Matches
ratings_panel.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <QWidget>
9
10#include "anpcpp/ratings.hpp"
11
12class Document;
13class QComboBox;
14class QTableWidget;
15class QLabel;
16class QDoubleSpinBox;
17class QStackedWidget;
18class QPushButton;
19
23class RatingsPanel : public QWidget {
24 Q_OBJECT
25public:
26 explicit RatingsPanel(Document* doc, QWidget* parent = nullptr);
27
28public slots:
29 void refresh();
30 void selectLink(const QString& parent, const QString& destCluster);
31
32private slots:
33 void onModeChanged();
34 void onInterpreterChanged();
35 void onConstantChanged();
36 void onApplyCategories();
37 void onAddCategory();
38 void onVotesChanged(int row, int col);
39 void onApplyKnots();
40
41private:
42 anpcpp::RatingsPrioritizer* activeRatings();
43 void rebuildVotes();
44 void rebuildScaleUi();
45 void updateReadout();
46
47 Document* doc_ = nullptr;
48 QString parent_;
49 QString destCluster_;
50 QLabel* header_ = nullptr;
51 QComboBox* modeBox_ = nullptr;
52 QStackedWidget* scaleStack_ = nullptr;
53 QTableWidget* catTable_ = nullptr;
54 QComboBox* interpreterBox_ = nullptr;
55 QDoubleSpinBox* constantSpin_ = nullptr;
56 QTableWidget* knotTable_ = nullptr;
57 QTableWidget* votesTable_ = nullptr;
58 QLabel* readout_ = nullptr;
59 QPushButton* applyCats_ = nullptr;
60 QPushButton* applyKnots_ = nullptr;
61 bool updating_ = false;
62};
Owns the root anpcpp::AnpNetwork, undo stack, file path, and dirty flag.
Definition document.hpp:23
Editor for RatingsPrioritizer scale definition and votes.
Definition ratings_panel.hpp:23