Updated Glossario.tex
[GoMoku3D.git] / src / main.cpp
blobe10f24c4728a8a7ae49c6a85f567e103d467953f
1 /********************************************************************
3 * Copyright (C) 2008 Davide Pesavento
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 /*!
23 * @mainpage Documentazione codice sorgente GoMoku3D
25 * @section descrizione Cos'è Gomoku3D
26 * GoMoku3D è una variante tridimensionale del classico gioco GoMoku.
27 * Lo scopo del gioco è di creare una sequenza di pedine dello stesso colore.
30 * @section installazione Come si installa
31 * Il gioco GoMoku3D è fornito nelle versioni per....
34 * @section ringraziamenti Ringraziamenti
35 * - Tullio per la bella esperienza.
36 * - I sumiti per i panini.
37 * - Pizza Shop e la Forcellini (perché lo dice la Martina).
38 * - Tutte le mamme del mondo.
39 * - La matemagica.
42 #include <QApplication>
43 #include <QLocale>
44 #include <QTranslator>
45 #include <QAbstractSocket>
46 #include <QList>
47 #include <Inventor/Qt/SoQt.h>
49 #include "MainWindow.h"
50 #include "GUISettings.h"
51 #include "Point.h"
52 #include "Move.h"
54 int main(int argc, char **argv)
56 QApplication app(argc, argv);
58 QApplication::setOrganizationName("ITWorks");
59 QApplication::setApplicationName("GoMoku3D");
61 GUISettings settings;
63 /* load translations */
64 QTranslator qtTranslator;
65 if (qtTranslator.load("qt_" + QLocale::system().name())) {
66 app.installTranslator(&qtTranslator);
68 QTranslator myTranslator;
69 if (myTranslator.load("translations/gomoku3d_" + settings.language())) {
70 app.installTranslator(&myTranslator);
73 /* register metatypes */
74 qRegisterMetaType<Point>();
75 qRegisterMetaType<Move>();
76 qRegisterMetaType< QList<int> >();
77 qRegisterMetaType< QList<Move> >();
78 qRegisterMetaType<QAbstractSocket::SocketError>();
80 MainWindow mainwin;
82 /* initialize SoQt library */
83 SoQt::init(&mainwin);
85 /* restore MainWindow's geometry*/
86 mainwin.restoreGeometry(settings.geometry());
88 mainwin.show();
89 return app.exec();
92 Q_DECLARE_METATYPE(QList<int>)
93 Q_DECLARE_METATYPE(QList<Move>)
94 Q_DECLARE_METATYPE(QAbstractSocket::SocketError)