Freeciv-3.2
|
#include <mapview.h>
Public Member Functions | |
map_view () | |
void | paint (QPainter *painter, QPaintEvent *event) |
void | find_place (int pos_x, int pos_y, int &w, int &h, int wdth, int hght, int recursive_nr) |
void | resume_searching (int pos_x, int pos_y, int &w, int &h, int wdth, int hght, int recursive_nr) |
void | update_cursor (enum cursor_type) |
Data Fields | |
bool | menu_click |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) |
void | keyPressEvent (QKeyEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | focusOutEvent (QFocusEvent *event) |
void | leaveEvent (QEvent *event) |
Private Slots | |
void | timer_event () |
Private Member Functions | |
void | shortcut_pressed (int key) |
void | shortcut_released (Qt::MouseButton mb) |
void | update_font (const QString &name, const QFont &font) |
Private Attributes | |
bool | stored_autocenter |
int | cursor_frame |
int | cursor |
map_view::map_view | ( | ) |
Constructor for map
Definition at line 196 of file mapview.cpp.
void map_view::find_place | ( | int | pos_x, |
int | pos_y, | ||
int & | w, | ||
int & | h, | ||
int | wdth, | ||
int | hght, | ||
int | recursive_nr | ||
) |
Searches place for widget with size w and height h Starts looking from position pos_x, pos_y, going clockwork Returns position as (w,h) Along with resume_searching its recursive function.
try position pos_x, pos_y, check middle and borders if aren't above other widget
Definition at line 328 of file mapview.cpp.
Referenced by resume_searching().
|
protected |
Focus lost event
Definition at line 263 of file mapview.cpp.
Keyboard handler for map_view
Definition at line 119 of file mapctrl.cpp.
|
protected |
Leave event
Definition at line 271 of file mapview.cpp.
|
protected |
Mouse movement handler for map_view
Definition at line 537 of file mapctrl.cpp.
|
protected |
Mouse buttons handler for map_view
Definition at line 521 of file mapctrl.cpp.
|
protected |
Mouse release event for map_view
Definition at line 529 of file mapctrl.cpp.
void map_view::paint | ( | QPainter * | painter, |
QPaintEvent * | event | ||
) |
Redraws given rectangle on map
Definition at line 291 of file mapview.cpp.
Referenced by paintEvent().
|
protected |
Slot inherited from QPixamp
Definition at line 279 of file mapview.cpp.
void map_view::resume_searching | ( | int | pos_x, |
int | pos_y, | ||
int & | w, | ||
int & | h, | ||
int | wdth, | ||
int | hght, | ||
int | recursive_nr | ||
) |
Sets new point for new search
Definition at line 301 of file mapview.cpp.
Referenced by find_place().
Pressed mouse or keyboard
Definition at line 214 of file mapctrl.cpp.
Referenced by keyPressEvent(), and mousePressEvent().
|
private |
Released mouse buttons
Definition at line 483 of file mapctrl.cpp.
Referenced by mouseReleaseEvent().
|
privateslot |
void map_view::update_cursor | ( | enum cursor_type | ct | ) |
Updates cursor
Definition at line 213 of file mapview.cpp.
Referenced by focusOutEvent(), leaveEvent(), and timer_event().
Updates fonts
Definition at line 252 of file mapview.cpp.
|
private |
Definition at line 109 of file mapview.h.
Referenced by map_view(), timer_event(), and update_cursor().
|
private |
Definition at line 108 of file mapview.h.
Referenced by timer_event(), and update_cursor().
bool map_view::menu_click |
Definition at line 92 of file mapview.h.
Referenced by map_view(), and shortcut_released().
|
private |
Definition at line 107 of file mapview.h.
Referenced by map_view(), shortcut_pressed(), and shortcut_released().