Updated Glossario.tex
[GoMoku3D.git] / src / core / GUISettings.cpp
blob0d4e4b7e22334c0246c3a99cb976b627b6ebb7db
1 /********************************************************************
3 * Copyright (C) 2008 Daniele Battaglia
5 * This file is part of GoMoku3D.
7 * GoMoku3D is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * GoMoku3D is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GoMoku3D. If not, see <http://www.gnu.org/licenses/>.
20 *******************************************************************/
22 #include "GUISettings.h"
24 void GUISettings::setLanguage(QString lang)
26 setValue("GUI/language", lang);
29 void GUISettings::setGeometry(QByteArray geom)
31 setValue("GUI/geometry", geom);
34 void GUISettings::setDockState(QByteArray state)
36 setValue("GUI/dock_state", state);
39 void GUISettings::setDefaultCubeColor(QColor color)
41 setValue("GUI/cube_color", color);
44 void GUISettings::setBackgroundColor(QColor color)
46 setValue("GUI/bg_color", color);
49 void GUISettings::setAIDelay(int sec)
51 setValue("GUI/delay", sec);
54 QString GUISettings::language() const
56 return value("GUI/language", "en").toString();
59 QByteArray GUISettings::geometry() const
61 return value("GUI/geometry", QByteArray()).toByteArray();
64 QByteArray GUISettings::dockState() const
66 return value("GUI/dock_state", QByteArray()).toByteArray();
69 QColor GUISettings::defaultCubeColor() const
71 return value("GUI/cube_color", QColor(127, 127, 127, 150)).value<QColor>();
74 QColor GUISettings::backgroundColor() const
76 return value("GUI/bg_color", QColor(0, 0, 0)).value<QColor>();
79 int GUISettings::aiDelay() const
81 return value("GUI/delay", 1).toInt();