This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
modern-linbo-gui/headers/linboosselectionrow.h

40 lines
870 B
C
Raw Normal View History

#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