Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
a2170092
Commit
a2170092
authored
13 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH : add method relative to the QViewWidget class
parent
153430bb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/ApplicationEngine/otbWrapperApplication.cxx
+26
-0
26 additions, 0 deletions
Code/ApplicationEngine/otbWrapperApplication.cxx
Code/ApplicationEngine/otbWrapperApplication.h
+6
-0
6 additions, 0 deletions
Code/ApplicationEngine/otbWrapperApplication.h
with
32 additions
and
0 deletions
Code/ApplicationEngine/otbWrapperApplication.cxx
+
26
−
0
View file @
a2170092
...
...
@@ -18,6 +18,7 @@
#include
"otbWrapperApplication.h"
#include
"otbWrapperChoiceParameter.h"
#include
"otbWrapperListViewParameter.h"
#include
"otbWrapperDirectoryParameter.h"
#include
"otbWrapperEmptyParameter.h"
#include
"otbWrapperFilenameParameter.h"
...
...
@@ -203,6 +204,10 @@ ParameterType Application::GetParameterType(std::string paramKey) const
{
type
=
ParameterType_Choice
;
}
else
if
(
dynamic_cast
<
const
ListViewParameter
*>
(
param
))
{
type
=
ParameterType_ListView
;
}
else
if
(
dynamic_cast
<
const
RadiusParameter
*>
(
param
))
{
type
=
ParameterType_Radius
;
...
...
@@ -331,6 +336,11 @@ void Application::SetParameterString(std::string parameter, std::string value)
ChoiceParameter
*
paramDown
=
dynamic_cast
<
ChoiceParameter
*>
(
param
);
paramDown
->
SetValue
(
value
);
}
else
if
(
dynamic_cast
<
ListViewParameter
*>
(
param
))
{
ListViewParameter
*
paramDown
=
dynamic_cast
<
ListViewParameter
*>
(
param
);
paramDown
->
SetValue
(
value
);
}
else
if
(
dynamic_cast
<
StringParameter
*>
(
param
))
{
StringParameter
*
paramDown
=
dynamic_cast
<
StringParameter
*>
(
param
);
...
...
@@ -510,6 +520,11 @@ std::string Application::GetParameterString(std::string parameter)
ChoiceParameter
*
paramDown
=
dynamic_cast
<
ChoiceParameter
*>
(
param
);
ret
=
paramDown
->
GetChoiceName
(
paramDown
->
GetValue
()
);
}
else
if
(
dynamic_cast
<
ListViewParameter
*>
(
param
))
{
ListViewParameter
*
paramDown
=
dynamic_cast
<
ListViewParameter
*>
(
param
);
ret
=
paramDown
->
GetChoiceName
(
paramDown
->
GetValue
()
);
}
else
if
(
dynamic_cast
<
StringParameter
*>
(
param
))
{
StringParameter
*
paramDown
=
dynamic_cast
<
StringParameter
*>
(
param
);
...
...
@@ -670,6 +685,17 @@ Application::AddChoice(std::string paramKey, std::string paramName)
GetParameterList
()
->
AddChoice
(
paramKey
,
paramName
);
}
void
Application
::
ClearChoices
(
std
::
string
paramKey
)
{
GetParameterList
()
->
ClearChoices
(
paramKey
);
}
std
::
vector
<
int
>
Application
::
GetSelectedItems
(
std
::
string
param
)
{
return
GetParameterList
()
->
GetSelectedItems
(
param
);
}
void
Application
::
AddParameter
(
ParameterType
type
,
std
::
string
paramKey
,
std
::
string
paramName
)
...
...
This diff is collapsed.
Click to expand it.
Code/ApplicationEngine/otbWrapperApplication.h
+
6
−
0
View file @
a2170092
...
...
@@ -366,6 +366,12 @@ protected:
* or the path to a choice value */
void
AddParameter
(
ParameterType
type
,
std
::
string
paramKey
,
std
::
string
paramName
);
/** Remove the items added to the ListWidget */
void
ClearChoices
(
std
::
string
key
);
/** Get Items selected in the ListView Parameter*/
std
::
vector
<
int
>
GetSelectedItems
(
std
::
string
paramKey
);
/** Declare a parameter as mandatory */
void
MandatoryOn
(
std
::
string
paramKey
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment