Public Member Functions |
| win (QWidget *qwidj, uint wid, const char *wname=NULL, uint height=1, uint width=1) |
| win () |
| Empty constructor, do not use.
|
virtual void | show () |
virtual QWidget * | get_widget () |
virtual void | save (const string &filename, bool confirm=false) |
| Save the Qt window to 'filename'.png.
|
virtual void | save_mat (const string &filename, bool confirm=false) |
virtual void | set_silent (const std::string *filename) |
| Do not display, instead save to image file 'filename'.
|
virtual void | freeze_style (bool freeze) |
virtual void | freeze_window_size (uint h, uint w) |
| Force window size to hxw and forbid any resizing.
|
virtual void | set_title (const char *title) |
| Change window title.
|
virtual void | set_wupdate (bool ud) |
virtual void | resize_window (uint h, uint w, bool force=false) |
virtual void | update_window (bool activate=false) |
virtual bool | busy_drawing () |
| Returns true if busy drawing.
|
virtual void | add_text (const std::string *s) |
| Add text a current text location (See 'set_text_origin()').
|
virtual void | add_arrow (int h1, int w1, int h2, int w2) |
virtual void | add_flow (idx< float > *flow, int h, int w) |
virtual void | add_box (float h0, float w0, float h, float w, ubyte r, ubyte g, ubyte b, ubyte a, string *s) |
virtual void | add_cross (float h0, float w0, float length, ubyte r, ubyte g, ubyte b, ubyte a, string *s) |
virtual void | add_ellipse (float h0, float w0, float h, float w, ubyte r, ubyte g, ubyte b, ubyte a, string *s) |
virtual void | add_image (idx< ubyte > &img, uint h0, uint w0) |
virtual void | add_mask (idx< ubyte > *img, uint h0, uint w0, ubyte r, ubyte g, ubyte b, ubyte a) |
virtual void | set_text_origin (float h0, float w0) |
| Change current location of text to be drawn to (h0,w0).
|
virtual void | clear () |
virtual void | clear_resize () |
| Clears the window and resizes it to 1x1.
|
virtual void | clear_all (bool clear_tmp=false) |
void | clear_text (bool clear_tmp=false) |
void | clear_arrows (bool clear_tmp=false) |
void | clear_boxes (bool clear_tmp=false) |
void | clear_crosses (bool clear_tmp=false) |
void | clear_ellipses (bool clear_tmp=false) |
void | clear_images (bool clear_tmp=false) |
void | clear_masks (bool clear_tmp=false) |
virtual void | set_text_colors (ubyte fg_r, ubyte fg_g, ubyte fg_b, ubyte fg_a, ubyte bg_r, ubyte bg_g, ubyte bg_b, ubyte bg_a, bool ignore_frozen=false) |
virtual void | set_bg_colors (ubyte r, ubyte g, ubyte b) |
| Set color of background.
|
virtual void | set_font_size (int sz) |
| Set font to this size.
|
virtual int | pop_key_pressed () |
virtual void | add_scroll_box (scroll_box0 *sb) |
virtual void | remove_scroll_box (scroll_box0 *sb) |
virtual void | replace_scroll_box_with_copy (scroll_box0 *sb) |
virtual void | paint (QPainter &painter, double scale=1.0) |
| Draw all elements with scale 'scale'.
|
virtual void | draw_text (QPainter &painter) |
| Draw all text into painter with scale 'scale'.
|
Protected Member Functions |
void | wheelEvent (QWheelEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | keyPressEvent (QKeyEvent *event) |
void | keyReleaseEvent (QKeyEvent *event) |
Protected Attributes |
QWidget * | qw |
| The widget object of children classes.
|
QPixmap * | pixmap |
QPoint | pixmapOffset |
QPoint | lastDragPos |
double | pixmapScale |
double | curScale |
float | scaleIncr |
idx< ubyte > * | buffer |
uint | buffer_maxh |
uint | buffer_maxw |
QVector< QRgb > | colorTable |
QImage * | qimage |
vector< text * > | texts |
vector< text * > | texts_tmp |
text * | txt |
vector< arrow * > | arrows |
vector< arrow * > | arrows_tmp |
vector< box * > | boxes |
vector< box * > | boxes_tmp |
vector< cross * > | crosses |
vector< cross * > | crosses_tmp |
vector< box * > | ellipses |
vector< box * > | ellipses_tmp |
vector< image * > | images |
vector< image * > | images_tmp |
vector< imask * > | masks |
vector< imask * > | masks_tmp |
bool | silent |
uint | id |
string | savefname |
float | text_h0 |
float | text_w0 |
bool | pos_reset |
bool | wupdate |
QColor | text_fg_color |
QColor | text_bg_color |
QColor | bg_color |
unsigned char | fg_r |
unsigned char | fg_g |
unsigned char | fg_b |
unsigned char | fg_a |
unsigned char | bg_r |
unsigned char | bg_g |
unsigned char | bg_b |
unsigned char | bg_a |
int | wupdate_ndisable |
bool | frozen_style |
| style is frozen or not
|
bool | frozen_size |
| window size is frozen
|
idxdim | frozen_dims |
| Dimensions of frozen window.
|
list< int > | keyspressed |
| a list of key pressed events
|
int | font_size |
| The size of the font.
|
bool | ctrl_on |
| ctrl key is on or not.
|
bool | text_on |
| Text is displayed or not.
|
bool | images_only |
| Only display images if true.
|
scroll_box0 * | scrollbox |
bool | busy |
| Busy drawing.
|
uint | drawing_mode |