26 lines
439 B
C++
26 lines
439 B
C++
#ifndef QRATIOBUTTON_H
|
|
#define QRATIOBUTTON_H
|
|
|
|
#include <QPushButton>
|
|
|
|
class QRatioButton : public QPushButton
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QRatioButton(const quint8 &row, const quint8 &column, QWidget *parent = nullptr);
|
|
|
|
virtual int heightForWidth(int w) const;
|
|
|
|
private:
|
|
void onButtonPressSignal();
|
|
|
|
quint8 row = 0;
|
|
quint8 column = 0;
|
|
|
|
signals:
|
|
void pressedRowColumn(const quint8 &row, const quint8 &column);
|
|
};
|
|
|
|
#endif // QRATIOBUTTON_H
|