Add finer engine tracing.
[tagua/yd.git] / src / hlvariant / shogi / shogiactions.cpp
blob018ec9262816d768d3a296120bf020db134628ca
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #include "shogiactions.h"
13 #include <KAction>
14 #include <KIcon>
16 namespace HLVariant {
17 namespace Shogi {
19 ShogiActions::ShogiActions()
20 : m_promotion(true) {
21 QAction* toggle = new KAction(KIcon("bookmark"), "Promote automatically", this);
22 toggle->setCheckable(true);
23 toggle->setChecked(true);
24 connect(toggle, SIGNAL(triggered()), this, SLOT(toggle_promotion()));
25 add(toggle);
28 bool ShogiActions::promotion() const {
29 return m_promotion;
32 void ShogiActions::toggle_promotion() {
33 m_promotion = !m_promotion;
36 } // namespace Shogi
37 } // namespace HLVariant