Module omix.api
Package omix.util.ui

Class AbstractConfigWidget

All Implemented Interfaces:
QPaintDevice, QtObjectInterface, QtSignalBlockerInterface, QtSignalEmitterInterface, QtThreadAffineInterface, ConfigWidgetInterface

public abstract class AbstractConfigWidget
extends QWidget
implements ConfigWidgetInterface
This abstract class can be derived to realize a member widget of the configuration dialog window.
Since:
Omix 1.3.11
Author:
Dr. Peter Droste, Omix Visualization
See Also:
ConfigWidgetFactory
  • Constructor Details

    • AbstractConfigWidget

      protected AbstractConfigWidget()
      Same as AbstractConfigWidget(null, null)
    • AbstractConfigWidget

      protected AbstractConfigWidget​(QWidget parent)
      Same as AbstractConfigWidget(parent, null)
      Parameters:
      parent -
    • AbstractConfigWidget

      protected AbstractConfigWidget​(Settings settings)
      Same as AbstractConfigWidget(null, settings)
      Parameters:
      settings -
    • AbstractConfigWidget

      protected AbstractConfigWidget​(QWidget parent, Settings settings)
      Sets the parent widget and the settings variable of the config widget.
      Parameters:
      parent -
      settings -
  • Method Details

    • settings

      protected Settings settings()
      protected access to the settings file
      Returns:
      settings
    • isRestartRequired

      public final boolean isRestartRequired()
      This method is called by the configuration window after closing. When this widget requests a restart, the user is asked to restart the application.
      Specified by:
      isRestartRequired in interface ConfigWidgetInterface
      Returns:
      restartRequired
    • setRestartRequired

      public final void setRestartRequired()
      Called once to request a restart of Omix.
    • buttonText

      public abstract String buttonText()
      Tells the configuration dialog the text displayed on the representing button.
      Specified by:
      buttonText in interface ConfigWidgetInterface
      Returns:
      text
    • buttonPixmap

      public abstract QPixmap buttonPixmap()
      Tells the configuration dialog the pixmap displayed on the representing button.
      Specified by:
      buttonPixmap in interface ConfigWidgetInterface
      Returns:
      pixmap
    • reinitialize

      public abstract void reinitialize()
      Is called by the configuration window when the reset button is pressed.
      Here, a custom program must reset all displayed settings.
      Specified by:
      reinitialize in interface ConfigWidgetInterface
    • isValid

      public boolean isValid()
      can be implemented to check the settings of the page. Is called before, the current page is changed or the config dialog is closed. By default, the method simply returns true.
      Returns:
      when returning false, the page remains.