Commit a5400029 authored by Laurent Montel's avatar Laurent Montel 😁

Port help

parent 769ada22
......@@ -6,13 +6,10 @@ set (QT_MIN_VERSION "5.3.0")
find_package(ECM 1.3.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets Svg Test)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
find_package(KF5 REQUIRED COMPONENTS
CoreAddons
Config
ItemModels
WidgetsAddons
WindowSystem
Config
DBusAddons
I18n
......
......@@ -40,6 +40,7 @@
#include <KToggleAction>
#include <KUrl>
#include <QIcon>
#include <KHelpClient>
#define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API
#include <libkdegamesprivate/kgamethemeselector.h>
......@@ -326,11 +327,17 @@ void MainWindow::showPreferences()
KConfigDialog *dialog = new KConfigDialog(this, "settings", Preferences::self());
dialog->addPage(new GeneralConfig(), i18n("General"), "preferences-other");
dialog->addPage(new KGameThemeSelector(dialog, Preferences::self(), KGameThemeSelector::NewStuffDisableDownload), i18n("Themes"), "games-config-theme");
//QT5 dialog->setHelp(QString(), "Kigo");
dialog->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
connect(dialog->button(QDialogButtonBox::Help), &QPushButton::clicked, this, &MainWindow::slotHelp);
connect(dialog, &KConfigDialog::settingsChanged, this, &MainWindow::applyPreferences);
dialog->show();
}
void MainWindow::slotHelp()
{
KHelpClient::invokeHelp(QString(), QStringLiteral("Kigo"));
}
void MainWindow::applyPreferences()
{
// //qDebug() << "Update settings based on changed configuration...";
......
......@@ -51,6 +51,7 @@ public:
explicit MainWindow(const QString &fileName = "", QWidget *parent = 0);
private slots:
void slotHelp();
void newGame(); ///< Configure new game
void loadGame(); ///< Configure loaded game
bool loadGame(const QString &fileName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment