Plasma Engine  2.0
Loading...
Searching...
No Matches
AddSubElementButton.moc.h
1#pragma once
2
3#include <GuiFoundation/GuiFoundationDLL.h>
4#include <GuiFoundation/PropertyGrid/PropertyBaseWidget.moc.h>
5
6class QHBoxLayout;
7class QPushButton;
8class QMenu;
10
11class PL_GUIFOUNDATION_DLL plQtAddSubElementButton : public plQtPropertyWidget
12{
13 Q_OBJECT
14
15public:
17
18 static bool s_bShowInDevelopmentFeatures;
19
20protected:
21 virtual void DoPrepareToDie() override {}
22
23private Q_SLOTS:
24 void onMenuAboutToShow();
25 void on_Button_clicked();
26 void OnMenuAction();
27
28private:
29 virtual void OnInit() override;
30 void OnAction(const plRTTI* pRtti);
31
32 QMenu* CreateCategoryMenu(const char* szCategory, plMap<plString, QMenu*>& existingMenus);
33
34 QHBoxLayout* m_pLayout;
35 QPushButton* m_pButton;
36
37 plSet<const plRTTI*> m_SupportedTypes;
38
39 bool m_bNoMoreElementsAllowed = false;
40 QMenu* m_pMenu = nullptr;
41 plQtSearchableMenu* m_pSearchableMenu = nullptr;
42 plUInt32 m_uiMaxElements = 0; // 0 means unlimited
43 bool m_bPreventDuplicates = false;
44
45 // used to remember the last search term entered into the searchable menu
46 // this should probably be per 'distinguishable menu', but currently it is just global
47 static plString s_sLastMenuSearch;
48};
49
Definition Map.h:408
Definition AddSubElementButton.moc.h:12
Base class for all property widgets.
Definition PropertyBaseWidget.moc.h:28
Implements an item for insertion into a QMenu that shows a search bar and a hierarchical list of opti...
Definition SearchableMenu.moc.h:22
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
Definition Set.h:238