Freeciv-3.2
|
#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 535 of file mapview.cpp.
minimap_view::~minimap_view | ( | ) |
Minimap_view destructor
Definition at line 556 of file mapview.cpp.
|
protected |
Called when mouse button was pressed. Used to moving minimap.
Definition at line 956 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 920 of file mapview.cpp.
|
protected |
Called when mouse button unpressed. Restores cursor.
Definition at line 979 of file mapview.cpp.
|
protected |
Minimap is being moved, position is being remembered
Definition at line 642 of file mapview.cpp.
void minimap_view::paint | ( | QPainter * | painter, |
QPaintEvent * | event | ||
) |
Redraws visible map using stored pixmap
Definition at line 840 of file mapview.cpp.
Referenced by paintEvent().
|
protected |
Paint event for minimap
Definition at line 566 of file mapview.cpp.
void minimap_view::reset | ( | ) |
Sets minimap scale to default
Definition at line 731 of file mapview.cpp.
Referenced by fc_client::switch_page().
|
protected |
Called when minimap has been resized
Definition at line 866 of file mapview.cpp.
Sets scaling factor for minimap
Definition at line 578 of file mapview.cpp.
Scales point from real overview coords to scaled overview coords.
Definition at line 695 of file mapview.cpp.
Referenced by draw_viewport().
|
protected |
Minimap is just unhidden, old position is restored
Definition at line 650 of file mapview.cpp.
void minimap_view::update_image | ( | ) |
Updates minimap's pixmap
Definition at line 829 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 634 of file mapview.cpp.
Slot for updating pixmap from thread's image
Definition at line 739 of file mapview.cpp.
Referenced by minimap_view().
|
protected |
Wheel event for minimap - zooms it in or out
Definition at line 886 of file mapview.cpp.
|
privateslot |
Sets scale factor to scale minimap 20% up
Definition at line 899 of file mapview.cpp.
Referenced by wheelEvent().
|
privateslot |
Sets scale factor to scale minimap 20% down
Definition at line 909 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().