Freeciv21
Develop your civilization from humble roots to a global empire
goto_dialog Class Reference

#include <gotodlg.h>

+ Inheritance diagram for goto_dialog:
+ Collaboration diagram for goto_dialog:

Public Member Functions

 goto_dialog (QWidget *parent=0)
 Constructor for goto_dialog. More...
 
void init ()
 Sets variables which must be destroyed later. More...
 
 ~goto_dialog () override
 Destructor for goto dialog. More...
 
void update_dlg ()
 Updates table in widget. More...
 
void show_me ()
 Shows and moves widget. More...
 
void sort_def ()
 Sorts dialog by default column (0) More...
 

Protected Member Functions

void paint (QPainter *painter, QPaintEvent *event)
 Paints rectangles for goto_dialog. More...
 
void paintEvent (QPaintEvent *event) override
 Paint event for goto_dialog. More...
 

Private Slots

void go_to_city ()
 Slot for goto for city. More...
 
void airlift_to ()
 Slot for airlifting unit. More...
 
void close_dlg ()
 Slot for hiding dialog. More...
 
void item_selected (const QItemSelection &sl, const QItemSelection &ds)
 User has chosen some city on table. More...
 
void checkbox_changed (int state)
 Slot for checkbox 'all nations'. More...
 

Private Member Functions

void fill_tab (struct player *pplayer)
 Helper for function for filling table. More...
 

Private Attributes

QTableWidget * goto_tab
 
QPushButton * goto_city
 
QPushButton * airlift_city
 
QPushButton * close_but
 
QCheckBox * show_all
 
QGridLayout * layout
 
QLabel * show_all_label
 
struct tileoriginal_tile
 

Detailed Description

Definition at line 27 of file gotodlg.h.

Constructor & Destructor Documentation

◆ goto_dialog()

goto_dialog::goto_dialog ( QWidget *  parent = 0)

Constructor for goto_dialog.

Definition at line 38 of file gotodlg.cpp.

◆ ~goto_dialog()

goto_dialog::~goto_dialog ( )
override

Destructor for goto dialog.

Definition at line 109 of file gotodlg.cpp.

Member Function Documentation

◆ airlift_to

void goto_dialog::airlift_to ( )
privateslot

Slot for airlifting unit.

Definition at line 264 of file gotodlg.cpp.

Referenced by goto_dialog().

◆ checkbox_changed

void goto_dialog::checkbox_changed ( int  state)
privateslot

Slot for checkbox 'all nations'.

Definition at line 119 of file gotodlg.cpp.

Referenced by goto_dialog().

◆ close_dlg

void goto_dialog::close_dlg ( )
privateslot

Slot for hiding dialog.

Definition at line 305 of file gotodlg.cpp.

Referenced by goto_dialog().

◆ fill_tab()

void goto_dialog::fill_tab ( struct player pplayer)
private

Helper for function for filling table.

Definition at line 215 of file gotodlg.cpp.

Referenced by update_dlg().

◆ go_to_city

void goto_dialog::go_to_city ( )
privateslot

Slot for goto for city.

Definition at line 285 of file gotodlg.cpp.

Referenced by goto_dialog().

◆ init()

void goto_dialog::init ( )

Sets variables which must be destroyed later.

Definition at line 98 of file gotodlg.cpp.

Referenced by popup_goto_dialog().

◆ item_selected

void goto_dialog::item_selected ( const QItemSelection &  sl,
const QItemSelection &  ds 
)
privateslot

User has chosen some city on table.

Definition at line 128 of file gotodlg.cpp.

Referenced by goto_dialog().

◆ paint()

void goto_dialog::paint ( QPainter *  painter,
QPaintEvent *  event 
)
protected

Paints rectangles for goto_dialog.

Definition at line 314 of file gotodlg.cpp.

Referenced by paintEvent().

◆ paintEvent()

void goto_dialog::paintEvent ( QPaintEvent *  event)
overrideprotected

Paint event for goto_dialog.

Definition at line 326 of file gotodlg.cpp.

◆ show_me()

void goto_dialog::show_me ( )

Shows and moves widget.

Definition at line 175 of file gotodlg.cpp.

Referenced by popup_goto_dialog().

◆ sort_def()

void goto_dialog::sort_def ( )

Sorts dialog by default column (0)

Definition at line 167 of file gotodlg.cpp.

Referenced by popup_goto_dialog().

◆ update_dlg()

void goto_dialog::update_dlg ( )

Updates table in widget.

Definition at line 195 of file gotodlg.cpp.

Referenced by checkbox_changed(), and popup_goto_dialog().

Member Data Documentation

◆ airlift_city

QPushButton* goto_dialog::airlift_city
private

Definition at line 31 of file gotodlg.h.

Referenced by goto_dialog(), and item_selected().

◆ close_but

QPushButton* goto_dialog::close_but
private

Definition at line 32 of file gotodlg.h.

Referenced by goto_dialog().

◆ goto_city

QPushButton* goto_dialog::goto_city
private

Definition at line 30 of file gotodlg.h.

Referenced by goto_dialog().

◆ goto_tab

QTableWidget* goto_dialog::goto_tab
private

◆ layout

QGridLayout* goto_dialog::layout
private

Definition at line 34 of file gotodlg.h.

Referenced by goto_dialog().

◆ original_tile

struct tile* goto_dialog::original_tile
private

Definition at line 58 of file gotodlg.h.

Referenced by close_dlg(), goto_dialog(), init(), and ~goto_dialog().

◆ show_all

QCheckBox* goto_dialog::show_all
private

Definition at line 33 of file gotodlg.h.

Referenced by goto_dialog(), and update_dlg().

◆ show_all_label

QLabel* goto_dialog::show_all_label
private

Definition at line 35 of file gotodlg.h.

Referenced by goto_dialog().