Skip to content
Snippets Groups Projects
Commit d7ffab2e authored by Felix de las Pozas's avatar Felix de las Pozas
Browse files

Merge branch 'UpdateRecorder' into 'master'

Update Recorder to latest version.

See merge request nsviz/NeuroScheme!110
parents e2dfb037 e5eed937
No related branches found
No related tags found
No related merge requests found
......@@ -84,68 +84,68 @@ Ubuntu-Subproject-master:
tags:
- ubuntu
OSX-Optional-Deps-master-tags:
stage: build
script:
- export DMGAPP_REPO="gitlabci@vg-lab.es:apps"
- module load Qt-5.9.1
- export BUILD_OPTIONALS_SUBPROJECTS=1
- export CMAKE_EXTRA_ARGS="-DNEUROSCHEME_OPTIONALS_AS_REQUIRED=ON -DLibJpegTurbo_INCLUDE_DIR=/usr/local/opt/jpeg-turbo/include -DLibJpegTurbo_LIBRARY=/usr/local/opt/jpeg-turbo/lib/libturbojpeg.dylib -DCLONE_SUBPROJECTS=ON -DNEUROSCHEME_NSOL_ENABLED=ON"
- export BUILD_GENERATOR="Ninja"
- export CMAKE_OSX_ARCHITECTURES=x86_64
- bash .gitlab-ci.sh
only:
- tags
except:
- branches
tags:
- osx-sierra
#OSX-Optional-Deps-master-tags:
# stage: build
# script:
# - export DMGAPP_REPO="gitlabci@vg-lab.es:apps"
# - module load Qt-5.9.1
# - export BUILD_OPTIONALS_SUBPROJECTS=1
# - export CMAKE_EXTRA_ARGS="-DNEUROSCHEME_OPTIONALS_AS_REQUIRED=ON -DLibJpegTurbo_INCLUDE_DIR=/usr/local/opt/jpeg-turbo/include -DLibJpegTurbo_LIBRARY=/usr/local/opt/jpeg-turbo/lib/libturbojpeg.dylib -DCLONE_SUBPROJECTS=ON -DNEUROSCHEME_NSOL_ENABLED=ON"
# - export BUILD_GENERATOR="Ninja"
# - export CMAKE_OSX_ARCHITECTURES=x86_64
# - bash .gitlab-ci.sh
# only:
# - tags
# except:
# - branches
# tags:
# - osx-sierra
OSX-Optional-Deps-master:
stage: build
script:
- export APP_VERSION="git-master"
- export DMGAPP_REPO="gitlabci@vg-lab.es:apps"
- module load Qt-5.9.1
- export BUILD_OPTIONALS_SUBPROJECTS=1
- export CMAKE_EXTRA_ARGS="-DNEUROSCHEME_OPTIONALS_AS_REQUIRED=ON -DLibJpegTurbo_INCLUDE_DIR=/usr/local/opt/jpeg-turbo/include -DLibJpegTurbo_LIBRARY=/usr/local/opt/jpeg-turbo/lib/libturbojpeg.dylib -DCLONE_SUBPROJECTS=ON -DNEUROSCHEME_NSOL_ENABLED=ON"
- export BUILD_GENERATOR="Ninja"
- export CMAKE_OSX_ARCHITECTURES=x86_64
- bash .gitlab-ci.sh
only:
- master
except:
- tags
tags:
- osx-sierra
#OSX-Optional-Deps-master:
# stage: build
# script:
# - export APP_VERSION="git-master"
# - export DMGAPP_REPO="gitlabci@vg-lab.es:apps"
# - module load Qt-5.9.1
# - export BUILD_OPTIONALS_SUBPROJECTS=1
# - export CMAKE_EXTRA_ARGS="-DNEUROSCHEME_OPTIONALS_AS_REQUIRED=ON -DLibJpegTurbo_INCLUDE_DIR=/usr/local/opt/jpeg-turbo/include -DLibJpegTurbo_LIBRARY=/usr/local/opt/jpeg-turbo/lib/libturbojpeg.dylib -DCLONE_SUBPROJECTS=ON -DNEUROSCHEME_NSOL_ENABLED=ON"
# - export BUILD_GENERATOR="Ninja"
# - export CMAKE_OSX_ARCHITECTURES=x86_64
# - bash .gitlab-ci.sh
# only:
# - master
# except:
# - tags
# tags:
# - osx-sierra
OSX-Optional-Deps:
stage: build
script:
- module load Qt-5.9.1
- export APP_VERSION="dev"
- export DMGAPP_REPO="gitlabci@vg-lab.es:apps.private"
- export BUILD_OPTIONALS_SUBPROJECTS=1
- export CMAKE_EXTRA_ARGS="-DNEUROSCHEME_OPTIONALS_AS_REQUIRED=ON -DLibJpegTurbo_INCLUDE_DIR=/usr/local/opt/jpeg-turbo/include -DLibJpegTurbo_LIBRARY=/usr/local/opt/jpeg-turbo/lib/libturbojpeg.dylib -DCLONE_SUBPROJECTS=ON -DNEUROSCHEME_NSOL_ENABLED=ON"
- export BUILD_GENERATOR="Ninja"
- export CMAKE_OSX_ARCHITECTURES=x86_64
- bash .gitlab-ci.sh
except:
- tags
- master
tags:
- osx-sierra
#OSX-Optional-Deps:
# stage: build
# script:
# - module load Qt-5.9.1
# - export APP_VERSION="dev"
# - export DMGAPP_REPO="gitlabci@vg-lab.es:apps.private"
# - export BUILD_OPTIONALS_SUBPROJECTS=1
# - export CMAKE_EXTRA_ARGS="-DNEUROSCHEME_OPTIONALS_AS_REQUIRED=ON -DLibJpegTurbo_INCLUDE_DIR=/usr/local/opt/jpeg-turbo/include -DLibJpegTurbo_LIBRARY=/usr/local/opt/jpeg-turbo/lib/libturbojpeg.dylib -DCLONE_SUBPROJECTS=ON -DNEUROSCHEME_NSOL_ENABLED=ON"
# - export BUILD_GENERATOR="Ninja"
# - export CMAKE_OSX_ARCHITECTURES=x86_64
# - bash .gitlab-ci.sh
# except:
# - tags
# - master
# tags:
# - osx-sierra
OSX-Subproject:
stage: build
script:
- module load Qt-5.9.1
- export CMAKE_EXTRA_ARGS="-DCLONE_SUBPROJECTS=ON"
- export BUILD_GENERATOR="Ninja";
- export CMAKE_OSX_ARCHITECTURES=x86_64
- bash .gitlab-ci.sh
tags:
- osx-sierra
#OSX-Subproject:
# stage: build
# script:
# - module load Qt-5.9.1
# - export CMAKE_EXTRA_ARGS="-DCLONE_SUBPROJECTS=ON"
# - export BUILD_GENERATOR="Ninja";
# - export CMAKE_OSX_ARCHITECTURES=x86_64
# - bash .gitlab-ci.sh
# tags:
# - osx-sierra
Win7-Subproject-vs14:
stage: build
......
......@@ -5,7 +5,7 @@
#git_subproject(gmrvlex git@gitlab.vg-lab.es:nsviz/gmrvlex.git c20b194)
git_subproject(ShiFT https://github.com/vg-lab/shift ef486e96)
git_subproject(scoop https://github.com/vg-lab/scoop cc02a23)
git_subproject(acuterecorder https://github.com/vg-lab/AcuteRecorder.git 81a16150 )
git_subproject(acuterecorder https://github.com/vg-lab/AcuteRecorder.git 7485cd8b )
if(NEUROSCHEME_NSOL_ENABLED)
git_subproject(nsol https://github.com/vg-lab/nsol 872fe14f)
endif()
......@@ -8,7 +8,7 @@
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
cmake_minimum_required( VERSION 3.1 FATAL_ERROR )
project( NeuroScheme VERSION 0.7.1 )
project( NeuroScheme VERSION 0.7.2 )
set( NeuroScheme_VERSION_ABI 12 )
# Disable in source building
......
......@@ -65,6 +65,10 @@ MainWindow::MainWindow( QWidget* parent_, bool zeroEQ )
_ui->setupUi( this );
auto recorderAction = RecorderUtils::recorderAction();
_ui->menuTools->insertAction(_ui->menuTools->actions().first(), recorderAction );
_ui->toolBar->addAction(recorderAction);
connect( _ui->actionJSONImporter, SIGNAL( triggered( )),
this, SLOT( importFromJSON( )));
......@@ -77,7 +81,7 @@ MainWindow::MainWindow( QWidget* parent_, bool zeroEQ )
connect( _ui->actionQuit, SIGNAL( triggered( )),
this, SLOT( close()));
connect( _ui->actionRecorder , SIGNAL( triggered( void )) ,
connect( recorderAction , SIGNAL( triggered( void )) ,
this ,SLOT( openRecorder( void )));
// ZeroEQ related actions ///////////////////////////////////////
......@@ -354,6 +358,29 @@ MainWindow::~MainWindow( void )
delete _canvas;
}
void MainWindow::closeEvent(QCloseEvent *e)
{
if(_recorder)
{
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Exit NeuroScheme"));
msgBox.setWindowIcon(QIcon(":/icons/ns_icon.png"));
msgBox.setText(tr("A recording is being made. Do you really want to exit NeuroScheme?"));
msgBox.setStandardButtons(QMessageBox::Cancel|QMessageBox::Yes);
if(msgBox.exec() != QMessageBox::Yes)
{
e->ignore();
return;
}
RecorderUtils::stopAndWait(_recorder, this);
_recorder = nullptr;
}
QMainWindow::closeEvent(e);
}
QString MainWindow::_tableColumnToString( const TTableColumns column )
{
switch ( column)
......@@ -785,16 +812,16 @@ void MainWindow::cleanScene( void )
void MainWindow::openRecorder( void )
{
auto recorderAction = qobject_cast<QAction *>(sender());
// The button stops the recorder if found.
if( _recorder != nullptr )
{
_ui->actionRecorder->setDisabled( true );
_recorder->stop();
if(recorderAction) recorderAction->setDisabled( true );
RecorderUtils::stopAndWait(_recorder, this);
// Recorder will be deleted after finishing.
_recorder = nullptr;
_ui->actionRecorder->setChecked( false );
return;
}
......@@ -809,25 +836,31 @@ void MainWindow::openRecorder( void )
params.showSourceParameters = false;
}
auto dialog = new RecorderDialog( nullptr , params , true );
dialog->setWindowIcon( QIcon( ":/icons/ns_icon.png" ));
dialog->setFixedSize( 800 , 600 );
if ( dialog->exec( ) == QDialog::Accepted)
RecorderDialog dialog( nullptr , params , true );
dialog.setWindowIcon( QIcon( ":/icons/ns_icon.png" ));
dialog.setFixedSize( 800 , 600 );
if ( dialog.exec( ) == QDialog::Accepted)
{
_recorder = dialog->getRecorder( );
_recorder = dialog.getRecorder( );
connect( _recorder , SIGNAL( finished( )) ,
_recorder , SLOT( deleteLater( )));
connect( _recorder , SIGNAL( finished( )) ,
this , SLOT( finishRecording( )));
_ui->actionRecorder->setChecked( true );
} else
if(recorderAction) recorderAction->setChecked( true );
}
else
{
_ui->actionRecorder->setChecked( false );
if(recorderAction) recorderAction->setChecked( false );
}
dialog->deleteLater( );
}
void MainWindow::finishRecording( )
{
_ui->actionRecorder->setEnabled( true );
auto recorderAction = qobject_cast<QAction *>(_ui->menuTools->actions().first());
if(recorderAction)
{
recorderAction->setEnabled( true );
recorderAction->setChecked(false);
}
}
......@@ -94,6 +94,8 @@ protected slots:
protected:
virtual void closeEvent(QCloseEvent *e) override;
enum TTableColumns
{
COLUMN_LABEL = 0,
......
......@@ -24,7 +24,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>25</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuPanes">
......@@ -65,7 +65,6 @@
<property name="title">
<string>&amp;Tools</string>
</property>
<addaction name="actionRecorder"/>
<addaction name="actionAdvancedRecorderOptions"/>
</widget>
<widget class="QMenu" name="menuFile">
......@@ -114,7 +113,6 @@
<addaction name="actionFocusOnDisplayed"/>
<addaction name="actionAutoFocusOnDisplayed"/>
<addaction name="separator"/>
<addaction name="actionRecorder"/>
</widget>
<action name="actionLayouts">
<property name="checkable">
......@@ -394,21 +392,6 @@
<string>Export JSON</string>
</property>
</action>
<action name="actionRecorder">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/recorder.svg</normaloff>:/icons/recorder.svg</iconset>
</property>
<property name="text">
<string>Recorder</string>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
</property>
</action>
<action name="actionAdvancedRecorderOptions">
<property name="checkable">
<bool>true</bool>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="123.49702mm"
height="123.49702mm"
viewBox="0 0 123.49705 123.49705"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="recorder.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="15"
fit-margin-left="15"
fit-margin-right="15"
fit-margin-bottom="15"
lock-margins="false"
width="107.89702mm"
inkscape:zoom="0.74029882"
inkscape:cx="-127.65116"
inkscape:cy="226.93539"
inkscape:window-width="1920"
inkscape:window-height="1013"
inkscape:window-x="2560"
inkscape:window-y="1440"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Blur"
id="filter721"
x="-0.077007798"
y="-0.077007798"
width="1.1540156"
height="1.1540156">
<feGaussianBlur
stdDeviation="3 3"
result="blur"
id="feGaussianBlur719" />
</filter>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-38.877594,-60.209427)">
<circle
style="fill:#2b0000;fill-rule:evenodd;stroke-width:0.264583;filter:url(#filter721)"
id="circle413"
cx="106.41572"
cy="129.05154"
r="46.748512"
transform="matrix(0.80142274,0,0,0.80142274,21.131741,25.626701)" />
<circle
style="fill:#aa0000;fill-rule:evenodd;stroke-width:0.212043"
id="path129"
cx="101.77579"
cy="123.36657"
r="37.465321" />
</g>
</svg>
......@@ -28,6 +28,5 @@
<file>icons/horizontalSplit.svg</file>
<file>icons/verticalSplit.svg</file>
<file>icons/documentClose.svg</file>
<file>icons/recorder.svg</file>
</qresource>
</RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment