Commit e2b154ab authored by Stéphane Albert's avatar Stéphane Albert

ENH: Removed the 'Orfeo Toolbox Algorithms' root node from the OTB-application browser.

parent 92dcd6ab
......@@ -143,12 +143,14 @@ ApplicationsToolBox
//
// main item (title)
#if USE_ALGORITHM_ROOT_NODE
QTreeWidgetItem * mainItem =
new QTreeWidgetItem( m_UI->m_AlgorithmsTree, ITEM_TYPE_ROOT );
mainItem->setText( COLUMN_NAME, tr( "Orfeo Toolbox Algorithms" ) );
mainItem->setExpanded( !m_SearchText.isEmpty() );
mainItem->setFlags( Qt::NoItemFlags | Qt::ItemIsEnabled );
#endif // USE_ALGORITHME_ROOT_NODE
QString search( m_SearchText.simplified() );
......@@ -171,7 +173,14 @@ ApplicationsToolBox
//
// step #1 -> DocTag is a main item
QTreeWidgetItem * cmainItem =
new QTreeWidgetItem( mainItem, ITEM_TYPE_TAG );
new QTreeWidgetItem(
#if USE_ALGORITHM_ROOT_NODE
mainItem,
#else // USE_ALGORITHM_ROOT_NODE
m_UI->m_AlgorithmsTree,
#endif // USE_ALGORITHM_ROOT_NODE
ITEM_TYPE_TAG
);
cmainItem->setText( COLUMN_NAME, qcurrentTag );
cmainItem->setExpanded( !m_SearchText.isEmpty() );
......
......@@ -46,6 +46,10 @@
// Monteverdi includes (sorted by alphabetic order)
#include "Core/mvdTypes.h"
#define USE_ALGORITHM_ROOT_NODE 0
/*****************************************************************************/
/* PRE-DECLARATION SECTION */
......@@ -64,7 +68,6 @@ namespace Ui
class ApplicationsToolBox;
};
/*****************************************************************************/
/* CLASS DEFINITION SECTION */
......@@ -174,7 +177,8 @@ private:
/**
* \brief text to search in the widget tree
*/
QString m_SearchText;
QString m_SearchText;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
......
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