2016-02-23 23:16:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <obs.hpp>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <vector>
|
2020-03-25 08:07:22 +00:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QPointer>
|
2016-02-23 23:16:51 +00:00
|
|
|
|
|
|
|
class OBSAdvAudioCtrl;
|
|
|
|
class QGridLayout;
|
|
|
|
|
|
|
|
// "Basic advanced audio"? ...
|
|
|
|
|
|
|
|
class OBSBasicAdvAudio : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
|
|
|
QWidget *controlArea;
|
|
|
|
QGridLayout *mainLayout;
|
2020-03-25 08:07:22 +00:00
|
|
|
QPointer<QCheckBox> activeOnly;
|
2020-10-01 20:15:25 +00:00
|
|
|
QPointer<QCheckBox> usePercent;
|
2016-02-23 23:16:51 +00:00
|
|
|
OBSSignal sourceAddedSignal;
|
|
|
|
OBSSignal sourceRemovedSignal;
|
2020-03-25 08:07:22 +00:00
|
|
|
bool showInactive;
|
|
|
|
bool showVisible;
|
2016-02-23 23:16:51 +00:00
|
|
|
|
2019-09-22 21:19:10 +00:00
|
|
|
std::vector<OBSAdvAudioCtrl *> controls;
|
2016-02-23 23:16:51 +00:00
|
|
|
|
|
|
|
inline void AddAudioSource(obs_source_t *source);
|
|
|
|
|
|
|
|
static bool EnumSources(void *param, obs_source_t *source);
|
|
|
|
|
|
|
|
static void OBSSourceAdded(void *param, calldata_t *calldata);
|
|
|
|
static void OBSSourceRemoved(void *param, calldata_t *calldata);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void SourceAdded(OBSSource source);
|
|
|
|
void SourceRemoved(OBSSource source);
|
|
|
|
|
2020-10-01 20:15:25 +00:00
|
|
|
void SetVolumeType(bool percent);
|
2020-03-25 08:07:22 +00:00
|
|
|
void ActiveOnlyChanged(bool checked);
|
|
|
|
|
2016-02-23 23:16:51 +00:00
|
|
|
public:
|
|
|
|
OBSBasicAdvAudio(QWidget *parent);
|
|
|
|
~OBSBasicAdvAudio();
|
2020-03-25 08:07:22 +00:00
|
|
|
void SetShowInactive(bool showInactive);
|
|
|
|
void SetIconsVisible(bool visible);
|
2016-02-23 23:16:51 +00:00
|
|
|
};
|