Freeciv-3.2: hud_action Class Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Signals | Public Member Functions | Data Fields | Protected Member Functions | Private Slots | Private Attributes
hud_action Class Reference

`#include <hudwidget.h>`

Inheritance diagram for hud_action:

## Signals

void | left_clicked ()
void | right_clicked ()

## Public Member Functions

| hud_action (QWidget *parent)
| ~hud_action ()
void | set_pixmap (QPixmap *p)

## Data Fields

shortcut_id | action_shortcut

## Protected Member Functions

void | paintEvent (QPaintEvent *event)
void | mousePressEvent (QMouseEvent *e)
void | mouseMoveEvent (QMouseEvent *event)
void | leaveEvent (QEvent *event)
void | enterEvent (QEnterEvent *event)

## Private Slots

void | on_clicked ()
void | on_right_clicked ()

## Private Attributes

QPixmap * | action_pixmap
bool | focus

## Detailed Description

Definition at line 156 of file hudwidget.h.

## Constructor & Destructor Documentation

## ◆ hud_action()

hud_action::hud_action | ( | QWidget * | parent | ) |

Hud action constructor, used to show one action

Definition at line 817 of file hudwidget.cpp.

## ◆ ~hud_action()

hud_action::~hud_action | ( |  | ) |

Hud action destructor

Definition at line 862 of file hudwidget.cpp.

## Member Function Documentation

## ◆ enterEvent()

void hud_action::enterEvent | ( | QEnterEvent * | event | ) |

protected

Enter event for hud_action, used to get status of pixmap higlight

Definition at line 904 of file hudwidget.cpp.

## ◆ leaveEvent()

void hud_action::leaveEvent | ( | QEvent * | event | ) |

protected

Leave event for hud_action, used to get status of pixmap higlight

Definition at line 893 of file hudwidget.cpp.

## ◆ left_clicked

void hud_action::left_clicked | ( |  | ) |

signal

Referenced by hud_action(), and mousePressEvent().

## ◆ mouseMoveEvent()

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

protected

Mouse move event for hud_action, draw focus

Definition at line 884 of file hudwidget.cpp.

## ◆ mousePressEvent()

void hud_action::mousePressEvent | ( | QMouseEvent * | e | ) |

protected

Mouse press event for hud_action

Definition at line 872 of file hudwidget.cpp.

## ◆ on_clicked

void hud_action::on_clicked | ( |  | ) |

privateslot

Left click event for hud_action

Definition at line 924 of file hudwidget.cpp.

Referenced by hud_action().

## ◆ on_right_clicked

void hud_action::on_right_clicked | ( |  | ) |

privateslot

Right click event for hud_action

Definition at line 917 of file hudwidget.cpp.

## ◆ paintEvent()

void hud_action::paintEvent | ( | QPaintEvent * | event | ) |

protected

Custom painting for hud_action

Definition at line 837 of file hudwidget.cpp.

## ◆ right_clicked

void hud_action::right_clicked | ( |  | ) |

signal

Referenced by mousePressEvent().

## ◆ set_pixmap()

void hud_action::set_pixmap | ( | QPixmap * | p | ) |

Sets given pixmap for hud_action

Definition at line 829 of file hudwidget.cpp.

Referenced by unit_actions::update_actions().

## Field Documentation

## ◆ action_pixmap

QPixmap* hud_action::action_pixmap

private

Definition at line 159 of file hudwidget.h.

Referenced by hud_action(), paintEvent(), set_pixmap(), and ~hud_action().

## ◆ action_shortcut

shortcut_id hud_action::action_shortcut

Definition at line 165 of file hudwidget.h.

Referenced by on_clicked(), and unit_actions::update_actions().

## ◆ focus

bool hud_action::focus

private

Definition at line 160 of file hudwidget.h.

Referenced by hud_action(), leaveEvent(), mouseMoveEvent(), and paintEvent().