Minor changes such as parameter warnings, added metatype registration for voice

refs #81
This commit is contained in:
Klaus Basan
2013-12-08 17:05:25 +01:00
committed by Mathew Sutcliffe
parent db4a3c5de4
commit 0c01da4c8e
9 changed files with 48 additions and 13 deletions

View File

@@ -85,14 +85,14 @@ void Client::exit(QTextStream &)
emit quit(); emit quit();
} }
void Client::squelchTestCmd(QTextStream &args) void Client::squelchTestCmd(QTextStream & /** args **/)
{ {
std::cout << "Running squelch test. Please be quiet for 5 seconds..." << std::endl; std::cout << "Running squelch test. Please be quiet for 5 seconds..." << std::endl;
printLinePrefix(); printLinePrefix();
m_voiceClient->runSquelchTest(); m_voiceClient->runSquelchTest();
} }
void Client::micTestCmd(QTextStream &args) void Client::micTestCmd(QTextStream & /** args **/)
{ {
std::cout << "Running mic test. Speak normally for 5 seconds..." << std::endl; std::cout << "Running mic test. Speak normally for 5 seconds..." << std::endl;
printLinePrefix(); printLinePrefix();
@@ -116,27 +116,27 @@ void Client::initiateConnectionCmd(QTextStream &args)
printLinePrefix(); printLinePrefix();
} }
void Client::terminateConnectionCmd(QTextStream &args) void Client::terminateConnectionCmd(QTextStream & /** args **/)
{ {
std::cout << "Leaving room." << std::endl; std::cout << "Leaving room." << std::endl;
m_voiceClient->leaveVoiceRoom(BlackCore::IVoiceClient::COM1); m_voiceClient->leaveVoiceRoom(BlackCore::IVoiceClient::COM1);
printLinePrefix(); printLinePrefix();
} }
void Client::inputDevicesCmd(QTextStream &args) void Client::inputDevicesCmd(QTextStream & /** args **/)
{ {
QList<BlackMisc::Voice::CInputAudioDevice> devices = m_voiceClient->audioInputDevices(); QList<BlackMisc::Voice::CInputAudioDevice> devices = m_voiceClient->audioInputDevices();
foreach (BlackMisc::Voice::CInputAudioDevice device, devices) foreach(BlackMisc::Voice::CInputAudioDevice device, devices)
{ {
std::cout << device.name().toStdString() << std::endl; std::cout << device.name().toStdString() << std::endl;
} }
printLinePrefix(); printLinePrefix();
} }
void Client::outputDevicesCmd(QTextStream &args) void Client::outputDevicesCmd(QTextStream & /** args **/)
{ {
QList<BlackMisc::Voice::COutputAudioDevice> devices = m_voiceClient->audioOutputDevices(); QList<BlackMisc::Voice::COutputAudioDevice> devices = m_voiceClient->audioOutputDevices();
foreach (BlackMisc::Voice::COutputAudioDevice device, devices) foreach(BlackMisc::Voice::COutputAudioDevice device, devices)
{ {
std::cout << " " << device.name().toStdString() << std::endl; std::cout << " " << device.name().toStdString() << std::endl;
} }
@@ -147,7 +147,7 @@ void Client::listUsersCmd(QTextStream &args)
{ {
Q_UNUSED(args) Q_UNUSED(args)
QSet<QString> users = m_voiceClient->roomUserList(BlackCore::IVoiceClient::COM1); QSet<QString> users = m_voiceClient->roomUserList(BlackCore::IVoiceClient::COM1);
foreach (QString user, users) foreach(QString user, users)
{ {
std::cout << " " << user.toStdString() << std::endl; std::cout << " " << user.toStdString() << std::endl;
} }
@@ -166,7 +166,7 @@ void Client::onMicTestFinished()
printLinePrefix(); printLinePrefix();
} }
void Client::connectionStatusConnected(const BlackCore::IVoiceClient::ComUnit comUnit) void Client::connectionStatusConnected(const BlackCore::IVoiceClient::ComUnit /** comUnit **/)
{ {
std::cout << "CONN_STATUS_CONNECTED" << std::endl; std::cout << "CONN_STATUS_CONNECTED" << std::endl;
printLinePrefix(); printLinePrefix();

View File

@@ -470,7 +470,7 @@ namespace BlackCore
cbvar_cast(cbVar)->m_outputDevices.append(outputDevice); cbvar_cast(cbVar)->m_outputDevices.append(outputDevice);
} }
void CVoiceClientVatlib::addUserInRoom(const ComUnit comUnit, const QString &callsign) void CVoiceClientVatlib::addUserInRoom(const ComUnit /** comUnit **/, const QString &callsign)
{ {
m_voiceRoomUsersUpdate.insert(callsign); m_voiceRoomUsersUpdate.insert(callsign);
} }

View File

@@ -21,7 +21,8 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \
translations/blackmisc_i18n_en.ts translations/blackmisc_i18n_en.ts
HEADERS += *.h \ HEADERS += *.h \
vaudiodevice.h vaudiodevice.h \
voiceallclasses.h
SOURCES += *.cpp SOURCES += *.cpp
DESTDIR = ../../lib DESTDIR = ../../lib
OTHER_FILES += $$TRANSLATIONS readme.txt OTHER_FILES += $$TRANSLATIONS readme.txt

View File

@@ -14,5 +14,6 @@
#include "blackmisc/networkallclasses.h" #include "blackmisc/networkallclasses.h"
#include "blackmisc/statusmessages.h" #include "blackmisc/statusmessages.h"
#include "blackmisc/statusmessage.h" #include "blackmisc/statusmessage.h"
#include "blackmisc/voiceallclasses.h"
#endif // guard #endif // guard

View File

@@ -11,6 +11,8 @@
#include "networkallclasses.h" #include "networkallclasses.h"
#include "settingsallclasses.h" #include "settingsallclasses.h"
#include "valuemap.h" #include "valuemap.h"
#include "statusmessages.h"
#include "voiceallclasses.h"
/* /*
* Metadata for PQs * Metadata for PQs
@@ -94,6 +96,16 @@ void BlackMisc::Settings::registerMetadata()
CSettingsNetwork::registerMetadata(); CSettingsNetwork::registerMetadata();
} }
/*
* Metadata for Voice
*/
void BlackMisc::Voice::registerMetadata()
{
COutputAudioDevice::registerMetadata();
CInputAudioDevice::registerMetadata();
CVoiceRoom::registerMetadata();
}
/* /*
* Metadata for Blackmisc * Metadata for Blackmisc
*/ */
@@ -110,6 +122,7 @@ void BlackMisc::registerMetadata()
Geo::registerMetadata(); Geo::registerMetadata();
Network::registerMetadata(); Network::registerMetadata();
Settings::registerMetadata(); Settings::registerMetadata();
Voice::registerMetadata();
} }
/* /*

View File

@@ -89,6 +89,14 @@ namespace BlackMisc
void registerMetadata(); void registerMetadata();
} }
namespace Voice
{
/*!
* \brief Registe metadata for settings
*/
void registerMetadata();
}
/*! /*!
* \brief Register all relevant metadata in BlackMisc * \brief Register all relevant metadata in BlackMisc
*/ */

