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

62 lines
1.4 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 SWDIALCONTROL_H
#define SWDIALCONTROL_H
#include <QButtonGroup>
#include <swbasecontrol.h>
#include <swsetupcontrol.h>
/**
* @brief Basisklasse für Controls, die über eine eigene Benutzeroberfläche verfügen.
*
* Die einzelnen Kind-elemente (Buttons, Switches, Digits ...) können per DialControl angesteuert
* und ausgelöst werden werden.
*/
class SWDialControl : public SWBaseControl
{
Q_OBJECT
public:
explicit SWDialControl( QWidget* parent, QSettings* settings );
virtual ~SWDialControl() = default;
public slots:
void onDialPushed() override;
void onDialDeltaChanged( int delta ) override;
virtual void onWidgetClicked( SWDialWidget* ) = 0;
protected:
void collectDialWidgets();
SWDialWidget& current();
using SWDialList = QVector<SWDialWidget*>;
SWDialList _dialWidgets;
int _crntIdx = -1;
};
#endif // SWDIALCONTROL_H