Plasma Engine  2.0
Loading...
Searching...
No Matches
ManipulatorLabel.moc.h
1#pragma once
2
3#include <GuiFoundation/GuiFoundationDLL.h>
4#include <GuiFoundation/PropertyGrid/PropertyBaseWidget.moc.h>
5#include <QLabel>
6
8
9class plQtManipulatorLabel : public QLabel
10{
11 Q_OBJECT
12public:
13 explicit plQtManipulatorLabel(QWidget* pParent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
14 explicit plQtManipulatorLabel(const QString& sText, QWidget* pParent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
15
16 const plManipulatorAttribute* GetManipulator() const;
17 void SetManipulator(const plManipulatorAttribute* pManipulator);
18
19 bool GetManipulatorActive() const;
20 void SetManipulatorActive(bool bActive);
21
22 void SetSelection(const plHybridArray<plPropertySelection, 8>& items);
23
24 void SetIsDefault(bool bIsDefault);
25
26protected:
27 virtual void contextMenuEvent(QContextMenuEvent* ev) override;
28 virtual void showEvent(QShowEvent* event) override;
29
30private:
31 virtual void mousePressEvent(QMouseEvent* ev) override;
32
33#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
34 virtual void enterEvent(QEnterEvent* ev) override;
35#else
36 virtual void enterEvent(QEvent* ev) override;
37#endif
38
39 virtual void leaveEvent(QEvent* ev) override;
40
41private:
43 const plManipulatorAttribute* m_pManipulator;
44 QFont m_Font;
45 bool m_bActive;
46 bool m_bIsDefault;
47};
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition PropertyAttributes.h:597
Definition ManipulatorLabel.moc.h:10