mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
(UI/QT) Make some of the add functions private
This commit is contained in:
parent
d9723d2282
commit
b38a4dcb08
@ -8691,6 +8691,7 @@ static bool setting_append_list(
|
|||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler);
|
general_read_handler);
|
||||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||||
|
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_PASSWORD_LINE_EDIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
|
@ -49,7 +49,7 @@ QWidget *UserInterfacePage::widget()
|
|||||||
{
|
{
|
||||||
CheckableSettingsGroup *kioskGroup = new CheckableSettingsGroup(kioskMode, widget);
|
CheckableSettingsGroup *kioskGroup = new CheckableSettingsGroup(kioskMode, widget);
|
||||||
|
|
||||||
kioskGroup->addPasswordLineEdit(MENU_ENUM_LABEL_MENU_KIOSK_MODE_PASSWORD);
|
kioskGroup->add(MENU_ENUM_LABEL_MENU_KIOSK_MODE_PASSWORD);
|
||||||
|
|
||||||
menuGroup->addRow(kioskGroup);
|
menuGroup->addRow(kioskGroup);
|
||||||
}
|
}
|
||||||
|
@ -65,10 +65,8 @@ FormLayout::FormLayout(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormLayout::addCheckBox(msg_hash_enums enum_idx)
|
void FormLayout::addCheckBox(rarch_setting_t *setting)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = menu_setting_find_enum(enum_idx);
|
|
||||||
|
|
||||||
if (setting && setting->short_description)
|
if (setting && setting->short_description)
|
||||||
addRow(new CheckBox(setting));
|
addRow(new CheckBox(setting));
|
||||||
}
|
}
|
||||||
@ -129,10 +127,8 @@ void FormLayout::addSizeSpinBox(msg_hash_enums enum_idx, unsigned scale)
|
|||||||
addRow(formLabel(setting), new SizeSpinBox(setting, scale));
|
addRow(formLabel(setting), new SizeSpinBox(setting, scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormLayout::addFloatSpinBox(msg_hash_enums enum_idx)
|
void FormLayout::addFloatSpinBox(rarch_setting_t *setting)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = menu_setting_find_enum(enum_idx);
|
|
||||||
|
|
||||||
if (setting && setting->short_description)
|
if (setting && setting->short_description)
|
||||||
addRow(formLabel(setting), new FloatSpinBox(setting));
|
addRow(formLabel(setting), new FloatSpinBox(setting));
|
||||||
}
|
}
|
||||||
@ -228,9 +224,9 @@ void SettingsGroup::addRow(QString label, QLayout *layout)
|
|||||||
m_layout->addRow(label, layout);
|
m_layout->addRow(label, layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsGroup::addCheckBox(msg_hash_enums enum_idx)
|
void SettingsGroup::addCheckBox(rarch_setting_t *setting)
|
||||||
{
|
{
|
||||||
m_layout->addCheckBox(enum_idx);
|
m_layout->addCheckBox(setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsGroup::addDirectorySelector(msg_hash_enums enum_idx)
|
void SettingsGroup::addDirectorySelector(msg_hash_enums enum_idx)
|
||||||
@ -278,9 +274,9 @@ void SettingsGroup::addUIntSpinBox(msg_hash_enums enum_idx)
|
|||||||
m_layout->addUIntSpinBox(enum_idx);
|
m_layout->addUIntSpinBox(enum_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsGroup::addFloatSpinBox(msg_hash_enums enum_idx)
|
void SettingsGroup::addFloatSpinBox(rarch_setting_t *setting)
|
||||||
{
|
{
|
||||||
m_layout->addFloatSpinBox(enum_idx);
|
m_layout->addFloatSpinBox(setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsGroup::addFloatSliderAndSpinBox(msg_hash_enums enum_idx)
|
void SettingsGroup::addFloatSliderAndSpinBox(msg_hash_enums enum_idx)
|
||||||
|
@ -34,20 +34,20 @@ class FormLayout : public QFormLayout
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FormLayout(QWidget *parent = 0);
|
FormLayout(QWidget *parent = 0);
|
||||||
void addUIntSpinBox(msg_hash_enums enum_idx);
|
|
||||||
void addSizeSpinBox(msg_hash_enums enum_idx, unsigned scale = 1024 * 1024);
|
void addSizeSpinBox(msg_hash_enums enum_idx, unsigned scale = 1024 * 1024);
|
||||||
void addFloatSpinBox(msg_hash_enums enum_idx);
|
void addUIntColorButton(const QString &title, msg_hash_enums r, msg_hash_enums g, msg_hash_enums b);
|
||||||
|
void addUIntSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addFloatSpinBox(rarch_setting_t *setting);
|
||||||
void addDirectorySelector(msg_hash_enums enum_idx);
|
void addDirectorySelector(msg_hash_enums enum_idx);
|
||||||
void addFileSelector(msg_hash_enums enum_idx);
|
void addFileSelector(msg_hash_enums enum_idx);
|
||||||
void addFontSelector(msg_hash_enums enum_idx);
|
void addFontSelector(msg_hash_enums enum_idx);
|
||||||
void addCheckBox(msg_hash_enums enum_idx);
|
void addCheckBox(rarch_setting_t *setting);
|
||||||
void addUIntComboBox(msg_hash_enums enum_idx);
|
void addUIntComboBox(msg_hash_enums enum_idx);
|
||||||
void addUIntRadioButtons(msg_hash_enums enum_idx);
|
void addUIntRadioButtons(msg_hash_enums enum_idx);
|
||||||
void addStringComboBox(msg_hash_enums enum_idx);
|
void addStringComboBox(msg_hash_enums enum_idx);
|
||||||
void addStringLineEdit(msg_hash_enums enum_idx);
|
void addStringLineEdit(msg_hash_enums enum_idx);
|
||||||
void addPasswordLineEdit(msg_hash_enums enum_idx);
|
void addPasswordLineEdit(msg_hash_enums enum_idx);
|
||||||
void addFloatSliderAndSpinBox(msg_hash_enums enum_idx);
|
void addFloatSliderAndSpinBox(msg_hash_enums enum_idx);
|
||||||
void addUIntColorButton(const QString &title, msg_hash_enums r, msg_hash_enums g, msg_hash_enums b);
|
|
||||||
bool addBindButton(msg_hash_enums enum_idx);
|
bool addBindButton(msg_hash_enums enum_idx);
|
||||||
|
|
||||||
bool add(msg_hash_enums enum_idx)
|
bool add(msg_hash_enums enum_idx)
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
switch (ui_type)
|
switch (ui_type)
|
||||||
{
|
{
|
||||||
case ST_UI_TYPE_CHECKBOX:
|
case ST_UI_TYPE_CHECKBOX:
|
||||||
this->addCheckBox(enum_idx);
|
this->addCheckBox(setting);
|
||||||
break;
|
break;
|
||||||
case ST_UI_TYPE_UINT_COLOR_BUTTON:
|
case ST_UI_TYPE_UINT_COLOR_BUTTON:
|
||||||
/* TODO/FIXME */
|
/* TODO/FIXME */
|
||||||
@ -81,7 +81,7 @@ public:
|
|||||||
/* TODO/FIXME */
|
/* TODO/FIXME */
|
||||||
break;
|
break;
|
||||||
case ST_UI_TYPE_FLOAT_SPINBOX:
|
case ST_UI_TYPE_FLOAT_SPINBOX:
|
||||||
this->addFloatSpinBox(enum_idx);
|
this->addFloatSpinBox(setting);
|
||||||
break;
|
break;
|
||||||
case ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX:
|
case ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX:
|
||||||
this->addFloatSliderAndSpinBox(enum_idx);
|
this->addFloatSliderAndSpinBox(enum_idx);
|
||||||
@ -129,18 +129,6 @@ public:
|
|||||||
void addRow(QWidget *widget);
|
void addRow(QWidget *widget);
|
||||||
void addRow(QLayout *layout);
|
void addRow(QLayout *layout);
|
||||||
void addRow(QString label, QLayout *layout);
|
void addRow(QString label, QLayout *layout);
|
||||||
void addCheckBox(msg_hash_enums enum_idx);
|
|
||||||
void addFileSelector(msg_hash_enums enum_idx);
|
|
||||||
void addDirectorySelector(msg_hash_enums enum_idx);
|
|
||||||
void addFontSelector(msg_hash_enums enum_idx);
|
|
||||||
void addStringLineEdit(msg_hash_enums enum_idx);
|
|
||||||
void addPasswordLineEdit(msg_hash_enums enum_idx);
|
|
||||||
void addStringComboBox(msg_hash_enums enum_idx);
|
|
||||||
void addUIntSpinBox(msg_hash_enums enum_idx);
|
|
||||||
void addUIntComboBox(msg_hash_enums enum_idx);
|
|
||||||
void addUIntRadioButtons(msg_hash_enums enum_idx);
|
|
||||||
void addFloatSpinBox(msg_hash_enums enum_idx);
|
|
||||||
void addFloatSliderAndSpinBox(msg_hash_enums enum_idx);
|
|
||||||
void addUIntColorButton(const QString &title, msg_hash_enums r, msg_hash_enums g, msg_hash_enums b);
|
void addUIntColorButton(const QString &title, msg_hash_enums r, msg_hash_enums g, msg_hash_enums b);
|
||||||
void addBindButton(msg_hash_enums enum_idx);
|
void addBindButton(msg_hash_enums enum_idx);
|
||||||
|
|
||||||
@ -157,7 +145,7 @@ public:
|
|||||||
switch (ui_type)
|
switch (ui_type)
|
||||||
{
|
{
|
||||||
case ST_UI_TYPE_CHECKBOX:
|
case ST_UI_TYPE_CHECKBOX:
|
||||||
this->addCheckBox(enum_idx);
|
this->addCheckBox(setting);
|
||||||
break;
|
break;
|
||||||
case ST_UI_TYPE_UINT_COLOR_BUTTON:
|
case ST_UI_TYPE_UINT_COLOR_BUTTON:
|
||||||
/* TODO/FIXME */
|
/* TODO/FIXME */
|
||||||
@ -175,7 +163,7 @@ public:
|
|||||||
/* TODO/FIXME */
|
/* TODO/FIXME */
|
||||||
break;
|
break;
|
||||||
case ST_UI_TYPE_FLOAT_SPINBOX:
|
case ST_UI_TYPE_FLOAT_SPINBOX:
|
||||||
this->addFloatSpinBox(enum_idx);
|
this->addFloatSpinBox(setting);
|
||||||
break;
|
break;
|
||||||
case ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX:
|
case ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX:
|
||||||
this->addFloatSliderAndSpinBox(enum_idx);
|
this->addFloatSliderAndSpinBox(enum_idx);
|
||||||
@ -214,6 +202,18 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
void addCheckBox(rarch_setting_t *setting);
|
||||||
|
void addFileSelector(msg_hash_enums enum_idx);
|
||||||
|
void addDirectorySelector(msg_hash_enums enum_idx);
|
||||||
|
void addFontSelector(msg_hash_enums enum_idx);
|
||||||
|
void addStringLineEdit(msg_hash_enums enum_idx);
|
||||||
|
void addPasswordLineEdit(msg_hash_enums enum_idx);
|
||||||
|
void addStringComboBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntComboBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntRadioButtons(msg_hash_enums enum_idx);
|
||||||
|
void addFloatSpinBox(rarch_setting_t *setting);
|
||||||
|
void addFloatSliderAndSpinBox(msg_hash_enums enum_idx);
|
||||||
FormLayout *m_layout;
|
FormLayout *m_layout;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user