Index: trunk/src/globals.h
===================================================================
--- trunk/src/globals.h	(revision 63)
+++ trunk/src/globals.h	(revision 64)
@@ -25,4 +25,9 @@
 #define GLOBALS_H
 
+/*!
+ * \file globals.h
+ * \brief This file contains TSPSG global defines.
+ */
+
 // INCLUDES
 #include <QtCore>
@@ -36,17 +41,31 @@
 // DEFINES
 // Default values
+//! Default minimum for random numbers generation
 #define DEF_RAND_MIN 1
+//! Default maximum for random numbers generation
 #define DEF_RAND_MAX 10
+//! Default number of cities
 #define DEF_NUM_CITIES 5
+//! Default font name
 #define DEF_FONT_FAMILY "Courier New"
+//! Default font size
 #define DEF_FONT_SIZE 10
+//! Default font color
 #define DEF_FONT_COLOR Qt::black
 
-// Maximum available number of cities
+//! Maximum available number of cities
 #define MAX_NUM_CITIES 30
-// Maximum allowed value for random generation limits
+//! Maximum allowed value for random generation limits
 #define MAX_RAND_VALUE 1000
 
 // Paths
+/*!
+ * \def PATH_I18N
+ * \brief Bath to internationalization files.
+ */
+/*!
+ * \def PATH_DOCS
+ * \brief Bath to documentation files.
+ */
 #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
 	#define PATH_I18N "/usr/share/tspsg/i18n"
@@ -57,24 +76,28 @@
 #endif // Q_OS_LINUX
 
-// TSPSG Task file signature - letters TSPT
+//! TSPSG Task file signature - letters \p TSPT
 #define TSPT quint32(0x54535054)
-// TSPSG Task file version
+//! TSPSG Task file version
 #define TSPT_VERSION quint8(1)
-// TSPSG Task file metadata version
+//! TSPSG Task file metadata version
 #define TSPT_META_VERSION quint8(1)
-// TSPSG Task file metadata size in bytes (incl. version)
+//! TSPSG Task file metadata size in bytes (incl. version)
 #define TSPT_META_SIZE 2
-// ZKomModRd Task file signature - letters ZK
+//! ZKomModRd Task file signature - letters \p ZK
 #define ZKT quint16(0x5A4B)
-// ZKomModRd Task file version
+//! ZKomModRd Task file version
 #define ZKT_VERSION quint8(1)
 
-// This value means infinity :-)
-#ifndef INFINITY
-	#define INFINITY 1.7E+308
+// Some libraries already have INFINITY defined.
+// We need to undefine it for INFINITY to have always the same value.
+#ifdef INFINITY
+	#undef INFINITY
 #endif
-// This is string, which represents infinite value in table
+//! This value means infinity :-)
+#define INFINITY 1.7E+308
+//! This string represents infinite value in the table
 #define INFSTR "---"
 
+// Sanity checks
 // Check that default number of cities is sane (<= MAX_NUM_CITIES)
 #if DEF_NUM_CITIES > MAX_NUM_CITIES
Index: trunk/src/mainwindow.h
===================================================================
--- trunk/src/mainwindow.h	(revision 63)
+++ trunk/src/mainwindow.h	(revision 64)
@@ -26,6 +26,8 @@
 
 #include "globals.h"
+
 #include "ui_mainwindow.h"
 #include "settingsdialog.h"
+
 #include "tspsolver.h"
 #include "tspmodel.h"
Index: trunk/src/os.h
===================================================================
--- trunk/src/os.h	(revision 63)
+++ trunk/src/os.h	(revision 64)
@@ -26,5 +26,9 @@
 
 // Some target arch detection.
-// NOTE: Only for GNU C, Visual Studio, Intel C/C++ and MinGW32 compilers
+/*!
+ * \def ARCH
+ * \brief The target CPU architecture TSPSG was built for.
+ * \warning NOTE: Only for GNU C, Visual Studio, Intel C/C++ and MinGW32 compilers.
+ */
 #if defined(__amd64__) || defined(_M_X64)
 	#define ARCH " (AMD 64-bit)"
