Freeciv-3.3
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions | Private Attributes
hud_input_box Class Reference

#include <hudwidget.h>

+ Inheritance diagram for hud_input_box:

Public Member Functions

 hud_input_box (QWidget *parent)
 
 ~hud_input_box ()
 
void set_text_title_definput (QString s1, QString s2, QString def_input)
 

Data Fields

QLineEdit input_edit
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 
void timerEvent (QTimerEvent *event)
 

Private Attributes

QElapsedTimer m_timer
 
int m_animate_step
 
QString text
 
QString title
 
QFontMetricsfm_text
 
QFontMetricsfm_title
 
QFont f_text
 
QString cs1
 
QString cs2
 
QFont f_title
 
int top
 
int mult
 

Detailed Description

Definition at line 110 of file hudwidget.h.

Constructor & Destructor Documentation

◆ hud_input_box()

hud_input_box::hud_input_box ( QWidget *  parent)

Custom input box constructor

Definition at line 354 of file hudwidget.cpp.

◆ ~hud_input_box()

hud_input_box::~hud_input_box ( )

Custom input box destructor

Definition at line 386 of file hudwidget.cpp.

Member Function Documentation

◆ paintEvent()

void hud_input_box::paintEvent ( QPaintEvent event)
protected

Paint event for custom input box

Definition at line 463 of file hudwidget.cpp.

◆ set_text_title_definput()

void hud_input_box::set_text_title_definput ( QString  s1,
QString  s2,
QString  def_input 
)

Sets text, title and default text and shows input box

Definition at line 395 of file hudwidget.cpp.

◆ timerEvent()

void hud_input_box::timerEvent ( QTimerEvent event)
protected

Timer event used to animate input box

Definition at line 454 of file hudwidget.cpp.

Field Documentation

◆ cs1

QString hud_input_box::cs1
private

Definition at line 131 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title_definput().

◆ cs2

QString hud_input_box::cs2
private

Definition at line 131 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title_definput().

◆ f_text

QFont hud_input_box::f_text
private

Definition at line 130 of file hudwidget.h.

Referenced by hud_input_box(), paintEvent(), and set_text_title_definput().

◆ f_title

QFont hud_input_box::f_title
private

Definition at line 132 of file hudwidget.h.

Referenced by hud_input_box(), and paintEvent().

◆ fm_text

QFontMetrics* hud_input_box::fm_text
private

Definition at line 128 of file hudwidget.h.

Referenced by hud_input_box(), paintEvent(), set_text_title_definput(), and ~hud_input_box().

◆ fm_title

QFontMetrics* hud_input_box::fm_title
private

Definition at line 129 of file hudwidget.h.

Referenced by hud_input_box(), paintEvent(), set_text_title_definput(), and ~hud_input_box().

◆ input_edit

QLineEdit hud_input_box::input_edit

Definition at line 119 of file hudwidget.h.

Referenced by set_text_title_definput().

◆ m_animate_step

int hud_input_box::m_animate_step
private

Definition at line 125 of file hudwidget.h.

Referenced by hud_input_box(), paintEvent(), and timerEvent().

◆ m_timer

QElapsedTimer hud_input_box::m_timer
private

Definition at line 113 of file hudwidget.h.

Referenced by set_text_title_definput(), and timerEvent().

◆ mult

int hud_input_box::mult
private

Definition at line 134 of file hudwidget.h.

Referenced by hud_input_box(), paintEvent(), and set_text_title_definput().

◆ text

QString hud_input_box::text
private

Definition at line 126 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title_definput().

◆ title

QString hud_input_box::title
private

Definition at line 127 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title_definput().

◆ top

int hud_input_box::top
private

Definition at line 133 of file hudwidget.h.

Referenced by hud_input_box(), paintEvent(), and set_text_title_definput().