Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SDialog.h
1
2
3
5
6#pragma once
7
8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SObject.h"
10#include <QtWidgets/QDialog>
11
12#ifndef FCT_DOC
13namespace rsh::ScriptBinding
14{
15#endif // !FCT_DOC
16
23class SDialog : public SObject
24{
25 //======================================================================================================================
26 // INTERNAL FUNCTION
27 //======================================================================================================================
28
29 //======================================================================================================================
30 // DOCUMENTED FUNCTION
31 //======================================================================================================================
32public slots: // these functions (slots) will be available in QtScript
33
41 Array Execute();
42
50 String label,
52 Boolean isInput,
54 Array labParams = Array(),
62 String _iDefaultInput = String()
64 );
65
70 String label,
72 String output,
74 Array labParams = Array(),
82 Array outParams = Array()
84 );
85
92 Boolean AddImage(
93 String imgPath,
95 Number width = -1,
97 Number height = -1,
99 Boolean keepRatio
101 );
102
105 String toString() ;
106};
107
108// @brief
109// This class allows to wrap static functions to SDialog easily.
110// This allows to wrap constructors more easily, constructors will be declared with the function New(...)
111class SDialog
112#ifndef FCT_DOC
113 : public SObjectStatic
114#endif // FCT_DOC
115{
116 //======================================================================================================================
117 // INTERNAL FUNCTION
118 //======================================================================================================================
119
120 //======================================================================================================================
121 // DOCUMENTED FUNCTION
122 //======================================================================================================================
123public slots:
126 static SDialog New(
127 String title
128#ifdef FCT_DOC
129 = String(),
131#else
132 = "Dialog",
133#endif
134 QWidget parent
136 );
137
140 static String toString();
141};
142Q_DECLARE_METATYPE(SDialog::_SDialogDummy);
143Q_DECLARE_METATYPE(SDialog);
144
145#ifndef FCT_DOC
146} // namespace rsh::ScriptBinding
147#endif // !FCT_DOC
The SDialog class provides simple Dialog creation methods. The SDialog creation can be done by callin...
Definition: SDialog.h:24
Array Execute()
Executes the dialog box.
String toString()
Get the type of the variable.
static SDialog New(String title=String(), QWidget parent)
Dialog constructor.
AddOutput(String label, String output, Array labParams=Array(), Array outParams=Array())
Adds a new output line to the Dialog. This is an overloaded member function, provided for convenience...
Boolean AddImage(String imgPath, Number width=-1, Number height=-1, Boolean keepRatio)
Adds a new image to the Dialog. Supported formats include PNG, JPG, JPEG, GIF, BMP and more.
AddLine(String label, Boolean isInput, Array labParams=Array(), String _iDefaultInput=String())
Adds a new line to the Dialog. Either a simple line with a single label, or also with a text input fi...
static String toString()
Get the type of the variable.
This class is an abstract class, you can use these function in its derived classes.
Definition: SObject.h:35