2014-12-28 00:38:00 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <obs.hpp>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <vector>
|
2019-12-26 10:20:12 -08:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QPointer>
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
class OBSAdvAudioCtrl;
|
2015-02-11 07:49:12 -08:00
|
|
|
class QGridLayout;
|
2014-12-28 00:38:00 -08:00
|
|
|
|
|
|
|
// "Basic advanced audio"? ...
|
|
|
|
|
|
|
|
class OBSBasicAdvAudio : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
|
|
|
QWidget *controlArea;
|
2015-02-11 07:49:12 -08:00
|
|
|
QGridLayout *mainLayout;
|
2019-12-26 10:20:12 -08:00
|
|
|
QPointer<QCheckBox> activeOnly;
|
2014-12-28 00:38:00 -08:00
|
|
|
OBSSignal sourceAddedSignal;
|
|
|
|
OBSSignal sourceRemovedSignal;
|
2019-12-26 10:20:12 -08:00
|
|
|
bool showInactive;
|
2020-01-25 03:48:38 -08:00
|
|
|
bool showVisible;
|
2014-12-28 00:38:00 -08:00
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
std::vector<OBSAdvAudioCtrl *> controls;
|
2014-12-28 00:38:00 -08: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);
|
|
|
|
|
2019-09-12 00:13:19 -07:00
|
|
|
void ShowContextMenu(const QPoint &pos);
|
|
|
|
void SetVolumeType();
|
2019-12-26 10:20:12 -08:00
|
|
|
void ActiveOnlyChanged(bool checked);
|
2019-09-12 00:13:19 -07:00
|
|
|
|
2014-12-28 00:38:00 -08:00
|
|
|
public:
|
|
|
|
OBSBasicAdvAudio(QWidget *parent);
|
2015-02-13 03:41:12 -08:00
|
|
|
~OBSBasicAdvAudio();
|
2019-12-26 10:20:12 -08:00
|
|
|
void SetShowInactive(bool showInactive);
|
2020-01-25 03:48:38 -08:00
|
|
|
void SetIconsVisible(bool visible);
|
2014-12-28 00:38:00 -08:00
|
|
|
};
|