Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CPanelSelection.hpp
Go to the documentation of this file.
1#ifndef LIBS_PANELS_CPANELSELECTION_HPP_
2#define LIBS_PANELS_CPANELSELECTION_HPP_
3
7
8#include <bits/stdint-uintn.h>
9#include <string>
10
15{
16public:
17 static CPanelSelection *createPanel(uint32_t *idSelected, AbstractComponentGUI **panel, bool isVertical);
18 static CPanelSelection *createComponents(uint32_t *idSelected, AbstractComponentGUI **selection,
19 AbstractComponentGUI **container);
20 ~CPanelSelection() override;
21
22 void add(uint32_t idSelected, const std::string &txtOption, AbstractComponentGUI **panel);
23
24 void addEmpty(uint32_t idSelected, const std::string &txtOption);
25
26 void emplaceListenerChange(const std::function<void(CDialog *, AbstractComponentGUI *)> &changeFunctionCall)
27 {
29 {
31 }
32 else
33 {
34 //RAG logeamos este tipo de fallos?
35 }
36 }
37
39 {
41 {
43 }
44 else
45 {
46 //RAG logeamos este tipo de fallos?
47 return 0;
48 }
49 }
50
56
57private:
58 explicit CPanelSelection(SPrvPanelSelection **dataPrivate);
59
61};
62
63template<typename TypeEnumSelection>
65{
66public:
67 static CPanelSelectionEnum *createPanelEnum(TypeEnumSelection *idSelected, AbstractComponentGUI **panel,
68 bool isVertical = true)
69 {
70 return (CPanelSelectionEnum *) createPanel((uint32_t *) idSelected, panel, isVertical);
71 }
72
73 static CPanelSelectionEnum *createComponentsEnum(TypeEnumSelection *idSelected, AbstractComponentGUI **selection,
74 AbstractComponentGUI **container)
75 {
76 return (CPanelSelectionEnum *) createComponents((uint32_t *) idSelected, selection, container);
77 }
78
79 void addEnum(TypeEnumSelection idSelected, const std::string &txtOption, AbstractComponentGUI **panel)
80 {
81 add(static_cast<uint32_t>(idSelected), txtOption, panel);
82 }
83
84 void addEmptyEnum(TypeEnumSelection idSelected, const char *txtOption)
85 {
86 addEmpty(static_cast<uint32_t>(idSelected), txtOption);
87 }
88
89 TypeEnumSelection getEnumOptionSelected(){
90 return static_cast<TypeEnumSelection>(getIdOptionSelection());
91 }
92};
93
94#endif /* LIBS_PANELS_CPANELSELECTION_HPP_ */
Definition AbstractComponentGUI.hpp:30
void emplaceListenerChange(std::function< void(CDialog *, AbstractComponentGUI *)> changeFunctionCall)
Agrega un IListenerChange formado mediante una función lambda.
Definition AbstractComponentGUI.cpp:519
Definition CComboBox.hpp:48
uint64_t getIdOptionSelection()
Definition CComboBox.cpp:344
Definition CDialog.hpp:21
Definition CLayoutLayers.hpp:11
Definition CPanelSelection.hpp:65
TypeEnumSelection getEnumOptionSelected()
Definition CPanelSelection.hpp:89
static CPanelSelectionEnum * createComponentsEnum(TypeEnumSelection *idSelected, AbstractComponentGUI **selection, AbstractComponentGUI **container)
Definition CPanelSelection.hpp:73
void addEnum(TypeEnumSelection idSelected, const std::string &txtOption, AbstractComponentGUI **panel)
Definition CPanelSelection.hpp:79
static CPanelSelectionEnum * createPanelEnum(TypeEnumSelection *idSelected, AbstractComponentGUI **panel, bool isVertical=true)
Definition CPanelSelection.hpp:67
void addEmptyEnum(TypeEnumSelection idSelected, const char *txtOption)
Definition CPanelSelection.hpp:84
Panel with a combobox and a container for the selected option.
Definition CPanelSelection.hpp:15
static CPanelSelection * createComponents(uint32_t *idSelected, AbstractComponentGUI **selection, AbstractComponentGUI **container)
Definition CPanelSelection.cpp:119
uint64_t getIdOptionSelection()
Definition CPanelSelection.hpp:38
void add(uint32_t idSelected, const std::string &txtOption, AbstractComponentGUI **panel)
Definition CPanelSelection.cpp:155
~CPanelSelection() override
Definition CPanelSelection.cpp:149
void addEmpty(uint32_t idSelected, const std::string &txtOption)
Definition CPanelSelection.cpp:161
SPrvPanelSelection * m_dataPrivate
Definition CPanelSelection.hpp:60
static CPanelSelection * createPanel(uint32_t *idSelected, AbstractComponentGUI **panel, bool isVertical)
Definition CPanelSelection.cpp:91
void emplaceListenerChange(const std::function< void(CDialog *, AbstractComponentGUI *)> &changeFunctionCall)
Definition CPanelSelection.hpp:26
CPanelSelection(SPrvPanelSelection **dataPrivate)
Definition CPanelSelection.cpp:170
Definition IDataPanel.hpp:5
Definition CPanelSelection.hpp:52
CComboBox * m_combobox
Definition CPanelSelection.hpp:53
CLayoutLayers * m_layers
Definition CPanelSelection.hpp:54