Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 727417aa authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Utility functions added for grabbing the current data selection.

parent 22848c7d
......@@ -419,7 +419,7 @@ void UIDataWidget::keyPressEvent( QKeyEvent *evt )
}
QList<GenericUIData*> UIDataWidget::selectedData( const QList<QString>& typeFilters )
QList<GenericUIData*> UIDataWidget::selectedData( const QStringList& typeFilters )
{
QList<QTreeWidgetItem*> selected = selectedItems();
QList<GenericUIData*> mng;
......
......@@ -55,7 +55,7 @@ public:
inline void populateExports( ExportInterface *exporter ) { m_ExportPlugins.push_back( exporter ); }
void contextMenuEvent( QContextMenuEvent *evt );
void keyPressEvent( QKeyEvent *evt );
QList<GenericUIData*> selectedData( const QList<QString>& typeFilters = QList<QString>() );
QList<GenericUIData*> selectedData( const QStringList& typeFilters = QStringList() );
template <typename TFunc>
inline void forAllItemsInSubTree( UIDataWidgetItem* item, const TFunc& func );
......
......@@ -417,9 +417,15 @@ bool UIMainWindow::unloadPlugins()
}
QList<GenericUIData*> UIMainWindow::selection()
QList<GenericUIData*> UIMainWindow::selection( const QStringList& typeFilters )
{
return ui->tableCurrentProjContent->selectedData();
return ui->tableCurrentProjContent->selectedData( typeFilters );
}
QList<GenericUIData*> UIMainWindow::selection( const QString& typeFilter )
{
return selection( QStringList(typeFilter) );
}
......
......@@ -94,7 +94,10 @@ public:
inline GLViewer* getCurrentViewer() const { return m_CurrentViewer; }
UIProject* getCurrentProject() const;
QList<GenericUIData*> selection();
QList<GenericUIData*> selection( const QStringList& typeFilters = QStringList() );
QList<GenericUIData*> selection( const QString& typeFilter );
template <typename T>
inline QList<GenericUIData*> selection() { return selection( UIData<T>::ClassTypeString() ); }
void init();
void release();
......
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