1 /* Copyright 2013-2019 MultiMC Contributors
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include <QWidget>
19 #include <QString>
20 
21 #include "pages/BasePage.h"
22 #include <MultiMC.h>
23 
24 namespace Ui
25 {
26 class GameOptionsPage;
27 }
28 
29 class GameOptions;
30 class MinecraftInstance;
31 
32 class GameOptionsPage : public QWidget, public BasePage
33 {
34     Q_OBJECT
35 
36 public:
37     explicit GameOptionsPage(MinecraftInstance *inst, QWidget *parent = 0);
38     virtual ~GameOptionsPage();
39 
40     void openedImpl() override;
41     void closedImpl() override;
42 
displayName()43     virtual QString displayName() const override
44     {
45         return tr("Game Options");
46     }
icon()47     virtual QIcon icon() const override
48     {
49         return MMC->getThemedIcon("settings");
50     }
id()51     virtual QString id() const override
52     {
53         return "gameoptions";
54     }
helpPage()55     virtual QString helpPage() const override
56     {
57         return "Game-Options-management";
58     }
59 
60 private: // data
61     Ui::GameOptionsPage *ui = nullptr;
62     std::shared_ptr<GameOptions> m_model;
63 };
64