Commit f693da07 authored by Marcel Campen's avatar Marcel Campen

createWidget now has additional parameter to specify whether the widget should...

createWidget now has additional parameter to specify whether the widget should be shown or stay hidden



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19717 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 708524fb
......@@ -1232,7 +1232,7 @@ private slots:
* @param _objectName The name in scripting environment used for the new object
* @param _uiFilename ui file to load
*/
void createWidget(QString _objectName, QString _uiFilename);
void createWidget(QString _objectName, QString _uiFilename, bool _show = true);
/// Set the active ViewMode
void setViewMode(QString _viewMode);
......
......@@ -84,7 +84,7 @@ void Core::scriptLogFunction( QString _output) {
emit scriptLog(_output);
}
void Core::createWidget(QString _objectName, QString _uiFilename) {
void Core::createWidget(QString _objectName, QString _uiFilename, bool _show) {
if ( OpenFlipper::Options::gui()) {
QUiLoader loader;
......@@ -114,7 +114,7 @@ void Core::createWidget(QString _objectName, QString _uiFilename) {
scriptEngine_.globalObject().setProperty(_objectName, scriptUi);
ui->show();
if(_show) ui->show();
} else {
emit log(LOGERR,tr("Error! Script tried to create Widget in ui less batc mode! Creation Aborted!"));
}
......
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