Commit 63d66604 authored by Jan Möbius's avatar Jan Möbius
Browse files

Datacontrol function to get object datatype and stringlist of all available...

Datacontrol function to get object datatype and stringlist of all available datatypes. Started scripting documentation. refs #394 

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13556 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3949720e
......@@ -21,6 +21,7 @@
* - \subpage dataFlow "Dataflow"
* - \subpage options "Command line options and config files"
* - \subpage datatypes "Integrated Datatypes"
* - \subpage scripting
*
* \subpage misc
* - \ref changelog
......
/*!
\page scripting OpenFlipper Scripting
TODO: OpenFlipper Scripting and examples.
\section scripting_datattypes DataTypes
In the scripting system the type DataType is already known. You can do for example
\code
DataType("TriangleMesh");
\endcode
You can get a string list with all available data types via
\code
// Get the string list of data types via DataControl Plugin
var types = datacontrol.availableDataTypeNames();
\endcode
\subsection scripting_datattypes_getting_type Getting the DataType of an Object
\code
// Set the object id
var object = 5;
// Get the DataTypes and print its name
print(datacontrol.dataType(object))
\endcode
\section scripting_examples Scripting Examples
\subsection scripting_examples_qstringlist Iterating over a QStringList
\code
// Get the string list of data types via DataControl Plugin
var types = datacontrol.availableDataTypeNames();
// Iterate over the list and print to the console
for ( i = 0 ; i < types.length ; ++i ) {
print(types[i]);
}
\endcode
*/
......@@ -236,11 +236,11 @@ uint typeCount();
* @{ */
//================================================================================================
/// Get iterator pointing to the first element in the tyoes list
/// Get iterator pointing to the first element in the types list
DLLEXPORT
std::vector< TypeInfo >::const_iterator typesBegin();
/// Get iterator pointing to the last element in the tyoes list
/// Get iterator pointing to the last element in the types list
DLLEXPORT
std::vector< TypeInfo >::const_iterator typesEnd();
......@@ -251,11 +251,11 @@ std::vector< TypeInfo >::const_iterator typesEnd();
* @{ */
//================================================================================================
/// Get DataType Human readable name ( this name might change. Use the typeName insted! )
/// Get DataType Human readable name ( this name might change. Use the typeName instead! )
DLLEXPORT
QString dataTypeName( DataType _id );
/// Get DataType Human readable name ( this name might change. Use the typeName insted! )
/// Get DataType Human readable name ( this name might change. Use the typeName instead! )
DLLEXPORT
QString dataTypeName( QString _typeName);
......@@ -283,7 +283,7 @@ QString typeIconName(QString _name);
DLLEXPORT
QString typeIconName(DataType _id);
/** \brief Get an QIcon associated with the given datatype
/** \brief Get an QIcon associated with the given DataType
*
* The icons are loaded once when set and then the reference is returned here.
* This reduces the time when frequently requesting the icons (e.g. DataControl)
......
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