Commit 9ef93dbe authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Callback function added to UIMainWindow to trigger events when the selection...

Callback function added to UIMainWindow to trigger events when the selection in the project view changes.
parent 937b976e
......@@ -273,6 +273,7 @@ void UIMainWindow::init()
connect( ui->tableCurrentProjContent, SIGNAL(removalAsked()), this, SLOT(removeFromCurrentProject()) );
connect( ui->tableCurrentProjContent, SIGNAL(itemDoubleClicked(GenericUIData*)), this, SLOT(onItemDoubleClicked(GenericUIData*)) );
connect( m_CurrentViewer, SIGNAL(dataSelected(GenericUIData*,Qt::KeyboardModifiers)), ui->tableCurrentProjContent, SLOT(updateSelection(GenericUIData*,Qt::KeyboardModifiers)) );
connect( ui->tableCurrentProjContent, SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()) );
connect( ui->comboProject, SIGNAL(currentIndexChanged(int)), this, SLOT(currentProjectChanged()) );
......@@ -1538,6 +1539,13 @@ void UIMainWindow::currentProjectChanged()
}
void UIMainWindow::selectionChanged()
{
QList< GenericUIData* > selectedItems = selection();
onSelectionChanged( selectedItems );
}
void UIMainWindow::importFiles(const QStringList& selectedFiles)
{
// Associates a list of files to be processed to each involved plug-in.
......
......@@ -104,6 +104,8 @@ public:
virtual UIProject* onCreatingProject( const QString &name = QString() ) { return new UIProject(name); }
virtual bool onClosingProject( UIProject *proj ) { return true; }
virtual void onSelectionChanged( QList<GenericUIData*> &selection ) {}
private:
void closeEvent( QCloseEvent* evt );
void hideEvent(QHideEvent* event);
......@@ -126,6 +128,7 @@ private slots:
void loadRecent();
void keyPressedInGLViewer( QKeyEvent *evt ) { additionalGLViewerHotkeys( evt ); }
void customMenuActionTriggered();
void selectionChanged();
public slots:
void toolExecutionFinished( bool needUpdate );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment