Add reload and reload all functions

This commit is contained in:
jfmcarreira committed 2014-06-16 22:47:30 +01:00
1 parent 53fc0381a8
commit 2a4364a02e
2 files changed
+41 -8

No files matched your search

+37 -8
View File
@@ -220,6 +220,22 @@ Void plaYUVerApp::format()
m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->currentFile(), true );
}
Void plaYUVerApp::reload()
{
if( m_pcCurrentSubWindow )
m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->currentFile(), false );
}
Void plaYUVerApp::reloadAll()
{
SubWindowHandle *subWindow;
for( Int i = 0; i < mdiArea->subWindowList().size(); i++ )
{
subWindow = qobject_cast<SubWindowHandle *>( mdiArea->subWindowList().at( i ) );
subWindow->loadFile( m_pcCurrentSubWindow->currentFile(), false );
}
}
Void plaYUVerApp::loadAll()
{
if( m_pcCurrentSubWindow )
@@ -873,17 +889,27 @@ Void plaYUVerApp::createActions()
m_arrayActions[SAVE_ACT]->setStatusTip( tr( "Save current frame" ) );
connect( m_arrayActions[SAVE_ACT], SIGNAL( triggered() ), this, SLOT( save() ) );
m_arrayActions[LOAD_ALL_ACT] = new QAction( tr( "&Load All" ), this );
//m_arrayActions[LOAD_ALL_ACT]->setIcon( QIcon( ":/images/configuredialog.png" ) );
m_arrayActions[LOAD_ALL_ACT]->setStatusTip( tr( "Load sequence into memory (caution)" ) );
connect( m_arrayActions[LOAD_ALL_ACT], SIGNAL( triggered() ), this, SLOT( loadAll() ) );
m_arrayActions[FORMAT_ACT] = new QAction( tr( "&Format" ), this );
m_arrayActions[FORMAT_ACT]->setIcon( QIcon( ":/images/configuredialog.png" ) );
m_arrayActions[FORMAT_ACT]->setStatusTip( tr( "Open format dialog" ) );
connect( m_arrayActions[FORMAT_ACT], SIGNAL( triggered() ), this, SLOT( format() ) );
m_arrayActions[CLOSE_ACT] = new QAction( tr( "Cl&ose" ), this );
m_arrayActions[RELOAD_ACT] = new QAction( tr( "&Reload" ), this );
m_arrayActions[RELOAD_ACT]->setIcon( style()->standardIcon( QStyle::SP_BrowserReload ) );
m_arrayActions[RELOAD_ACT]->setStatusTip( tr( "Reload current sequence" ) );
connect( m_arrayActions[RELOAD_ACT], SIGNAL( triggered() ), this, SLOT( reload() ) );
m_arrayActions[RELOAD_ALL_ACT] = new QAction( tr( "Reload All" ), this );
//m_arrayActions[RELOAD_ACT]->setIcon( QIcon( ":/images/configuredialog.png" ) );
m_arrayActions[RELOAD_ALL_ACT]->setStatusTip( tr( "Reload all sequences" ) );
connect( m_arrayActions[RELOAD_ALL_ACT], SIGNAL( triggered() ), this, SLOT( reload() ) );
m_arrayActions[LOAD_ALL_ACT] = new QAction( tr( "Preload" ), this );
//m_arrayActions[LOAD_ALL_ACT]->setIcon( QIcon( ":/images/configuredialog.png" ) );
m_arrayActions[LOAD_ALL_ACT]->setStatusTip( tr( "Load sequence into memory (caution)" ) );
connect( m_arrayActions[LOAD_ALL_ACT], SIGNAL( triggered() ), this, SLOT( loadAll() ) );
m_arrayActions[CLOSE_ACT] = new QAction( tr( "&Close" ), this );
// m_arrayActions[CLOSE_ACT]->setIcon( QIcon( ":/images/close.png" ) );
m_arrayActions[CLOSE_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogCloseButton ) );
@@ -997,12 +1023,12 @@ Void plaYUVerApp::createActions()
// ------------ Window ------------
m_arrayActions[TILE_WINDOWS_ACT] = new QAction( tr( "&Tile" ), this );
m_arrayActions[TILE_WINDOWS_ACT] = new QAction( tr( "Tile" ), this );
m_arrayActions[TILE_WINDOWS_ACT]->setIcon( QIcon( ":images/windowstile.png" ) );
m_arrayActions[TILE_WINDOWS_ACT]->setStatusTip( tr( "Tile the windows" ) );
connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( tileSubWindows() ) );
m_arrayActions[CASCADE_WINDOWS_ACT] = new QAction( tr( "&Cascade" ), this );
m_arrayActions[CASCADE_WINDOWS_ACT] = new QAction( tr( "Cascade" ), this );
m_arrayActions[CASCADE_WINDOWS_ACT]->setIcon( QIcon( ":images/windowscascade.png" ) );
m_arrayActions[CASCADE_WINDOWS_ACT]->setStatusTip( tr( "Cascade the windows" ) );
connect( m_arrayActions[CASCADE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( cascadeSubWindows() ) );
@@ -1049,6 +1075,8 @@ Void plaYUVerApp::createMenus()
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[SAVE_ACT] );
m_arrayMenu[FILE_MENU]->addSeparator();
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[FORMAT_ACT] );
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[RELOAD_ACT] );
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[RELOAD_ALL_ACT] );
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[LOAD_ALL_ACT] );
m_arrayMenu[FILE_MENU]->addSeparator();
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[CLOSE_ACT] );
@@ -1112,6 +1140,7 @@ Void plaYUVerApp::createToolBars()
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[OPEN_ACT] );
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[SAVE_ACT] );
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[FORMAT_ACT] );
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[RELOAD_ACT] );
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[CLOSE_ACT] );
m_arrayToolBars[FILE_TOOLBAR]->setMovable( false );
+4
View File
@@ -59,6 +59,8 @@ private Q_SLOTS:
void open();
void save();
void format();
void reload();
void reloadAll();
void loadAll();
void closeActiveWindow();
void closeAll();
@@ -198,6 +200,8 @@ private:
OPEN_ACT = 0,
SAVE_ACT,
FORMAT_ACT,
RELOAD_ACT,
RELOAD_ALL_ACT,
LOAD_ALL_ACT,
CLOSE_ACT,
CLOSEALL_ACT,