Freeciv-3.3
|
#include <QMouseEvent>
#include <QPainter>
#include <QPixmap>
#include <QToolTip>
#include <QWheelEvent>
#include "log.h"
#include "support.h"
#include "calendar.h"
#include "game.h"
#include "map.h"
#include "research.h"
#include "climisc.h"
#include "mapctrl_common.h"
#include "menu.h"
#include "movement.h"
#include "overview_common.h"
#include "sprite.h"
#include "repodlgs.h"
#include "text.h"
#include "zoom.h"
#include "colors.h"
#include "fc_client.h"
#include "gui_main.h"
#include "mapview.h"
#include "qtg_cxxside.h"
#include "sidebar.h"
Go to the source code of this file.
Macros | |
#define | MAX_DIRTY_RECTS 20 |
#define MAX_DIRTY_RECTS 20 |
Definition at line 59 of file mapview.cpp.
|
extern |
Closes city dialog
Definition at line 3839 of file citydlg.cpp.
Referenced by qtg_popdown_all_city_dialogs(), qtg_popdown_city_dialog(), city_dialog::refresh(), and tileset_changed().
Mark the entire screen area as "dirty" so that we can flush it later.
Definition at line 1159 of file mapview.cpp.
Referenced by mapview_thaw().
Mark the rectangular region as "dirty" so that we know to flush it later.
Definition at line 1141 of file mapview.cpp.
Draws calculated trade routes
Definition at line 82 of file mapview.cpp.
Referenced by map_view::paint().
Area Selection
Definition at line 1256 of file mapview.cpp.
Flush all regions that have been previously marked as dirty. See dirty_rect and dirty_all. This function is generally called after we've processed a batch of drawing operations.
Definition at line 1172 of file mapview.cpp.
|
static |
Flush the given part of the canvas buffer (if there is one) to the screen.
Definition at line 1131 of file mapview.cpp.
Referenced by flush_dirty().
Return the dimensions of the area (container widget; maximum size) for the overview.
Definition at line 1288 of file mapview.cpp.
Return a canvas that is the overview window.
Definition at line 1121 of file mapview.cpp.
Get the text showing the timeout. This is generally displayed on the info panel.
Not re-entrant
Definition at line 1604 of file text.c.
Referenced by qtg_update_timeout_label(), and update_timeout_label().
Do any necessary synchronization to make sure the screen is up-to-date. The canvas should have already been flushed to screen via flush_dirty - all this function does is make sure the hardware has caught up.
Definition at line 1196 of file mapview.cpp.
Converts gui to overview position.
Definition at line 590 of file mapview.cpp.
Referenced by minimap_view::draw_viewport(), minimap_view::scale_point(), and unscale_point().
Check if point x, y is in area (px -> pxe, py - pye)
Definition at line 71 of file mapview.cpp.
Referenced by map_view::find_place().
Freeze the drawing of the map.
Definition at line 1334 of file mapview.cpp.
Return whether the map should be drawn or not.
Definition at line 1326 of file mapview.cpp.
Referenced by dirty_all(), dirty_rect(), and flush_dirty().
Thaw the drawing of the map.
Definition at line 1342 of file mapview.cpp.
Called when the map size changes. This may be used to change the size of the GUI element holding the overview canvas. The overview.width and overview.height are updated if this function is called. It's used for first creation of overview only, later overview stays the same size, scaled by qt-specific function.
Definition at line 1302 of file mapview.cpp.
Put overlay tile to pixmap
Definition at line 1229 of file mapview.cpp.
Referenced by put_cross_overlay_tile().
Draw a cross-hair overlay on a tile.
Definition at line 1242 of file mapview.cpp.
Refresh map canvas size information
Definition at line 1459 of file mapview.cpp.
Referenced by setup_gui_funcs().
void qtg_start_turn | ( | ) |
Update the timeout display. The timeout is the time until the turn ends, in seconds.
Definition at line 1086 of file mapview.cpp.
Referenced by setup_gui_funcs().
void set_indicator_icons | ( | struct sprite * | bulb, |
struct sprite * | sol, | ||
struct sprite * | flake, | ||
struct sprite * | gov | ||
) |
Set information for the indicator icons typically shown in the main client window. The parameters tell which sprite to use for the indicator.
Definition at line 1112 of file mapview.cpp.
This function is called when the tileset is changed.
Definition at line 1264 of file mapview.cpp.
Scales point from scaled overview coords to real overview coords.
Definition at line 713 of file mapview.cpp.
Referenced by minimap_view::mousePressEvent(), and minimap_thread::run().
Update (refresh) all city descriptions on the mapview.
Definition at line 1221 of file mapview.cpp.
Typically an info box is provided to tell the player about the state of their civilization. This function is called when the label is changed.
Definition at line 990 of file mapview.cpp.
Update (refresh) the locations of the mapview scrollbars (if it uses them).
Definition at line 1205 of file mapview.cpp.
Update the size of the sliders on the scrollbars.
Definition at line 1213 of file mapview.cpp.
void update_mouse_cursor | ( | enum cursor_type | new_cursor_type | ) |
Update the mouse cursor. Cursor type depends on what user is doing and pointing.
Definition at line 1077 of file mapview.cpp.
Sets the position of the overview scroll window based on mapview position.
Definition at line 1318 of file mapview.cpp.
If do_restore is false it should change the turn button style (to draw the user's attention to it). If called regularly from a timer this will give a blinking turn done button. If do_restore is true this should reset the turn done button to the default style.
Definition at line 1098 of file mapview.cpp.
Update the information label which gives info on the current unit and the tile under the current unit, for specified unit. Note that in practice punit is always the focus unit.
Clears label if punit is nullptr.
Typically also updates the cursor for the map_canvas (this is related because the info label may includes "select destination" prompt etc). And it may call update_unit_pix_label() to update the icons for units on this tile.
Definition at line 1066 of file mapview.cpp.
Referenced by tileset_changed().
|
static |
Definition at line 61 of file mapview.cpp.
Referenced by dirty_rect(), and flush_dirty().
|
extern |
Definition at line 68 of file pages.cpp.
Referenced by qtg_start_turn().
|
extern |
Definition at line 81 of file pages.cpp.
Referenced by cycle_enemy_units(), and qtg_start_turn().
|
extern |
Definition at line 70 of file pages.cpp.
Referenced by center_next_enemy_city(), and qtg_start_turn().
|
extern |
Definition at line 69 of file pages.cpp.
Referenced by center_next_player_capital(), center_next_player_city(), and qtg_start_turn().
|
static |
Definition at line 55 of file mapview.cpp.
Referenced by mapview_freeze(), mapview_is_frozen(), and mapview_thaw().
|
static |
Definition at line 60 of file mapview.cpp.
Referenced by dirty_all(), dirty_rect(), and flush_dirty().