Add design prototype, some renamings.
This commit is contained in:
8
main.cpp
8
main.cpp
@@ -38,21 +38,21 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include <bcmainwindow.h>
|
||||
#include <bcvalue.h>
|
||||
#include <bcvaluemanager.h>
|
||||
#include <bcdata.h>
|
||||
#include <bcvdatamanager.h>
|
||||
|
||||
/*
|
||||
#include <QMetaEnum>
|
||||
|
||||
void parseString(const QString &inputString) {
|
||||
QMetaEnum metaEnum = QMetaEnum::fromType<BCValue::ID>();
|
||||
QMetaEnum metaEnum = QMetaEnum::fromType<BCData::ID>();
|
||||
|
||||
bool ok = false;
|
||||
// keyToValue parst den String ("x1") und liefert den int-Wert
|
||||
int intVal = metaEnum.keyToValue(inputString.toLatin1().constData(), &ok);
|
||||
|
||||
if (ok) {
|
||||
BCValue::ID id = static_cast<BCValue::ID>(intVal);
|
||||
BCData::ID id = static_cast<BCData::ID>(intVal);
|
||||
// Erfolg!
|
||||
} else {
|
||||
// Fehler: String existiert nicht im Enum
|
||||
|
||||
Reference in New Issue
Block a user