diff --git a/doc/gui_test/.gitignore b/doc/gui_test/.gitignore new file mode 100644 index 0000000..aa3808c --- /dev/null +++ b/doc/gui_test/.gitignore @@ -0,0 +1,82 @@ +# This file is used to ignore files which are generated +# ---------------------------------------------------------------------------- + +*~ +*.autosave +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*.so.* +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +!core/ +tags +.DS_Store +.directory +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp +Thumbs.db +*.res +*.rc +/.qmake.cache +/.qmake.stash + +# qtcreator generated files +*.pro.user* +*.qbs.user* +CMakeLists.txt.user* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.sdf +*.opensdf +*.vcxproj +*vcxproj.* + +# MinGW generated files +*.Debug +*.Release + +# Python byte code +*.pyc + +# Binaries +# -------- +*.dll +*.exe + +# Directories with generated files +.moc/ +.obj/ +.pch/ +.rcc/ +.uic/ +/build*/ diff --git a/doc/gui_test/dummy_gui.qrc b/doc/gui_test/dummy_gui.qrc new file mode 100644 index 0000000..d5dd23e --- /dev/null +++ b/doc/gui_test/dummy_gui.qrc @@ -0,0 +1,23 @@ + + + resources/gui_test.qss + resources/bionx_akku.png + resources/bionx_console.png + resources/bionx_motor.png + resources/connect.png + resources/connected.png + resources/disconnected.png + resources/document-import.png + resources/document-revert.png + resources/document-save.png + resources/document-save-as.png + resources/exit.png + resources/go-first.png + resources/go-jump.png + resources/go-last.png + resources/important.png + resources/restart.png + resources/splash.pdn + resources/splash.png + + diff --git a/doc/gui_test/gui_test.pro b/doc/gui_test/gui_test.pro new file mode 100644 index 0000000..0e55d7b --- /dev/null +++ b/doc/gui_test/gui_test.pro @@ -0,0 +1,27 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++20 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + dummy_gui.qrc diff --git a/doc/gui_test/main.cpp b/doc/gui_test/main.cpp new file mode 100644 index 0000000..d109f9b --- /dev/null +++ b/doc/gui_test/main.cpp @@ -0,0 +1,40 @@ + + +#include "mainwindow.h" + +#include + +#include +#include +#include +#include +#include + +// main.cpp +#include +#include +#include + +bool setApplicationStyleSheet( QAnyStringView path ) +{ + QFile styleFile( path.toString() ); + if (styleFile.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QString style = styleFile.readAll(); + qApp->setStyleSheet(style); + styleFile.close(); + return true; + } + + qWarning() << "Konnte Stylesheet nicht laden:" << styleFile.errorString(); + return true; +} + +int main (int argc, char *argv[]) +{ + QApplication a (argc, argv); + setApplicationStyleSheet( u":gui_test.qss" ); + MainWindow w; + w.show (); + return a.exec (); +} diff --git a/doc/gui_test/mainwindow.cpp b/doc/gui_test/mainwindow.cpp new file mode 100644 index 0000000..854de27 --- /dev/null +++ b/doc/gui_test/mainwindow.cpp @@ -0,0 +1,16 @@ +#include + +MainWindow::MainWindow (QWidget *parent) + : QMainWindow (parent) +{ + setupUi (this); + + _toolButtonMotor->setDefaultAction( _actionMotor ); + _toolButtonBattery->setDefaultAction( _actionBattery ); + _toolButtonConsole->setDefaultAction( _actionConsole ); + +} + +MainWindow::~MainWindow () +{ +} diff --git a/doc/gui_test/mainwindow.h b/doc/gui_test/mainwindow.h new file mode 100644 index 0000000..ff10fca --- /dev/null +++ b/doc/gui_test/mainwindow.h @@ -0,0 +1,18 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + +class MainWindow : public QMainWindow, public Ui_MainWindow +{ + Q_OBJECT + +public: + + MainWindow (QWidget *parent = nullptr); + ~MainWindow (); + + +}; +#endif // MAINWINDOW_H diff --git a/doc/gui_test/mainwindow.ui b/doc/gui_test/mainwindow.ui new file mode 100644 index 0000000..cb5c93f --- /dev/null +++ b/doc/gui_test/mainwindow.ui @@ -0,0 +1,228 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + + + + + + + + 96 + 96 + + + + ... + + + + 64 + 64 + + + + _buttonGroup + + + + + + + + 96 + 96 + + + + ... + + + + 64 + 64 + + + + _buttonGroup + + + + + + + + 96 + 96 + + + + ... + + + + 64 + 64 + + + + _buttonGroup + + + + + + + + 96 + 96 + + + + ... + + + + 64 + 64 + + + + _buttonGroup + + + + + + + + + + + + + + + + + + + + + + :restart.png:restart.png + + + pimp + + + Pimp my Ride + + + + + + :/bionx_motor.png:/bionx_motor.png + + + motor + + + Show motor settings + + + + + + :/bionx_akku.png:/bionx_akku.png + + + battery + + + Show battery settings + + + + + + :/bionx_console.png:/bionx_console.png + + + console + + + Show console settings + + + + + + :/resources/exit.png:/resources/exit.png + + + Exit + + + Exit + + + + + + :/resources/connected.png:/resources/connected.png + + + connect + + + connect to bike + + + QAction::MenuRole::TextHeuristicRole + + + + + + + + + + + diff --git a/doc/gui_test/resources/96/bottom.png b/doc/gui_test/resources/96/bottom.png new file mode 100644 index 0000000..bf1949d Binary files /dev/null and b/doc/gui_test/resources/96/bottom.png differ diff --git a/doc/gui_test/resources/96/browser-download.png b/doc/gui_test/resources/96/browser-download.png new file mode 100644 index 0000000..e29f13e Binary files /dev/null and b/doc/gui_test/resources/96/browser-download.png differ diff --git a/doc/gui_test/resources/96/cab_extract.png b/doc/gui_test/resources/96/cab_extract.png new file mode 100644 index 0000000..c266ab8 Binary files /dev/null and b/doc/gui_test/resources/96/cab_extract.png differ diff --git a/doc/gui_test/resources/96/document-export.png b/doc/gui_test/resources/96/document-export.png new file mode 100644 index 0000000..a48c806 Binary files /dev/null and b/doc/gui_test/resources/96/document-export.png differ diff --git a/doc/gui_test/resources/96/document-import.png b/doc/gui_test/resources/96/document-import.png new file mode 100644 index 0000000..b74531d Binary files /dev/null and b/doc/gui_test/resources/96/document-import.png differ diff --git a/doc/gui_test/resources/96/document-revert.png b/doc/gui_test/resources/96/document-revert.png new file mode 100644 index 0000000..58e62c1 Binary files /dev/null and b/doc/gui_test/resources/96/document-revert.png differ diff --git a/doc/gui_test/resources/96/document-save-as.png b/doc/gui_test/resources/96/document-save-as.png new file mode 100644 index 0000000..67c38ee Binary files /dev/null and b/doc/gui_test/resources/96/document-save-as.png differ diff --git a/doc/gui_test/resources/96/document-save.png b/doc/gui_test/resources/96/document-save.png new file mode 100644 index 0000000..e29f13e Binary files /dev/null and b/doc/gui_test/resources/96/document-save.png differ diff --git a/doc/gui_test/resources/96/go-jump.png b/doc/gui_test/resources/96/go-jump.png new file mode 100644 index 0000000..dde9987 Binary files /dev/null and b/doc/gui_test/resources/96/go-jump.png differ diff --git a/doc/gui_test/resources/96/gtk-apply.png b/doc/gui_test/resources/96/gtk-apply.png new file mode 100644 index 0000000..4d7baf1 Binary files /dev/null and b/doc/gui_test/resources/96/gtk-apply.png differ diff --git a/doc/gui_test/resources/96/gtk-goto-first-ltr.png b/doc/gui_test/resources/96/gtk-goto-first-ltr.png new file mode 100644 index 0000000..ed710d1 Binary files /dev/null and b/doc/gui_test/resources/96/gtk-goto-first-ltr.png differ diff --git a/doc/gui_test/resources/96/gtk-goto-last-ltr.png b/doc/gui_test/resources/96/gtk-goto-last-ltr.png new file mode 100644 index 0000000..c337a0b Binary files /dev/null and b/doc/gui_test/resources/96/gtk-goto-last-ltr.png differ diff --git a/doc/gui_test/resources/96/gtk-revert-to-saved-ltr.png b/doc/gui_test/resources/96/gtk-revert-to-saved-ltr.png new file mode 100644 index 0000000..58e62c1 Binary files /dev/null and b/doc/gui_test/resources/96/gtk-revert-to-saved-ltr.png differ diff --git a/doc/gui_test/resources/96/gtk-revert-to-saved-rtl.png b/doc/gui_test/resources/96/gtk-revert-to-saved-rtl.png new file mode 100644 index 0000000..58e62c1 Binary files /dev/null and b/doc/gui_test/resources/96/gtk-revert-to-saved-rtl.png differ diff --git a/doc/gui_test/resources/96/gtk-save.png b/doc/gui_test/resources/96/gtk-save.png new file mode 100644 index 0000000..e29f13e Binary files /dev/null and b/doc/gui_test/resources/96/gtk-save.png differ diff --git a/doc/gui_test/resources/96/gtk-undo-ltr.png b/doc/gui_test/resources/96/gtk-undo-ltr.png new file mode 100644 index 0000000..e879b42 Binary files /dev/null and b/doc/gui_test/resources/96/gtk-undo-ltr.png differ diff --git a/doc/gui_test/resources/96/object-rotate-left.png b/doc/gui_test/resources/96/object-rotate-left.png new file mode 100644 index 0000000..927abf5 Binary files /dev/null and b/doc/gui_test/resources/96/object-rotate-left.png differ diff --git a/doc/gui_test/resources/96/object-rotate-right.png b/doc/gui_test/resources/96/object-rotate-right.png new file mode 100644 index 0000000..ab21f3e Binary files /dev/null and b/doc/gui_test/resources/96/object-rotate-right.png differ diff --git a/doc/gui_test/resources/96/reload.png b/doc/gui_test/resources/96/reload.png new file mode 100644 index 0000000..502394b Binary files /dev/null and b/doc/gui_test/resources/96/reload.png differ diff --git a/doc/gui_test/resources/96/rotate.png b/doc/gui_test/resources/96/rotate.png new file mode 100644 index 0000000..ab21f3e Binary files /dev/null and b/doc/gui_test/resources/96/rotate.png differ diff --git a/doc/gui_test/resources/96/stock_bottom.png b/doc/gui_test/resources/96/stock_bottom.png new file mode 100644 index 0000000..bf1949d Binary files /dev/null and b/doc/gui_test/resources/96/stock_bottom.png differ diff --git a/doc/gui_test/resources/96/stock_mail-send-receive.png b/doc/gui_test/resources/96/stock_mail-send-receive.png new file mode 100644 index 0000000..5be2a73 Binary files /dev/null and b/doc/gui_test/resources/96/stock_mail-send-receive.png differ diff --git a/doc/gui_test/resources/96/view-refresh96.png b/doc/gui_test/resources/96/view-refresh96.png new file mode 100644 index 0000000..502394b Binary files /dev/null and b/doc/gui_test/resources/96/view-refresh96.png differ diff --git a/doc/gui_test/resources/bikeinfo.xml b/doc/gui_test/resources/bikeinfo.xml new file mode 100644 index 0000000..202cade --- /dev/null +++ b/doc/gui_test/resources/bikeinfo.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/gui_test/resources/bionx_akku.png b/doc/gui_test/resources/bionx_akku.png new file mode 100644 index 0000000..8db8b73 Binary files /dev/null and b/doc/gui_test/resources/bionx_akku.png differ diff --git a/doc/gui_test/resources/bionx_console.png b/doc/gui_test/resources/bionx_console.png new file mode 100644 index 0000000..024b333 Binary files /dev/null and b/doc/gui_test/resources/bionx_console.png differ diff --git a/doc/gui_test/resources/bionx_motor.png b/doc/gui_test/resources/bionx_motor.png new file mode 100644 index 0000000..ea1c69f Binary files /dev/null and b/doc/gui_test/resources/bionx_motor.png differ diff --git a/doc/gui_test/resources/connect.png b/doc/gui_test/resources/connect.png new file mode 100644 index 0000000..e0c1571 Binary files /dev/null and b/doc/gui_test/resources/connect.png differ diff --git a/doc/gui_test/resources/connected.png b/doc/gui_test/resources/connected.png new file mode 100644 index 0000000..43d40b9 Binary files /dev/null and b/doc/gui_test/resources/connected.png differ diff --git a/doc/gui_test/resources/disconnected.png b/doc/gui_test/resources/disconnected.png new file mode 100644 index 0000000..6a7e035 Binary files /dev/null and b/doc/gui_test/resources/disconnected.png differ diff --git a/doc/gui_test/resources/document-import.png b/doc/gui_test/resources/document-import.png new file mode 100644 index 0000000..662b134 Binary files /dev/null and b/doc/gui_test/resources/document-import.png differ diff --git a/doc/gui_test/resources/document-revert.png b/doc/gui_test/resources/document-revert.png new file mode 100644 index 0000000..fb38bd5 Binary files /dev/null and b/doc/gui_test/resources/document-revert.png differ diff --git a/doc/gui_test/resources/document-save-as.png b/doc/gui_test/resources/document-save-as.png new file mode 100644 index 0000000..3f4641f Binary files /dev/null and b/doc/gui_test/resources/document-save-as.png differ diff --git a/doc/gui_test/resources/document-save.png b/doc/gui_test/resources/document-save.png new file mode 100644 index 0000000..f412793 Binary files /dev/null and b/doc/gui_test/resources/document-save.png differ diff --git a/doc/gui_test/resources/exit.png b/doc/gui_test/resources/exit.png new file mode 100644 index 0000000..8f2d4e6 Binary files /dev/null and b/doc/gui_test/resources/exit.png differ diff --git a/doc/gui_test/resources/go-first.png b/doc/gui_test/resources/go-first.png new file mode 100644 index 0000000..c271161 Binary files /dev/null and b/doc/gui_test/resources/go-first.png differ diff --git a/doc/gui_test/resources/go-jump.png b/doc/gui_test/resources/go-jump.png new file mode 100644 index 0000000..e2002d6 Binary files /dev/null and b/doc/gui_test/resources/go-jump.png differ diff --git a/doc/gui_test/resources/go-last.png b/doc/gui_test/resources/go-last.png new file mode 100644 index 0000000..85ed476 Binary files /dev/null and b/doc/gui_test/resources/go-last.png differ diff --git a/doc/gui_test/resources/gui_test.qss b/doc/gui_test/resources/gui_test.qss new file mode 100644 index 0000000..7b0203f --- /dev/null +++ b/doc/gui_test/resources/gui_test.qss @@ -0,0 +1,137 @@ +/* appqss */ + +/* Alle QWidgets bekommen diesen Font */ +QWidget +{ + font-size: 14px; + font-family: Segoe UI, sans-serif; +} + +QMainWindow +{ + background-color: white; +} + +/* Style für _buttonWidget */ +#_buttonWidget { + background-color: #e0e0e0; + border: 1px solid #b0b0b0; + border-radius: 8px; +} + +/* Style für _stackedWidget */ +#_stackedWidget { + background-color: #e0e0e0; + border: 1px solid #b0b0b0; + border-radius: 8px; +} + +/* Spezifisches Styling für Buttons */ +QPushButton +{ + background-color: #0078d7; + color: white; + border-radius: 4px; + padding: 6px; +} + +QPushButton:hover +{ + background-color: #1084e3; +} + +QPushButton:pressed +{ + background-color: #005a9e; +} + +/* Normal */ +QToolButton { + background-color: transparent; + border: 1px solid transparent; + border-radius: 4px; + padding: 4px; +} + +/* Hover */ +QToolButton:hover { + background-color: #E3F2FD; + border: 1px solid #2196F3; +} + +/* Pressed/Clicked */ +QToolButton:pressed { + background-color: #BBDEFB; +} + +/* Checked (bei checkable buttons) */ +QToolButton:checked { + background-color: #2196F3; + color: white; +} + +/* Checked + Hover */ +QToolButton:checked:hover { + background-color: #1976D2; +} + +/* Disabled */ +QToolButton:disabled { + color: #BDBDBD; + background-color: transparent; +} + +/* Styling anhand von Objektnamen (ID) */ +#loginButton +{ + font-weight: bold; + background-color: green; +} + +QListView +{ + background-color: #404142; + border-radius: 8px; + 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/doc/gui_test/resources/important.png b/doc/gui_test/resources/important.png new file mode 100644 index 0000000..f162ee5 Binary files /dev/null and b/doc/gui_test/resources/important.png differ diff --git a/doc/gui_test/resources/restart.png b/doc/gui_test/resources/restart.png new file mode 100644 index 0000000..2136f49 Binary files /dev/null and b/doc/gui_test/resources/restart.png differ diff --git a/doc/gui_test/resources/splash.pdn b/doc/gui_test/resources/splash.pdn new file mode 100644 index 0000000..88e2808 Binary files /dev/null and b/doc/gui_test/resources/splash.pdn differ diff --git a/doc/gui_test/resources/splash.png b/doc/gui_test/resources/splash.png new file mode 100644 index 0000000..ca74553 Binary files /dev/null and b/doc/gui_test/resources/splash.png differ