Freeciv-3.3
|
#include <sidebar.h>
Public Slots | |
void | sblink () |
void | some_slot () |
Public Member Functions | |
fc_sidewidget (QPixmap *pix, QString label, QString pg, pfcn_bool func, int type=SW_STD) | |
~fc_sidewidget () | |
int | get_priority () |
QPixmap * | get_pixmap () |
void | paint (QPainter *painter, QPaintEvent *event) |
void | resize_pixmap (int width, int height) |
void | set_custom_labels (QString l) |
void | set_label (QString str) |
void | set_left_click (pfcn_bool func) |
void | set_pixmap (QPixmap *pm) |
void | set_right_click (pfcn func) |
void | set_tooltip (QString tooltip) |
void | set_wheel_down (pfcn func) |
void | set_wheel_up (pfcn func) |
void | update_final_pixmap () |
void | update_fonts () |
Data Fields | |
bool | blink |
bool | keep_blinking |
bool | disabled |
int | standard |
QString | page |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) |
void | enterEvent (QEnterEvent *event) |
void | leaveEvent (QEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | paintEvent (QPaintEvent *event) |
void | wheelEvent (QWheelEvent *event) |
Private Member Functions | |
void | paint () |
Private Attributes | |
bool | hover |
pfcn | right_click |
pfcn | wheel_down |
pfcn | wheel_up |
pfcn_bool | left_click |
QFont * | sfont |
QFont * | info_font |
QPixmap * | def_pixmap |
QPixmap * | final_pixmap |
QPixmap * | scaled_pixmap |
QString | custom_label |
QString | desc |
QTimer * | timer |
fc_sidewidget::fc_sidewidget | ( | QPixmap * | pix, |
QString | label, | ||
QString | pg, | ||
pfcn_bool | func, | ||
int | type = SW_STD |
||
) |
Sidewidget constructor
Definition at line 62 of file sidebar.cpp.
fc_sidewidget::~fc_sidewidget | ( | ) |
Sidewidget destructor
Definition at line 99 of file sidebar.cpp.
|
protected |
Context menu requested
Definition at line 258 of file sidebar.cpp.
|
protected |
Mouse entered on widget area
Definition at line 228 of file sidebar.cpp.
QPixmap * fc_sidewidget::get_pixmap | ( | ) |
Returns scaled (not default) pixmap for sidewidget
Definition at line 168 of file sidebar.cpp.
Referenced by fc_sidebar::resize_me().
int fc_sidewidget::get_priority | ( | ) |
|
protected |
Mouse left widget area
Definition at line 244 of file sidebar.cpp.
|
protected |
Mouse press event for sidewidget
Definition at line 303 of file sidebar.cpp.
|
private |
Referenced by paintEvent().
void fc_sidewidget::paint | ( | QPainter * | painter, |
QPaintEvent * | event | ||
) |
Paints final pixmap on screeen
Definition at line 216 of file sidebar.cpp.
|
protected |
Paint event for sidewidget
Definition at line 204 of file sidebar.cpp.
Resizes default_pixmap to scaled_pixmap to fit current width, leaves default_pixmap unchanged
Definition at line 185 of file sidebar.cpp.
Referenced by fc_sidebar::resize_me().
|
slot |
Blinks current sidebar widget
Definition at line 335 of file sidebar.cpp.
Referenced by fc_sidewidget().
Sets custom text visible on top of sidewidget
Definition at line 152 of file sidebar.cpp.
Referenced by fc_client::update_info_label().
Sets default label on bottom of sidewidget
Definition at line 176 of file sidebar.cpp.
Sets callback for mouse left click
Definition at line 271 of file sidebar.cpp.
Sets default pixmap for sidewidget
Definition at line 120 of file sidebar.cpp.
Referenced by fc_client::reload_sidebar_icons().
Sets callback for mouse right click
Definition at line 279 of file sidebar.cpp.
Referenced by fc_client::create_game_page().
Sets tooltip for sidewidget
Definition at line 160 of file sidebar.cpp.
Referenced by fc_client::update_sidebar_tooltips().
Sets callback for mouse wheel down
Definition at line 287 of file sidebar.cpp.
Referenced by fc_client::create_game_page().
Sets callback for mouse wheel up
Definition at line 295 of file sidebar.cpp.
Referenced by fc_client::create_game_page().
|
slot |
Miscelanous slot, helping observe players currently, and changing science extra functionality might be added, eg by setting properties
Definition at line 356 of file sidebar.cpp.
Referenced by side_right_click_diplomacy(), and side_right_click_science().
void fc_sidewidget::update_final_pixmap | ( | ) |
Updates final pixmap and draws it on screen
Definition at line 393 of file sidebar.cpp.
Referenced by contextMenuEvent(), fc_game_tab_widget::current_changed(), leaveEvent(), fc_sidebar::resize_me(), sblink(), fc_sidebar::update_fonts(), and fc_client::update_info_label().
void fc_sidewidget::update_fonts | ( | ) |
Update sidebar fonts
Definition at line 132 of file sidebar.cpp.
Referenced by fc_sidewidget(), and fc_sidebar::update_fonts().
|
protected |
Mouse wheel event
Definition at line 319 of file sidebar.cpp.
bool fc_sidewidget::blink |
Definition at line 71 of file sidebar.h.
Referenced by fc_sidewidget(), sblink(), and update_final_pixmap().
|
private |
Definition at line 102 of file sidebar.h.
Referenced by set_custom_labels(), and update_final_pixmap().
|
private |
Definition at line 99 of file sidebar.h.
Referenced by fc_sidewidget(), resize_pixmap(), set_pixmap(), and ~fc_sidewidget().
|
private |
Definition at line 103 of file sidebar.h.
Referenced by fc_sidewidget(), set_label(), and update_final_pixmap().
bool fc_sidewidget::disabled |
Definition at line 73 of file sidebar.h.
Referenced by fc_sidewidget(), and update_final_pixmap().
|
private |
Definition at line 100 of file sidebar.h.
Referenced by fc_sidewidget(), paint(), update_final_pixmap(), and ~fc_sidewidget().
|
private |
Definition at line 92 of file sidebar.h.
Referenced by contextMenuEvent(), fc_sidewidget(), leaveEvent(), and update_final_pixmap().
|
private |
Definition at line 98 of file sidebar.h.
Referenced by fc_sidewidget(), update_final_pixmap(), update_fonts(), and ~fc_sidewidget().
|
private |
Definition at line 96 of file sidebar.h.
Referenced by fc_sidewidget(), mousePressEvent(), and set_left_click().
QString fc_sidewidget::page |
Definition at line 75 of file sidebar.h.
Referenced by fc_sidewidget(), and update_final_pixmap().
|
private |
Definition at line 93 of file sidebar.h.
Referenced by fc_sidewidget(), mousePressEvent(), and set_right_click().
|
private |
Definition at line 101 of file sidebar.h.
Referenced by fc_sidewidget(), get_pixmap(), resize_pixmap(), update_final_pixmap(), and ~fc_sidewidget().
|
private |
Definition at line 97 of file sidebar.h.
Referenced by fc_sidewidget(), update_final_pixmap(), update_fonts(), and ~fc_sidewidget().
int fc_sidewidget::standard |
Definition at line 74 of file sidebar.h.
Referenced by fc_sidewidget(), fc_sidebar::resize_me(), resize_pixmap(), and update_final_pixmap().
|
private |
Definition at line 104 of file sidebar.h.
Referenced by ~fc_sidewidget().
|
private |
Definition at line 94 of file sidebar.h.
Referenced by fc_sidewidget(), set_wheel_down(), and wheelEvent().
|
private |
Definition at line 95 of file sidebar.h.
Referenced by fc_sidewidget(), set_wheel_up(), and wheelEvent().