Playing with colors.
This commit is contained in:
31
main.cpp
31
main.cpp
@@ -84,37 +84,8 @@ bool setApplicationStyleSheet( QAnyStringView path )
|
||||
// 2. Datei öffnen und lesen
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
auto x = BC::ID::Motor_Status_Main;
|
||||
|
||||
enum class Color : uint8_t { Red, Green, Blue };
|
||||
|
||||
QMap<Color, QString> map;
|
||||
map.insert(Color::Red, QStringLiteral("rot"));
|
||||
map[Color::Green] = QStringLiteral("grün");
|
||||
|
||||
|
||||
qDebug() << " --- sach bloss das geht: " << x << " ui: " << uint8_t(x) << " : " << map[Color::Red];
|
||||
|
||||
|
||||
QApplication app(argc, argv);
|
||||
//setApplicationStyleSheet( ":/BionxControl.qss"_L1 );
|
||||
|
||||
QMetaEnum metaEnum = QMetaEnum::fromType<BC::ID>();
|
||||
|
||||
bool ok = false;
|
||||
QString inputString = "x3";
|
||||
BC::ID yyy{};
|
||||
|
||||
// keyToValue parst den String ("x1") und liefert den int-Wert
|
||||
int intVal = metaEnum.keyToValue(inputString.toLatin1().constData(), &ok);
|
||||
if (ok)
|
||||
yyy = static_cast<BC::ID>(intVal);
|
||||
|
||||
auto xxx = BC::ID::Battery_Config_Force_Done;
|
||||
//QString result = fullString.section("::", -1);
|
||||
qDebug() << " schön: " << xxx << " -- " << uint8_t(xxx) << " : " << yyy;
|
||||
qDebug() << " nice: " << metaEnum.enumName() << " : " <<metaEnum.name() << ": " << metaEnum.enclosingMetaObject()->className();
|
||||
|
||||
setApplicationStyleSheet( ":/bionxcontrol.qss"_L1 );
|
||||
|
||||
BCMainWindow w;
|
||||
w.show();
|
||||
|
||||
Reference in New Issue
Block a user