-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event dashboards and improve dashboard handling #21
Conversation
565b726
to
311dc1c
Compare
src/dashboarditem.h
Outdated
@@ -9,6 +9,7 @@ | |||
#define DASHBOARDITEM_H | |||
|
|||
#include <QObject> | |||
#include <QOpcUaMonitoringParameters> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Überflüssiger include
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -173,8 +186,14 @@ bool DashboardItemModel::isAddItem(uint index) const | |||
|
|||
void DashboardItemModel::setCurrentIndex(uint index) | |||
{ | |||
for (const auto &item : mItems) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muss das eine for-Schleife sein? Der Index ist doch in dem Moment noch mCurrentIndex oder habe ich da was übersehen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soweit ich das sehe, gilt das nicht, wenn ein Item weiter vorne in der Liste via removeItem() entfernt wird.
src/monitoreditem.cpp
Outdated
return mEventFilter; | ||
} | ||
|
||
QList<QVariantMap> MonitoredItem::lastEvents() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funktion kann const reference sein
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/backend.cpp
Outdated
const auto selectClauses = settings.value(Constants::SettingsKey::EventFilters) | ||
.value<QList<QList<QOpcUaSimpleAttributeOperand>>>(); | ||
|
||
for (int i = 0; i < nodeIds.size(); ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable i wird schon in der äußeren Schleife verwendet, könnte zu Verwirrungen führen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/referencemodel.cpp
Outdated
@@ -7,14 +7,6 @@ | |||
|
|||
#include "referencemodel.h" | |||
|
|||
enum Roles : int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ist das notwendig? Warum sind die enums in die Header-Datei verschoben worden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Überbleibsel von einem kaputten Implementierungsansatz, ich habe es zurückverschoben
@@ -238,11 +238,226 @@ Rectangle { | |||
} | |||
} | |||
|
|||
Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verschieben geht zwar noch, aber nach dem Verschieben ändert sich die Größe der Kachel nicht mehr bei Events.
Das Verschieben der Event-Dashboards ist in meinen Augen auch nicht sehr intuitiv. Deswegen wäre zu überlegen, ob man das bei Events gar mehr zulässt oder man im Header noch zwei Pfeile zum Verschieben der Reihenfolge einbaut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich habe die Variante mit den Pfeilen gebaut
If a dashboard is currently not being displayed and and an event occurs or a value changes, it is marked with an activity indicator.
311dc1c
to
bd866dd
Compare
No description provided.