mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
25 lines
469 B
C++
25 lines
469 B
C++
#pragma once
|
|
|
|
#include <QCheckBox>
|
|
|
|
class MuteCheckBox : public QCheckBox {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MuteCheckBox(QWidget *parent = nullptr) : QCheckBox(parent)
|
|
{
|
|
setTristate(true);
|
|
}
|
|
|
|
protected:
|
|
/* While we need it to be tristate internally, we don't want a user being
|
|
* able to manually get into the partial state. */
|
|
void nextCheckState() override
|
|
{
|
|
if (checkState() != Qt::Checked)
|
|
setCheckState(Qt::Checked);
|
|
else
|
|
setCheckState(Qt::Unchecked);
|
|
}
|
|
};
|