mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +08:00
Changed audio settings to CVariant after merge with master
This commit is contained in:
@@ -158,7 +158,7 @@ namespace BlackMisc
|
|||||||
/*
|
/*
|
||||||
* Value
|
* Value
|
||||||
*/
|
*/
|
||||||
BlackMisc::CStatusMessageList CSettingsAudio::value(const QString &path, const QString &command, const QVariant &value, bool &changedFlag)
|
BlackMisc::CStatusMessageList CSettingsAudio::value(const QString &path, const QString &command, const CVariant &value, bool &changedFlag)
|
||||||
{
|
{
|
||||||
// TODO: This needs to be refactored to a smarter way to delegate commands
|
// TODO: This needs to be refactored to a smarter way to delegate commands
|
||||||
changedFlag = false;
|
changedFlag = false;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace BlackMisc
|
|||||||
bool operator !=(const CSettingsAudio &other) const;
|
bool operator !=(const CSettingsAudio &other) const;
|
||||||
|
|
||||||
//! \copydoc BlackCore::IContextSettings
|
//! \copydoc BlackCore::IContextSettings
|
||||||
virtual BlackMisc::CStatusMessageList value(const QString &path, const QString &command, const QVariant &value, bool &changedFlag);
|
virtual BlackMisc::CStatusMessageList value(const QString &path, const QString &command, const BlackMisc::CVariant &value, bool &changedFlag);
|
||||||
|
|
||||||
//! \copydoc CValueObject::getValueHash
|
//! \copydoc CValueObject::getValueHash
|
||||||
virtual uint getValueHash() const override;
|
virtual uint getValueHash() const override;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define BLACKMISC_VARIANT_H
|
#define BLACKMISC_VARIANT_H
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
class QDBusArgument;
|
class QDBusArgument;
|
||||||
|
|
||||||
@@ -104,6 +105,15 @@ namespace BlackMisc
|
|||||||
//! Convert this variant to a bool.
|
//! Convert this variant to a bool.
|
||||||
bool toBool() const { return m_v.toBool(); }
|
bool toBool() const { return m_v.toBool(); }
|
||||||
|
|
||||||
|
//! Convert this variant to an integer.
|
||||||
|
int toInt() const { return m_v.toInt(); }
|
||||||
|
|
||||||
|
//! Convert this variant to double.
|
||||||
|
double toDouble() const { return m_v.toDouble(); }
|
||||||
|
|
||||||
|
//! Convert this variant to QDateTime.
|
||||||
|
QDateTime toDateTime() const { return m_v.toDateTime(); }
|
||||||
|
|
||||||
//! Set the variant to null.
|
//! Set the variant to null.
|
||||||
void clear() { m_v.clear(); }
|
void clear() { m_v.clear(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user