6#include <ilog/TLoggerCompWrap.h>
7#include <iqtgui/TDesignerGuiCompBase.h>
10#include <imtgui/IClientAreaProvider.h>
11#include <imtgui/IPopupController.h>
12#include <GeneratedFiles/imtgui/ui_CPopupTestGuiComp.h>
19class CPopupTestGuiComp:
20 public ilog::TLoggerCompWrap<iqtgui::TDesignerGuiCompBase<Ui::CPopupTestGuiComp>>
24 typedef ilog::TLoggerCompWrap<iqtgui::TDesignerGuiCompBase<Ui::CPopupTestGuiComp>> BaseClass;
26 I_BEGIN_COMPONENT(CPopupTestGuiComp);
27 I_REGISTER_SUBELEMENT(ClientAreaProvider);
28 I_REGISTER_SUBELEMENT_INTERFACE(ClientAreaProvider, IClientAreaProvider, ExtractClientAreaProvider);
29 I_ASSIGN(m_popupControllerCompPtr,
"PopupController",
"Popup controller",
false,
"PopupController");
36 virtual void OnGuiCreated()
override;
39 virtual void OnDesignSchemaChanged(
const QByteArray& themeId)
override;
42 virtual bool eventFilter(QObject* watched, QEvent* event)
override;
45 void on_AnchorTL_clicked();
46 void on_AnchorTR_clicked();
47 void on_AnchorBL_clicked();
48 void on_AnchorBR_clicked();
50 void on_InfoButton_clicked();
51 void on_WarningButton_clicked();
52 void on_ErrorButton_clicked();
53 void on_CriticalButton_clicked();
55 void on_MessageButton_clicked();
56 void on_WidgetButton_clicked();
57 void on_WidgetControlsButton_clicked();
59 void on_TimeoutUser_toggled(
bool checked);
61 void on_AllowClosing_toggled(
bool checked);
62 void on_UseAreaProvider_toggled(
bool checked);
65 QRect CalculatePopupAreaFromScreen();
66 void UpdateClientArea();
67 istd::IInformationProvider::InformationCategory GetCategory();
70 static QRect Normalize(
const QRect& rect);
73 class ClientAreaProvider:
virtual public IClientAreaProvider
78 void SetCorner(Qt::Corner corner);
79 void SetRect(
const QRect& rect);
82 virtual QPoint GetAnchor()
const override;
83 virtual QSize GetSize()
const override;
91 template <
typename InterfaceType>
92 static InterfaceType* ExtractClientAreaProvider(CPopupTestGuiComp& component)
94 return &component.m_clientAreaProvider;
98 I_REF(IPopupController, m_popupControllerCompPtr);
100 int m_messageCounter;
101 imod::TModelWrap<ClientAreaProvider> m_clientAreaProvider;