42 pageLayout->addWidget(rbEllipse, 4, 0); |
42 pageLayout->addWidget(rbEllipse, 4, 0); |
43 |
43 |
44 rbPolyline->setChecked(true); |
44 rbPolyline->setChecked(true); |
45 |
45 |
46 pbClear = addButton(tr("Clear"), pageLayout, 5, 0); |
46 pbClear = addButton(tr("Clear"), pageLayout, 5, 0); |
47 pbLoad = addButton(tr("Load"), pageLayout, 6, 0); |
47 pbOptimize = addButton(tr("Optimize"), pageLayout, 6, 0); |
48 pbSave = addButton(tr("Save"), pageLayout, 7, 0); |
48 pbLoad = addButton(tr("Load"), pageLayout, 7, 0); |
|
49 pbSave = addButton(tr("Save"), pageLayout, 8, 0); |
49 |
50 |
50 drawMapWidget = new DrawMapWidget(this); |
51 drawMapWidget = new DrawMapWidget(this); |
51 pageLayout->addWidget(drawMapWidget, 0, 1, 9, 1); |
52 pageLayout->addWidget(drawMapWidget, 0, 1, 10, 1); |
52 |
53 |
53 return pageLayout; |
54 return pageLayout; |
54 } |
55 } |
55 |
56 |
56 void PageDrawMap::connectSignals() |
57 void PageDrawMap::connectSignals() |
57 { |
58 { |
58 connect(cbEraser, SIGNAL(toggled(bool)), drawMapWidget, SLOT(setErasing(bool))); |
59 connect(cbEraser, SIGNAL(toggled(bool)), drawMapWidget, SLOT(setErasing(bool))); |
59 connect(pbUndo, SIGNAL(clicked()), drawMapWidget, SLOT(undo())); |
60 connect(pbUndo, SIGNAL(clicked()), drawMapWidget, SLOT(undo())); |
60 connect(pbClear, SIGNAL(clicked()), drawMapWidget, SLOT(clear())); |
61 connect(pbClear, SIGNAL(clicked()), drawMapWidget, SLOT(clear())); |
|
62 connect(pbOptimize, SIGNAL(clicked()), drawMapWidget, SLOT(optimize())); |
61 connect(pbLoad, SIGNAL(clicked()), this, SLOT(load())); |
63 connect(pbLoad, SIGNAL(clicked()), this, SLOT(load())); |
62 connect(pbSave, SIGNAL(clicked()), this, SLOT(save())); |
64 connect(pbSave, SIGNAL(clicked()), this, SLOT(save())); |
63 |
65 |
64 connect(rbPolyline, SIGNAL(toggled(bool)), this, SLOT(pathTypeSwitched(bool))); |
66 connect(rbPolyline, SIGNAL(toggled(bool)), this, SLOT(pathTypeSwitched(bool))); |
65 connect(rbRectangle, SIGNAL(toggled(bool)), this, SLOT(pathTypeSwitched(bool))); |
67 connect(rbRectangle, SIGNAL(toggled(bool)), this, SLOT(pathTypeSwitched(bool))); |