View File

@@ -52,7 +52,7 @@ namespace BlackMisc
qDBusRegisterMetaType<CAudioDevice>(); qDBusRegisterMetaType<CAudioDevice>();
} }
QString CAudioDevice::convertToQString(bool i18n) const QString CAudioDevice::convertToQString(bool /* i18n */) const
{ {
return m_deviceName; return m_deviceName;
} }

View File

@@ -0,0 +1,12 @@
/* Copyright (C) 2013 VATSIM Community / contributors
* 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/. */
#ifndef BLACKMISC_VOICEALLCLASSES_H
#define BLACKMISC_VOICEALLCLASSES_H
#include "blackmisc/vaudiodevice.h"
#include "blackmisc/vvoiceroom.h"
#endif // guard

View File

@@ -68,7 +68,7 @@ namespace BlackMisc
qDBusRegisterMetaType<CVoiceRoom>(); qDBusRegisterMetaType<CVoiceRoom>();
} }
QString CVoiceRoom::convertToQString(bool i18n) const QString CVoiceRoom::convertToQString(bool /* i18n */ ) const
{ {
if (m_hostname.isEmpty() || m_channel.isEmpty()) return "Unknown"; if (m_hostname.isEmpty() || m_channel.isEmpty()) return "Unknown";
QString s = m_hostname; QString s = m_hostname;