Bug #1206 » 0007-Correct-multipler-to-multiplier.patch
client/gui-qt/menu.cpp | ||
---|---|---|
}
|
||
/**********************************************************************//**
|
||
Action "MULTIPLERS RATES"
|
||
Action "MULTIPLIERS RATES"
|
||
**************************************************************************/
|
||
void mr_menu::slot_popup_mult_rates()
|
||
{
|
client/gui-qt/ratesdlg.cpp | ||
---|---|---|
}
|
||
/**********************************************************************//**
|
||
Multipler rates dialog constructor
|
||
Multiplier rates dialog constructor
|
||
Inheriting from qfc_dialog will cause crash in Qt5.2
|
||
**************************************************************************/
|
||
multipler_rates_dialog::multipler_rates_dialog(QWidget *parent)
|
||
multiplier_rates_dialog::multiplier_rates_dialog(QWidget *parent)
|
||
: QDialog(parent)
|
||
{
|
||
QGroupBox *group_box;
|
||
... | ... | |
slider->setMaximum(mult_to_scale(pmul, pmul->stop));
|
||
slider->setValue(mult_to_scale(pmul, val));
|
||
connect(slider, &QAbstractSlider::valueChanged,
|
||
this, &multipler_rates_dialog::slot_set_value);
|
||
this, &multiplier_rates_dialog::slot_set_value);
|
||
slider_list.append(slider);
|
||
label = new QLabel(QString::number(mult_to_scale(pmul, val)));
|
||
hb->addWidget(slider);
|
||
... | ... | |
cancel_button->setText(_("Cancel"));
|
||
ok_button->setText(_("Ok"));
|
||
connect(cancel_button, &QAbstractButton::pressed,
|
||
this, &multipler_rates_dialog::slot_cancel_button_pressed);
|
||
this, &multiplier_rates_dialog::slot_cancel_button_pressed);
|
||
connect(ok_button, &QAbstractButton::pressed,
|
||
this, &multipler_rates_dialog::slot_ok_button_pressed);
|
||
this, &multiplier_rates_dialog::slot_ok_button_pressed);
|
||
some_layout->addWidget(cancel_button);
|
||
some_layout->addWidget(ok_button);
|
||
main_layout->addSpacing(20);
|
||
... | ... | |
/**********************************************************************//**
|
||
Slider value changed
|
||
**************************************************************************/
|
||
void multipler_rates_dialog::slot_set_value(int i)
|
||
void multiplier_rates_dialog::slot_set_value(int i)
|
||
{
|
||
QSlider *qo;
|
||
qo = (QSlider *) QObject::sender();
|
||
... | ... | |
/**********************************************************************//**
|
||
Cancel pressed
|
||
**************************************************************************/
|
||
void multipler_rates_dialog::slot_cancel_button_pressed()
|
||
void multiplier_rates_dialog::slot_cancel_button_pressed()
|
||
{
|
||
close();
|
||
deleteLater();
|
||
... | ... | |
/**********************************************************************//**
|
||
Ok pressed - send multipliers' values.
|
||
**************************************************************************/
|
||
void multipler_rates_dialog::slot_ok_button_pressed()
|
||
void multiplier_rates_dialog::slot_ok_button_pressed()
|
||
{
|
||
int j = 0;
|
||
int value;
|
||
... | ... | |
**************************************************************************/
|
||
void popup_multiplier_dialog(void)
|
||
{
|
||
multipler_rates_dialog *mrd;
|
||
multiplier_rates_dialog *mrd;
|
||
if (!can_client_issue_orders()) {
|
||
return;
|
||
}
|
||
mrd = new multipler_rates_dialog(gui()->central_wdg);
|
||
mrd = new multiplier_rates_dialog(gui()->central_wdg);
|
||
mrd->show();
|
||
}
|
||
client/gui-qt/ratesdlg.h | ||
---|---|---|
/**************************************************************************
|
||
* Dialog used to change policies
|
||
*************************************************************************/
|
||
class multipler_rates_dialog: public QDialog
|
||
class multiplier_rates_dialog: public QDialog
|
||
{
|
||
Q_OBJECT
|
||
public:
|
||
explicit multipler_rates_dialog(QWidget* parent = 0);
|
||
explicit multiplier_rates_dialog(QWidget* parent = 0);
|
||
private:
|
||
QList<QSlider*> slider_list;
|
||
QPushButton *cancel_button;
|
- « Previous
- 1
- 2
- Next »