umbrello: OverwriteDialog Class Reference

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

Public Member Functions | Static Public Attributes | Private Attributes | List of all members
OverwriteDialog Class Reference

`#include <overwritedialog.h>`

Inheritance diagram for OverwriteDialog:

## Public Member Functions
| OverwriteDialog (const QString &fileName, const QString &outputDirectory, bool applyToAllRemaining, QWidget *parent=nullptr)
| ~OverwriteDialog ()
bool | applyToAllRemaining ()
Public Member Functions inherited from SinglePageDialogBase
| 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)

## Static Public Attributes
static const int | No = SinglePageDialogBase::Apply

## Private Attributes
QCheckBox * | m_applyToAllRemaining

## Additional Inherited Members
Public Types inherited from SinglePageDialogBase
enum | ButtonCode { Cancel = 0 , Ok = 1 , Apply = 2 }
Protected Slots inherited from SinglePageDialogBase
void | slotApply ()
void | slotOk ()
void | slotCancel ()
void | slotClicked (QAbstractButton *)
Protected Member Functions inherited from SinglePageDialogBase
void | enableButtonOk (bool enable)
virtual bool | validate ()
Protected Attributes inherited from SinglePageDialogBase
QDialogButtonBox * | m_buttonBox
QWidget * | m_mainWidget

## Detailed Description

Used by CodeGenerator::findFileName when it needs to ask the user if they want to overwrite and existing file, generate a similar name or cancel. Gives an option to apply the choice to all remaining files.

Uses OK and Apply buttons but overrides their text and behaviour, probably better to use user defined buttons but I couldn't work out how.

Author
  Jonathan Riddell jr@jr.nosp@m.idde.nosp@m.ll.or.nosp@m.g Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Constructor & Destructor Documentation

## ◆ OverwriteDialog()

OverwriteDialog::OverwriteDialog | ( | const QString & | fileName,
|  | const QString & | outputDirectory,
|  | bool | applyToAllRemaining,
|  | QWidget * | parent = nullptr )

Constructor sets up the dialog, adding checkbox and label.

## ◆ ~OverwriteDialog()

OverwriteDialog::~OverwriteDialog | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ applyToAllRemaining()

bool OverwriteDialog::applyToAllRemaining | ( |  | ) |

Returns
  the value of the Apply To All Remaining Files checkbox

## Member Data Documentation

## ◆ m_applyToAllRemaining

QCheckBox* OverwriteDialog::m_applyToAllRemaining
| private

## ◆ No

const int OverwriteDialog::No = SinglePageDialogBase::Apply
| static

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

- umbrello/dialogs/overwritedialog.h
- umbrello/dialogs/overwritedialog.cpp