Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
LayoutData.h
Go to the documentation of this file.
1#pragma once
2#include <QDir>
3#include <gii/global.h>
4#include <gii/qt/Namespace.h>
6
7namespace sf
8{
9
13class _GII_CLASS LayoutData : public QObject
14{
15 Q_OBJECT
16
17 public:
21 explicit LayoutData(QObject* parent = nullptr);
22
28 virtual void openPropertyEditor(QObject* target);
29
35 virtual void popupContextMenu(QObject* target, const QPoint& pos);
36
40 void setReadOnly(bool);
41
45 [[nodiscard]] bool getReadOnly() const;
46
52 static LayoutData* from(QObject* target);
53
57 static bool hasMenuModifiers(Qt::KeyboardModifiers modifiers);
58
62 [[nodiscard]] virtual QDir getDirectory() const;
63
68 void setDirectory(const QDir& directory);
69
73 static QString getFileSuffix();
74
79 [[nodiscard]] gii::IdType getIdOffset() const;
80
85 void setIdOffset(gii::IdType idOffset) const;
86
87 private:
88 struct Private;
89 Private* _p{nullptr};
90};
91
92}// namespace sf
Definition LayoutData.h:14
LayoutData(QObject *parent=nullptr)
Constructor as QWidget.
static QString getFileSuffix()
Gets suffix used for layout files.
static LayoutData * from(QObject *target)
Gets the layout widget instance for the passed target if any.
bool getReadOnly() const
Property 'converted' get method.
virtual void openPropertyEditor(QObject *target)
Opens a property editor dialog for the given target in a derived class. The returned pointer can be u...
static bool hasMenuModifiers(Qt::KeyboardModifiers modifiers)
Returns true when the modifier are met for the context menu to popup.
virtual QDir getDirectory() const
Gets the directory of the loaded layout file.
gii::IdType getIdOffset() const
Gets the id offset for all Gii widgets. Only applied when a layout is loaded.
void setDirectory(const QDir &directory)
Gets the directory of the loaded layout file. Only has effect when getDirectory() is not overridden.
void setReadOnly(bool)
Property 'converted' set method.
virtual void popupContextMenu(QObject *target, const QPoint &pos)
Executes a popup from .
void setIdOffset(gii::IdType idOffset) const
Sets id offset for all Gii widgets. Only applied when a layout is loaded.
#define _GII_CLASS
Definition gii/global.h:38
InformationTypes::id_type IdType
Short type definition for Qt code.
Definition Namespace.h:16
Definition Application.h:10