Index: trunk/src/globals.h
===================================================================
--- trunk/src/globals.h	(revision 52)
+++ trunk/src/globals.h	(revision 54)
@@ -31,5 +31,5 @@
 // Version info
 #include "version.h"
-// OS detection
+// OS and ARCH detection
 #include "os.h"
 
@@ -58,5 +58,5 @@
 
 // Maximum available number of cities
-#define MAX_NUM_CITIES 20
+#define MAX_NUM_CITIES 30
 // This value means infinity :-)
 #ifndef INFINITY
Index: trunk/src/mainwindow.cpp
===================================================================
--- trunk/src/mainwindow.cpp	(revision 52)
+++ trunk/src/mainwindow.cpp	(revision 54)
@@ -30,4 +30,9 @@
 	loadLanguage();
 	setupUi(this);
+#ifndef Q_OS_WINCE
+QStatusBar *statusbar = new QStatusBar(this);
+	statusbar->setObjectName("statusbar");
+	setStatusBar(statusbar);
+#endif // Q_OS_WINCE
 	initDocStyleSheet();
 	solutionText->document()->setDefaultFont(settings->value("Output/Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>());
@@ -39,7 +44,7 @@
 	toolBar->setIconSize(QSize(s / 10,s / 10));
 #endif
-#ifndef Q_OS_WINCE
+#ifndef QT_NO_PRINTER
 	printer = new QPrinter(QPrinter::HighResolution);
-#endif // Q_OS_WINCE
+#endif // QT_NO_PRINTER
 	groupSettingsLanguageList = new QActionGroup(this);
 	actionSettingsLanguageEnglish->setData("en");
@@ -58,8 +63,12 @@
 	connect(actionHelpAboutQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
 	connect(actionHelpAbout,SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered()));
-#ifndef Q_OS_WINCE
+#ifndef QT_NO_PRINTER
+	menuFile->insertAction(actionFileExit,actionFilePrintPreview);
+	menuFile->insertAction(actionFileExit,actionFilePrint);
+	menuFile->insertSeparator(actionFileExit);
+	toolBar->insertAction(actionSettingsPreferences,actionFilePrint);
 	connect(actionFilePrintPreview,SIGNAL(triggered()),this,SLOT(actionFilePrintPreviewTriggered()));
 	connect(actionFilePrint,SIGNAL(triggered()),this,SLOT(actionFilePrintTriggered()));
-#endif // Q_OS_WINCE
+#endif // QT_NO_PRINTER
 	connect(buttonSolve,SIGNAL(clicked()),this,SLOT(buttonSolveClicked()));
 	connect(buttonRandom,SIGNAL(clicked()),this,SLOT(buttonRandomClicked()));
@@ -106,8 +115,8 @@
 	if (!enable)
 		output.clear();
-#ifndef Q_OS_WINCE
+#ifndef QT_NO_PRINTER
 	actionFilePrint->setEnabled(enable);
 	actionFilePrintPreview->setEnabled(enable);
-#endif // Q_OS_WINCE
+#endif // QT_NO_PRINTER
 }
 
@@ -206,4 +215,5 @@
 	if (!maybeSave())
 		return;
+	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 	tspmodel->clear();
 	taskView->resizeColumnsToContents();
@@ -214,4 +224,5 @@
 	solutionText->clear();
 	enableSolutionActions(false);
+	QApplication::restoreOverrideCursor();
 }
 
@@ -349,5 +360,5 @@
 }
 
-#ifndef Q_OS_WINCE
+#ifndef QT_NO_PRINTER
 void MainWindow::printPreview(QPrinter *printer)
 {
@@ -372,14 +383,18 @@
 	if (pd.exec() != QDialog::Accepted)
 		return;
+	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 	solutionText->document()->print(printer);
-}
-#endif // Q_OS_WINCE
+	QApplication::restoreOverrideCursor();
+}
+#endif // QT_NO_PRINTER
 
 void MainWindow::buttonRandomClicked()
 {
+	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 	tspmodel->randomize();
 	setWindowModified(true);
 	taskView->resizeColumnsToContents();
 	taskView->resizeRowsToContents();
+	QApplication::restoreOverrideCursor();
 }
 
Index: trunk/src/mainwindow.h
===================================================================
--- trunk/src/mainwindow.h	(revision 52)
+++ trunk/src/mainwindow.h	(revision 54)
@@ -26,9 +26,5 @@
 
 #include "globals.h"
-#ifdef Q_OS_WINCE
-	#include "ui_mainwindow.ce.h"
-#else
-	#include "ui_mainwindow.h"
-#endif // Q_OS_WINCE
+#include "ui_mainwindow.h"
 #include "settingsdialog.h"
 #include "tspsolver.h"
@@ -54,9 +50,9 @@
 	void actionHelpAboutTriggered();
 	void dataChanged();
-#ifndef Q_OS_WINCE
+#ifndef QT_NO_PRINTER
 	void printPreview(QPrinter *);
 	void actionFilePrintPreviewTriggered();
 	void actionFilePrintTriggered();
-#endif // Q_OS_WINCE
+#endif // QT_NO_PRINTER
 	void buttonSolveClicked();
 	void buttonRandomClicked();
@@ -67,7 +63,7 @@
 private:
 	QSettings *settings;
-#ifndef Q_OS_WINCE
+#ifndef QT_NO_PRINTER
 	QPrinter *printer;
-#endif // Q_OS_WINCE
+#endif // QT_NO_PRINTER
 	CTSPModel *tspmodel;
 	QString fileName;
Index: trunk/src/tspsolver.cpp
===================================================================
--- trunk/src/tspsolver.cpp	(revision 52)
+++ trunk/src/tspsolver.cpp	(revision 54)
@@ -39,6 +39,6 @@
 double min = INFINITY;
 	for (int k = 0; k < nCities; k++)
-		if (((k != exc)) && (min > matrix[nRow][k]))
-			min = matrix[nRow][k];
+		if (((k != exc)) && (min > matrix.at(nRow).at(k)))
+			min = matrix.at(nRow).at(k);
 	return min == INFINITY ? 0 : min;
 }
@@ -48,6 +48,6 @@
 double min = INFINITY;
 	for (int k = 0; k < nCities; k++)
-		if ((k != exr) && (min > matrix[k][nCol]))
-			min = matrix[k][nCol];
+		if ((k != exr) && (min > matrix.at(k).at(nCol)))
+			min = matrix.at(k).at(nCol);
 	return min == INFINITY ? 0 : min;
 }
@@ -98,5 +98,5 @@
 		for (int c = 0; c < nCities; c++)
 //			if ((matrix[r][c] == 0) && !forbidden.values(r).contains(c)) {
-			if (matrix[r][c] == 0) {
+			if (matrix.at(r).at(c) == 0) {
 				sum = findMinInRow(r,matrix,c) + findMinInCol(c,matrix,r);
 				if (sum > h) {
