--- a/QTfrontend/ui/page/pagedrawmap.cpp Mon Apr 09 22:01:13 2012 +0400
+++ b/QTfrontend/ui/page/pagedrawmap.cpp Mon Apr 09 22:01:36 2012 +0400
@@ -19,6 +19,7 @@
#include <QGridLayout>
#include <QPushButton>
#include <QFileDialog>
+#include <QCheckBox>
#include "pagedrawmap.h"
#include "drawmapwidget.h"
@@ -28,19 +29,22 @@
{
QGridLayout * pageLayout = new QGridLayout();
- pbUndo = addButton(tr("Undo"), pageLayout, 0, 0);
- pbClear = addButton(tr("Clear"), pageLayout, 1, 0);
- pbLoad = addButton(tr("Load"), pageLayout, 2, 0);
- pbSave = addButton(tr("Save"), pageLayout, 3, 0);
+ cbEraser = new QCheckBox(tr("Eraser"), this);
+ pageLayout->addWidget(cbEraser, 0, 0);
+ pbUndo = addButton(tr("Undo"), pageLayout, 1, 0);
+ pbClear = addButton(tr("Clear"), pageLayout, 2, 0);
+ pbLoad = addButton(tr("Load"), pageLayout, 3, 0);
+ pbSave = addButton(tr("Save"), pageLayout, 4, 0);
drawMapWidget = new DrawMapWidget(this);
- pageLayout->addWidget(drawMapWidget, 0, 1, 5, 1);
+ pageLayout->addWidget(drawMapWidget, 0, 1, 6, 1);
return pageLayout;
}
void PageDrawMap::connectSignals()
{
+ connect(cbEraser, SIGNAL(toggled(bool)), drawMapWidget, SLOT(setErasing(bool)));
connect(pbUndo, SIGNAL(clicked()), drawMapWidget, SLOT(undo()));
connect(pbClear, SIGNAL(clicked()), drawMapWidget, SLOT(clear()));
connect(pbLoad, SIGNAL(clicked()), this, SLOT(load()));