Qt/SettingsWindow: Add SelectGeneralPane method
This commit is contained in:
parent
0d07821935
commit
8580e159fe
|
@ -38,7 +38,7 @@ SettingsWindow::SettingsWindow(QWidget* parent) : QDialog(parent)
|
||||||
m_tabs = new ListTabWidget();
|
m_tabs = new ListTabWidget();
|
||||||
layout->addWidget(m_tabs);
|
layout->addWidget(m_tabs);
|
||||||
|
|
||||||
AddTab(m_tabs, tr("General"), new GeneralPane(), "config");
|
m_general_pane_index = AddTab(m_tabs, tr("General"), new GeneralPane(), "config");
|
||||||
AddTab(m_tabs, tr("Interface"), new InterfacePane(), "browse");
|
AddTab(m_tabs, tr("Interface"), new InterfacePane(), "browse");
|
||||||
m_audio_pane_index = AddTab(m_tabs, tr("Audio"), new AudioPane(), "play");
|
m_audio_pane_index = AddTab(m_tabs, tr("Audio"), new AudioPane(), "play");
|
||||||
AddTab(m_tabs, tr("Paths"), new PathPane(), "browse");
|
AddTab(m_tabs, tr("Paths"), new PathPane(), "browse");
|
||||||
|
@ -55,3 +55,8 @@ void SettingsWindow::SelectAudioPane()
|
||||||
{
|
{
|
||||||
m_tabs->setCurrentIndex(m_audio_pane_index);
|
m_tabs->setCurrentIndex(m_audio_pane_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsWindow::SelectGeneralPane()
|
||||||
|
{
|
||||||
|
m_tabs->setCurrentIndex(m_general_pane_index);
|
||||||
|
}
|
||||||
|
|
|
@ -13,9 +13,11 @@ class SettingsWindow final : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SettingsWindow(QWidget* parent = nullptr);
|
explicit SettingsWindow(QWidget* parent = nullptr);
|
||||||
|
void SelectGeneralPane();
|
||||||
void SelectAudioPane();
|
void SelectAudioPane();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ListTabWidget* m_tabs;
|
ListTabWidget* m_tabs;
|
||||||
int m_audio_pane_index = -1;
|
int m_audio_pane_index = -1;
|
||||||
|
int m_general_pane_index = -1;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue