14 #include <QMessageBox>
93 explicit disband_box(
const std::vector<unit *> &punits,
112 const struct text_tag_list *tags,
struct tile *ptile,
146 void nation_selected(
const QItemSelection &sl,
const QItemSelection &ds);
147 void style_selected(
const QItemSelection &sl,
const QItemSelection &ds);
148 void group_selected(
const QItemSelection &sl,
const QItemSelection &ds);
172 QVariant data1_in, QVariant data2_in);
196 QWidget *parent =
nullptr,
197 void (*run_on_close_in)(
int) =
nullptr);
201 QVariant data2, QString tool_tip,
const int button_id);
void stack_button(Choice_dialog_button *button)
Put the button in the stack and temporarily remove it.
void prev_unit()
Focus previous target.
struct unit * targeted_unit
void unstack_all_buttons()
Put all the buttons in the stack back to the dialog.
Choice_dialog_button * get_identified_button(const int id)
Get the button with the given identity.
QPushButton * target_unit_button
void set_layout()
Sets layout for choice dialog.
void update_dialog(const struct act_prob *act_probs)
Update dialog for new target (targeted_unit)
QList< Choice_dialog_button * > last_buttons_stack
~choice_dialog() override
Destructor for choice dialog.
void next_unit()
Focus next target.
void show_me()
Shows choice dialog.
QVBoxLayout * get_layout()
Returns layout in choice dialog.
QList< Choice_dialog_button * > buttons_list
void(* run_on_close)(int)
choice_dialog(const QString title, const QString text, QWidget *parent=nullptr, void(*run_on_close_in)(int)=nullptr)
Constructor for choice_dialog.
void switch_target()
Switches target unit.
QList< Choice_dialog_button * > action_button_map
int sub_target_id[ASTK_COUNT]
void execute_action(const int action)
Run chosen action and close dialog.
void add_item(QString title, pfcn_void func, QVariant data1, QVariant data2, QString tool_tip, const int button_id)
Adds new action for choice dialog.
void disband_clicked()
Clicked Yes in disband box.
const std::vector< unit * > cpunits
disband_box(const std::vector< unit * > &punits, QWidget *parent=0)
Disband Message box contructor.
~disband_box() override
Destructor for disband box.
notify_goto(const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile, QWidget *parent)
Notify goto dialog constructor.
void inspect_city()
Clicked inspect city in notify goto dialog.
QPushButton * inspect_but
void goto_tile()
Clicked goto tile in notify goto dialog.
qdef_act()
Default actions provider constructor.
static qdef_act * action()
Returns instance of qdef_act.
action_id vs_city_get()
Returns default action vs city.
static qdef_act * m_instance
static void drop()
Deletes qdef_act instance.
void vs_city_set(int i)
Sets default action vs city.
void vs_unit_set(int i)
Sets default action vs unit.
action_id vs_unit_get()
Returns default action vs unit.
void mouseReleaseEvent(QMouseEvent *event) override
Mouse release event for themed dialog.
void mouseMoveEvent(QMouseEvent *event) override
Mouse move event for themed titlebar (moves dialog with left mouse)
qfc_dialog(QWidget *parent)
Constructor for custom dialog with themed titlebar.
void mousePressEvent(QMouseEvent *event) override
Mouse press event - catches left click.
void paintEvent(QPaintEvent *event) override
Paint event for themed dialog.
void random_pressed()
Sets random nation.
void style_selected(const QItemSelection &sl, const QItemSelection &ds)
Sets selected style.
QTableWidget * selected_nation_tabs
QPushButton * random_button
~races_dialog() override
Destructor for races dialog.
void refresh()
Sets first index to call update of nation list.
void nation_selected(const QItemSelection &sl, const QItemSelection &ds)
Sets selected nation and updates style and leaders selector.
void nationset_changed(int index)
User changed nation_set.
void ok_pressed()
Button accepting all selection has been pressed, closes dialog if everything is ok.
void leader_selected(int index)
Sets selected leader.
QList< QWidget * > * nations_tabs_list
void group_selected(const QItemSelection &sl, const QItemSelection &ds)
Selected group of nation.
void set_index(int index)
Sets new nations' group by current current selection, index is used only when there is no current sel...
void update_nationset_combo()
Updates nation_set combo ( usually called from option change )
races_dialog(struct player *pplayer, QWidget *parent=0)
Constructor for selecting nations.
QTableWidget * nation_tabs
QGridLayout * main_layout
void cancel_pressed()
Button canceling all selections has been pressed.
void(* pfcn_void)(QVariant, QVariant)
bool try_default_unit_action(QVariant q1, QVariant q2)
Try to pick up default unit action.
void update_nationset_combo()
Updates nationset combobox.
void popup_revolution_dialog(struct government *government=nullptr)
Popup a dialog asking if the player wants to start a revolution.
void popup_races_dialog(struct player *pplayer)
Popup the nation selection dialog.
void popup_upgrade_dialog(const std::vector< unit * > &punits)
Popup dialog for upgrade units.
void revolution_response(struct government *government)
Starts revolution with targeted government as target or anarchy otherwise.
bool try_default_city_action(QVariant q1, QVariant q2)
Try to pick up default city action.
void popup_disband_dialog(const std::vector< unit * > &punits)
Pops up a dialog to confirm disband of the unit(s).