first re-commit.
This commit is contained in:
53
swbuttongroup.h
Normal file
53
swbuttongroup.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
|
||||
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 SWBUTTONGROUP_H
|
||||
#define SWBUTTONGROUP_H
|
||||
|
||||
#include <QButtonGroup>
|
||||
#include <QObject>
|
||||
#include <swdialhandler.h>
|
||||
|
||||
|
||||
class SWRadioButton;
|
||||
|
||||
|
||||
class SWDialButtonGroup : public QButtonGroup, public SWDialHandler
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
explicit SWDialButtonGroup(QObject *parent = nullptr);
|
||||
|
||||
|
||||
void addKeyButton( SWRadioButton* button, int id, const QString& key );
|
||||
SWRadioButton& buttonAt( int id );
|
||||
|
||||
void setCurrentActiveId( int newID );
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onDialPushed() override;
|
||||
void onDialDeltaChanged( int delta ) override;
|
||||
|
||||
protected:
|
||||
|
||||
int _checkedID = -1; // die aktive, ge-checkte id
|
||||
int _hoverdID = -1; // die vom Dial ge-hoverte id
|
||||
|
||||
};
|
||||
|
||||
#endif // SWBUTTONGROUP_H
|
Reference in New Issue
Block a user