Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
588c8a6a
Commit
588c8a6a
authored
Mar 13, 2013
by
Otmane Lahlou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: method to fill the TreeWidget ans slot to receive the tag/appsName map
parent
dddd2520
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
1 deletion
+78
-1
Code/Common/mvdApplicationsToolBox.cxx
Code/Common/mvdApplicationsToolBox.cxx
+63
-0
Code/Common/mvdApplicationsToolBox.h
Code/Common/mvdApplicationsToolBox.h
+15
-1
No files found.
Code/Common/mvdApplicationsToolBox.cxx
View file @
588c8a6a
...
...
@@ -76,8 +76,71 @@ ApplicationsToolBox
{
}
/*******************************************************************************/
QTreeWidget
*
ApplicationsToolBox
::
GetAlgorithmsTree
()
{
return
m_UI
->
m_AlgorithmsTree
;
}
/*******************************************************************************/
void
ApplicationsToolBox
::
FillTreeUsingTags
()
{
//
// clear algorithms tree
GetAlgorithmsTree
()
->
clear
();
//
// main item (title)
QTreeWidgetItem
*
mainItem
=
new
QTreeWidgetItem
(
GetAlgorithmsTree
()
);
mainItem
->
setText
(
0
,
"Orfeo Toolbox Algorithms"
);
//
//
ApplicationsTagContainer
::
const_iterator
itTag
=
m_AppTags
.
begin
();
while
(
itTag
!=
m_AppTags
.
end
()
)
{
// Step # 1 -> Tag as a main item
// set current tag as a main item
QTreeWidgetItem
*
cmainItem
=
new
QTreeWidgetItem
(
mainItem
);
QString
qcurrentMainItem
(
(
*
itTag
).
first
.
c_str
()
);
cmainItem
->
setText
(
0
,
qcurrentMainItem
);
// step #2 -> Applications name as secondary items
// iterate over the StringVector containing the apps relative to
// this tag
StringVector
::
const_iterator
itApps
=
(
*
itTag
).
second
.
begin
();
while
(
itApps
!=
(
*
itTag
).
second
.
end
()
)
{
//
// set current tag as main item
QTreeWidgetItem
*
secItem
=
new
QTreeWidgetItem
(
cmainItem
);
QString
qcurrentSecItem
(
(
*
itApps
).
c_str
()
);
secItem
->
setText
(
0
,
qcurrentSecItem
);
++
itApps
;
}
++
itTag
;
}
}
/*******************************************************************************/
/* SLOTS */
/*******************************************************************************/
void
ApplicationsToolBox
::
OnAvailableApplicationsTagsChanged
(
const
ApplicationsTagContainer
&
appsTags
)
{
// rememeber the map
m_AppTags
=
appsTags
;
// fill the tree with the application
FillTreeUsingTags
();
}
/*******************************************************************************/
}
// end namespace 'mvd'
Code/Common/mvdApplicationsToolBox.h
View file @
588c8a6a
...
...
@@ -44,7 +44,7 @@
//
// Monteverdi includes (sorted by alphabetic order)
#include "mvdTypes.h"
/*****************************************************************************/
/* PRE-DECLARATION SECTION */
...
...
@@ -94,11 +94,15 @@ public:
/** \brief Destructor. */
virtual
~
ApplicationsToolBox
();
/** Get TreeWidget */
QTreeWidget
*
GetAlgorithmsTree
();
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
//
// Public SLOTS.
public
slots
:
void
OnAvailableApplicationsTagsChanged
(
const
ApplicationsTagContainer
&
appsTags
);
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
...
...
@@ -121,6 +125,10 @@ protected:
//
// Private methods.
private:
/**
* \brief fill the widget tree using the tags map
*/
void
FillTreeUsingTags
();
//
// Private attributes.
...
...
@@ -130,6 +138,12 @@ private:
*/
Ui
::
ApplicationsToolBox
*
m_UI
;
/**
* \brief map storing applications and its tags
*/
ApplicationsTagContainer
m_AppTags
;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment