mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Ref T472, utility functions for aircraft categories
This commit is contained in:
committed by
Mat Sutcliffe
parent
b57003c4e8
commit
5846860382
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QMap>
|
||||
#include <QList>
|
||||
#include <QStringList>
|
||||
#include <QMetaType>
|
||||
|
||||
@@ -77,6 +78,9 @@ namespace BlackMisc
|
||||
//! Level
|
||||
void setLevel(int l1, int l2, int l3);
|
||||
|
||||
//! Levels depending on depth, 3.2 -> 3,2 / 1.0 -> 1 / 4.3.1 -> 4,3,1
|
||||
QList<int> getLevel() const;
|
||||
|
||||
//! First level
|
||||
int getFirstLevel() const { return m_l1; }
|
||||
|
||||
@@ -95,6 +99,12 @@ namespace BlackMisc
|
||||
//! Matching path?
|
||||
bool matchesPath(const QString &path, Qt::CaseSensitivity cs);
|
||||
|
||||
//! Is matching the level, 0 ignored
|
||||
bool matchesLevel(int l1, int l2 = 0, int l3 = 0) const;
|
||||
|
||||
//! Is matching the level, 0 ignored
|
||||
bool matchesLevel(const QList<int> &level) const;
|
||||
|
||||
//! Assignable?
|
||||
bool isAssignable() const { return m_assignable; }
|
||||
|
||||
@@ -122,6 +132,9 @@ namespace BlackMisc
|
||||
//! Level compare
|
||||
int compareByLevel(const CAircraftCategory &other) const;
|
||||
|
||||
//! Higher level?
|
||||
bool isHigherLevel(const CAircraftCategory &other) const;
|
||||
|
||||
//! NULL object
|
||||
static const CAircraftCategory &null();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user