Files
raDIYo/swradiobutton.h
2025-08-05 22:36:00 +02:00

56 lines
1.2 KiB
C++

/***************************************************************************
source::worx raDIYo
Copyright © 2020-2022 c.holzheuer
chris@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 SWRADIOBUTTON_H
#define SWRADIOBUTTON_H
#include <QPushButton>
#include <QDebug>
#include <swdialwidget.h>
/**
* @brief Ein QPushButtonder der sich programmatisch 'hovern'
* und per RotaryControl bedienen lässt.
*
* @see QPushButton,
* @see SWDialWidget
*/
class SWRadioButton : public QPushButton
{
Q_OBJECT
public:
explicit SWRadioButton( QWidget* parent = nullptr );
virtual ~SWRadioButton() = default;
virtual void setKey( const QString& key );
virtual void unHover();
virtual void hover();
protected:
constexpr static const char* const ButtonIcon = ":/images/radiyo.%1.checked.png";
QString _hoverStyle;
};
#endif // SWRADIOBUTTON_H