Ongoing GUI updates.
This commit is contained in:
@@ -36,10 +36,16 @@
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <bcdriver.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief Einfaches Buttonwidget, um zwischen Dark- und Lightmode
|
||||
* zu wechseln
|
||||
*/
|
||||
|
||||
class BCThemeSwitchButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -47,6 +53,7 @@ class BCThemeSwitchButton : public QPushButton
|
||||
public:
|
||||
|
||||
explicit BCThemeSwitchButton(QWidget *parent = nullptr);
|
||||
void setDarkMode( bool isDark );
|
||||
|
||||
signals:
|
||||
|
||||
@@ -54,13 +61,13 @@ signals:
|
||||
|
||||
private slots:
|
||||
|
||||
void toggle();
|
||||
void toggleMode();
|
||||
|
||||
private:
|
||||
|
||||
void updateIcon();
|
||||
|
||||
bool _isDarkMode;
|
||||
bool _isDarkMode{false};
|
||||
|
||||
};
|
||||
|
||||
@@ -70,6 +77,11 @@ private:
|
||||
/// -----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* @brief Einfaches Widget, um den Zustand des TinyCan Native
|
||||
* Drivers anzuzeigen.
|
||||
*/
|
||||
|
||||
class BCDriverStateWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -84,12 +96,16 @@ public slots:
|
||||
// 'customMessage' ist optional. Wenn leer, wird ein Standardtext genommen.
|
||||
void onDriverStateChanged(BCDriver::DriverState state, const QString& customMessage = QString());
|
||||
|
||||
private:
|
||||
signals:
|
||||
|
||||
void clicked();
|
||||
|
||||
protected:
|
||||
|
||||
void updateStyle();
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
|
||||
QLabel* _led;
|
||||
QLabel* _label;
|
||||
BCDriver::DriverState _state;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user