Commit 9c19aa4f authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Fix board label support in C++.

parent 8e63c1e2
...@@ -156,6 +156,7 @@ void KReversiMainWindow::setupActionsInit() ...@@ -156,6 +156,7 @@ void KReversiMainWindow::setupActionsInit()
m_showMovesAct->setIcon(QIcon::fromTheme(QStringLiteral("view-history"))); m_showMovesAct->setIcon(QIcon::fromTheme(QStringLiteral("view-history")));
m_showMovesAct->setText(i18n("Show Move History")); m_showMovesAct->setText(i18n("Show Move History"));
actionCollection()->addAction(QStringLiteral("show_moves"), m_showMovesAct); actionCollection()->addAction(QStringLiteral("show_moves"), m_showMovesAct);
connect(m_historyDock, &QDockWidget::visibilityChanged, this, &KReversiMainWindow::slotToggleBoardLabels);
} }
void KReversiMainWindow::loadSettings() void KReversiMainWindow::loadSettings()
...@@ -203,6 +204,11 @@ void KReversiMainWindow::slotUseColoredChips(bool toggled) ...@@ -203,6 +204,11 @@ void KReversiMainWindow::slotUseColoredChips(bool toggled)
Preferences::self()->save(); Preferences::self()->save();
} }
void KReversiMainWindow::slotToggleBoardLabels(bool toggled)
{
m_view->setShowBoardLabels(toggled);
}
void KReversiMainWindow::slotNewGame() void KReversiMainWindow::slotNewGame()
{ {
m_startDialog->exec(); m_startDialog->exec();
......
...@@ -59,6 +59,7 @@ public slots: ...@@ -59,6 +59,7 @@ public slots:
void slotMoveFinished(); void slotMoveFinished();
void slotGameOver(); void slotGameOver();
void slotUseColoredChips(bool); void slotUseColoredChips(bool);
void slotToggleBoardLabels(bool);
void slotHighscores(); void slotHighscores();
void slotDialogReady(); void slotDialogReady();
private: private:
......
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