* ./hurricane/src/viewer:

- New: In CellViewer, new menu entries for Import/Export cell, build on the
        model of open/save.
This commit is contained in:
Jean-Paul Chaput 2010-08-22 12:35:29 +00:00
parent 20feb37332
commit 8a0852c730
2 changed files with 16 additions and 2 deletions

View File

@ -55,10 +55,12 @@ namespace Hurricane {
, _applicationName (tr("Viewer")) , _applicationName (tr("Viewer"))
, _toolInterruptAction (NULL) , _toolInterruptAction (NULL)
, _openAction (NULL) , _openAction (NULL)
, _importAction (NULL)
, _nextAction (NULL) , _nextAction (NULL)
, _printAction (NULL) , _printAction (NULL)
, _imageAction (NULL) , _imageAction (NULL)
, _saveAction (NULL) , _saveAction (NULL)
, _exportAction (NULL)
, _closeAction (NULL) , _closeAction (NULL)
, _exitAction (NULL) , _exitAction (NULL)
, _refreshAction (NULL) , _refreshAction (NULL)
@ -122,6 +124,10 @@ namespace Hurricane {
_openAction->setIcon ( QIcon(":/images/stock_open.png") ); _openAction->setIcon ( QIcon(":/images/stock_open.png") );
_openAction->setStatusTip ( tr("Open (load) a new Cell") ); _openAction->setStatusTip ( tr("Open (load) a new Cell") );
_importAction = new QAction ( tr("&Import Cell"), this );
_importAction->setObjectName ( "viewer.menuBar.file.importCell" );
_importAction->setStatusTip ( tr("Import (convert) a new Cell") );
_nextAction = new QAction ( tr("&Next Breakpoint"), this ); _nextAction = new QAction ( tr("&Next Breakpoint"), this );
_nextAction->setObjectName ( "viewer.menuBar.file.nextBreakpoint" ); _nextAction->setObjectName ( "viewer.menuBar.file.nextBreakpoint" );
_nextAction->setStatusTip ( tr("Proceed to the next breakpoint") ); _nextAction->setStatusTip ( tr("Proceed to the next breakpoint") );
@ -154,6 +160,10 @@ namespace Hurricane {
_saveAction->setStatusTip ( tr("Save (write) the current Cell") ); _saveAction->setStatusTip ( tr("Save (write) the current Cell") );
_saveAction->setVisible ( false ); _saveAction->setVisible ( false );
_exportAction = new QAction ( tr("&Export Cell"), this );
_exportAction->setObjectName ( "viewer.menuBar.file.exportCell" );
_exportAction->setStatusTip ( tr("Export (convert) Cell") );
_closeAction = new QAction ( tr("&Close"), this ); _closeAction = new QAction ( tr("&Close"), this );
_closeAction->setObjectName ( "viewer.menuBar.file.close" ); _closeAction->setObjectName ( "viewer.menuBar.file.close" );
_closeAction->setStatusTip ( tr("Close This Coriolis CellViewer") ); _closeAction->setStatusTip ( tr("Close This Coriolis CellViewer") );
@ -220,8 +230,9 @@ namespace Hurricane {
_fileMenu = menuBar()->addMenu ( tr("File") ); _fileMenu = menuBar()->addMenu ( tr("File") );
_fileMenu->setObjectName ( "viewer.menuBar.file" ); _fileMenu->setObjectName ( "viewer.menuBar.file" );
_fileMenu->addAction ( _openAction ); _fileMenu->addAction ( _openAction );
_fileMenu->addAction ( _nextAction ); _fileMenu->addAction ( _importAction );
_fileMenu->addAction ( _nextAction );
_fileMenu->addSeparator (); _fileMenu->addSeparator ();
for ( size_t i=0 ; i<CellHistorySize ; i++ ) { for ( size_t i=0 ; i<CellHistorySize ; i++ ) {
_fileMenu->addAction ( _cellHistoryAction[i] ); _fileMenu->addAction ( _cellHistoryAction[i] );
@ -230,6 +241,7 @@ namespace Hurricane {
_fileMenu->addAction ( _printAction ); _fileMenu->addAction ( _printAction );
_fileMenu->addAction ( _imageAction ); _fileMenu->addAction ( _imageAction );
_fileMenu->addAction ( _saveAction ); _fileMenu->addAction ( _saveAction );
_fileMenu->addAction ( _exportAction );
_fileMenu->addSeparator (); _fileMenu->addSeparator ();
_fileMenu->addAction ( _closeAction ); _fileMenu->addAction ( _closeAction );
_fileMenu->addAction ( _exitAction ); _fileMenu->addAction ( _exitAction );

View File

@ -107,11 +107,13 @@ namespace Hurricane {
QString _applicationName; QString _applicationName;
QAction* _toolInterruptAction; QAction* _toolInterruptAction;
QAction* _openAction; QAction* _openAction;
QAction* _importAction;
QAction* _nextAction; QAction* _nextAction;
QAction* _cellHistoryAction[CellHistorySize]; QAction* _cellHistoryAction[CellHistorySize];
QAction* _printAction; QAction* _printAction;
QAction* _imageAction; QAction* _imageAction;
QAction* _saveAction; QAction* _saveAction;
QAction* _exportAction;
QAction* _closeAction; QAction* _closeAction;
QAction* _exitAction; QAction* _exitAction;
QAction* _refreshAction; QAction* _refreshAction;