Freeciv-3.1
|
#include <mapview.h>
Public Member Functions | |
minimap_view (QWidget *parent) | |
~minimap_view () | |
void | paint (QPainter *painter, QPaintEvent *event) |
virtual void | update_menu () |
void | update_image () |
void | reset () |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) |
void | resizeEvent (QResizeEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | wheelEvent (QWheelEvent *event) |
void | moveEvent (QMoveEvent *event) |
void | showEvent (QShowEvent *event) |
Private Slots | |
void | update_pixmap (const QImage &image) |
void | zoom_in () |
void | zoom_out () |
Private Member Functions | |
void | draw_viewport (QPainter *painter) |
void | scale (double factor) |
void | scale_point (int &x, int &y) |
Private Attributes | |
double | scale_factor |
float | w_ratio |
float | h_ratio |
minimap_thread | thread |
QBrush | background |
QPixmap * | pix |
QPoint | cursor |
QPoint | position |
resize_widget * | rw |
Additional Inherited Members | |
Data Fields inherited from fcwidget | |
bool | was_destroyed |
minimap_view::minimap_view | ( | QWidget * | parent | ) |
Constructor for minimap
Definition at line 537 of file mapview.cpp.
minimap_view::~minimap_view | ( | ) |
Minimap_view destructor
Definition at line 558 of file mapview.cpp.
|
private |
|
protected |
Called when mouse button was pressed. Used to moving minimap.
Definition at line 958 of file mapview.cpp.
|
protected |
Mouse Handler for minimap_view Left button - moves minimap Right button - recenters on some point For wheel look mouseWheelEvent
Definition at line 922 of file mapview.cpp.
|
protected |
Called when mouse button unpressed. Restores cursor.
Definition at line 981 of file mapview.cpp.
|
protected |
Minimap is being moved, position is being remembered
Definition at line 644 of file mapview.cpp.
void minimap_view::paint | ( | QPainter * | painter, |
QPaintEvent * | event | ||
) |
Redraws visible map using stored pixmap
Definition at line 842 of file mapview.cpp.
Referenced by paintEvent().
|
protected |
Paint event for minimap
Definition at line 568 of file mapview.cpp.
void minimap_view::reset | ( | ) |
Sets minimap scale to default
Definition at line 733 of file mapview.cpp.
Referenced by fc_client::switch_page().
|
protected |
Called when minimap has been resized
Definition at line 868 of file mapview.cpp.
|
private |
Sets scaling factor for minimap
Definition at line 580 of file mapview.cpp.
Referenced by zoom_in(), and zoom_out().
|
private |
Scales point from real overview coords to scaled overview coords.
Definition at line 697 of file mapview.cpp.
Referenced by draw_viewport().
|
protected |
Minimap is just unhidden, old position is restored
Definition at line 652 of file mapview.cpp.
void minimap_view::update_image | ( | ) |
Updates minimap's pixmap
Definition at line 831 of file mapview.cpp.
Referenced by mousePressEvent(), resizeEvent(), and scale().
|
virtual |
Called by close widget, cause widget has been hidden. Updates menu.
Implements fcwidget.
Definition at line 636 of file mapview.cpp.
|
privateslot |
Slot for updating pixmap from thread's image
Definition at line 741 of file mapview.cpp.
Referenced by minimap_view().
|
protected |
Wheel event for minimap - zooms it in or out
Definition at line 888 of file mapview.cpp.
|
privateslot |
Sets scale factor to scale minimap 20% up
Definition at line 901 of file mapview.cpp.
Referenced by wheelEvent().
|
privateslot |
Sets scale factor to scale minimap 20% down
Definition at line 911 of file mapview.cpp.
Referenced by wheelEvent().
|
private |
Definition at line 251 of file mapview.h.
Referenced by minimap_view().
|
private |
Definition at line 253 of file mapview.h.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 249 of file mapview.h.
Referenced by draw_viewport(), minimap_view(), mousePressEvent(), paint(), and resizeEvent().
|
private |
Definition at line 252 of file mapview.h.
Referenced by minimap_view(), paint(), update_pixmap(), and ~minimap_view().
|
private |
Definition at line 254 of file mapview.h.
Referenced by moveEvent(), and showEvent().
|
private |
Definition at line 255 of file mapview.h.
Referenced by minimap_view(), and paint().
|
private |
Definition at line 248 of file mapview.h.
Referenced by draw_viewport(), minimap_view(), mousePressEvent(), paint(), reset(), scale(), scale_point(), update_image(), and zoom_in().
|
private |
Definition at line 250 of file mapview.h.
Referenced by minimap_view(), and update_image().
|
private |
Definition at line 249 of file mapview.h.
Referenced by draw_viewport(), minimap_view(), mousePressEvent(), paint(), and resizeEvent().