Maki
Formally verfied low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
base_dialog.h
1
#pragma once
2
3
#include <QDialog>
4
5
#include "style_helpers.h"
6
7
class
QDialogButtonBox;
8
12
class
BaseDialog
:
public
QDialog
13
{
14
Q_OBJECT
15
public
:
24
BaseDialog
(
const
QString& title,
double
ratio,
double
screenFraction, QWidget* parent =
nullptr
);
25
26
protected
:
33
void
setSize
(
double
ratio,
double
screenFraction);
34
35
void
setFlexibleSize(
int
minWidth,
int
minHeight);
36
44
void
setSize
(
double
ratio,
double
screenFraction, qreal heightFraction);
45
46
void
keyPressEvent(QKeyEvent* event)
override
;
47
53
QVBoxLayout*
layout
();
54
62
QDialogButtonBox*
createButtons
(
const
QString& ok,
const
QString& cancel);
63
69
void
limitWidth
(
int
minWidth);
70
76
void
limitHeight
(
int
minHeight);
77
78
private
:
79
int
mMinimunWidth;
80
int
mMinimunHeight;
81
};
BaseDialog::BaseDialog
BaseDialog(const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr)
Constructs a new BaseDialog instance.
Definition
base_dialog.cpp:19
BaseDialog::limitHeight
void limitHeight(int minHeight)
Defines the heigth limits for the dialog.
Definition
base_dialog.cpp:122
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:33
BaseDialog::limitWidth
void limitWidth(int minWidth)
Defines the width limits for the dialog.
Definition
base_dialog.cpp:115
BaseDialog::createButtons
QDialogButtonBox * createButtons(const QString &ok, const QString &cancel)
Creates a button box with OK and Cancel buttons.
Definition
base_dialog.cpp:78
BaseDialog::layout
QVBoxLayout * layout()
Returns the layout of the dialog.
Definition
base_dialog.cpp:73
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research