diff --git a/AboutDialog.cpp b/AboutDialog.cpp new file mode 100644 index 0000000..a4042e8 --- /dev/null +++ b/AboutDialog.cpp @@ -0,0 +1,18 @@ +#include "AboutDialog.h" +#include "ui_AboutDialog.h" +#include +AboutDialog::AboutDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::AboutDialog) +{ + ui->setupUi(this); + ui->label_title->setText("AudioGame " + QString(APP_VERSION)); + ui->label_mpiLogo->setPixmap(QPixmap(":/logos/mpi-brain-research.png")); + ui->label_scicLogo->setPixmap(QPixmap(":/logos/logo_scic.png")); + ui->label_audioGameLogo->setPixmap(QPixmap(":/logos/AudioGame.png")); +} + +AboutDialog::~AboutDialog() +{ + delete ui; +} diff --git a/AboutDialog.h b/AboutDialog.h new file mode 100644 index 0000000..5d2516f --- /dev/null +++ b/AboutDialog.h @@ -0,0 +1,23 @@ +/*Simple dialog displaying author and institution*/ +#ifndef ABOUTDIALOG_H +#define ABOUTDIALOG_H + +#include + +namespace Ui { +class AboutDialog; +} + +class AboutDialog : public QDialog +{ + Q_OBJECT + +public: + explicit AboutDialog(QWidget *parent = 0); + ~AboutDialog(); + +private: + Ui::AboutDialog *ui; +}; + +#endif // ABOUTDIALOG_H diff --git a/AboutDialog.ui b/AboutDialog.ui new file mode 100644 index 0000000..115e72b --- /dev/null +++ b/AboutDialog.ui @@ -0,0 +1,246 @@ + + + AboutDialog + + + + 0 + 0 + 639 + 270 + + + + About + + + + + + 0 + + + + + + + + + + + + + 24 + 75 + true + + + + Qt::LeftToRight + + + AudioGame + + + Qt::AutoText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + + + + + + + + (c)2016 <a href="mailto:david.unzue@brain.mpg.de">David Unzue</a>, +<a href="mailto:georgi.tushev@brain.mpg.de">Georgi Tushev</a>, +<a href="mailto:friedrich.kretschmer@brain.mpg.de">Friedrich Kretschmer</a> + + + true + + + + + + + <a href="http://brain.mpg.de/services/scientific-services/scientific-computing.html">Scientific computing facility </a> + + + true + + + + + + + <a href ="http://brain.mpg.de/home.html">Max Planck Institute for Brain Research</a> + + + true + + + + + + + Max-von-Laue-Str. 4 + + + + + + + 60438 Frankfurt am Main, Germany + + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + 10 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + + + + + buttonBox + rejected() + AboutDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + buttonBox + accepted() + AboutDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + diff --git a/AudioGameGUI.pro b/AudioGameGUI.pro index 8a1e6bd..d248c12 100644 --- a/AudioGameGUI.pro +++ b/AudioGameGUI.pro @@ -1,59 +1,62 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2016-07-26T13:26:15 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -CONFIG += c++11 - -win32 { - RC_FILE = app.rc - QT += axcontainer - TYPELIBS = $$system(dumpcpp -getfile {D323A622-1D13-11D4-8858-444553540000}) - - isEmpty(TYPELIBS) { - message("TDT library not found!") - } else { - TYPELIBS = $$system(dumpcpp {D323A622-1D13-11D4-8858-444553540000}) - HEADERS += rpcoxlib.h - SOURCES += rpcoxlib.cpp - } -} - -TARGET = AudioGameGUI -TEMPLATE = app - -SOURCES += main.cpp\ - NIDAQmxInterface.cpp \ - StateMachineController.cpp \ - Mainwindow.cpp \ - TimerDialog.cpp \ - TDTInterface.cpp \ - trialseq.cpp \ - LogFileWriter.cpp - - -HEADERS += \ - NIDAQmxInterface.h \ - StateMachineController.h \ - TimerDialog.h \ - Mainwindow.h \ - SettingStructures.h \ - TDTInterface.h \ - trialseq.h \ - LogFileWriter.h - -#LIBS += -L"C:\\TDT\\lib64" \ -# -lRPco - -FORMS += mainwindow.ui \ - timerdialog.ui - -DISTFILES += - - -LIBS += -L"C:\\Program Files (x86)\\National Instruments\\Shared\\ExternalCompilerSupport\\C\\lib64\\msvc" \ - -lNIDAQmx +#------------------------------------------------- +# +# Project created by QtCreator 2016-07-26T13:26:15 +# +#------------------------------------------------- + +# NOTE: COMPILES UNDER WINDOWS ONLY BECAUSE OF THE +# ACTIVE-X COM OBJECT TDT REQUIRES!! :-( + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +CONFIG += c++11 +DEFINES += APP_VERSION=\\\"0.1\\\" +RESOURCES = application.qrc +RC_FILE = app.rc +QT += axcontainer +TYPELIBS = $$system(dumpcpp -getfile {D323A622-1D13-11D4-8858-444553540000}) + +isEmpty(TYPELIBS) { + message("TDT library not found!") +} else { + TYPELIBS = $$system(dumpcpp {D323A622-1D13-11D4-8858-444553540000}) + HEADERS += rpcoxlib.h + SOURCES += rpcoxlib.cpp +} + + +TARGET = AudioGameGUI +TEMPLATE = app + +SOURCES += main.cpp\ + NIDAQmxInterface.cpp \ + StateMachineController.cpp \ + Mainwindow.cpp \ + TimerDialog.cpp \ + TDTInterface.cpp \ + trialseq.cpp \ + LogFileWriter.cpp \ + AboutDialog.cpp + + +HEADERS += \ + NIDAQmxInterface.h \ + StateMachineController.h \ + TimerDialog.h \ + Mainwindow.h \ + SettingStructures.h \ + TDTInterface.h \ + trialseq.h \ + LogFileWriter.h \ + AboutDialog.h + +FORMS += mainwindow.ui \ + timerdialog.ui \ + AboutDialog.ui + +DISTFILES += + + +LIBS += -L"C:\\Program Files (x86)\\National Instruments\\Shared\\ExternalCompilerSupport\\C\\lib64\\msvc" \ + -lNIDAQmx diff --git a/Mainwindow.cpp b/Mainwindow.cpp index 531227b..659a3d8 100644 --- a/Mainwindow.cpp +++ b/Mainwindow.cpp @@ -239,3 +239,10 @@ void MainWindow::updateIti() } } } + +void MainWindow::on_pushButton_about_clicked() +{ + AboutDialog* aboutDialog = new AboutDialog(this); + aboutDialog->setAttribute(Qt::WA_DeleteOnClose); + aboutDialog->show(); +} diff --git a/Mainwindow.h b/Mainwindow.h index b0f55c5..395dc8a 100644 --- a/Mainwindow.h +++ b/Mainwindow.h @@ -11,6 +11,7 @@ #include "StateMachineController.h" #include "SettingStructures.h" #include "trialseq.h" +#include "AboutDialog.h" namespace Ui { class MainWindow; @@ -40,7 +41,7 @@ private slots: void onStateMachineTerminated(); void onStatusMessage(QString statusMessage); - + void on_pushButton_about_clicked(); private: Ui::MainWindow *ui; diff --git a/application.qrc b/application.qrc new file mode 100644 index 0000000..d26186d --- /dev/null +++ b/application.qrc @@ -0,0 +1,9 @@ + + + mpi-brain-research.png + logo_scic.png + AudioGame.ico + AudioGame.png + AudioGame.svg + + diff --git a/logo_scic.png b/logo_scic.png new file mode 100644 index 0000000..3b0282e Binary files /dev/null and b/logo_scic.png differ diff --git a/mainwindow.ui b/mainwindow.ui index ff86386..0a79594 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -7,7 +7,7 @@ 0 0 472 - 614 + 643 @@ -16,46 +16,6 @@ - - - 10 - - - - - Run - - - false - - - false - - - false - - - - - - - Pause - - - true - - - - - - - Stop - - - - - - File Export Settings @@ -125,7 +85,7 @@ - + Experiment Settings @@ -394,6 +354,79 @@ + + + + 10 + + + + + Run + + + false + + + false + + + false + + + + + + + Pause + + + true + + + + + + + Stop + + + + + + + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 25 + 25 + + + + ? + + + + + diff --git a/mpi-brain-research.png b/mpi-brain-research.png new file mode 100644 index 0000000..dc3e9c0 Binary files /dev/null and b/mpi-brain-research.png differ