advancedpage.hpp 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#ifndef ADVANCEDPAGE_H
#define ADVANCEDPAGE_H

#include <QWidget>

#include "ui_advancedpage.h"

#include <components/settings/settings.hpp>

namespace Files { struct ConfigurationManager; }
bret curtis's avatar
bret curtis committed
11
namespace Config { class GameSettings; }
12 13 14 15 16 17 18 19

namespace Launcher
{
    class AdvancedPage : public QWidget, private Ui::AdvancedPage
    {
        Q_OBJECT

    public:
bret curtis's avatar
bret curtis committed
20 21
        AdvancedPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings,
                     Settings::Manager &engineSettings, QWidget *parent = 0);
22 23 24 25

        bool loadSettings();
        void saveSettings();

bret curtis's avatar
bret curtis committed
26 27 28 29 30 31 32
    public slots:
        void slotLoadedCellsChanged(QStringList cellNames);

    private slots:
        void on_skipMenuCheckBox_stateChanged(int state);
        void on_runScriptAfterStartupBrowseButton_clicked();

33 34
    private:
        Files::ConfigurationManager &mCfgMgr;
bret curtis's avatar
bret curtis committed
35
        Config::GameSettings &mGameSettings;
36 37
        Settings::Manager &mEngineSettings;

bret curtis's avatar
bret curtis committed
38 39 40 41 42
        /**
         * Load the cells associated with the given content files for use in autocomplete
         * @param filePaths the file paths of the content files to be examined
         */
        void loadCellsForAutocomplete(QStringList filePaths);
43 44 45 46 47
        void loadSettingBool(QCheckBox *checkbox, const std::string& setting, const std::string& group);
        void saveSettingBool(QCheckBox *checkbox, const std::string& setting, const std::string& group);
    };
}
#endif