forked from foldynl/QLog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCallsign.h
40 lines (35 loc) · 1.08 KB
/
Callsign.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef QLOG_CORE_CALLSIGN_H
#define QLOG_CORE_CALLSIGN_H
#include <QObject>
#include <QRegularExpression>
class Callsign : public QObject
{
Q_OBJECT
public:
explicit Callsign(const QString &callsign,
QObject *parent = nullptr);
static const QRegularExpression callsignRegEx();
static const QString callsignRegExString();
static const QStringList secondarySpecialSuffixes;
const QString getCallsign() const;
const QString getHostPrefix() const;
const QString getHostPrefixWithDelimiter() const;
const QString getBase() const;
const QString getBasePrefix() const;
const QString getBasePrefixNumber() const;
const QString getSuffix() const;
const QString getSuffixWithDelimiter() const;
const QString getWPXPrefix() const;
bool isValid() const;
private:
QString fullCallsign;
QString hostPrefix;
QString hostPrefixWithDelimiter;
QString base;
QString basePrefix;
QString basePrefixNumber;
QString suffix;
QString suffixWithDelimiter;
bool valid;
};
#endif // QLOG_CORE_CALLSIGN_H