Okay, experimenting a bit with this concept, here is what I see:
With my current system, when I want to use my enums, I do #include "enums.h" and then when I want to, for instance, declare a variable of type settings_type, I do the following:
#include "enums.h"
.
.
.
settings_type vara;
vara = plot;
#include "enums.h"
.
.
.
settings_type vara;
vara = plot;
To copy to clipboard, switch view to plain text mode
Now if I declare a class, MyEnums, in order to use the enums, I now do this:
#include "myenums.h"
.
.
.
MyEnums::settings_type vara;
vara = MyEnums::plot;
#include "myenums.h"
.
.
.
MyEnums::settings_type vara;
vara = MyEnums::plot;
To copy to clipboard, switch view to plain text mode
This has just increased the amount of my code.
So, could somebody explain to me what other advantages there might be to using QMetaEnum that make up for the increased complexity?
Bookmarks