anpstudio 0.4.0
ANP Studio — Analytic Network Process desktop application
Loading...
Searching...
No Matches
inspector_panel.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <QWidget>
9
10#include "anpcpp/limit_matrix.hpp"
11
12class Document;
13class QLineEdit;
14class QTextEdit;
15class QCheckBox;
16class QLabel;
17class QPushButton;
18class QComboBox;
19class QTreeWidget;
20class QTreeWidgetItem;
21class QTableWidget;
22class QEvent;
23
27class InspectorPanel : public QWidget {
28 Q_OBJECT
29public:
30 explicit InspectorPanel(Document* doc, QWidget* parent = nullptr);
31
32public slots:
33 void refresh();
34
35protected:
36 bool eventFilter(QObject* watched, QEvent* event) override;
37
38private slots:
39 void onInvertToggled(bool checked);
40 void onSetAlternatives();
41 void onOpenSubnet();
42 void onSynthesisKindChanged(int index);
43 void onCustomExprEdited();
44 void onLimitMethodChanged(int index);
45 void onLimitFlagChanged();
46 void onNameEdited();
47 void onDescriptionEdited();
48 void onSubnetItemActivated(QTreeWidgetItem* item, int column);
49
50private:
51 enum class Mode { Network, Cluster, Node };
52
53 void refreshSynthesisControls();
54 void refreshLimitControls();
55 void setModeWidgets(Mode mode);
56 void fillSubnetTree();
57 void fillConnections();
58 void fillMatrixColumns(const QString& nodeName);
59 [[nodiscard]] QString displayNetworkName() const;
60 [[nodiscard]] anpcpp::LimitMatrixOptions currentLimitOptionsFromUi() const;
61
62 Document* doc_ = nullptr;
63 QLabel* title_ = nullptr;
64 QLabel* typeLabel_ = nullptr;
65 QLineEdit* nameEdit_ = nullptr;
66 QTextEdit* descriptionEdit_ = nullptr;
67
68 QCheckBox* invert_ = nullptr;
69 QPushButton* setAlts_ = nullptr;
70 QPushButton* openSubnet_ = nullptr;
71
72 QLabel* formulaLabel_ = nullptr;
73 QComboBox* synthKind_ = nullptr;
74 QLineEdit* customExpr_ = nullptr;
75
76 QLabel* limitOptsLabel_ = nullptr;
77 QComboBox* limitMethod_ = nullptr;
78 QCheckBox* limitWithLimit_ = nullptr;
79 QCheckBox* limitStraight_ = nullptr;
80
81 QLabel* subnetLabel_ = nullptr;
82 QTreeWidget* subnetTree_ = nullptr;
83
84 QLabel* connectionsLabel_ = nullptr;
85 QTreeWidget* connectionsTree_ = nullptr;
86
87 QLabel* matricesLabel_ = nullptr;
88 QLabel* unscaledLabel_ = nullptr;
89 QLabel* scaledLabel_ = nullptr;
90 QLabel* limitLabel_ = nullptr;
91 QTableWidget* unscaledCol_ = nullptr;
92 QTableWidget* scaledCol_ = nullptr;
93 QTableWidget* limitCol_ = nullptr;
94
95 bool updating_ = false;
96};
Owns the root anpcpp::AnpNetwork, undo stack, file path, and dirty flag.
Definition document.hpp:71
Property inspector for the selected network, cluster, or node.
Definition inspector_panel.hpp:27