Merge pull request #8031 from spycrab/qt_remove_iterative_input

Qt/Mapping: Remove iterative input
This commit is contained in:
spycrab 2019-04-24 14:03:17 +02:00 committed by GitHub
commit ea0846463f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 42 deletions

View File

@ -104,9 +104,6 @@ void MappingButton::Detect()
ConfigChanged();
m_parent->SaveSettings();
if (m_parent->IsIterativeInput())
m_parent->NextButton(this);
}
void MappingButton::Clear()

View File

@ -46,29 +46,6 @@ MappingWindow* MappingWidget::GetParent() const
return m_parent;
}
bool MappingWidget::IsIterativeInput() const
{
return m_parent->IsIterativeInput();
}
void MappingWidget::NextButton(MappingButton* button)
{
auto iterator = std::find(m_buttons.begin(), m_buttons.end(), button);
if (iterator == m_buttons.end())
return;
if (++iterator == m_buttons.end())
return;
MappingButton* next = *iterator;
if (next->IsInput() && next->isVisible())
next->Detect();
else
NextButton(next);
}
int MappingWidget::GetPort() const
{
return m_parent->GetPort();

View File

@ -45,9 +45,6 @@ public:
MappingWindow* GetParent() const;
bool IsIterativeInput() const;
void NextButton(MappingButton* button);
virtual void LoadSettings() = 0;
virtual void SaveSettings() = 0;
virtual InputConfig* GetConfig() = 0;

View File

@ -120,19 +120,14 @@ void MappingWindow::CreateMainLayout()
{
m_main_layout = new QVBoxLayout();
m_config_layout = new QHBoxLayout();
m_iterative_input = new QCheckBox(tr("Iterative Input"));
m_tab_widget = new QTabWidget();
m_button_box = new QDialogButtonBox(QDialogButtonBox::Close);
m_iterative_input->setToolTip(tr("Automatically progress one button after another during "
"configuration. Useful for first-time setup."));
m_config_layout->addWidget(m_devices_box);
m_config_layout->addWidget(m_reset_box);
m_config_layout->addWidget(m_profiles_box);
m_main_layout->addLayout(m_config_layout);
m_main_layout->addWidget(m_iterative_input);
m_main_layout->addWidget(m_tab_widget);
m_main_layout->addWidget(m_button_box);
@ -417,8 +412,3 @@ void MappingWindow::OnClearFieldsPressed()
emit ConfigChanged();
emit Save();
}
bool MappingWindow::IsIterativeInput() const
{
return m_iterative_input->isChecked();
}

View File

@ -16,7 +16,6 @@ class EmulatedController;
}
class InputConfig;
class QCheckBox;
class QComboBox;
class QDialogButtonBox;
class QEvent;
@ -50,7 +49,6 @@ public:
int GetPort() const;
ControllerEmu::EmulatedController* GetController() const;
bool IsIterativeInput() const;
bool IsMappingAllDevices() const;
signals:
@ -83,7 +81,6 @@ private:
ControllerEmu::EmulatedController* m_controller = nullptr;
// Main
QCheckBox* m_iterative_input;
QVBoxLayout* m_main_layout;
QHBoxLayout* m_config_layout;
QDialogButtonBox* m_button_box;