Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
BaseDialog Class Reference

Base dialog class with common functionality. More...

#include <base_dialog.h>

Inheritance diagram for BaseDialog:
EventDialog SettingsDialog maki::PromptDialog maki::TextDialog maki::TypeReferenceDialog maki::TypeValueDialog

Public Member Functions

 BaseDialog (const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr)
 Constructs a new BaseDialog instance.

Protected Member Functions

void setSize (double ratio, double screenFraction)
 Sets the size of the dialog based on the given ratio and screen fraction.
void setSize (double ratio, double screenFraction, qreal heightFraction)
 Sets the size of the dialog based on the given ratio, screen fraction, and height fraction.
QVBoxLayout * layout ()
 Returns the layout of the dialog.
QDialogButtonBox * createButtons (const QString &ok, const QString &cancel)
 Creates a button box with OK and Cancel buttons.
void limitWidth (int minWidth)
 Defines the width limits for the dialog.
void limitHeight (int minHeight)
 Defines the heigth limits for the dialog.

Detailed Description

Base dialog class with common functionality.

Constructor & Destructor Documentation

◆ BaseDialog()

BaseDialog::BaseDialog ( const QString & title,
double ratio,
double screenFraction,
QWidget * parent = nullptr )

Constructs a new BaseDialog instance.

Parameters
titleThe title of the dialog.
ratioThe size ratio for the dialog.
screenFractionThe fraction of the screen to use for the dialog.
parentThe parent widget.

Member Function Documentation

◆ createButtons()

QDialogButtonBox * BaseDialog::createButtons ( const QString & ok,
const QString & cancel )
protected

Creates a button box with OK and Cancel buttons.

Parameters
okThe text for the OK button.
cancelThe text for the Cancel button.
Returns
QDialogButtonBox* Pointer to the created button box.

◆ layout()

QVBoxLayout * BaseDialog::layout ( )
protected

Returns the layout of the dialog.

Returns
QVBoxLayout* Pointer to the layout.

◆ limitHeight()

void BaseDialog::limitHeight ( int minHeight)
protected

Defines the heigth limits for the dialog.

Parameters
minHeightThe minimum height allowed

◆ limitWidth()

void BaseDialog::limitWidth ( int minWidth)
protected

Defines the width limits for the dialog.

Parameters
minWidthThe minimum width allowed

◆ setSize() [1/2]

void BaseDialog::setSize ( double ratio,
double screenFraction )
protected

Sets the size of the dialog based on the given ratio and screen fraction.

Parameters
ratioThe size ratio for the dialog.
screenFractionThe fraction of the screen to use for the dialog.

◆ setSize() [2/2]

void BaseDialog::setSize ( double ratio,
double screenFraction,
qreal heightFraction )
protected

Sets the size of the dialog based on the given ratio, screen fraction, and height fraction.

Parameters
ratioThe size ratio for the dialog.
screenFractionThe fraction of the screen to use for the dialog.
heightFractionThe fraction of the height to use for the dialog.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/widgets/base_dialog.h
  • /__w/maki/maki/app/widgets/base_dialog.cpp