Add reload and reload all functions
This commit is contained in:
1 parent
53fc0381a8
commit
2a4364a02e
2 files changed
+41
-8
No files matched your search
@@ -220,6 +220,22 @@ Void plaYUVerApp::format()
|
|||||||
m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->currentFile(), true );
|
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()
|
Void plaYUVerApp::loadAll()
|
||||||
{
|
{
|
||||||
if( m_pcCurrentSubWindow )
|
if( m_pcCurrentSubWindow )
|
||||||
@@ -873,17 +889,27 @@ Void plaYUVerApp::createActions()
|
|||||||
m_arrayActions[SAVE_ACT]->setStatusTip( tr( "Save current frame" ) );
|
m_arrayActions[SAVE_ACT]->setStatusTip( tr( "Save current frame" ) );
|
||||||
connect( m_arrayActions[SAVE_ACT], SIGNAL( triggered() ), this, SLOT( save() ) );
|
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] = new QAction( tr( "&Format" ), this );
|
||||||
m_arrayActions[FORMAT_ACT]->setIcon( QIcon( ":/images/configuredialog.png" ) );
|
m_arrayActions[FORMAT_ACT]->setIcon( QIcon( ":/images/configuredialog.png" ) );
|
||||||
m_arrayActions[FORMAT_ACT]->setStatusTip( tr( "Open format dialog" ) );
|
m_arrayActions[FORMAT_ACT]->setStatusTip( tr( "Open format dialog" ) );
|
||||||
connect( m_arrayActions[FORMAT_ACT], SIGNAL( triggered() ), this, SLOT( format() ) );
|
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( QIcon( ":/images/close.png" ) );
|
||||||
m_arrayActions[CLOSE_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogCloseButton ) );
|
m_arrayActions[CLOSE_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogCloseButton ) );
|
||||||
|
|
||||||
@@ -997,12 +1023,12 @@ Void plaYUVerApp::createActions()
|
|||||||
|
|
||||||
// ------------ Window ------------
|
// ------------ 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]->setIcon( QIcon( ":images/windowstile.png" ) );
|
||||||
m_arrayActions[TILE_WINDOWS_ACT]->setStatusTip( tr( "Tile the windows" ) );
|
m_arrayActions[TILE_WINDOWS_ACT]->setStatusTip( tr( "Tile the windows" ) );
|
||||||
connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( tileSubWindows() ) );
|
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]->setIcon( QIcon( ":images/windowscascade.png" ) );
|
||||||
m_arrayActions[CASCADE_WINDOWS_ACT]->setStatusTip( tr( "Cascade the windows" ) );
|
m_arrayActions[CASCADE_WINDOWS_ACT]->setStatusTip( tr( "Cascade the windows" ) );
|
||||||
connect( m_arrayActions[CASCADE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( cascadeSubWindows() ) );
|
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]->addAction( m_arrayActions[SAVE_ACT] );
|
||||||
m_arrayMenu[FILE_MENU]->addSeparator();
|
m_arrayMenu[FILE_MENU]->addSeparator();
|
||||||
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[FORMAT_ACT] );
|
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]->addAction( m_arrayActions[LOAD_ALL_ACT] );
|
||||||
m_arrayMenu[FILE_MENU]->addSeparator();
|
m_arrayMenu[FILE_MENU]->addSeparator();
|
||||||
m_arrayMenu[FILE_MENU]->addAction( m_arrayActions[CLOSE_ACT] );
|
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[OPEN_ACT] );
|
||||||
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[SAVE_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[FORMAT_ACT] );
|
||||||
|
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[RELOAD_ACT] );
|
||||||
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[CLOSE_ACT] );
|
m_arrayToolBars[FILE_TOOLBAR]->addAction( m_arrayActions[CLOSE_ACT] );
|
||||||
|
|
||||||
m_arrayToolBars[FILE_TOOLBAR]->setMovable( false );
|
m_arrayToolBars[FILE_TOOLBAR]->setMovable( false );
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ private Q_SLOTS:
|
|||||||
void open();
|
void open();
|
||||||
void save();
|
void save();
|
||||||
void format();
|
void format();
|
||||||
|
void reload();
|
||||||
|
void reloadAll();
|
||||||
void loadAll();
|
void loadAll();
|
||||||
void closeActiveWindow();
|
void closeActiveWindow();
|
||||||
void closeAll();
|
void closeAll();
|
||||||
@@ -198,6 +200,8 @@ private:
|
|||||||
OPEN_ACT = 0,
|
OPEN_ACT = 0,
|
||||||
SAVE_ACT,
|
SAVE_ACT,
|
||||||
FORMAT_ACT,
|
FORMAT_ACT,
|
||||||
|
RELOAD_ACT,
|
||||||
|
RELOAD_ALL_ACT,
|
||||||
LOAD_ALL_ACT,
|
LOAD_ALL_ACT,
|
||||||
CLOSE_ACT,
|
CLOSE_ACT,
|
||||||
CLOSEALL_ACT,
|
CLOSEALL_ACT,
|
||||||
|
|||||||
Reference in new issue
Block a user