Into

Modules

Documentation

classPiiConfigurationWidget

#include <PiiConfigurationWidget.h>

An interface that provides different UI components a way of communicating with the controlling program.

Inherits QWidget

Inherited by PiiTableLabelerConfigurator

Description

The UI components provided by operations (see PiiOperation::createUiComponent()) are all derived from QWidget. Since the creator of a UI component usually has no knowledge of the actual type of the component, an abstract way of delivering certain information is provided by the PiiConfigurationWidget interface. If the UI component implements this interface, the creator can send and receive information that controls the behavior of the UI. Neither this interface nor the internal Listener interface use signals and slots, because Qt does not support multiple inheritance.

The interface has a default implementation for each method so that only the necessary methods need to be overridden.

Public Slots

virtual void

Accept the UI component.

virtual void
( )

Reset the component to the state it was upon creation or after the last acceptChanges() call.

virtual void

Set the default values.

Signals

void
(
  • bool acceptable
)

This signal indicates that the configurator is either acceptable or unacceptable.

void
(
  • bool changed
)

This signal indicates that the contents of the widget have been altered from their initial values.

Constructors and destructor

Create a new PiiConfigurationWidget with the given parent.

Public member functions

virtual bool

Check whether the UI component can be accepted.

virtual bool

See if the component can be reset to the state it was upon creation or after the last acceptChanges() call.

virtual bool

Check whether the component's state has changed since its creation or the last acceptChanges() call.

virtual bool

See if the component has default values it can be initialized with.

Protected member functions

void
(
  • bool acceptable
)

Set the acceptable state.

void
(
  • bool changed
)

Set the changed state.

Function details

  • PiiConfigurationWidget

    ( )

    Create a new PiiConfigurationWidget with the given parent.

  • ~PiiConfigurationWidget

    ()
  • virtual bool canAccept

    ()
    [virtual]

    Check whether the UI component can be accepted.

    This is needed, for example, with configuration dialogs that can be accepted only if certain values have been correctly set. The default implementation returns the value set by setAcceptable(). The default value is true.

  • virtual bool canReset

    ()
    [virtual]

    See if the component can be reset to the state it was upon creation or after the last acceptChanges() call.

    The default implementation returns false.

  • virtual bool hasChanged

    ()
    [virtual]

    Check whether the component's state has changed since its creation or the last acceptChanges() call.

    The default implementation returns the value set by setChanged(). The default value is false.

  • virtual bool hasDefaults

    ()
    [virtual]

    See if the component has default values it can be initialized with.

    The default implementation returns false.

  • void setAcceptable

    (
    • bool acceptable
    )
    [protected]

    Set the acceptable state.

    This method also sends a acceptStateChanged() signal.

  • void setChanged

    (
    • bool changed
    )
    [protected]

    Set the changed state.

    This method also sends a contentsChanged() signal.

  • void acceptStateChanged

    (
    • bool acceptable
    )
    [signal]

    This signal indicates that the configurator is either acceptable or unacceptable.

  • void contentsChanged

    (
    • bool changed
    )
    [signal]

    This signal indicates that the contents of the widget have been altered from their initial values.

  • virtual void acceptChanges

    ()
    [virtual, slot]

    Accept the UI component.

    The implementation of this method should store the changes made so far.

  • virtual void reset

    ()
    [virtual, slot]

    Reset the component to the state it was upon creation or after the last acceptChanges() call.

  • virtual void setDefaults

    ()
    [virtual, slot]

    Set the default values.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.