Auto status change to "Under Review"
@@ -1,70 +1,70 | |||
|
1 | 1 | #ifndef SCIQLOP_VARIABLEMODEL_H |
|
2 | 2 | #define SCIQLOP_VARIABLEMODEL_H |
|
3 | 3 | |
|
4 | 4 | |
|
5 | 5 | #include <Data/SqpDateTime.h> |
|
6 | 6 | |
|
7 | 7 | #include <QAbstractTableModel> |
|
8 | 8 | #include <QLoggingCategory> |
|
9 | 9 | |
|
10 | 10 | #include <Common/MetaTypes.h> |
|
11 | 11 | #include <Common/spimpl.h> |
|
12 | 12 | |
|
13 | 13 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableModel) |
|
14 | 14 | |
|
15 |
enum VariableRoles { |
|
|
15 | enum VariableRoles { ProgressRole = Qt::UserRole }; | |
|
16 | 16 | |
|
17 | 17 | |
|
18 | 18 | class IDataSeries; |
|
19 | 19 | class Variable; |
|
20 | 20 | |
|
21 | 21 | /** |
|
22 | 22 | * @brief The VariableModel class aims to hold the variables that have been created in SciQlop |
|
23 | 23 | */ |
|
24 | 24 | class VariableModel : public QAbstractTableModel { |
|
25 | 25 | public: |
|
26 | 26 | explicit VariableModel(QObject *parent = nullptr); |
|
27 | 27 | |
|
28 | 28 | /** |
|
29 | 29 | * Creates a new variable in the model |
|
30 | 30 | * @param name the name of the new variable |
|
31 | 31 | * @param dateTime the dateTime of the new variable |
|
32 | 32 | * @return the pointer to the new variable |
|
33 | 33 | */ |
|
34 | 34 | std::shared_ptr<Variable> createVariable(const QString &name, |
|
35 | 35 | const SqpDateTime &dateTime) noexcept; |
|
36 | 36 | |
|
37 | 37 | /** |
|
38 | 38 | * Deletes a variable from the model, if it exists |
|
39 | 39 | * @param variable the variable to delete |
|
40 | 40 | */ |
|
41 | 41 | void deleteVariable(std::shared_ptr<Variable> variable) noexcept; |
|
42 | 42 | |
|
43 | 43 | |
|
44 | 44 | std::shared_ptr<Variable> variable(int index) const; |
|
45 | 45 | |
|
46 | 46 | void setDataProgress(std::shared_ptr<Variable> variable, double progress); |
|
47 | 47 | |
|
48 | 48 | // /////////////////////////// // |
|
49 | 49 | // QAbstractTableModel methods // |
|
50 | 50 | // /////////////////////////// // |
|
51 | 51 | |
|
52 | 52 | virtual int columnCount(const QModelIndex &parent = QModelIndex{}) const override; |
|
53 | 53 | virtual int rowCount(const QModelIndex &parent = QModelIndex{}) const override; |
|
54 | 54 | virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; |
|
55 | 55 | virtual QVariant headerData(int section, Qt::Orientation orientation, |
|
56 | 56 | int role = Qt::DisplayRole) const override; |
|
57 | 57 | |
|
58 | 58 | private: |
|
59 | 59 | class VariableModelPrivate; |
|
60 | 60 | spimpl::unique_impl_ptr<VariableModelPrivate> impl; |
|
61 | 61 | |
|
62 | 62 | private slots: |
|
63 | 63 | /// Slot called when data of a variable has been updated |
|
64 | 64 | void onVariableUpdated() noexcept; |
|
65 | 65 | }; |
|
66 | 66 | |
|
67 | 67 | // Registers QVector<int> metatype so it can be used in VariableModel::dataChanged() signal |
|
68 | 68 | SCIQLOP_REGISTER_META_TYPE(QVECTOR_INT_REGISTRY, QVector<int>) |
|
69 | 69 | |
|
70 | 70 | #endif // SCIQLOP_VARIABLEMODEL_H |
@@ -1,236 +1,236 | |||
|
1 | 1 | #include <Variable/Variable.h> |
|
2 | 2 | #include <Variable/VariableModel.h> |
|
3 | 3 | |
|
4 | 4 | #include <Data/IDataSeries.h> |
|
5 | 5 | |
|
6 | 6 | #include <QDateTime> |
|
7 | 7 | #include <QSize> |
|
8 | 8 | #include <unordered_map> |
|
9 | 9 | |
|
10 | 10 | Q_LOGGING_CATEGORY(LOG_VariableModel, "VariableModel") |
|
11 | 11 | |
|
12 | 12 | namespace { |
|
13 | 13 | |
|
14 | 14 | // Column indexes |
|
15 | 15 | const auto NAME_COLUMN = 0; |
|
16 | 16 | const auto TSTART_COLUMN = 1; |
|
17 | 17 | const auto TEND_COLUMN = 2; |
|
18 | 18 | const auto NB_COLUMNS = 3; |
|
19 | 19 | |
|
20 | 20 | // Column properties |
|
21 | 21 | const auto DEFAULT_HEIGHT = 25; |
|
22 | 22 | const auto DEFAULT_WIDTH = 100; |
|
23 | 23 | |
|
24 | 24 | struct ColumnProperties { |
|
25 | 25 | ColumnProperties(const QString &name = {}, int width = DEFAULT_WIDTH, |
|
26 | 26 | int height = DEFAULT_HEIGHT) |
|
27 | 27 | : m_Name{name}, m_Width{width}, m_Height{height} |
|
28 | 28 | { |
|
29 | 29 | } |
|
30 | 30 | |
|
31 | 31 | QString m_Name; |
|
32 | 32 | int m_Width; |
|
33 | 33 | int m_Height; |
|
34 | 34 | }; |
|
35 | 35 | |
|
36 | 36 | const auto COLUMN_PROPERTIES |
|
37 | 37 | = QHash<int, ColumnProperties>{{NAME_COLUMN, {QObject::tr("Name")}}, |
|
38 | 38 | {TSTART_COLUMN, {QObject::tr("tStart"), 180}}, |
|
39 | 39 | {TEND_COLUMN, {QObject::tr("tEnd"), 180}}}; |
|
40 | 40 | |
|
41 | 41 | /// Format for datetimes |
|
42 | 42 | const auto DATETIME_FORMAT = QStringLiteral("dd/MM/yyyy \nhh:mm:ss:zzz"); |
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | } // namespace |
|
46 | 46 | |
|
47 | 47 | struct VariableModel::VariableModelPrivate { |
|
48 | 48 | /// Variables created in SciQlop |
|
49 | 49 | std::vector<std::shared_ptr<Variable> > m_Variables; |
|
50 | 50 | std::unordered_map<std::shared_ptr<Variable>, double> m_VariableToProgress; |
|
51 | 51 | |
|
52 | 52 | |
|
53 | /// Return te row index of the variable | |
|
53 | /// Return the row index of the variable. -1 if it's not found | |
|
54 | 54 | int indexOfVariable(Variable *variable) const noexcept; |
|
55 | 55 | }; |
|
56 | 56 | |
|
57 | 57 | VariableModel::VariableModel(QObject *parent) |
|
58 | 58 | : QAbstractTableModel{parent}, impl{spimpl::make_unique_impl<VariableModelPrivate>()} |
|
59 | 59 | { |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | std::shared_ptr<Variable> VariableModel::createVariable(const QString &name, |
|
63 | 63 | const SqpDateTime &dateTime) noexcept |
|
64 | 64 | { |
|
65 | 65 | auto insertIndex = rowCount(); |
|
66 | 66 | beginInsertRows({}, insertIndex, insertIndex); |
|
67 | 67 | |
|
68 | 68 | /// @todo For the moment, the other data of the variable is initialized with default values |
|
69 | 69 | auto variable = std::make_shared<Variable>(name, QStringLiteral("unit"), |
|
70 | 70 | QStringLiteral("mission"), dateTime); |
|
71 | 71 | |
|
72 | 72 | impl->m_Variables.push_back(variable); |
|
73 | 73 | connect(variable.get(), &Variable::updated, this, &VariableModel::onVariableUpdated); |
|
74 | 74 | |
|
75 | 75 | endInsertRows(); |
|
76 | 76 | |
|
77 | 77 | return variable; |
|
78 | 78 | } |
|
79 | 79 | |
|
80 | 80 | void VariableModel::deleteVariable(std::shared_ptr<Variable> variable) noexcept |
|
81 | 81 | { |
|
82 | 82 | if (!variable) { |
|
83 | 83 | qCCritical(LOG_Variable()) << "Can't delete a null variable from the model"; |
|
84 | 84 | return; |
|
85 | 85 | } |
|
86 | 86 | |
|
87 | 87 | // Finds variable in the model |
|
88 | 88 | auto begin = impl->m_Variables.cbegin(); |
|
89 | 89 | auto end = impl->m_Variables.cend(); |
|
90 | 90 | auto it = std::find(begin, end, variable); |
|
91 | 91 | if (it != end) { |
|
92 | 92 | auto removeIndex = std::distance(begin, it); |
|
93 | 93 | |
|
94 | 94 | // Deletes variable |
|
95 | 95 | beginRemoveRows({}, removeIndex, removeIndex); |
|
96 | 96 | impl->m_Variables.erase(it); |
|
97 | 97 | endRemoveRows(); |
|
98 | 98 | } |
|
99 | 99 | else { |
|
100 | 100 | qCritical(LOG_VariableModel()) |
|
101 | 101 | << tr("Can't delete variable %1 from the model: the variable is not in the model") |
|
102 | 102 | .arg(variable->name()); |
|
103 | 103 | } |
|
104 | 104 | } |
|
105 | 105 | |
|
106 | 106 | |
|
107 | 107 | std::shared_ptr<Variable> VariableModel::variable(int index) const |
|
108 | 108 | { |
|
109 | 109 | return (index >= 0 && index < impl->m_Variables.size()) ? impl->m_Variables[index] : nullptr; |
|
110 | 110 | } |
|
111 | 111 | |
|
112 | 112 | void VariableModel::setDataProgress(std::shared_ptr<Variable> variable, double progress) |
|
113 | 113 | { |
|
114 | 114 | |
|
115 | 115 | impl->m_VariableToProgress[variable] = progress; |
|
116 | 116 | auto modelIndex = createIndex(impl->indexOfVariable(variable.get()), NAME_COLUMN); |
|
117 | 117 | |
|
118 | 118 | emit dataChanged(modelIndex, modelIndex); |
|
119 | 119 | } |
|
120 | 120 | |
|
121 | 121 | int VariableModel::columnCount(const QModelIndex &parent) const |
|
122 | 122 | { |
|
123 | 123 | Q_UNUSED(parent); |
|
124 | 124 | |
|
125 | 125 | return NB_COLUMNS; |
|
126 | 126 | } |
|
127 | 127 | |
|
128 | 128 | int VariableModel::rowCount(const QModelIndex &parent) const |
|
129 | 129 | { |
|
130 | 130 | Q_UNUSED(parent); |
|
131 | 131 | |
|
132 | 132 | return impl->m_Variables.size(); |
|
133 | 133 | } |
|
134 | 134 | |
|
135 | 135 | QVariant VariableModel::data(const QModelIndex &index, int role) const |
|
136 | 136 | { |
|
137 | 137 | if (!index.isValid()) { |
|
138 | 138 | return QVariant{}; |
|
139 | 139 | } |
|
140 | 140 | |
|
141 | 141 | if (index.row() < 0 || index.row() >= rowCount()) { |
|
142 | 142 | return QVariant{}; |
|
143 | 143 | } |
|
144 | 144 | |
|
145 | 145 | if (role == Qt::DisplayRole) { |
|
146 | 146 | if (auto variable = impl->m_Variables.at(index.row()).get()) { |
|
147 | 147 | /// Lambda function that builds the variant to return for a time value |
|
148 | 148 | auto dateTimeVariant = [](double time) { |
|
149 | 149 | auto dateTime = QDateTime::fromMSecsSinceEpoch(time * 1000.); |
|
150 | 150 | return dateTime.toString(DATETIME_FORMAT); |
|
151 | 151 | }; |
|
152 | 152 | |
|
153 | 153 | switch (index.column()) { |
|
154 | 154 | case NAME_COLUMN: |
|
155 | 155 | return variable->name(); |
|
156 | 156 | case TSTART_COLUMN: |
|
157 | 157 | return dateTimeVariant(variable->dateTime().m_TStart); |
|
158 | 158 | case TEND_COLUMN: |
|
159 | 159 | return dateTimeVariant(variable->dateTime().m_TEnd); |
|
160 | 160 | default: |
|
161 | 161 | // No action |
|
162 | 162 | break; |
|
163 | 163 | } |
|
164 | 164 | |
|
165 | 165 | qWarning(LOG_VariableModel()) |
|
166 | 166 | << tr("Can't get data (unknown column %1)").arg(index.column()); |
|
167 | 167 | } |
|
168 | 168 | else { |
|
169 | 169 | qWarning(LOG_VariableModel()) << tr("Can't get data (no variable)"); |
|
170 | 170 | } |
|
171 | 171 | } |
|
172 |
else if (role == VariableRoles:: |
|
|
172 | else if (role == VariableRoles::ProgressRole) { | |
|
173 | 173 | if (auto variable = impl->m_Variables.at(index.row())) { |
|
174 | 174 | |
|
175 | 175 | auto it = impl->m_VariableToProgress.find(variable); |
|
176 | 176 | if (it != impl->m_VariableToProgress.cend()) { |
|
177 | 177 | return it->second; |
|
178 | 178 | } |
|
179 | 179 | } |
|
180 | 180 | } |
|
181 | 181 | |
|
182 | 182 | return QVariant{}; |
|
183 | 183 | } |
|
184 | 184 | |
|
185 | 185 | QVariant VariableModel::headerData(int section, Qt::Orientation orientation, int role) const |
|
186 | 186 | { |
|
187 | 187 | if (role != Qt::DisplayRole && role != Qt::SizeHintRole) { |
|
188 | 188 | return QVariant{}; |
|
189 | 189 | } |
|
190 | 190 | |
|
191 | 191 | if (orientation == Qt::Horizontal) { |
|
192 | 192 | auto propertiesIt = COLUMN_PROPERTIES.find(section); |
|
193 | 193 | if (propertiesIt != COLUMN_PROPERTIES.cend()) { |
|
194 | 194 | // Role is either DisplayRole or SizeHintRole |
|
195 | 195 | return (role == Qt::DisplayRole) |
|
196 | 196 | ? QVariant{propertiesIt->m_Name} |
|
197 | 197 | : QVariant{QSize{propertiesIt->m_Width, propertiesIt->m_Height}}; |
|
198 | 198 | } |
|
199 | 199 | else { |
|
200 | 200 | qWarning(LOG_VariableModel()) |
|
201 | 201 | << tr("Can't get header data (unknown column %1)").arg(section); |
|
202 | 202 | } |
|
203 | 203 | } |
|
204 | 204 | |
|
205 | 205 | return QVariant{}; |
|
206 | 206 | } |
|
207 | 207 | |
|
208 | 208 | void VariableModel::onVariableUpdated() noexcept |
|
209 | 209 | { |
|
210 | 210 | // Finds variable that has been updated in the model |
|
211 | 211 | if (auto updatedVariable = dynamic_cast<Variable *>(sender())) { |
|
212 | 212 | auto updatedVariableIndex = impl->indexOfVariable(updatedVariable); |
|
213 | 213 | |
|
214 | 214 | if (updatedVariableIndex > -1) { |
|
215 | 215 | emit dataChanged(createIndex(updatedVariableIndex, 0), |
|
216 | 216 | createIndex(updatedVariableIndex, columnCount() - 1)); |
|
217 | 217 | } |
|
218 | 218 | } |
|
219 | 219 | } |
|
220 | 220 | |
|
221 | 221 | int VariableModel::VariableModelPrivate::indexOfVariable(Variable *variable) const noexcept |
|
222 | 222 | { |
|
223 | 223 | auto begin = std::cbegin(m_Variables); |
|
224 | 224 | auto end = std::cend(m_Variables); |
|
225 | 225 | auto it |
|
226 | 226 | = std::find_if(begin, end, [variable](const auto &var) { return var.get() == variable; }); |
|
227 | 227 | |
|
228 | 228 | if (it != end) { |
|
229 | 229 | // Gets the index of the variable in the model: we assume here that views have the same |
|
230 | 230 | // order as the model |
|
231 | 231 | return std::distance(begin, it); |
|
232 | 232 | } |
|
233 | 233 | else { |
|
234 | 234 | return -1; |
|
235 | 235 | } |
|
236 | 236 | } |
@@ -1,140 +1,140 | |||
|
1 | 1 | #include <Variable/VariableController.h> |
|
2 | 2 | #include <Variable/VariableInspectorWidget.h> |
|
3 | 3 | #include <Variable/VariableMenuHeaderWidget.h> |
|
4 | 4 | #include <Variable/VariableModel.h> |
|
5 | 5 | |
|
6 | 6 | #include <ui_VariableInspectorWidget.h> |
|
7 | 7 | |
|
8 | 8 | #include <QSortFilterProxyModel> |
|
9 | 9 | #include <QStyledItemDelegate> |
|
10 | 10 | #include <QWidgetAction> |
|
11 | 11 | |
|
12 | 12 | #include <SqpApplication.h> |
|
13 | 13 | |
|
14 | 14 | Q_LOGGING_CATEGORY(LOG_VariableInspectorWidget, "VariableInspectorWidget") |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | class QProgressBarItemDelegate : public QStyledItemDelegate { |
|
18 | 18 | |
|
19 | 19 | public: |
|
20 |
QProgressBarItemDelegate(QObject *parent) : QStyledItemDelegate |
|
|
20 | QProgressBarItemDelegate(QObject *parent) : QStyledItemDelegate{parent} {} | |
|
21 | 21 | |
|
22 | 22 | void paint(QPainter *painter, const QStyleOptionViewItem &option, |
|
23 | 23 | const QModelIndex &index) const |
|
24 | 24 | { |
|
25 | 25 | auto data = index.data(Qt::DisplayRole); |
|
26 |
auto progressData = index.data(VariableRoles:: |
|
|
26 | auto progressData = index.data(VariableRoles::ProgressRole); | |
|
27 | 27 | if (data.isValid() && progressData.isValid()) { |
|
28 | 28 | auto name = data.value<QString>(); |
|
29 | 29 | auto progress = progressData.value<double>(); |
|
30 | 30 | if (progress >= 0) { |
|
31 | 31 | auto progressBarOption = QStyleOptionProgressBar{}; |
|
32 | 32 | progressBarOption.rect = option.rect; |
|
33 | 33 | progressBarOption.minimum = 0; |
|
34 | 34 | progressBarOption.maximum = 100; |
|
35 | 35 | progressBarOption.progress = progress; |
|
36 | 36 | progressBarOption.text |
|
37 | 37 | = QString("%1 %2").arg(name).arg(QString::number(progress, 'f', 2) + "%"); |
|
38 | 38 | progressBarOption.textVisible = true; |
|
39 | 39 | progressBarOption.textAlignment = Qt::AlignCenter; |
|
40 | 40 | |
|
41 | 41 | QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOption, |
|
42 | 42 | painter); |
|
43 | 43 | } |
|
44 | 44 | } |
|
45 | 45 | else { |
|
46 | 46 | QStyledItemDelegate::paint(painter, option, index); |
|
47 | 47 | } |
|
48 | 48 | } |
|
49 | 49 | }; |
|
50 | 50 | |
|
51 | 51 | VariableInspectorWidget::VariableInspectorWidget(QWidget *parent) |
|
52 | 52 | : QWidget{parent}, |
|
53 | 53 | ui{new Ui::VariableInspectorWidget}, |
|
54 |
m_ProgressBarItemDelegate{new QProgressBarItemDelegate |
|
|
54 | m_ProgressBarItemDelegate{new QProgressBarItemDelegate{this}} | |
|
55 | 55 | { |
|
56 | 56 | ui->setupUi(this); |
|
57 | 57 | |
|
58 | 58 | // Sets model for table |
|
59 | 59 | // auto sortFilterModel = new QSortFilterProxyModel{this}; |
|
60 | 60 | // sortFilterModel->setSourceModel(sqpApp->variableController().variableModel()); |
|
61 | 61 | |
|
62 | 62 | auto variableModel = sqpApp->variableController().variableModel(); |
|
63 | 63 | ui->tableView->setModel(variableModel); |
|
64 | 64 | |
|
65 | 65 | // Adds extra signal/slot between view and model, so the view can be updated instantly when |
|
66 | 66 | // there is a change of data in the model |
|
67 | 67 | connect(variableModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), this, |
|
68 | 68 | SLOT(refresh())); |
|
69 | 69 | |
|
70 | 70 | ui->tableView->setSelectionModel(sqpApp->variableController().variableSelectionModel()); |
|
71 | 71 | ui->tableView->setItemDelegateForColumn(0, m_ProgressBarItemDelegate); |
|
72 | 72 | |
|
73 | 73 | // Fixes column sizes |
|
74 | 74 | auto model = ui->tableView->model(); |
|
75 | 75 | const auto count = model->columnCount(); |
|
76 | 76 | for (auto i = 0; i < count; ++i) { |
|
77 | 77 | ui->tableView->setColumnWidth( |
|
78 | 78 | i, model->headerData(i, Qt::Horizontal, Qt::SizeHintRole).toSize().width()); |
|
79 | 79 | } |
|
80 | 80 | |
|
81 | 81 | // Sets selection options |
|
82 | 82 | ui->tableView->setSelectionBehavior(QTableView::SelectRows); |
|
83 | 83 | ui->tableView->setSelectionMode(QTableView::ExtendedSelection); |
|
84 | 84 | |
|
85 | 85 | // Connection to show a menu when right clicking on the tree |
|
86 | 86 | ui->tableView->setContextMenuPolicy(Qt::CustomContextMenu); |
|
87 | 87 | connect(ui->tableView, &QTableView::customContextMenuRequested, this, |
|
88 | 88 | &VariableInspectorWidget::onTableMenuRequested); |
|
89 | 89 | } |
|
90 | 90 | |
|
91 | 91 | VariableInspectorWidget::~VariableInspectorWidget() |
|
92 | 92 | { |
|
93 | 93 | delete ui; |
|
94 | 94 | } |
|
95 | 95 | |
|
96 | 96 | void VariableInspectorWidget::onTableMenuRequested(const QPoint &pos) noexcept |
|
97 | 97 | { |
|
98 | 98 | auto selectedRows = ui->tableView->selectionModel()->selectedRows(); |
|
99 | 99 | |
|
100 | 100 | // Gets the model to retrieve the underlying selected variables |
|
101 | 101 | auto model = sqpApp->variableController().variableModel(); |
|
102 | 102 | auto selectedVariables = QVector<std::shared_ptr<Variable> >{}; |
|
103 | 103 | for (const auto &selectedRow : qAsConst(selectedRows)) { |
|
104 | 104 | if (auto selectedVariable = model->variable(selectedRow.row())) { |
|
105 | 105 | selectedVariables.push_back(selectedVariable); |
|
106 | 106 | } |
|
107 | 107 | } |
|
108 | 108 | |
|
109 | 109 | QMenu tableMenu{}; |
|
110 | 110 | |
|
111 | 111 | // Emits a signal so that potential receivers can populate the menu before displaying it |
|
112 | 112 | emit tableMenuAboutToBeDisplayed(&tableMenu, selectedVariables); |
|
113 | 113 | |
|
114 | 114 | // Adds menu-specific actions |
|
115 | 115 | if (!selectedVariables.isEmpty()) { |
|
116 | 116 | // 'Delete' action |
|
117 | 117 | auto deleteFun = [&selectedVariables]() { |
|
118 | 118 | sqpApp->variableController().deleteVariables(selectedVariables); |
|
119 | 119 | }; |
|
120 | 120 | |
|
121 | 121 | tableMenu.addSeparator(); |
|
122 | 122 | tableMenu.addAction(QIcon{":/icones/delete.png"}, tr("Delete"), deleteFun); |
|
123 | 123 | } |
|
124 | 124 | |
|
125 | 125 | if (!tableMenu.isEmpty()) { |
|
126 | 126 | // Generates menu header (inserted before first action) |
|
127 | 127 | auto firstAction = tableMenu.actions().first(); |
|
128 | 128 | auto headerAction = new QWidgetAction{&tableMenu}; |
|
129 | 129 | headerAction->setDefaultWidget(new VariableMenuHeaderWidget{selectedVariables, &tableMenu}); |
|
130 | 130 | tableMenu.insertAction(firstAction, headerAction); |
|
131 | 131 | |
|
132 | 132 | // Displays menu |
|
133 | 133 | tableMenu.exec(mapToGlobal(pos)); |
|
134 | 134 | } |
|
135 | 135 | } |
|
136 | 136 | |
|
137 | 137 | void VariableInspectorWidget::refresh() noexcept |
|
138 | 138 | { |
|
139 | 139 | ui->tableView->viewport()->update(); |
|
140 | 140 | } |
General Comments 2
Pull request updated. Auto status change to "Under Review"
Changed commits: * 1 added * 0 removed Changed files: * M core/include/Network/NetworkController.h * M core/include/Variable/VariableController.h * M core/include/Variable/VariableModel.h * M core/src/Network/NetworkController.cpp * M core/src/Variable/VariableController.cpp * M core/src/Variable/VariableModel.cpp * M gui/include/Variable/VariableInspectorWidget.h * M gui/src/SqpApplication.cpp * M gui/src/Variable/VariableInspectorWidget.cpp * M plugins/amda/src/AmdaResultParser.cpp * M plugins/amda/tests/TestAmdaResultParser.cpp * R COPYING * R app/src/MainWindow.cpp * R app/ui/MainWindow.ui * R cmake/sciqlop_package_qt.cmake * R core/include/Common/MetaTypes.h * R core/include/Data/ArrayData.h * R core/include/Data/DataProviderParameters.h * R core/include/Data/DataSeries.h * R core/include/Data/IDataProvider.h * R core/include/Data/IDataSeries.h * R core/include/Data/ScalarSeries.h * R core/include/Data/SqpDateTime.h * R core/include/DataSource/DataSourceItemAction.h * R core/include/Plugin/PluginManager.h * R core/include/Time/TimeController.h * R core/include/Variable/Variable.h * R core/include/Variable/VariableCacheController.h * R core/include/Visualization/VisualizationController.h * R core/src/Data/ScalarSeries.cpp * R core/src/DataSource/DataSourceItemAction.cpp * R core/src/Plugin/PluginManager.cpp * R core/src/Time/TimeController.cpp * R core/src/Variable/Variable.cpp * R core/src/Variable/VariableCacheController.cpp * R core/src/Visualization/VisualizationController.cpp * R core/tests/Variable/TestVariableCacheController.cpp * R gui/include/DataSource/DataSourceTreeWidgetItem.h * R gui/include/DataSource/DataSourceWidget.h * R gui/include/SidePane/SqpSidePane.h * R gui/include/TimeWidget/TimeWidget.h * R gui/include/Variable/VariableMenuHeaderWidget.h * R gui/include/Visualization/IVariableContainer.h * R gui/include/Visualization/IVisualizationWidget.h * R gui/include/Visualization/IVisualizationWidgetVisitor.h * R gui/include/Visualization/VisualizationGraphHelper.h * R gui/include/Visualization/VisualizationGraphWidget.h * R gui/include/Visualization/VisualizationTabWidget.h * R gui/include/Visualization/VisualizationWidget.h * R gui/include/Visualization/VisualizationZoneWidget.h * R gui/include/Visualization/operations/GenerateVariableMenuOperation.h * R gui/include/Visualization/operations/MenuBuilder.h * R gui/include/Visualization/operations/RemoveVariableOperation.h * R gui/include/Visualization/qcustomplot.h * R gui/resources/icones/dataSourceComponent.png * R gui/resources/icones/dataSourceNode.png * R gui/resources/icones/dataSourceProduct.png * R gui/resources/icones/dataSourceRoot.png * R gui/resources/icones/delete.png * R gui/resources/icones/next.png * R gui/resources/icones/openInspector.png * R gui/resources/icones/plot.png * R gui/resources/icones/previous.png * R gui/resources/icones/sciqlop2PNG_1024.png * R gui/resources/icones/unplot.png * R gui/resources/sqpguiresources.qrc * R gui/src/DataSource/DataSourceTreeWidgetItem.cpp * R gui/src/DataSource/DataSourceWidget.cpp * R gui/src/SidePane/SqpSidePane.cpp * R gui/src/TimeWidget/TimeWidget.cpp * R gui/src/Variable/VariableMenuHeaderWidget.cpp * R gui/src/Visualization/VisualizationGraphHelper.cpp * R gui/src/Visualization/VisualizationGraphWidget.cpp * R gui/src/Visualization/VisualizationTabWidget.cpp * R gui/src/Visualization/VisualizationWidget.cpp * R gui/src/Visualization/VisualizationZoneWidget.cpp * R gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp * R gui/src/Visualization/operations/MenuBuilder.cpp * R gui/src/Visualization/operations/RemoveVariableOperation.cpp * R gui/src/Visualization/qcustomplot.cpp * R gui/ui/DataSource/DataSourceWidget.ui * R gui/ui/SidePane/SqpSidePane.ui * R gui/ui/TimeWidget/TimeWidget.ui * R gui/ui/Variable/VariableInspectorWidget.ui * R gui/ui/Variable/VariableMenuHeaderWidget.ui * R gui/ui/Visualization/VisualizationGraphWidget.ui * R gui/ui/Visualization/VisualizationTabWidget.ui * R gui/ui/Visualization/VisualizationWidget.ui * R gui/ui/Visualization/VisualizationZoneWidget.ui * R gui/vera-exclusions/exclusions.txt * R plugin/CMakeLists.txt * R plugin/cmake/Findsciqlop-plugin.cmake * R plugin/include/Plugin/IPlugin.h * R plugins/amda/CMakeLists.txt * R plugins/amda/cmake/Findsciqlop-amda.cmake * R plugins/amda/include/AmdaGlobal.h * R plugins/amda/include/AmdaParser.h * R plugins/amda/include/AmdaPlugin.h * R plugins/amda/include/AmdaProvider.h * R plugins/amda/include/AmdaResultParser.h * R plugins/amda/resources/amda.json * R plugins/amda/resources/amdaresources.qrc * R plugins/amda/resources/samples/AmdaSample.json * R plugins/amda/src/AmdaParser.cpp * R plugins/amda/src/AmdaPlugin.cpp * R plugins/amda/src/AmdaProvider.cpp * R plugins/amda/tests-resources/TestAmdaParser/TwoRootsFile.json * R plugins/amda/tests-resources/TestAmdaParser/ValidFile1.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootKey.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootType.json * R plugins/amda/tests-resources/TestAmdaResultParser/NaNValue.txt * R plugins/amda/tests-resources/TestAmdaResultParser/NoUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/TooManyValues.txt * R plugins/amda/tests-resources/TestAmdaResultParser/ValidScalar1.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongDate.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongValue.txt * R plugins/amda/tests/TestAmdaParser.cpp * R plugins/mockplugin/CMakeLists.txt * R plugins/mockplugin/cmake/Findsciqlop-mockplugin.cmake * R plugins/mockplugin/include/CosinusProvider.h * R plugins/mockplugin/include/MockPlugin.h * R plugins/mockplugin/include/MockPluginGlobal.h * R plugins/mockplugin/resources/mockplugin.json * R plugins/mockplugin/src/CosinusProvider.cpp * R plugins/mockplugin/src/MockPlugin.cpp * R README.md * R app/CMakeLists.txt * R app/include/MainWindow.h * R app/src/Main.cpp * R app/vera-exclusions/exclusions.txt * R cmake/sciqlop.cmake * R cmake/sciqlop_applications.cmake * R cmake/sciqlop_package.cmake * R cmake/sciqlop_params.cmake * R core/CMakeLists.txt * R core/include/Common/spimpl.h * R core/include/DataSource/DataSourceController.h * R core/include/DataSource/DataSourceItem.h * R core/src/DataSource/DataSourceController.cpp * R core/src/DataSource/DataSourceItem.cpp * R core/tests/DataSource/TestDataSourceController.cpp * R core/vera-exclusions/exclusions.txt * R formatting/cmake/use_clangformat.cmake * R formatting/vera-exclusions/exclusions.txt * R gui/CMakeLists.txt * R gui/include/SqpApplication.h * R LICENSE * R app/src/mainwindow.cpp * R app/src/mainwindow.ui
You need to be logged in to leave comments.
Login now