Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
83fa0241
Commit
83fa0241
authored
13 years ago
by
Tobias Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
add documentation for ToolOptions, removed debug stuff
parent
0af3b281
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/gui/doc/tools.rst
+95
-1
95 additions, 1 deletion
modules/gui/doc/tools.rst
modules/gui/src/tools/tool_option.cc
+0
-5
0 additions, 5 deletions
modules/gui/src/tools/tool_option.cc
modules/gui/src/tools/tool_option.hh
+0
-3
0 additions, 3 deletions
modules/gui/src/tools/tool_option.hh
with
95 additions
and
9 deletions
modules/gui/doc/tools.rst
+
95
−
1
View file @
83fa0241
...
...
@@ -74,4 +74,98 @@ The example `Write a Tool in Python` demonstrates how to add a simple tool
:rtype: :class:`ToolOptions`
.. class:: ToolOption
Currently, there are four different types of ToolOption which can be used to
build up your own tool. They will automatically generate the appropriate
QT widgets:
* :class:`ToolOptionInt` generates a QLineEdit of integer type
* :class:`ToolOptionFloat` generates a QLineEdit of float type
* :class:`ToolOptionEnum` generates a QComboBox
* :class:`ToolOptionButton` generates a QPushButton
.. class:: ToolOptionInt(key, verbose_name, default_value, min_value, max_value)
:param key: Internal key name
:type name: str
:param verbose_name: Name used as label in the widget
:type name: str
:param default_value: Default value
:param min_value: Minimum allowed value
Defaults to minimum possible value
:param max_value: Maximum allowed value
Defaults to maximum possible value
.. method:: GetDefault()
.. method:: GetUpperLimit()
.. method:: GetLowerLimit()
.. method:: GetValue()
.. method:: SetValue(value)
.. class:: ToolOptionFloat(key, verbose_name, default_value, min_value, max_value)
:param key: Internal key name
:type name: str
:param verbose_name: Name used as label in the widget
:type name: str
:param default_value: Default value
:param min_value: Minimum allowed value
Defaults to minimum possible value
:param max_value: Maximum allowed value
Defaults to maximum possible value
.. method:: GetDefault()
.. method:: GetUpperLimit()
.. method:: GetLowerLimit()
.. method:: GetValue()
.. method:: SetValue(value)
.. class:: ToolOptionEnum(key, verbose_name)
:param key: Internal key name
:type name: str
:param verbose_name: Name used as label in the widget
:type verbose_name: str
.. method:: Add(text, tag)
:param text: Text in dropdown menu
:type text: str
:param tag: Index in dropdown menu
:type tag: int
.. method:: SetIndex(index)
:type index: int
.. method:: GetIndex()
.. method:: GetValue()
.. method:: Begin()
.. method:: End()
.. method:: Size()
.. class:: ToolOptionButton(key, verbose_name, QObject* receiver,
const char *slot_method)
:param key: Internal key name
:type name: str
:param verbose_name: Name used as label in the widget
:type name: str
:param slot_method: Name of slot method that should be invoked upon releasing the buton
:type slot_method: const char *
:param receiver: QObject that implements the slot method
:type receiver: QObject *
\ No newline at end of file
This diff is collapsed.
Click to expand it.
modules/gui/src/tools/tool_option.cc
+
0
−
5
View file @
83fa0241
...
...
@@ -68,9 +68,4 @@ ToolOptionButton::ToolOptionButton(const String& key,
}
void
ToolOptionButton
::
RunMe
()
{
std
::
cout
<<
"TOOL RUN ME RUN ME"
<<
std
::
endl
;
}
}}
This diff is collapsed.
Click to expand it.
modules/gui/src/tools/tool_option.hh
+
0
−
3
View file @
83fa0241
...
...
@@ -124,7 +124,6 @@ private:
};
class
DLLEXPORT_OST_GUI
ToolOptionButton
:
public
ToolOption
{
Q_OBJECT
public:
ToolOptionButton
(
const
String
&
key
,
const
String
&
verbose_name
,
...
...
@@ -132,8 +131,6 @@ public:
const
char
*
slot_method
);
const
char
*
GetSlotMethod
()
const
{
return
slot_method_
;
}
QObject
*
GetReceiver
()
const
{
return
receiver_
;
}
public
slots
:
void
RunMe
();
private
:
const
char
*
slot_method_
;
QObject
*
receiver_
;
...
...
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