mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-29 04:35:41 +08:00
Ref T731, UI components for notifications and volume/device
* changed version without voice rooms * notifications only * volume and devices
This commit is contained in:
committed by
Mat Sutcliffe
parent
b3cceaa76b
commit
74bea4959e
76
src/blackgui/components/audiodevicevolumesetupcomponent.h
Normal file
76
src/blackgui/components/audiodevicevolumesetupcomponent.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/* Copyright (C) 2019
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
||||
* or distributed except according to the terms contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_COMPONENTS_AUDIODEVICEVOLUMESETUPCOMPONENT_H
|
||||
#define BLACKGUI_COMPONENTS_AUDIODEVICEVOLUMESETUPCOMPONENT_H
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackmisc/audio/audiosettings.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QCheckBox>
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CAudioDeviceVolumeSetupComponent; }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
//! Audio setup such as input / output devices
|
||||
class BLACKGUI_EXPORT CAudioDeviceVolumeSetupComponent : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CAudioDeviceVolumeSetupComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CAudioDeviceVolumeSetupComponent() override;
|
||||
|
||||
private:
|
||||
//! Init
|
||||
void init();
|
||||
|
||||
//! Reload settings
|
||||
void reloadSettings();
|
||||
|
||||
//! Audio device selected
|
||||
//! \param index audio device index (COM1, COM2)
|
||||
void onAudioDeviceSelected(int index);
|
||||
|
||||
//! Current audio devices changed
|
||||
void onCurrentAudioDevicesChanged(const BlackMisc::Audio::CAudioDeviceInfoList &devices);
|
||||
|
||||
//! Audio devices changed
|
||||
void onAudioDevicesChanged(const BlackMisc::Audio::CAudioDeviceInfoList &devices);
|
||||
|
||||
//! Loopback toggled
|
||||
void onLoopbackToggled(bool loopback);
|
||||
|
||||
//! Notification flags toggled
|
||||
void onNotificationsToggled(bool checked);
|
||||
|
||||
//! Audio device lists from settings
|
||||
void initAudioDeviceLists();
|
||||
|
||||
//! Audio is optional, check if available
|
||||
bool hasAudio() const;
|
||||
|
||||
QScopedPointer<Ui::CAudioDeviceVolumeSetupComponent> ui;
|
||||
BlackMisc::CSetting<BlackMisc::Audio::TSettings> m_audioSettings { this, &CAudioDeviceVolumeSetupComponent::reloadSettings };
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user