mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #369, fixed / adjusted testing and samples
* changed from qDebug() to QTextStream * setter for voice room * set fake voice room URL, otherwise no nonger displayed in GUI
This commit is contained in:
@@ -160,6 +160,9 @@ namespace BlackMisc
|
||||
//! Set voice room
|
||||
void setVoiceRoom(const BlackMisc::Audio::CVoiceRoom &voiceRoom) { this->m_voiceRoom = voiceRoom; }
|
||||
|
||||
//! Set voice room URL
|
||||
void setVoiceRoomUrl(const QString &url) { this->m_voiceRoom.setVoiceRoomUrl(url); }
|
||||
|
||||
//! Valid voice room?
|
||||
bool hasValidVoiceRoom() const { return this->m_voiceRoom.isValid(); }
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace BlackMisc
|
||||
const QDateTime dtUntil = dtFrom.addSecs(60 * 60.0); // 1 hour
|
||||
const CUser user(id, usr);
|
||||
|
||||
CAtcStation station;
|
||||
if (byPropertyIndex)
|
||||
{
|
||||
CAtcStation station;
|
||||
station.setPropertyByIndex(CCallsign(cs).toCVariant(), CAtcStation::IndexCallsign);
|
||||
station.setPropertyByIndex(user.toCVariant(), CAtcStation::IndexController);
|
||||
station.setPropertyByIndex(CFrequency(f, CFrequencyUnit::MHz()).toCVariant(), CAtcStation::IndexFrequency);
|
||||
@@ -56,16 +56,17 @@ namespace BlackMisc
|
||||
station.setPropertyByIndex(CVariant::from(dtFrom), CAtcStation::IndexBookedFrom);
|
||||
station.setPropertyByIndex(CVariant::from(dtUntil), CAtcStation::IndexBookedUntil);
|
||||
station.setPropertyByIndex(CLength(index + 1, CLengthUnit::NM()).toCVariant(), CAtcStation::IndexDistanceToOwnAircraft);
|
||||
return station;
|
||||
}
|
||||
else
|
||||
{
|
||||
CAtcStation station(CCallsign(cs), user,
|
||||
CFrequency(f, CFrequencyUnit::MHz()),
|
||||
geoPos, CLength(50, CLengthUnit::km()), false, dtFrom, dtUntil);
|
||||
station = CAtcStation(CCallsign(cs), user,
|
||||
CFrequency(f, CFrequencyUnit::MHz()),
|
||||
geoPos, CLength(50, CLengthUnit::km()), false, dtFrom, dtUntil);
|
||||
station.setDistanceToOwnAircraft(CLength(index + 1, CLengthUnit::NM()));
|
||||
return station;
|
||||
}
|
||||
|
||||
station.setVoiceRoomUrl("vvl://foo.bar.baz/room" + QString::number(index));
|
||||
return station;
|
||||
}
|
||||
|
||||
void CTesting::readStations(const CAtcStationList &stations, bool byPropertyIndex)
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace BlackMisc
|
||||
QString url = serverUrl.trimmed().toLower();
|
||||
url.replace(CVoiceRoom::protocolComplete(), "");
|
||||
url.replace(CVoiceRoom::protocol(), "");
|
||||
QStringList splitParts = serverUrl.split("/");
|
||||
QStringList splitParts = url.split("/");
|
||||
m_hostname = splitParts.at(0);
|
||||
m_channel = splitParts.at(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user