Maki
Formally verified low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
base_dialog.h
1
#pragma once
2
3
#include <QDialog>
4
#include <QVBoxLayout>
5
6
class
QDialogButtonBox;
7
11
class
BaseDialog
:
public
QDialog
12
{
13
Q_OBJECT
14
public
:
23
BaseDialog
(
const
QString& title,
double
ratio,
double
screenFraction, QWidget* parent =
nullptr
);
24
25
protected
:
32
void
setSize
(
double
ratio,
double
screenFraction);
33
41
void
setSize
(
double
ratio,
double
screenFraction, qreal heightFraction);
42
43
void
keyPressEvent(QKeyEvent* event)
override
;
44
50
QVBoxLayout*
layout
();
51
59
QDialogButtonBox*
createButtons
(
const
QString& ok,
const
QString& cancel);
60
66
void
limitWidth
(
int
minWidth);
67
73
void
limitHeight
(
int
minHeight);
74
75
private
:
76
int
mMinimunWidth;
77
int
mMinimunHeight;
78
};
BaseDialog::BaseDialog
BaseDialog(const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr)
Constructs a new BaseDialog instance.
Definition
base_dialog.cpp:17
BaseDialog::limitHeight
void limitHeight(int minHeight)
Defines the heigth limits for the dialog.
Definition
base_dialog.cpp:117
BaseDialog::setSize
void setSize(double ratio, double screenFraction)
Sets the size of the dialog based on the given ratio and screen fraction.
Definition
base_dialog.cpp:31
BaseDialog::limitWidth
void limitWidth(int minWidth)
Defines the width limits for the dialog.
Definition
base_dialog.cpp:110
BaseDialog::createButtons
QDialogButtonBox * createButtons(const QString &ok, const QString &cancel)
Creates a button box with OK and Cancel buttons.
Definition
base_dialog.cpp:71
BaseDialog::layout
QVBoxLayout * layout()
Returns the layout of the dialog.
Definition
base_dialog.cpp:66
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research