Added about window

master
Yohann Dedy 2017-03-05 17:32:39 +01:00
parent 0c2374e7a2
commit da8cd848fb
2 changed files with 15 additions and 1 deletions

View File

@ -47,7 +47,12 @@ mainWindow::mainWindow(QWidget *parent) :
// Menu Bar
QMenu* mainMenu = new QMenu("File", _menuBar);
QAction* about = mainMenu->addAction("About");
connect(about, SIGNAL(triggered(bool)), this, SLOT(openAboutWindow()));
mainMenu->addSeparator();
QAction* settings = mainMenu->addAction("Settings");
connect(settings, SIGNAL(triggered(bool)), this, SLOT(openSettingsWindow()));
mainMenu->addSeparator();
QMenu* get = mainMenu->addMenu("Get");
@ -122,7 +127,6 @@ mainWindow::mainWindow(QWidget *parent) :
connect(_midiIn, SIGNAL(midiMessageReceived(QMidiMessage*)), this, SLOT(onMidiMessageReceive(QMidiMessage*)));
connect(_presetSettingsTable, SIGNAL(customContextMenuRequested(QPoint)),SLOT(channelsMenu(QPoint)));
connect(_presetSettingsTable, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(presetCellClicked(int,int)));
connect(settings, SIGNAL(triggered(bool)), this, SLOT(openSettingsWindow()));
_presetsList->setCurrentRow(0);
}
@ -200,6 +204,15 @@ void mainWindow::presetCellClicked(int row, int column)
}
}
void mainWindow::openAboutWindow()
{
QString aboutText("DoefperPocketQt\n"
"Version 0.1.0\n\n"
"Source code : https://github.com/yohannlyd/DoepferPocketQt\n"
"yohann@dedy.fr\n");
QMessageBox::about(this,"DoefperPocketQt",aboutText);
}
void mainWindow::openSettingsWindow()
{
_settingsWindow->setWindowModality(Qt::ApplicationModal);

View File

@ -61,6 +61,7 @@ signals:
public slots:
void onMidiMessageReceive(QMidiMessage* message);
void presetCellClicked(int row, int column);
void openAboutWindow();
void openSettingsWindow();
void updateDeviceConfig();
void updatePreset(QMidiMessage* message);