Logo Search packages:      
Sourcecode: qmk-groundstation version File versions  Download package

qmapcontrol::MapControl::MapControl ( QSize  size,
MouseMode  mousemode = Panning 
)

The constructor of MapControl.

The MapControl is the widget which displays the maps. The size describes the area, which gets filled with map data When you give no MouseMode, the mouse is moving the map. You can change the MouseMode on runtime, to e.g. Dragging, which lets the user drag a rectangular box. After the dragging a signal with the size of the box is emitted. The mousemode ┬┤None┬┤ can be used, to completely define the control of the map yourself.

Parameters:
size the size which the widget should fill with map data
mousemode the way mouseevents are handled

Definition at line 29 of file mapcontrol.cpp.

References updateRequestNew().

        : size(size), mymousemode(mousemode), scaleVisible(false)
    {
        layermanager = new LayerManager(this, size);
        screen_middle = QPoint(size.width()/2, size.height()/2);

        mousepressed = false;

        connect(ImageManager::instance(), SIGNAL(imageReceived()),
                this, SLOT(updateRequestNew()));

        connect(ImageManager::instance(), SIGNAL(loadingFinished()),
                this, SLOT(loadingFinished()));

        this->setMaximumSize(size.width()+1, size.height()+1);
    }


Generated by  Doxygen 1.6.0   Back to index