@@ -44,4 +48,14 @@
 
 // Target OS detection. Done by Qt, so should work with any compiler.
+/*!
+ * \def OS
+ * \brief The target operating system TSPSG was built for.
+ */
+/*!
+ * \def OSID
+ * \brief The target operating system ID.
+ * 
+ * This value is used in task file metadata.
+ */
 #ifdef Q_OS_AIX
 	#define OS "AIX"ARCH
Index: trunk/src/resource.h
===================================================================
--- trunk/src/resource.h	(revision 63)
+++ trunk/src/resource.h	(revision 64)
@@ -7,4 +7,17 @@
  *
  *  This file is part of TSPSG.
+ *
+ *  TSPSG is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  TSPSG is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with TSPSG.  If not, see <http://www.gnu.org/licenses/>.
  */
 
Index: trunk/src/settingsdialog.h
===================================================================
--- trunk/src/settingsdialog.h	(revision 63)
+++ trunk/src/settingsdialog.h	(revision 64)
@@ -26,4 +26,5 @@
 
 #include "globals.h"
+
 #include "ui_settingsdialog.h"
 
Index: trunk/src/tspsolver.cpp
===================================================================
--- trunk/src/tspsolver.cpp	(revision 63)
+++ trunk/src/tspsolver.cpp	(revision 64)
@@ -23,5 +23,4 @@
 
 #include "tspsolver.h"
-#include "tspmodel.h"
 
 CTSPSolver::CTSPSolver()
Index: trunk/src/tspsolver.h
===================================================================
--- trunk/src/tspsolver.h	(revision 63)
+++ trunk/src/tspsolver.h	(revision 64)
@@ -26,4 +26,6 @@
 
 #include "globals.h"
+
+#include "tspmodel.h"
 
 typedef QList<QList<double> > tMatrix;
Index: trunk/src/version.h
===================================================================
--- trunk/src/version.h	(revision 63)
+++ trunk/src/version.h	(revision 64)
@@ -1,5 +1,6 @@
-/*
- *  TSPSG: TSP Solver and Generator
- *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+/*! \mainpage
+ *
+ *  <b>TSPSG: TSP Solver and Generator</b>
+ *  \author Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
  *
  *  $Id$
@@ -25,15 +26,37 @@
 #define VERSION_H
 
+/*!
+ * \file version.h
+ * \brief This file contains TSPSG version information defines.
+ */
+
+//! TSPSG version ID
 #define VERSIONID "$Id$"
+//! Major version of current TSPSG build
 #define BUILD_VERSION_MAJOR 0
+//! Minor version of current TSPSG build
 #define BUILD_VERSION_MINOR 1
+//! TSPSG release number
 #define BUILD_RELEASE 2
-// This will only change on releases and will be the same as revision number
+
+/*!
+ * \brief Current TSPSG build number
+ *
+ * This will only change on releases and will be the same as revision number.
+ *
+ * Build number meanings:
+ *   - 1  --  3: alpha 1 to 3
+ *   - 4  --  7: beta 1 to 4
+ *   - 8  -- 10: rc 1 to 3
+ *   - 11 --...: release 1 to ...
+ */
 #define BUILD_NUMBER 65535
-// Release number meanings:
-//   1  --  3: alpha 1 to 3
-//   4  --  7: beta 1 to 4
-//   8  -- 10: rc 1 to 3
-//   11 --...: release 1 to ...
+
+/*!
+ * \def BUILD_STATUS
+ * \brief TSPSG build status
+ *
+ * Determined based on BUILD_NUMBER.
+ */
 #if BUILD_NUMBER == 65535
 	#define BUILD_STATUS (dev build)
@@ -46,8 +69,12 @@
 #endif // BUILD_NUMBER == 65535
 
-// "Converting" x to quoted string
+//! Used for "conversion" of \a x to quoted string
 #define QUOTE_X(x) #x
 #define QUOTE(x) QUOTE_X(x)
 
+/*!
+ * \def BUILD_VERSION
+ * \brief Full version of TSPSG in the form: \a major.\a minor.\a release [\a status].
+ */
 #ifndef BUILD_STATUS
 	#define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE)
