Brief description of class still missing. More...
#include <MapView.h>
Public Types | |
| enum | Mode { Move, Line, Rect, Ellipse, Text, Dimension } |
Public Member Functions | |
| MapView (QWidget *parent=0) | |
| Mode | mode () const |
| MapProject * | project () const |
| void | setMode (Mode m) |
| void | setProject (MapProject *p) |
| void | setRotation () |
| void | setSnapOption (DrawView::SnapOptions ms) |
| void | setSnapType (DrawView::SnapType ms) |
| DrawView::SnapOptions | snapOption () const |
| DrawView::SnapType | snapType () const |
| ~MapView () | |
Brief description of class still missing.
Full description of class still missing
| enum MapView::Mode |
| MapView::MapView | ( | QWidget * | parent = 0 | ) |
Description of constructor still missing
: MultiDocumentSubWindow(parent) { TRACE; _mode=Move; _project=0; _view=0; _status=0; }
Description of destructor still missing
References MapProject::removeView(), and TRACE.
{
TRACE;
_project->removeView(this);
}
| Mode MapView::mode | ( | ) | const [inline] |
{return _mode;}
| MapProject* MapView::project | ( | ) | const [inline] |
Referenced by MainWindow::projectClosed(), MainWindow::refreshScene(), and MainWindow::setActiveProject().
{return _project;}
| void MapView::setMode | ( | Mode | m | ) | [inline] |
Referenced by MainWindow::setDimensionMode(), MainWindow::setEllipseMode(), MainWindow::setLineMode(), MainWindow::setMoveMode(), MainWindow::setRectMode(), and MainWindow::setTextMode().
{_mode=m;}
| void MapView::setProject | ( | MapProject * | p | ) |
References MapProject::scene(), and TRACE.
Referenced by MapProject::addView().
{
TRACE;
ASSERT(!_project);
_project=p;
QLayout * vBox=layout();
vBox->setMargin(0);
vBox->setSpacing(0);
_view=new DrawView(_project->scene());
_view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
_view->setInteractive(true);
connect(_view, SIGNAL(mouseMoved(const QPointF&)), this, SLOT(showMousePos(const QPointF&)));
connect(_view, SIGNAL(mouseReleased(const QPointF&)), this, SLOT(mouseAction(const QPointF&)));
vBox->addWidget(_view);
_status=new QStatusBar;
vBox->addWidget(_status);
resize(700, 400);
}
| void MapView::setRotation | ( | ) |
References TRACE.
Referenced by MainWindow::rotateView().
{
TRACE;
// Just a try...
_view->rotate(30);
}
| void MapView::setSnapOption | ( | DrawView::SnapOptions | ms | ) | [inline] |
References DrawView::setSnapOption().
Referenced by MainWindow::setSnapX(), and MainWindow::setSnapY().
{_view->setSnapOption(ms);}
| void MapView::setSnapType | ( | DrawView::SnapType | ms | ) | [inline] |
References DrawView::setSnapType().
Referenced by MainWindow::setSnapContours(), MainWindow::setSnapGrid(), and MainWindow::setSnapNodes().
{_view->setSnapType(ms);}
| DrawView::SnapOptions MapView::snapOption | ( | ) | const [inline] |
References DrawView::snapOption().
Referenced by MainWindow::setActiveProject(), MainWindow::setSnapX(), and MainWindow::setSnapY().
{return _view->snapOption();}
| DrawView::SnapType MapView::snapType | ( | ) | const [inline] |
References DrawView::snapType().
Referenced by MainWindow::setActiveProject().
{return _view->snapType();}