Index: src/main.cpp
===================================================================
--- src/main.cpp	(revision f99964aa0b92f5ca88387dcf89886a57c449011e)
+++ src/main.cpp	(revision 7672bc895b1bc8c82c9e254736a54de0a3bd9f85)
@@ -1,5 +1,8 @@
 /*
  *	TSPSG - TSP Solver and Generator
- *	Copyright (C) 2007 L¸ppa <lacontacts[at]gmail[dot]com>
+ *	Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>
+ *
+ *	$Id$
+ *	$URL$
  *
  *	This file is part of TSPSG.
Index: src/mainwindow.cpp
===================================================================
--- src/mainwindow.cpp	(revision f99964aa0b92f5ca88387dcf89886a57c449011e)
+++ src/mainwindow.cpp	(revision 7672bc895b1bc8c82c9e254736a54de0a3bd9f85)
@@ -1,5 +1,8 @@
 /*
  *	TSPSG - TSP Solver and Generator
- *	Copyright (C) 2007 L¸ppa <lacontacts[at]gmail[dot]com>
+ *	Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>
+ *
+ *	$Id$
+ *	$URL$
  *
  *	This file is part of TSPSG.
@@ -29,4 +32,5 @@
 	setupUi(this);
 	connect(actionSettingsSettings,SIGNAL(triggered()),this,SLOT(ChangeSettings()));
+	connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(CitiesNumberChanged(int)));
 	// Centering MainWindow
 	// TODO: Loading of saved window state
@@ -34,5 +38,33 @@
     rect.moveCenter(QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen()).center());
 	setGeometry(rect);
+	for (int k = 0; k < tableTask->rowCount(); k++) {
+		QTableWidgetItem *item = new QTableWidgetItem(trUtf8("Город ")+QVariant(k + 1).toString());
+		tableTask->setVerticalHeaderItem(k,item);
+	}
+	for (int k = 0; k < tableTask->columnCount(); k++) {
+		QTableWidgetItem *item = new QTableWidgetItem(trUtf8("Город ")+QVariant(k + 1).toString());
+		tableTask->setHorizontalHeaderItem(k,item);
+	}
+	tableTask->resizeRowsToContents();
+	tableTask->resizeColumnsToContents();
+}
 
+void MainWindow::CitiesNumberChanged(int n)
+{
+	// Adding row, setting header and adjusting its size
+bool increased = tableTask->rowCount() < n ? true : false;
+	tableTask->setRowCount(n);
+QTableWidgetItem *item = new QTableWidgetItem(trUtf8("Город ")+QVariant(n).toString());
+	tableTask->setVerticalHeaderItem(n - 1,item);
+	if (increased)
+		tableTask->resizeRowToContents(n - 1);
+	// Adding column, setting header and adjusting its size
+	increased = tableTask->columnCount() < n ? true : false;
+	tableTask->setColumnCount(n);
+	item = new QTableWidgetItem(trUtf8("Город ")+QVariant(n).toString());
+	tableTask->setHorizontalHeaderItem(n - 1,item);
+	if (increased)
+	tableTask->resizeColumnToContents(n - 1);
+	tableTask->setMinimumSize(tableTask->sizeHint());
 }
 
Index: src/mainwindow.h
===================================================================
--- src/mainwindow.h	(revision f99964aa0b92f5ca88387dcf89886a57c449011e)
+++ src/mainwindow.h	(revision 7672bc895b1bc8c82c9e254736a54de0a3bd9f85)
@@ -1,5 +1,8 @@
 /*
  *	TSPSG - TSP Solver and Generator
- *	Copyright (C) 2007 L¸ppa <lacontacts[at]gmail[dot]com>
+ *	Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>
+ *
+ *	$Id$
+ *	$URL$
  *
  *	This file is part of TSPSG.
@@ -33,4 +36,5 @@
 private slots:
 	void ChangeSettings();
+	void CitiesNumberChanged(int n);
 };
 
Index: src/settingsdialog.cpp
===================================================================
--- src/settingsdialog.cpp	(revision f99964aa0b92f5ca88387dcf89886a57c449011e)
+++ src/settingsdialog.cpp	(revision 7672bc895b1bc8c82c9e254736a54de0a3bd9f85)
@@ -1,5 +1,5 @@
 /*
  *	TSPSG - TSP Solver and Generator
- *	Copyright (C) 2007 L¸ppa <lacontacts[at]gmail[dot]com>
+ *	Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>
  *
  *	$Id$
Index: src/settingsdialog.h
===================================================================
--- src/settingsdialog.h	(revision f99964aa0b92f5ca88387dcf89886a57c449011e)
+++ src/settingsdialog.h	(revision 7672bc895b1bc8c82c9e254736a54de0a3bd9f85)
@@ -1,5 +1,5 @@
 /*
  *	TSPSG - TSP Solver and Generator
- *	Copyright (C) 2007 L¸ppa <lacontacts[at]gmail[dot]com>
+ *	Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>
  *
  *	$Id$
