Files
pilotclient/src/blackmisc/audiodevicelist.h
Klaus Basan 0d01c460b0 Formatting
2014-07-11 01:20:41 +02:00

60 lines
1.6 KiB
C++

/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*!
\file
*/
#ifndef BLACKMISC_AUDIODEVICELIST_H
#define BLACKMISC_AUDIODEVICELIST_H
#include "audiodevice.h"
#include "sequence.h"
#include "collection.h"
#include <QObject>
#include <QString>
#include <QList>
namespace BlackMisc
{
namespace Audio
{
/*!
* Value object encapsulating a list of audio devices.
*/
class CAudioDeviceList : public CSequence<CAudioDevice>
{
public:
//! Default constructor.
CAudioDeviceList();
//! Construct from a base class object.
CAudioDeviceList(const CSequence &other);
//! \copydoc CValueObject::toQVariant
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
//! Get output devices in that list
CAudioDeviceList getOutputDevices() const;
//! Get output devices in that list
CAudioDeviceList getInputDevices() const;
//! Count (as of type)
int count(CAudioDevice::DeviceType type) const;
//! Register metadata
static void registerMetadata();
};
} //namespace
} // namespace
Q_DECLARE_METATYPE(BlackMisc::Audio::CAudioDeviceList)
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Audio::CAudioDevice>)
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Audio::CAudioDevice>)
#endif //guard