Base dialog class with common functionality.
More...
#include <base_dialog.h>
|
| | BaseDialog (const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr) |
| | Constructs a new BaseDialog instance.
|
|
| 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.
|
Base dialog class with common functionality.
◆ BaseDialog()
| BaseDialog::BaseDialog |
( |
const QString & | title, |
|
|
double | ratio, |
|
|
double | screenFraction, |
|
|
QWidget * | parent = nullptr ) |
Constructs a new BaseDialog instance.
- Parameters
-
| title | The title of the dialog. |
| ratio | The size ratio for the dialog. |
| screenFraction | The fraction of the screen to use for the dialog. |
| parent | The parent widget. |
◆ createButtons()
| QDialogButtonBox * BaseDialog::createButtons |
( |
const QString & | ok, |
|
|
const QString & | cancel ) |
|
protected |
Creates a button box with OK and Cancel buttons.
- Parameters
-
| ok | The text for the OK button. |
| cancel | The 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
-
| minHeight | The minimum height allowed |
◆ limitWidth()
| void BaseDialog::limitWidth |
( |
int | minWidth | ) |
|
|
protected |
Defines the width limits for the dialog.
- Parameters
-
| minWidth | The 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
-
| ratio | The size ratio for the dialog. |
| screenFraction | The 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
-
| ratio | The size ratio for the dialog. |
| screenFraction | The fraction of the screen to use for the dialog. |
| heightFraction | The 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