diff options
author | Andrew <forkk@forkk.net> | 2013-11-04 19:58:56 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-11-04 19:58:56 -0600 |
commit | 5083a6a8090fa03d3c1800c1f9588079ca11e9f9 (patch) | |
tree | 7c2e88c7184a7f5acf5e7a03be5c5f0bf6904113 /logic/MinecraftProcess.h | |
parent | dc3b0fcb2b74aeede37b08216b203cab284f7fce (diff) | |
parent | bb7e8985f6d189de0acac6a1c3033cb16378c1fb (diff) | |
download | PrismLauncher-5083a6a8090fa03d3c1800c1f9588079ca11e9f9.tar.gz PrismLauncher-5083a6a8090fa03d3c1800c1f9588079ca11e9f9.tar.bz2 PrismLauncher-5083a6a8090fa03d3c1800c1f9588079ca11e9f9.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Diffstat (limited to 'logic/MinecraftProcess.h')
-rw-r--r-- | logic/MinecraftProcess.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/logic/MinecraftProcess.h b/logic/MinecraftProcess.h index 812559d5..ad887c5b 100644 --- a/logic/MinecraftProcess.h +++ b/logic/MinecraftProcess.h @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #pragma once #include <QProcess> @@ -24,15 +25,17 @@ * @brief the MessageLevel Enum * defines what level a message is */ -namespace MessageLevel { -enum Enum { - MultiMC, /**< MultiMC Messages */ - Debug, /**< Debug Messages */ - Info, /**< Info Messages */ - Message, /**< Standard Messages */ - Warning, /**< Warnings */ - Error, /**< Errors */ - Fatal /**< Fatal Errors */ +namespace MessageLevel +{ +enum Enum +{ + MultiMC, /**< MultiMC Messages */ + Debug, /**< Debug Messages */ + Info, /**< Info Messages */ + Message, /**< Standard Messages */ + Warning, /**< Warnings */ + Error, /**< Errors */ + Fatal /**< Fatal Errors */ }; } @@ -56,25 +59,29 @@ public: void launch(); void setMinecraftWorkdir(QString path); - + void setMinecraftArguments(QStringList args); - + void killMinecraft(); - - inline void setLogin(QString user, QString sid) { username = user; sessionID = sid; } - + + inline void setLogin(QString user, QString sid) + { + username = user; + sessionID = sid; + } + signals: /** * @brief emitted when mc has finished and the PostLaunchCommand was run */ - void ended(BaseInstance*); + void ended(BaseInstance *); /** * @brief emitted when we want to log something * @param text the text to log * @param level the level to log at */ - void log(QString text, MessageLevel::Enum level=MessageLevel::MultiMC); + void log(QString text, MessageLevel::Enum level = MessageLevel::MultiMC); protected: BaseInstance *m_instance; @@ -83,10 +90,12 @@ protected: QString m_out_leftover; QProcess m_prepostlaunchprocess; -protected slots: +protected +slots: void finish(int, QProcess::ExitStatus status); void on_stdErr(); void on_stdOut(); + private: bool killed; MessageLevel::Enum getLevel(const QString &message, MessageLevel::Enum defaultLevel); |