DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
DynExp::QMLModuleWidget Class Reference

#include <Module.h>

+ Inheritance diagram for DynExp::QMLModuleWidget:

Public Member Functions

 QMLModuleWidget (QAnyStringView SourceUri, QAnyStringView SourceTypeName, QMLModuleBase &Owner, QWidget *Parent=nullptr)
 Constructs a QMLModuleWidget instance.
 
 ~QMLModuleWidget ()=default
 
QObject * GetRootObject () const noexcept
 Getter for this QML module UI's root QML item.
 
QObject * GetBackend () const noexcept
 Getter for this QML module's UI backend. The backend is cached in Backend.
 
bool AllowResize () const noexcept override
 Indicates the resizing behavior of the user interface window. Override to adjust.
 
- Public Member Functions inherited from DynExp::QModuleWidget
 QModuleWidget (QModuleBase &Owner, QWidget *Parent=nullptr)
 Constructs a QModuleWidget instance.
 
 ~QModuleWidget ()=default
 
const auto & GetOwner () const noexcept
 Getter for the owning module.
 
Qt::WindowFlags GetQtWindowFlags () const noexcept
 Depending on thr return value of AllowResize(), returns either the return value of GetQtWindowFlagsResizable() or GetQtWindowFlagsNonResizable().
 
std::string GetDataSaveDirectory () const
 Recalls a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to recall the directory the user has chosen last for saving a file. This directory is the same across all modules.
 
void SetDataSaveDirectory (std::string_view Directory) const
 Sets a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to store the directory the user has chosen last for saving a file. This directory is the same across all modules.
 
virtual bool AllowDocked () const noexcept
 Indicates the docking behavior of the user interface window. Override to adjust.
 

Private Attributes

QQuickView * QuickView
 QQuick target displaying the UI.
 
QWidget * QuickViewContainer
 Widget containing QuickView.
 
QObject * Backend = nullptr
 Pointer to C++ backend synchronized with QML UI.
 

Additional Inherited Members

- Static Public Member Functions inherited from DynExp::QModuleWidget
static constexpr Qt::WindowFlags GetQtWindowFlagsResizable ()
 Default Qt window flags for resizable module windows.
 
static constexpr Qt::WindowFlags GetQtWindowFlagsNonResizable ()
 Default Qt window flags for non-resizable module windows.
 

Detailed Description

Definition at line 1872 of file Module.h.

Constructor & Destructor Documentation

◆ QMLModuleWidget()

DynExp::QMLModuleWidget::QMLModuleWidget ( QAnyStringView  SourceUri,
QAnyStringView  SourceTypeName,
QMLModuleBase Owner,
QWidget *  Parent = nullptr 
)

Constructs a QMLModuleWidget instance.

Parameters
SourceUriuri of the qml module to construct this widget from
SourceTypeNameType nname of the qml module to construct this widget from
OwnerModule owning this user interface window.
ParentParent Qt widget of this user interface window. There is no need to pass anything else than nullptr here.

Definition at line 833 of file Module.cpp.

◆ ~QMLModuleWidget()

DynExp::QMLModuleWidget::~QMLModuleWidget ( )
default

Member Function Documentation

◆ AllowResize()

bool DynExp::QMLModuleWidget::AllowResize ( ) const
inlineoverridevirtualnoexcept

Indicates the resizing behavior of the user interface window. Override to adjust.

Returns
Return true when the window should be resizable by the user, false otherwise.

Reimplemented from DynExp::QModuleWidget.

Definition at line 1897 of file Module.h.

◆ GetBackend()

QObject * DynExp::QMLModuleWidget::GetBackend ( ) const
noexcept

Getter for this QML module's UI backend. The backend is cached in Backend.

Returns
Returns QML module's UI backend or nullptr if the backend is not set.

Definition at line 870 of file Module.cpp.

◆ GetRootObject()

QObject * DynExp::QMLModuleWidget::GetRootObject ( ) const
noexcept

Getter for this QML module UI's root QML item.

Returns
Returns QML module UI's root object or nullptr if there is no root object.

Definition at line 865 of file Module.cpp.

Member Data Documentation

◆ Backend

QObject* DynExp::QMLModuleWidget::Backend = nullptr
mutableprivate

Pointer to C++ backend synchronized with QML UI.

Definition at line 1902 of file Module.h.

◆ QuickView

QQuickView* DynExp::QMLModuleWidget::QuickView
private

QQuick target displaying the UI.

Definition at line 1900 of file Module.h.

◆ QuickViewContainer

QWidget* DynExp::QMLModuleWidget::QuickViewContainer
private

Widget containing QuickView.

Definition at line 1901 of file Module.h.


The documentation for this class was generated from the following files: