diff --git a/pylonrecorder.cpp b/pylonrecorder.cpp index 6643e34..dba217f 100644 --- a/pylonrecorder.cpp +++ b/pylonrecorder.cpp @@ -422,11 +422,17 @@ void PylonRecorder::createActions() { storeSettingsAction->setStatusTip(tr("store current settings as defaults")); connect(storeSettingsAction, &QAction::triggered, this, &PylonRecorder::storeSettings); + projectSettingsAction = new QAction(tr("set project name"), this); + projectSettingsAction->setStatusTip(tr("Set the project name")); + connect(projectSettingsAction, &QAction::triggered, this, &PylonRecorder::editProjectMetadata); + QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings")); settingsMenu->addAction(selectStorageAction); - settingsMenu->addAction(storeSettingsAction); + settingsMenu->addAction(projectSettingsAction); + settingsMenu->addSeparator(); settingsMenu->setToolTipsVisible(true); - + settingsMenu->addAction(storeSettingsAction); + QMenu *helpMenu = menuBar()->addMenu(tr("&Help")); helpMenu->addAction(tr("&About"), this, &PylonRecorder::about); helpMenu->addAction(tr("About &Qt"), &QApplication::aboutQt); @@ -713,6 +719,7 @@ void PylonRecorder::grabStillFromPylon() { } } + void PylonRecorder::selectStorageLocation() { QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"), "/home", @@ -724,3 +731,8 @@ void PylonRecorder::selectStorageLocation() { selectStorageAction->setStatusTip(tr("Storage location: ") + storageLocation); } } + + +void PylonRecorder::editProjectMetadata(){ + std::cerr << "EditProjectSettings" << std::endl; +} diff --git a/pylonrecorder.h b/pylonrecorder.h index 9de9993..4895f0a 100644 --- a/pylonrecorder.h +++ b/pylonrecorder.h @@ -69,6 +69,10 @@ private: void updateActions(); void applySettings(); void storeSettings(); + void editProjectMetadata(); + void setExperimentName(); + void setExperimenterName(); + void setSubjectID(); QColor progressColor(int value); std::string createFilename(); @@ -99,6 +103,7 @@ private: QString inactiveLabelStyle = ("QLabel { font-size: 10pt;font-family: Arial; color :gray; }"); QSpinBox *framerateSpinner, *buffersizeSpinner, *exposureSpinner, *gainSpinner; QAction *selectStorageAction, *storeSettingsAction; + QAction *projectSettingsAction; QString storageLocation = ""; #if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printer)