Add a simple About page that shows the library build version

This commit is contained in:
Chris Robinson 2016-03-06 02:02:37 -08:00
parent 101ae7644e
commit 6971e86847
3 changed files with 24 additions and 0 deletions

View File

@ -292,6 +292,8 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionLoad, SIGNAL(triggered()), this, SLOT(loadConfigFromFile())); connect(ui->actionLoad, SIGNAL(triggered()), this, SLOT(loadConfigFromFile()));
connect(ui->actionSave_As, SIGNAL(triggered()), this, SLOT(saveConfigAsFile())); connect(ui->actionSave_As, SIGNAL(triggered()), this, SLOT(saveConfigAsFile()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAboutPage()));
connect(ui->closeCancelButton, SIGNAL(clicked()), this, SLOT(cancelCloseAction())); connect(ui->closeCancelButton, SIGNAL(clicked()), this, SLOT(cancelCloseAction()));
connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(saveCurrentConfig())); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(saveCurrentConfig()));
@ -427,6 +429,14 @@ void MainWindow::cancelCloseAction()
} }
void MainWindow::showAboutPage()
{
QMessageBox::information(this, tr("About"),
tr("OpenAL Soft Configuration Utility.\nBuilt for OpenAL Soft library version ")+(ALSOFT_VERSION ".")
);
}
QStringList MainWindow::collectHrtfs() QStringList MainWindow::collectHrtfs()
{ {
QStringList ret; QStringList ret;

View File

@ -24,6 +24,8 @@ private slots:
void saveConfigAsFile(); void saveConfigAsFile();
void loadConfigFromFile(); void loadConfigFromFile();
void showAboutPage();
void enableApplyButton(); void enableApplyButton();
void updateResamplerLabel(int num); void updateResamplerLabel(int num);

View File

@ -1964,7 +1964,14 @@ added by the ALC_EXT_DEDICATED extension.</string>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionQuit"/> <addaction name="actionQuit"/>
</widget> </widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>&amp;Help</string>
</property>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
<addaction name="menuHelp"/>
</widget> </widget>
<action name="actionQuit"> <action name="actionQuit">
<property name="icon"> <property name="icon">
@ -2002,6 +2009,11 @@ added by the ALC_EXT_DEDICATED extension.</string>
<string>Load Configuration File</string> <string>Load Configuration File</string>
</property> </property>
</action> </action>
<action name="actionAbout">
<property name="text">
<string>&amp;About...</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>