Added extended stylesheet.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 18.0.1, 2025-12-15T18:54:47. -->
|
<!-- Written by QtCreator 18.0.1, 2025-12-17T09:45:35. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOURCES += \
|
|||||||
bccommand.cpp \
|
bccommand.cpp \
|
||||||
bccommandrunner.cpp \
|
bccommandrunner.cpp \
|
||||||
bcvalue.cpp \
|
bcvalue.cpp \
|
||||||
|
bcvaluedelegate.cpp \
|
||||||
bcvaluemanager.cpp \
|
bcvaluemanager.cpp \
|
||||||
bcvaluemodel.cpp \
|
bcvaluemodel.cpp \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
@@ -39,6 +40,7 @@ HEADERS += \
|
|||||||
bccommandrunner.h \
|
bccommandrunner.h \
|
||||||
bcmainwindow.h \
|
bcmainwindow.h \
|
||||||
bcvalue.h \
|
bcvalue.h \
|
||||||
|
bcvaluedelegate.h \
|
||||||
bcvaluemanager.h \
|
bcvaluemanager.h \
|
||||||
bcvaluemodel.h
|
bcvaluemodel.h
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,80 @@
|
|||||||
/* app.qss */
|
/* appqss */
|
||||||
|
|
||||||
/* Alle QWidgets bekommen diesen Font */
|
/* Alle QWidgets bekommen diesen Font */
|
||||||
QWidget {
|
QWidget
|
||||||
|
{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: "Segoe UI", sans-serif;
|
font-family: Segoe UI, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Spezifisches Styling für Buttons */
|
/* Spezifisches Styling für Buttons */
|
||||||
QPushButton {
|
QPushButton
|
||||||
|
{
|
||||||
background-color: #0078d7;
|
background-color: #0078d7;
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:hover {
|
QPushButton:hover
|
||||||
|
{
|
||||||
background-color: #1084e3;
|
background-color: #1084e3;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:pressed {
|
QPushButton:pressed
|
||||||
|
{
|
||||||
background-color: #005a9e;
|
background-color: #005a9e;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styling anhand von Objektnamen (ID) */
|
/* Styling anhand von Objektnamen (ID) */
|
||||||
#loginButton {
|
#loginButton
|
||||||
|
{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: green;
|
background-color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QTableView" name="_valueView">
|
<widget class="QListView" name="_valueView">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::NoFrame</enum>
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -64,9 +64,6 @@
|
|||||||
<property name="alternatingRowColors">
|
<property name="alternatingRowColors">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="gridStyle">
|
|
||||||
<enum>Qt::PenStyle::CustomDashLine</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ public:
|
|||||||
static BCValue makeValue(BCDevice::ID deviceID, const BCValueParams& params );
|
static BCValue makeValue(BCDevice::ID deviceID, const BCValueParams& params );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// Damit QVariant dieses Struct transportieren kann:
|
||||||
|
Q_DECLARE_METATYPE(BCValue)
|
||||||
|
|
||||||
// abbreviations:
|
// abbreviations:
|
||||||
// SOC = State Of Charge
|
// SOC = State Of Charge
|
||||||
@@ -106,7 +108,7 @@ constexpr auto to_u(E e) noexcept {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using BCValueList = QList<BCValue>;
|
using BCValueList = QVector<BCValue>;
|
||||||
|
|
||||||
|
|
||||||
#endif // BCRawValue_H
|
#endif // BCRawValue_H
|
||||||
|
|||||||
Reference in New Issue
Block a user