diff --git a/GUI/coregui/coregui.pro b/GUI/coregui/coregui.pro index df861f29611ec7eeac39f170826c071c7d9804e0..a06522fd99822b526892f912f6cfa2e9d3e55216 100644 --- a/GUI/coregui/coregui.pro +++ b/GUI/coregui/coregui.pro @@ -16,7 +16,7 @@ TEMPLATE = app QMAKE_EXTENSION_SHLIB = so #CONFIG -= app_bundle OBJECTS_DIR = obj -#MOC_DIR = obj +MOC_DIR = obj #UI_DIR = obj #RCC_DIR = obj diff --git a/GUI/coregui/simulationmanager/simulationmanager.cpp b/GUI/coregui/simulationmanager/simulationmanager.cpp index 241e71a4b488c13576d624687c33736d3dac3935..54526b3c1cf6474ce3328a56a8375dc0e084f8fc 100644 --- a/GUI/coregui/simulationmanager/simulationmanager.cpp +++ b/GUI/coregui/simulationmanager/simulationmanager.cpp @@ -6,6 +6,7 @@ #include <QComboBox> #include <QLabel> #include <QGridLayout> +#include <QMessageBox> SimulationManager::SimulationManager(QWidget *parent) : QWidget(parent) @@ -29,18 +30,18 @@ SimulationManager::SimulationManager(QWidget *parent) // selection of simulation parameters QGroupBox *simulationParametersGroup = new QGroupBox(tr("Simulation Parameters")); // framework (DWBA - BA) - QLabel *frameworkLabel = new QLabel(tr("Select Framework:")); + QLabel *frameworkLabel = new QLabel(tr("Framework:")); QComboBox *frameworkSelectionBox = new QComboBox; frameworkSelectionBox->addItem(tr("DWBA")); frameworkSelectionBox->addItem(tr("BA")); // interference function (DA - LMA - SSCA - ISGISAXSMOR) - QLabel *interferenceLabel = new QLabel(tr("Select Interference Function Approximation:")); + QLabel *interferenceLabel = new QLabel(tr("Interference Function Approximation:")); QComboBox *interferenceFunctionSelectionBox = new QComboBox; interferenceFunctionSelectionBox->addItem(tr("DA")); interferenceFunctionSelectionBox->addItem(tr("LMA")); interferenceFunctionSelectionBox->addItem(tr("SSCA")); // lattice type (None - Lattice - Para1D - Para1DFinite) - QLabel *latticeTypeLabel = new QLabel(tr("Select Lattice Type:")); + QLabel *latticeTypeLabel = new QLabel(tr("Lattice Type:")); QComboBox *latticeTypeSelectionBox = new QComboBox; latticeTypeSelectionBox->addItem(tr("None")); latticeTypeSelectionBox->addItem(tr("Lattice")); @@ -57,7 +58,7 @@ SimulationManager::SimulationManager(QWidget *parent) simulationParametersGroup->setLayout(simulationParametersLayout); // run simulation button - QPushButton *runSimulationButton = new QPushButton(tr("Run Simulation")); + runSimulationButton = new QPushButton(tr("Run Simulation")); // main layout QVBoxLayout *mainLayout = new QVBoxLayout; @@ -66,4 +67,14 @@ SimulationManager::SimulationManager(QWidget *parent) mainLayout->addWidget(runSimulationButton); mainLayout->addStretch(); setLayout(mainLayout); + + // signal and slots + connect(runSimulationButton, SIGNAL(clicked()), this, SLOT(onRunSimulation())); +} + +void SimulationManager::onRunSimulation() +{ + // initialize a Simulation object and run it + QMessageBox::information(this, tr("Pushed \"Run Simulation\"-button"), + tr("You pushed a button.")); } diff --git a/GUI/coregui/simulationmanager/simulationmanager.h b/GUI/coregui/simulationmanager/simulationmanager.h index aa9ae6d12cfa9eab9d610cf7c2740aa3c43f0294..8bdffc05259b98a4d3dc4c806d8567fd71be6b80 100644 --- a/GUI/coregui/simulationmanager/simulationmanager.h +++ b/GUI/coregui/simulationmanager/simulationmanager.h @@ -3,12 +3,20 @@ #include <QWidget> +class QPushButton; class SimulationManager : public QWidget { + Q_OBJECT + public: SimulationManager(QWidget *parent = 0); -}; +public slots: + void onRunSimulation(); + +private: + QPushButton *runSimulationButton; +}; #endif // SIMULATIONMANAGER_H