Misc. imorvements as discussed in RW/KB worksho

* preparation for a context menu to send text messages from ATC/aircraft view
* preparation for context menu for fast pos. updates
* reverse ICAO lookup at login screen
* display fast updates / parts in GUI
* moved max- aircraft into settings
* made serverselection own component
This commit is contained in:
Klaus Basan
2015-03-15 20:02:08 +01:00
parent fb12c608b1
commit 79b3cf3cd3
42 changed files with 979 additions and 410 deletions

View File

@@ -55,6 +55,8 @@ namespace BlackMisc
return CVariant::fromValue(this->isRendered());
case IndexPartsSynchronized:
return CVariant::fromValue(this->isPartsSynchronized());
case IndexFastPositionUpdates:
return CVariant::fromValue(this->fastPositionUpdates());
default:
return CAircraft::propertyByIndex(index);
}
@@ -85,6 +87,9 @@ namespace BlackMisc
case IndexPartsSynchronized:
this->m_partsSynchronized = variant.toBool();
break;
case IndexFastPositionUpdates:
this->m_fastPositionUpdates = variant.toBool();
break;
default:
CAircraft::setPropertyByIndex(variant, index);
break;

View File

@@ -32,7 +32,8 @@ namespace BlackMisc
IndexClient,
IndexEnabled,
IndexRendered,
IndexPartsSynchronized
IndexPartsSynchronized,
IndexFastPositionUpdates
};
//! Default constructor.
@@ -85,6 +86,12 @@ namespace BlackMisc
//! Rendered?
bool isRendered() const { return m_rendered; }
//! Support fast position updates
bool fastPositionUpdates() const {return m_fastPositionUpdates;}
//! Support fast position updates
void setFastPositionUpdates(bool useFastPositions) { m_fastPositionUpdates = useFastPositions; }
//! Rendered?
void setRendered(bool rendered) { m_rendered = rendered; }
@@ -104,10 +111,12 @@ namespace BlackMisc
private:
BLACK_ENABLE_TUPLE_CONVERSION(CSimulatedAircraft)
BlackMisc::Simulation::CAircraftModel m_model;
BlackMisc::Network::CClient m_client;
bool m_enabled = true; // to be displayed in sim
bool m_rendered = false; // really shown in sim
bool m_partsSynchronized = false;
BlackMisc::Network::CClient m_client;
bool m_enabled = true; //!< to be displayed in sim
bool m_rendered = false; //!< really shown in simulator
bool m_partsSynchronized = false; //!< sync.parts
bool m_fastPositionUpdates =false; //!<use fast position updates
void init();
};
@@ -119,7 +128,8 @@ BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Simulation::CSimulatedAircraft, (
attr(o.m_client),
attr(o.m_enabled),
attr(o.m_rendered),
attr(o.m_partsSynchronized)
attr(o.m_partsSynchronized),
attr(o.m_fastPositionUpdates)
))
Q_DECLARE_METATYPE(BlackMisc::Simulation::CSimulatedAircraft)