diff --git a/.qtcreator/BionxControl.pro.user b/.qtcreator/BionxControl.pro.user index 8d502af..aed09f7 100644 --- a/.qtcreator/BionxControl.pro.user +++ b/.qtcreator/BionxControl.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/BionxControl.pro b/BionxControl.pro index 778c812..bba41ca 100644 --- a/BionxControl.pro +++ b/BionxControl.pro @@ -28,6 +28,7 @@ SOURCES += \ bccommand.cpp \ bccommandrunner.cpp \ bcvalue.cpp \ + bcvaluedelegate.cpp \ bcvaluemanager.cpp \ bcvaluemodel.cpp \ main.cpp \ @@ -39,6 +40,7 @@ HEADERS += \ bccommandrunner.h \ bcmainwindow.h \ bcvalue.h \ + bcvaluedelegate.h \ bcvaluemanager.h \ bcvaluemodel.h diff --git a/BionxControl.qss b/BionxControl.qss index 057c46b..1d64a87 100644 --- a/BionxControl.qss +++ b/BionxControl.qss @@ -1,29 +1,80 @@ -/* app.qss */ +/* appqss */ /* Alle QWidgets bekommen diesen Font */ -QWidget { +QWidget +{ font-size: 14px; - font-family: "Segoe UI", sans-serif; + font-family: Segoe UI, sans-serif; } /* Spezifisches Styling für Buttons */ -QPushButton { +QPushButton +{ background-color: #0078d7; color: white; border-radius: 4px; padding: 6px; } -QPushButton:hover { +QPushButton:hover +{ background-color: #1084e3; } -QPushButton:pressed { +QPushButton:pressed +{ background-color: #005a9e; } /* Styling anhand von Objektnamen (ID) */ -#loginButton { +#loginButton +{ font-weight: bold; background-color: green; -} \ No newline at end of file +} + +QListView +{ + background-color: #f5f5f5; + border: none; + outline: none; + show-decoration-selected: 0; +} + +QListView::item +{ + border: 2px solid #2196F3; + border-radius: 8px; + padding: 8px; + margin: 4px; + background-color: white; +} + +QListView::item:hover +{ + border-color: #FF9800; + background-color: #fff8f0; +} + +QListView::item:selected +{ + border-color: #F44336; /* Roter Rahmen */ + background-color: #ffebee; +} + +QListView::item:selected:hover +{ + border-color: #FF9800; + background-color: #ffe0b2; +} + +QListView::item:focus +{ +// outline: none; /* Entfernt das Focus-Rectangle */ +// border-color: green; +// background-color: #ffe0b2; + border: 2px solid gray; + border-style: inset; + background-color: white; + color: black; +} diff --git a/bcmainwindow.ui b/bcmainwindow.ui index c92f42e..cbb6db3 100644 --- a/bcmainwindow.ui +++ b/bcmainwindow.ui @@ -54,7 +54,7 @@ - + QFrame::Shape::NoFrame @@ -64,9 +64,6 @@ false - - Qt::PenStyle::CustomDashLine - diff --git a/bcvalue.h b/bcvalue.h index 6b59d18..11e0b00 100644 --- a/bcvalue.h +++ b/bcvalue.h @@ -89,6 +89,8 @@ public: static BCValue makeValue(BCDevice::ID deviceID, const BCValueParams& params ); }; +// Damit QVariant dieses Struct transportieren kann: +Q_DECLARE_METATYPE(BCValue) // abbreviations: // SOC = State Of Charge @@ -106,7 +108,7 @@ constexpr auto to_u(E e) noexcept { } */ -using BCValueList = QList; +using BCValueList = QVector; #endif // BCRawValue_H