Freeciv-3.3: notify_dialog Class Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
notify_dialog Class Reference

`#include <dialogs.h>`

Inheritance diagram for notify_dialog:

## Public Member Functions

| notify_dialog (const char *caption, const char *headline, const char *lines, QWidget *parent=0)
virtual void | update_menu ()
| ~notify_dialog ()
void | restart ()

## Protected Member Functions

void | mousePressEvent (QMouseEvent *event)
void | mouseMoveEvent (QMouseEvent *event)
void | mouseReleaseEvent (QMouseEvent *event)

## Private Member Functions

void | paintEvent (QPaintEvent *paint_event)
void | calc_size (int &x, int &y)

## Private Attributes

close_widget * | cw
QLabel * | label
QVBoxLayout * | layout
QString | qcaption
QString | qheadline
QStringList | qlist
QFont | small_font
QPoint | cursor

## Additional Inherited Members

Data Fields inherited from fcwidget
bool | was_destroyed

## Detailed Description

Definition at line 173 of file dialogs.h.

## Constructor & Destructor Documentation

## ◆ notify_dialog()

notify_dialog::notify_dialog | ( | const char * | caption,
|  | const char * | headline,
|  | const char * | lines,
|  | QWidget * | parent = `0`
| ) |  |

Constructor for notify dialog

Definition at line 879 of file dialogs.cpp.

## ◆ ~notify_dialog()

notify_dialog::~notify_dialog | ( |  | ) |

Destructor for notify dialog, notice that somehow object is not destroyed immediately, so it can be still visible for parent, check boolean was_destroyed if u suspect it could not be destroyed yet

Definition at line 1024 of file dialogs.cpp.

## Member Function Documentation

## ◆ calc_size()

void notify_dialog::calc_size | ( | int & | x,
|  | int & | y
| ) |  |

private

Calculates size of notify dialog

Definition at line 940 of file dialogs.cpp.

Referenced by notify_dialog().

## ◆ mouseMoveEvent()

void notify_dialog::mouseMoveEvent | ( | QMouseEvent * | event | ) |

protected

Called when mouse button was pressed and moving around

Definition at line 995 of file dialogs.cpp.

## ◆ mousePressEvent()

void notify_dialog::mousePressEvent | ( | QMouseEvent * | event | ) |

protected

Called when mouse button was pressed, just to close on right click

Definition at line 982 of file dialogs.cpp.

## ◆ mouseReleaseEvent()

void notify_dialog::mouseReleaseEvent | ( | QMouseEvent * | event | ) |

protected

Called when mouse button unpressed. Restores cursor.

Definition at line 1005 of file dialogs.cpp.

## ◆ paintEvent()

void notify_dialog::paintEvent | ( | QPaintEvent * | paint_event | ) |

private

Paint Event for notify dialog

Definition at line 959 of file dialogs.cpp.

## ◆ restart()

void notify_dialog::restart | ( |  | ) |

Starts new copy of notify dialog and closes current one

Definition at line 912 of file dialogs.cpp.

Referenced by restart_notify_dialogs().

## ◆ update_menu()

void notify_dialog::update_menu | ( |  | ) |

virtual

Called when close button was pressed

Implements fcwidget.

Definition at line 1013 of file dialogs.cpp.

## Field Documentation

## ◆ cursor

QPoint notify_dialog::cursor

private

Definition at line 196 of file dialogs.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

## ◆ cw

close_widget* notify_dialog::cw

private

Definition at line 189 of file dialogs.h.

Referenced by notify_dialog(), and paintEvent().

## ◆ label

QLabel* notify_dialog::label

private

Definition at line 190 of file dialogs.h.

## ◆ layout

QVBoxLayout* notify_dialog::layout

private

Definition at line 191 of file dialogs.h.

## ◆ qcaption

QString notify_dialog::qcaption

private

Definition at line 192 of file dialogs.h.

Referenced by calc_size(), notify_dialog(), paintEvent(), and restart().

## ◆ qheadline

QString notify_dialog::qheadline

private

Definition at line 193 of file dialogs.h.

Referenced by calc_size(), notify_dialog(), paintEvent(), and restart().

## ◆ qlist

QStringList notify_dialog::qlist

private

Definition at line 194 of file dialogs.h.

Referenced by calc_size(), notify_dialog(), paintEvent(), and restart().

## ◆ small_font

QFont notify_dialog::small_font

private

Definition at line 195 of file dialogs.h.

Referenced by calc_size(), notify_dialog(), and paintEvent().