mkRPG
Public Types | Public Slots | Signals | Public Member Functions
MapViewer Class Reference

The MapViewer class provides a widget to display and edit a Map using a MapPainter. More...

#include <mapviewer.h>

Public Types

enum  SelectionMode { PencilSelection, RectangleSelection, RegionSelection }
 The SelectionMode enum describes the different behaviour the cell selection can have. More...

Public Slots

void updateRequest ()

Signals

void viewSizeChanged (QSize)
void selectionChanged ()

Public Member Functions

 MapViewer (QWidget *parent=0)
void setMap (Map *m)
void updateMap ()
MapPaintermapPainter ()
void setSelectionMode (SelectionMode m)
SelectionMode selectionMode () const

Detailed Description

The MapViewer class provides a widget to display and edit a Map using a MapPainter.

Several selection modes are available. Combined with the ```Ctrl``` and ```Shift``` modifiers, a colossal amount of selection possibilities is offered. See SelectionMode for more information.


Member Enumeration Documentation

The SelectionMode enum describes the different behaviour the cell selection can have.

The selection's behaviour in based on to parameters :

  • The keyboard modifiers that are pressed during selection.
  • The current selection mode

If the ```Ctrl``` modifier is pressed, the past selected cells stay selected otherwise, they are all unselected

If the ```Shift``` modifier is pressed, the selection is inverted.

Three modes of selection exists :

Enumerator:
PencilSelection 

The cells under the cursor are selected

RectangleSelection 

The cells inside the rectangle defined by the clicked cell and the cell under the cursor are selected

RegionSelection 

The cells inside the region drawn by cursor's moves are selected


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Defines