#ifndef LINBOOSSELECTIONROW_H
#define LINBOOSSELECTIONROW_H
#include <QObject>
#include <QWidget>
#include <Q3ButtonGroup>
#include "linbobackend.h"
#include "linboosselectbutton.h"
class LinboOsSelectionRow : public QWidget
{
Q_OBJECT
public:
explicit LinboOsSelectionRow(LinboBackend* backend, QWidget *parent = nullptr);
LinboOs* getSelectedOs();
void setShowOnlySelectedButton(bool value);
protected:
void resizeEvent(QResizeEvent *event) override;
private:
LinboBackend* backend;
QList<LinboOsSelectButton*> osButtons;
QButtonGroup* osButtonGroup;
bool showOnlySelectedButton;
private slots:
void resizeAndPositionAllButtons();
void handleButtonToggled(bool checked);
void handleLinboStateChanged(LinboBackend::LinboState newState);
signals:
void selectedOsChanged();
};
#endif // LINBOOSSELECTIONROW_H