diff options
Diffstat (limited to 'logic/OpSys.cpp')
-rw-r--r-- | logic/OpSys.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/logic/OpSys.cpp b/logic/OpSys.cpp new file mode 100644 index 00000000..f101fd08 --- /dev/null +++ b/logic/OpSys.cpp @@ -0,0 +1,23 @@ +#include "OpSys.h" + +OpSys OpSys_fromString(QString name) +{ + if(name == "linux") + return Os_Linux; + if(name == "windows") + return Os_Windows; + if(name == "osx") + return Os_OSX; + return Os_Other; +} + +QString OpSys_toString(OpSys name) +{ + switch(name) + { + case Os_Linux: return "linux"; + case Os_OSX: return "osx"; + case Os_Windows: return "windows"; + default: return "other"; + } +}
\ No newline at end of file |