umbrello: SinglePageDialogBase Class Reference

umbrello 25.04.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
SinglePageDialogBase Class Reference

`#include <singlepagedialogbase.h>`

Inheritance diagram for SinglePageDialogBase:

## Public Types
enum | ButtonCode { Cancel = 0 , Ok = 1 , Apply = 2 }

## Public Member Functions
| SinglePageDialogBase (QWidget *parent, bool withApplyButton=false, bool withSearchButton=false)
virtual | ~SinglePageDialogBase ()
virtual bool | apply ()
void | setCaption (const QString &caption)
QWidget * | mainWidget ()
void | setMainWidget (QWidget *widget)
void | setButtonText (ButtonCode code, const QString &text)

## Protected Slots
void | slotApply ()
void | slotOk ()
void | slotCancel ()
void | slotClicked (QAbstractButton *)

## Protected Member Functions
void | enableButtonOk (bool enable)
virtual bool | validate ()

## Protected Attributes
QDialogButtonBox * | m_buttonBox
QWidget * | m_mainWidget

## Detailed Description

Base class for single page property dialogs

Author
  Ralf Habacker

Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Member Enumeration Documentation

## ◆ ButtonCode

enum SinglePageDialogBase::ButtonCode

Enumerator
Cancel |
Ok |
Apply |

## Constructor & Destructor Documentation

## ◆ SinglePageDialogBase()

SinglePageDialogBase::SinglePageDialogBase | ( | QWidget * | parent,
|  | bool | withApplyButton = false,
|  | bool | withSearchButton = false )
| explicit

Constructor

## ◆ ~SinglePageDialogBase()

SinglePageDialogBase::~SinglePageDialogBase | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ apply()

bool SinglePageDialogBase::apply | ( |  | ) |
| virtual

Apply dialog changes to the related object.

This method could be overridden in derived dialogs to suppport post dialog applying.

Returns
  true apply succeeds
  false apply does not succeed

Reimplemented in ParameterPropertiesDialog, SelectOperationDialog, StereoAttributeDialog, UMLAttributeDialog, UMLCheckConstraintDialog, UMLEntityAttributeDialog, UMLEnumLiteralDialog, UMLInstanceAttributeDialog, UMLOperationDialog, UMLRoleDialog, UMLTemplateDialog, and UMLUniqueConstraintDialog.

## ◆ enableButtonOk()

void SinglePageDialogBase::enableButtonOk | ( | bool | enable | ) |
| protected

Enable the ok button.

Parameters

  enable | the enable value

## ◆ mainWidget()

QWidget * SinglePageDialogBase::mainWidget | ( |  | ) |

Returns
  The main widget. Will return `this` as the mainWidget if none was set before. This way you can write
  ui.setupUi(mainWidget());
  SinglePageDialogBase::mainWidget
  QWidget * mainWidget()
  Definition singlepagedialogbase.cpp:136
  when using designer.

## ◆ setButtonText()

void SinglePageDialogBase::setButtonText | ( | SinglePageDialogBase::ButtonCode | code,
|  | const QString & | text )

Set the text of a dedicated button.

Parameters

  code | button code
  text | button text

## ◆ setCaption()

void SinglePageDialogBase::setCaption | ( | const QString & | caption | ) |

## ◆ setMainWidget()

void SinglePageDialogBase::setMainWidget | ( | QWidget * | widget | ) |

Sets the main widget of the dialog.

## ◆ slotApply

void SinglePageDialogBase::slotApply | ( |  | ) |
| protectedslot

Used when the Apply button is clicked. Calls apply().

## ◆ slotCancel

void SinglePageDialogBase::slotCancel | ( |  | ) |
| protectedslot

Used when the Cancel button is clicked.

## ◆ slotClicked

void SinglePageDialogBase::slotClicked | ( | QAbstractButton * | button | ) |
| protectedslot

Used when the Cancel button is clicked.

## ◆ slotOk

void SinglePageDialogBase::slotOk | ( |  | ) |
| protectedslot

Used when the OK button is clicked. Calls apply().

## ◆ validate()

bool SinglePageDialogBase::validate | ( |  | ) |
| protectedvirtual

Return state of dialog input validation.

The false state is used to prevent closing the dialog.

Returns
  true if dialog entries are valid

Reimplemented in ParameterPropertiesDialog.

## Member Data Documentation

## ◆ m_buttonBox

QDialogButtonBox* SinglePageDialogBase::m_buttonBox
| protected

## ◆ m_mainWidget

QWidget* SinglePageDialogBase::m_mainWidget
| protected

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

- umbrello/dialogs/singlepagedialogbase.h
- umbrello/dialogs/singlepagedialogbase.cpp