16 #include <QPropertyAnimation>
137 struct city *pcity,
int *width,
int *height);
Renders the map on widgets.
A dialog to perform debugging of the tileset.
Q_DISABLE_COPY(info_tile)
static info_tile * m_instance
static void drop()
Deletes current instance.
void calc_size()
Calculates size of info_tile and moves it to be fully visible.
static info_tile * i(struct tile *p=nullptr)
Returns given instance.
info_tile(struct tile *ptile, QWidget *parent=0)
Constructor for info_tile.
static bool shown()
Check if the info tile is currently shown.
void mouseReleaseEvent(QMouseEvent *event) override
Mouse release event for map_view.
void paintEvent(QPaintEvent *event) override
Slot inherited from QPixamp.
void scale_changed(double scale) const
void mousePressEvent(QMouseEvent *event) override
Mouse buttons handler for map_view.
void resizeEvent(QResizeEvent *event) override
The widget has been resized.
void set_scale_now(double scale)
Sets the map scale immediately without doing any animation.
void keyPressEvent(QKeyEvent *event) override
Keyboard handler for map_view.
std::unique_ptr< QPropertyAnimation > m_scale_animation
void timer_event()
Timer for cursor.
map_view()
Constructor for map.
void zoom_out()
Zooms out by 20%.
void center_on_tile(tile *tile, bool animate=true)
Centers the view on a tile.
void update_cursor(enum cursor_type)
Updates cursor.
void zoom_reset()
Resets the zoom level.
std::vector< QPointer< fcwidget > > m_hidden_fcwidgets
friend void debug_tile(tile *tile)
Callback to set the tile being debugged.
void hide_all_fcwidgets()
Hides all fcwidgets (reports etc).
void focusOutEvent(QFocusEvent *event) override
Focus lost event.
freeciv::renderer * m_renderer
QPoint find_place(const QSize &size) const
Finds a suitable location for a widget of the given size, avoiding overlap with other widgets.
void show_all_fcwidgets()
Shows all fcwidgets (reports etc).
void leaveEvent(QEvent *event) override
Leave event.
void show_debugger()
Opens the tileset debugger.
void wheelEvent(QWheelEvent *event) override
The user wants to scroll.
freeciv::tileset_debugger * debugger() const
void hide_debugger()
Closes the tileset debugger if it is open.
std::unique_ptr< QPropertyAnimation > m_origin_animation
void set_scale(double scale, bool animate=true)
Sets the map scale.
void mouseMoveEvent(QMouseEvent *event) override
Mouse movement handler for map_view.
void zoom_in()
Zooms in by 20%.
void shortcut_pressed(shortcut_id key)
Pressed mouse or keyboard.
QPointer< freeciv::tileset_debugger > m_debugger
void shortcut_released(Qt::MouseButton mb)
Released mouse buttons.
void popup_tile_info(struct tile *ptile)
Popups information label tile.
bool mapview_is_frozen()
Return whether the map should be drawn or not.
void popdown_tile_info()
Popdowns information label tile.
void show_city_desc(QPixmap *pcanvas, int canvas_x, int canvas_y, struct city *pcity, int *width, int *height)
Draw a description for the given city.
bool is_point_in_area(int x, int y, int px, int py, int pxe, int pye)
void draw_calculated_trade_routes(QPainter *painter)
Draws calculated trade routes.