OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::PropertyDialog Class Reference

The PropertyDialog is used to edit many property groups. When a property is changed a copy of the property is stored and the propertyChanged signal is emitted. All changed properties can be accessed after the dialog closed. The dialog result is "OK" only when the user pressed Confirm and at least one property has changed. All stored changed properties will be destroyed when the dialog is destroyed. More...

#include "PropertyDialog.h"

Inheritance diagram for ot::PropertyDialog:
ot::Dialog ot::QWidgetInterface

Classes

class  PropertyDialogEntry
 
class  PropertyDialogNavigation
 

Signals

void propertyChanged (const Property *_property)
 
void propertyDeleteRequested (const Property *_property)
 

Public Member Functions

 PropertyDialog (const PropertyDialogCfg &_config, QWidget *_parentWidget=(QWidget *) nullptr)
 
virtual ~PropertyDialog ()
 
void setupFromConfiguration (const PropertyDialogCfg &_config)
 Sets up this dialog from the provided configuration. Existing data will be removed.
 
const PropertyGrid *const getPropertyGrid (void) const
 
const std::list< const Property * > & getChangedProperties (void) const
 
- Public Member Functions inherited from ot::Dialog
 Dialog (QWidget *_parent=(QWidget *) nullptr)
 
 Dialog (const DialogCfg &_config, QWidget *_parent=(QWidget *) nullptr)
 
virtual ~Dialog ()
 
virtual QWidget * getQWidget (void)
 Returns a pointer to the root widget of this object.
 
DialogResult showDialog (const ShowFlags &_showFlags=ShowFlags(IdealFit))
 Center the dialog on parent and call exec.
 
void setDialogFlag (DialogCfg::DialogFlag _flag, bool _active=true)
 
void setDialogFlags (DialogCfg::DialogFlags _flags)
 
DialogCfg::DialogFlags dialogFlags (void) const
 
DialogResult dialogResult (void) const
 
void setDialogName (const std::string &_name)
 
const std::string & dialogName (void) const
 
const DialogStateFlagsgetDialogState (void) const
 
- Public Member Functions inherited from ot::QWidgetInterface
 QWidgetInterface ()
 
virtual ~QWidgetInterface ()
 
void setOTWidgetFlags (const WidgetFlags &_flags)
 
const WidgetFlagsotWidgetFlags (void) const
 
virtual void otWidgetFlagsChanged (const WidgetFlags &_flags)
 
void centerOnParent (const QWidget *const _parentWidget)
 Centers this widget on the parent. If no parent is provided the widget will center on the screen.
 
QPoint calculateCenterOnParentPos (const QWidget *const _parentWidget)
 Calculates the top left corner of this widget centered on the parent widget. If no parent is provided the widget will center on the screen.
 

Additional Inherited Members

- Public Types inherited from ot::Dialog
enum  DialogResult {
  Ok , Yes , No , Retry ,
  Cancel
}
 
enum  ShowFlag { DefaultShow = 0 << 0 , CenterOnParent = 1 << 0 , FitOnScreen = 1 << 1 , IdealFit = CenterOnParent | FitOnScreen }
 
enum class  DialogState { NoState = 0 << 0 , MousePressed = 1 << 0 , Closing = 1 << 1 }
 
typedef Flags< ShowFlagShowFlags
 
typedef Flags< DialogStateDialogStateFlags
 
- Public Slots inherited from ot::Dialog
void close (DialogResult _result)
 
void closeOk (void)
 
void closeYes (void)
 
void closeNo (void)
 
void closeRetry (void)
 
void closeCancel (void)
 
- Protected Member Functions inherited from ot::Dialog
virtual void keyPressEvent (QKeyEvent *_event) override
 
virtual void mousePressEvent (QMouseEvent *_event) override
 
virtual void mouseMoveEvent (QMouseEvent *_event) override
 
virtual void mouseReleaseEvent (QMouseEvent *_event) override
 
virtual void closeEvent (QCloseEvent *_event) override
 
virtual bool mayCloseDialogWindow (void) const
 
- Protected Attributes inherited from ot::QWidgetInterface
WidgetFlags m_widgetFlags
 

Detailed Description

The PropertyDialog is used to edit many property groups. When a property is changed a copy of the property is stored and the propertyChanged signal is emitted. All changed properties can be accessed after the dialog closed. The dialog result is "OK" only when the user pressed Confirm and at least one property has changed. All stored changed properties will be destroyed when the dialog is destroyed.

See also
PropertyDialogCfg

Constructor & Destructor Documentation

◆ PropertyDialog()

ot::PropertyDialog::PropertyDialog ( const PropertyDialogCfg & _config,
QWidget * _parentWidget = (QWidget*)nullptr )

◆ ~PropertyDialog()

ot::PropertyDialog::~PropertyDialog ( )
virtual

Member Function Documentation

◆ getChangedProperties()

const std::list< const Property * > & ot::PropertyDialog::getChangedProperties ( void ) const
inline

◆ getPropertyGrid()

const PropertyGrid *const ot::PropertyDialog::getPropertyGrid ( void ) const
inline

◆ propertyChanged

void ot::PropertyDialog::propertyChanged ( const Property * _property)
signal

◆ propertyDeleteRequested

void ot::PropertyDialog::propertyDeleteRequested ( const Property * _property)
signal

◆ setupFromConfiguration()

void ot::PropertyDialog::setupFromConfiguration ( const PropertyDialogCfg & _config)

Sets up this dialog from the provided configuration. Existing data will be removed.


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