QTfrontend/pages.cpp
changeset 1889 b8590b604fdd
parent 1887 d68939b3f7f0
child 1891 47e832a88cbd
--- a/QTfrontend/pages.cpp	Thu Mar 12 20:29:01 2009 +0000
+++ b/QTfrontend/pages.cpp	Fri Mar 13 18:04:44 2009 +0000
@@ -898,9 +898,15 @@
 	mapper = new QDataWidgetMapper(this);
 
 	BtnBack = addButton(":/res/Exit.png", pageLayout, 10, 0, true);
-	BtnSave = addButton(":/res/Save.png", pageLayout, 10, 2, true);
+	BtnNew = addButton(tr("New"), pageLayout, 10, 1);
+	BtnPrev = addButton(tr("Prev"), pageLayout, 10, 2);
+	BtnNext = addButton(tr("Next"), pageLayout, 10, 3);
+	BtnSave = addButton(":/res/Save.png", pageLayout, 10, 4, true);
 
 	connect(BtnSave, SIGNAL(clicked()), mapper, SLOT(toFirst()));
+	connect(BtnNew, SIGNAL(clicked()), this, SLOT(newRow()));
+	connect(BtnPrev, SIGNAL(clicked()), mapper, SLOT(toPrevious()));
+	connect(BtnNext, SIGNAL(clicked()), mapper, SLOT(toNext()));
 }
 
 void PageScheme::setModel(QAbstractItemModel * model)
@@ -919,3 +925,10 @@
 
 	mapper->toFirst();
 }
+
+void PageScheme::newRow()
+{
+	QAbstractItemModel * model = mapper->model();
+	model->insertRow(model->rowCount());
+	mapper->toLast();
+}