NDEVR
API Documentation
PopupInfo.h
1
#pragma once
2
#include "DLLInfo.h"
3
#include <QRect>
4
#include <functional>
5
#include <qnamespace.h>
6
#include <QPointer>
7
class
QWidget;
8
namespace
NDEVR
9
{
15
struct
PopupInfo
16
{
20
PopupInfo
()
21
{}
22
26
PopupInfo
(
const
QRect&
rect
)
27
:
rect
(
rect
)
28
{}
29
33
NDEVR_WIDGETS_API
PopupInfo
(QWidget*
widget
);
34
QRect
rect
;
35
std::function<void()>
finished_callback
;
36
std::function<void(
PopupInfo
)>
settings_callback
;
37
QPointer<QWidget>
widget
;
38
QPointer<QWidget>
parent_widget
;
39
Qt::WindowModality
modality
= Qt::WindowModality::NonModal;
40
bool
fullscreen
=
false
;
41
bool
request_margins
=
false
;
42
bool
closable
=
false
;
43
bool
hideable
=
false
;
44
bool
allow_title_autohide
=
false
;
45
bool
windowable
=
false
;
46
bool
request_dock
=
false
;
47
bool
is_popup_menu
=
false
;
48
bool
make_call_widget_dialog
=
false
;
49
bool
delete_on_hide
=
false
;
50
int
animation_speed
= -1;
51
52
};
53
}
NDEVR
The primary namespace for the NDEVR SDK.
Definition
ArialTileFetcherModule.h:35
PopupInfo::PopupInfo
PopupInfo(const QRect &rect)
Constructs a PopupInfo with a specified animation origin rectangle.
Definition
PopupInfo.h:26
PopupInfo::parent_widget
QPointer< QWidget > parent_widget
The parent widget for the popup.
Definition
PopupInfo.h:38
PopupInfo::finished_callback
std::function< void()> finished_callback
Optional callback invoked when the popup is closed.
Definition
PopupInfo.h:35
PopupInfo::allow_title_autohide
bool allow_title_autohide
Whether the title bar can auto-hide when not hovered.
Definition
PopupInfo.h:44
PopupInfo::is_popup_menu
bool is_popup_menu
Whether this popup behaves as a popup menu (auto-closes on focus loss).
Definition
PopupInfo.h:47
PopupInfo::closable
bool closable
Whether the popup can be closed by the user.
Definition
PopupInfo.h:42
PopupInfo::widget
QPointer< QWidget > widget
The widget to display inside the popup.
Definition
PopupInfo.h:37
PopupInfo::make_call_widget_dialog
bool make_call_widget_dialog
Whether to wrap the widget in a call-widget-style dialog.
Definition
PopupInfo.h:48
PopupInfo::windowable
bool windowable
Whether the popup can be detached into a standalone window.
Definition
PopupInfo.h:45
PopupInfo::animation_speed
int animation_speed
The animation speed in milliseconds, or -1 for the default.
Definition
PopupInfo.h:50
PopupInfo::rect
QRect rect
The screen rectangle used as the animation origin for the popup.
Definition
PopupInfo.h:34
PopupInfo::PopupInfo
PopupInfo(QWidget *widget)
Constructs a PopupInfo using a widget as the animation origin.
PopupInfo::fullscreen
bool fullscreen
Whether the popup should be displayed fullscreen.
Definition
PopupInfo.h:40
PopupInfo::PopupInfo
PopupInfo()
Default constructor with all flags set to their defaults.
Definition
PopupInfo.h:20
PopupInfo::hideable
bool hideable
Whether the popup can be hidden (minimized) by the user.
Definition
PopupInfo.h:43
PopupInfo::settings_callback
std::function< void(PopupInfo)> settings_callback
If set, requests a settings button on the dialog.
Definition
PopupInfo.h:36
PopupInfo::request_dock
bool request_dock
Whether the popup requests to be docked in the main window.
Definition
PopupInfo.h:46
PopupInfo::request_margins
bool request_margins
Whether to add margins around the popup content.
Definition
PopupInfo.h:41
PopupInfo::modality
Qt::WindowModality modality
The window modality for the popup dialog.
Definition
PopupInfo.h:39
PopupInfo::delete_on_hide
bool delete_on_hide
Whether to delete the popup widget when it is hidden.
Definition
PopupInfo.h:49
Widgets
Headers
PopupInfo.h
NDEVR.org