The SKIRT project
advanced radiative transfer for astrophysics
Signals | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
PropertyWizardPane Class Reference

#include <PropertyWizardPane.hpp>

Inheritance diagram for PropertyWizardPane:
Inheritance graph
[legend]

Signals

void propertyValidChanged (bool valid)
 
void propertyValueChanged ()
 

Public Member Functions

 PropertyWizardPane (std::unique_ptr< PropertyHandler > handler, QObject *target)
 
 ~PropertyWizardPane ()
 
PropertyHandlerhandler ()
 
virtual void updateInterface ()
 

Protected Member Functions

QLabel * createHeader (string text)
 
template<class T >
T * handlerCast ()
 
void showEvent (QShowEvent *event) override
 

Private Attributes

std::unique_ptr< PropertyHandler_handler
 

Detailed Description

PropertyWizardPane is the base class for all wizard panes handling item properties. It offers common functionality, such as connecting the propertyValidChanged() signal to the target object, and retaining a reference to the relevant property handler so that it does not get deleted until the wizard pane is destroyed.

Constructor & Destructor Documentation

◆ PropertyWizardPane()

PropertyWizardPane::PropertyWizardPane ( std::unique_ptr< PropertyHandler handler,
QObject *  target 
)
explicit

The default (and only) constructor retains a reference to the specified property handler so that it does not get deleted until the wizard pane is destroyed, and connects the propertyValidChanged() and propertyValueChanged() signals to the specified target object.

◆ ~PropertyWizardPane()

PropertyWizardPane::~PropertyWizardPane ( )

The destructor destroys the property handler being held by this wizard pane.

Member Function Documentation

◆ createHeader()

QLabel * PropertyWizardPane::createHeader ( string  text)
protected

This function creates a QLabel widget with the given text and with a status tip that is appropriate for the property being handled by this property wizard pane.

◆ handler()

PropertyHandler * PropertyWizardPane::handler ( )
inline

This function returns the handler retained by this wizard pane, without transferring ownership.

◆ handlerCast()

template<class T >
T * PropertyWizardPane::handlerCast ( )
inlineprotected

This template function dynamically casts the handler retained by this wizard pane to the specified template type, and returns the result. If the handler is not of the specified type, the function returns null.

◆ propertyValidChanged

void PropertyWizardPane::propertyValidChanged ( bool  valid)
signal

This signal is emitted when the valid state of the property wizard pane (indicating whether the wizard is allowed to advance) may have changed.

◆ propertyValueChanged

void PropertyWizardPane::propertyValueChanged ( )
signal

This signal is emitted when the value of the property being handled by this property wizard pane has changed. The signal should only be emitted when the value actually did change, not just when it might have changed. Thus the caller should check the previous property value.

◆ showEvent()

void PropertyWizardPane::showEvent ( QShowEvent *  event)
overrideprotected

This function ensures that the first focus-enabled widget in the pane receives the focus when the pane is shown.

◆ updateInterface()

virtual void PropertyWizardPane::updateInterface ( )
virtual

This function updates the user interface of the pane if needed to adjust to changes to the values of other properties displayed inside the same MultiPropertyWizardPane instance. Examples include a minimum, maximum or default value based on a conditional expression, and quantity units determined by the value of a preceding enumeration property. The function should be implemented by all subclasses that may be managed by a MultiPropertyWizardPane. The implementation in this abstract base class does nothing.

Reimplemented in DoubleListPropertyWizardPane, and DoublePropertyWizardPane.


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