Serial Studio 1.1.6
A dashboard software for your embedded projects
UI::DeclarativeWidget Class Reference

#include <DeclarativeWidget.h>

Inheritance diagram for UI::DeclarativeWidget:
Inheritance graph
Collaboration diagram for UI::DeclarativeWidget:
Collaboration graph

Public Slots

void resizeWidget ()
 
void setWidget (QWidget *widget)
 

Signals

void widgetChanged ()
 

Public Member Functions

 DeclarativeWidget (QQuickItem *parent=0)
 
QWidget * widget ()
 
void update (const QRect &rect=QRect())
 
virtual void paint (QPainter *painter) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void keyReleaseEvent (QKeyEvent *event) override
 
virtual void inputMethodEvent (QInputMethodEvent *event) override
 
virtual void focusInEvent (QFocusEvent *event) override
 
virtual void focusOutEvent (QFocusEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void mouseDoubleClickEvent (QMouseEvent *event) override
 
virtual void wheelEvent (QWheelEvent *event) override
 
virtual void dragEnterEvent (QDragEnterEvent *event) override
 
virtual void dragMoveEvent (QDragMoveEvent *event) override
 
virtual void dragLeaveEvent (QDragLeaveEvent *event) override
 
virtual void dropEvent (QDropEvent *event) override
 

Properties

QWidget * widget
 

Private Member Functions

void execEvent (void *function, void *event)
 

Private Attributes

QPixmap m_pixmap
 
QPointer< QWidget > m_widget
 

Constructor & Destructor Documentation

◆ DeclarativeWidget()

UI::DeclarativeWidget::DeclarativeWidget ( QQuickItem *  parent = 0)

Configures item flags, sets fill color and connects signals/slots to automatically resize the contained widget to the QML item's size.

Member Function Documentation

◆ dragEnterEvent()

void UI::DeclarativeWidget::dragEnterEvent ( QDragEnterEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ dragLeaveEvent()

void UI::DeclarativeWidget::dragLeaveEvent ( QDragLeaveEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ dragMoveEvent()

void UI::DeclarativeWidget::dragMoveEvent ( QDragMoveEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ dropEvent()

void UI::DeclarativeWidget::dropEvent ( QDropEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ execEvent()

void UI::DeclarativeWidget::execEvent ( void *  function,
void *  event 
)
private

◆ focusInEvent()

void UI::DeclarativeWidget::focusInEvent ( QFocusEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ focusOutEvent()

void UI::DeclarativeWidget::focusOutEvent ( QFocusEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ inputMethodEvent()

void UI::DeclarativeWidget::inputMethodEvent ( QInputMethodEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ keyPressEvent()

void UI::DeclarativeWidget::keyPressEvent ( QKeyEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ keyReleaseEvent()

void UI::DeclarativeWidget::keyReleaseEvent ( QKeyEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ mouseDoubleClickEvent()

void UI::DeclarativeWidget::mouseDoubleClickEvent ( QMouseEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ mouseMoveEvent()

void UI::DeclarativeWidget::mouseMoveEvent ( QMouseEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ mousePressEvent()

void UI::DeclarativeWidget::mousePressEvent ( QMouseEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ mouseReleaseEvent()

void UI::DeclarativeWidget::mouseReleaseEvent ( QMouseEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ paint()

void UI::DeclarativeWidget::paint ( QPainter *  painter)
overridevirtual

Displays the pixmap generated in the update() function in the QML interface through the given painter pointer.

◆ resizeWidget

void UI::DeclarativeWidget::resizeWidget ( )
slot

Resizes the widget to fit inside the QML painted item.

◆ setWidget

void UI::DeclarativeWidget::setWidget ( QWidget *  widget)
slot

Changes the

Parameters
widgetto be rendered in the QML interface.

◆ update()

void UI::DeclarativeWidget::update ( const QRect &  rect = QRect())

Grabs an image/pixmap of the contained widget. The pixmap is later used to render the widget in the QML interface without causing signal/slot interferences with the scenegraph render thread.

◆ wheelEvent()

void UI::DeclarativeWidget::wheelEvent ( QWheelEvent *  event)
overridevirtual

Passes the given

Parameters
eventto the contained widget (if any).

◆ widget()

QWidget * UI::DeclarativeWidget::widget ( )

◆ widgetChanged

void UI::DeclarativeWidget::widgetChanged ( )
signal

Member Data Documentation

◆ m_pixmap

QPixmap UI::DeclarativeWidget::m_pixmap
private

◆ m_widget

QPointer<QWidget> UI::DeclarativeWidget::m_widget
private

Property Documentation

◆ widget

QWidget * UI::DeclarativeWidget::widget
readwrite

Returns a pointer to the contained widget


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