Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
FormDialog.h
Go to the documentation of this file.
1#pragma once
2#include <QDialog>
3#include <QFile>
4#include <QScrollArea>
5#include <misc/global.h>
6
7namespace sf
8{
9
13class _MISC_CLASS FormDialog final : public QDialog
14{
15 Q_OBJECT
16
17 public:
21 explicit FormDialog(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
22
26 [[nodiscard]] QSize sizeHint() const override;
27
31 void load(QFile file);
32
36 void loadAlt(QFile file);
37
41 // ReSharper disable once CppFunctionIsNotImplemented
42 Q_SIGNAL void resizing(QResizeEvent* event);
43
44 protected:
48 void resizeEvent(QResizeEvent* event) override;
49
50 private:
51 QScrollArea* _scrollArea;
52
53 QWidget* _widget{nullptr};
54
55 void connectChildren();
56};
57
58}// namespace sf
Creates a dialog from ui-type file.
Definition FormDialog.h:14
void resizeEvent(QResizeEvent *event) override
Overridden to emit resizing signal.
QSize sizeHint() const override
Overridden to return the size of the contained UI file.
Q_SIGNAL void resizing(QResizeEvent *event)
Signal to resize content.
FormDialog(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Constructor.
void loadAlt(QFile file)
Alternative for loading UI-file in the dialog.
void load(QFile file)
Loads a UI-file into the dialog.
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10