refs #288, formatting, minor tweaks, utility methods, tabstops

This commit is contained in:
Klaus Basan
2014-11-15 01:18:35 +01:00
committed by Roland Winklmeier
parent 86167e14c5
commit 5ff28cb3a1
8 changed files with 45 additions and 11 deletions

View File

@@ -119,6 +119,7 @@ namespace BlackCore
signals:
//! Settings have been changed
//! \sa IContextSettings::SettingsType
void changedSettings(uint type);
public slots:

View File

@@ -230,7 +230,7 @@ namespace BlackCore
{
QMap<QString, QString> clientPartsMap = clientPartsToMap(currentLine, clientSectionAttributes);
CCallsign callsign = CCallsign(clientPartsMap["callsign"]);
if (callsign.isEmpty()) continue;
if (callsign.isEmpty()) break;
BlackMisc::Network::CUser user(clientPartsMap["cid"], clientPartsMap["realname"], callsign);
const QString clientType = clientPartsMap["clienttype"].toLower();
if (clientType.isEmpty()) break; // sometimes type is empty
@@ -300,7 +300,7 @@ namespace BlackCore
if (currentLine.contains("UPDATE"))
{
QStringList updateParts = currentLine.replace(" ", "").split('=');
if (updateParts.length() < 2) continue;
if (updateParts.length() < 2) break;
QString dts = updateParts.at(1).trimmed();
updateTimestampFromFile = QDateTime::fromString(dts, "yyyyMMddHHmmss");
updateTimestampFromFile.setOffsetFromUtc(0);
@@ -313,9 +313,10 @@ namespace BlackCore
{
// ident:hostname_or_IP:location:name:clients_connection_allowed:
QStringList fsdServerParts = currentLine.split(':');
if (fsdServerParts.size() < 4) continue;
if (!fsdServerParts.at(3).trimmed().contains('1')) continue; // allowed?
BlackMisc::Network::CServer fsdServer(fsdServerParts.at(0), fsdServerParts.at(2), fsdServerParts.at(1), 6809, CUser("id", "real name", "email", "password"));
if (fsdServerParts.size() < 5) break;
if (!fsdServerParts.at(4).trimmed().contains('1')) break; // allowed?
QString description(fsdServerParts.at(2)); // part(3) could be added
BlackMisc::Network::CServer fsdServer(fsdServerParts.at(0), description, fsdServerParts.at(1), 6809, CUser("id", "real name", "email", "password"));
fsdServers.push_back(fsdServer);
}
break;
@@ -323,8 +324,8 @@ namespace BlackCore
{
// hostname_or_IP:location:name:clients_connection_allowed:type_of_voice_server:
QStringList voiceServerParts = currentLine.split(':');
if (voiceServerParts.size() < 3) continue;
if (!voiceServerParts.at(3).trimmed().contains('1')) continue; // allowed?
if (voiceServerParts.size() < 3) break;
if (!voiceServerParts.at(3).trimmed().contains('1')) break; // allowed?
BlackMisc::Network::CServer voiceServer(voiceServerParts.at(1), voiceServerParts.at(2), voiceServerParts.at(0), -1, CUser());
voiceServers.push_back(voiceServer);
}

View File

@@ -27,7 +27,8 @@ namespace BlackGui
* Constructor
*/
CInfoWindowComponent::CInfoWindowComponent(QWidget *parent) :
QWizardPage(parent), ui(new Ui::InfoWindow)
QWizardPage(parent),
ui(new Ui::InfoWindow)
{
ui->setupUi(this);
this->hide();

View File

@@ -49,7 +49,6 @@ namespace BlackGui
//! Append status message to list
void appendStatusMessageToList(const BlackMisc::CStatusMessage &statusMessage);
private:
QScopedPointer<Ui::CLogComponent> ui;
};

View File

@@ -427,6 +427,26 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>le_CommandLineInput</tabstop>
<tabstop>pb_Connect</tabstop>
<tabstop>pb_MainAircrafts</tabstop>
<tabstop>pb_MainAtc</tabstop>
<tabstop>pb_MainUsers</tabstop>
<tabstop>pb_MainTextMessages</tabstop>
<tabstop>pb_MainSimulator</tabstop>
<tabstop>pb_MainFlightplan</tabstop>
<tabstop>pb_MainWeather</tabstop>
<tabstop>pb_MainMappings</tabstop>
<tabstop>pb_MainLog</tabstop>
<tabstop>pb_MainSettings</tabstop>
<tabstop>pb_MainCockpit</tabstop>
<tabstop>pb_CockpitIdent</tabstop>
<tabstop>pb_Opacity100</tabstop>
<tabstop>pb_Opacity050</tabstop>
<tabstop>pb_SoundMute</tabstop>
<tabstop>pb_SoundMaxVolume</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View File

@@ -94,10 +94,10 @@ namespace BlackGui
//! Select next right tab
void selectRightTab();
//! Display status message
//! Display status message in all info areas (according their state)
void displayStatusMessage(const BlackMisc::CStatusMessage &statusMessage);
//! Display status messages
//! Display status messages in all info areas (according their state)
void displayStatusMessages(const BlackMisc::CStatusMessageList &statusMessages);
protected:

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* 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 and at http://www.swift-project.org/license.html. 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.
*/
#include "setnetwork.h"
#include "blackcore/dbus_server.h"
#include "blackmisc/blackmiscfreefunctions.h"

View File

@@ -81,6 +81,9 @@ namespace BlackMisc
//! Message may already have been handled directly
bool isRedundant() const { return this->m_redundant; }
//! Info or debug, no warning or error
bool isSeverityInfoOrLess() const { return this->m_severity == SeverityInfo || this->m_severity == SeverityDebug; }
//! Mark the message as having been handled by the given object
void markAsHandledBy(const QObject *object) const;