diff options
Diffstat (limited to 'src/executableslist.h')
| -rw-r--r-- | src/executableslist.h | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/src/executableslist.h b/src/executableslist.h index 4e1ad644..907b37aa 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -39,32 +39,23 @@ struct Executable { QString m_SteamAppID;
QString m_WorkingDirectory;
- enum class Type {
- Game,
- Custom
+ enum Flag {
+ CustomExecutable = 0x01,
+ ShowInToolbar = 0x02,
+ UseApplicationIcon = 0x04
};
- enum class Toolbar {
- Disabled,
- Enabled
- };
-
- enum class Icon {
- MO,
- Application
- };
+ Q_DECLARE_FLAGS(Flags, Flag)
- Type m_Type;
- Toolbar m_Toolbar;
- Icon m_Icon;
+ Flags m_Flags;
- bool isCustom() const { return m_Type == Type::Custom; }
+ bool isCustom() const { return m_Flags.testFlag(CustomExecutable); }
- bool shownOnToolbar() const { return m_Toolbar == Toolbar::Enabled; }
+ bool shownOnToolbar() const { return m_Flags.testFlag(ShowInToolbar); }
- void showOnToolbar(bool state) { m_Toolbar = state ? Toolbar::Enabled : Toolbar::Disabled; }
+ void showOnToolbar(bool state);
- bool usesOwnIcon() const { return m_Icon == Icon::Application; }
+ bool usesOwnIcon() const { return m_Flags.testFlag(UseApplicationIcon); }
};
@@ -149,9 +140,7 @@ public: const QString &workingDirectory,
MOBase::ExecutableInfo::CloseMOStyle closeMO,
const QString &steamAppID,
- Executable::Type custom,
- Executable::Toolbar toolbar,
- Executable::Icon ownicon);
+ Executable::Flags flags);
/**
* @brief remove the executable with the specified file name. This needs to be an absolute file path
@@ -198,4 +187,6 @@ private: };
+Q_DECLARE_OPERATORS_FOR_FLAGS(Executable::Flags)
+
#endif // EXECUTABLESLIST_H
|
