/*************************************************************************** source::worx libWidgets Copyright © 2021-2022 c.holzheuer c.holzheuer@sourceworx.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ***************************************************************************/ #ifndef SWSIDEBAR_H #define SWSIDEBAR_H #include #include #include #include class LIBMINICASH_EXPORT SWSideBar : public QFrame { Q_OBJECT public: explicit SWSideBar( QWidget *parent = nullptr ); virtual ~SWSideBar(); void appendAction( QAction* action ); void appendAction( const QIcon &icon, const QString &text = "" ); void setCheckedAction( QAction* action ); QSize minimumSizeHint() const; signals: public slots: //void koo(); protected: void paintEvent( QPaintEvent *event ); void mousePressEvent( QMouseEvent *event ); void mouseReleaseEvent( QMouseEvent *event ); void mouseMoveEvent( QMouseEvent *event ); void leaveEvent( QEvent * event ); QAction* actionAt( const QPoint &at ); static const int SWACTIONHEIGHT = 108; const QColor _hoveredColor = QColor( 150, 150, 150 ); const QColor _checkedColor = QColor( 55, 55, 55 ); QAction* _hoveredAction = nullptr; QAction* _pressedAction = nullptr; QAction* _checkedAction = nullptr; }; #endif // SWSIDEBAR_H