CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUIObject.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
21
22class CFxUIObjectImpl;
23class CFxUIObjectData;
24class CFxUIEmitScope;
25class CFxUIVariant;
26
31{
32 friend CFxUIObjectData;
33 friend CFxUIEmitScope;
34public:
35
38
40 virtual ~CFxUIObject();
41
50
56 void setHandle( FxNativeHandle handle );
57
64
71
77 const CFxUIObject* parent() const;
78
85
92
100 bool setProperty( const char* name, const CFxUIVariant& value );
101
109 CFxUIVariant property( const char* name );
110
117
125 template<typename T>
127 {
128 CFxUIList<T> result;
129
130 CFxUIList<CFxUIObject*> allChildren = children();
131 for ( CFxUIObject* child : allChildren )
132 {
133 if ( T obj = dynamic_cast<T>( child ) )
134 {
135 if ( !name.isEmpty() )
136 {
137 if ( name == obj->objectName() )
138 result.push_back( obj );
139 }
140 else
141 result.push_back( obj );
142 }
143 }
144
145 return result;
146 }
147
153 void blockSignals( bool block );
154
160 bool signalsBlocked() const;
161
162protected:
169
170private:
176 void setSender( CFxUIObject* pSender );
177
178protected:
179 CFxUIObjectImpl* m_pImpl;
180 CFxUIObjectData* m_pData;
181
182 //...
183};
#define COMMONUI_API
std::list< T > CFxUIList
CFxString CFxUIString
QObject * FxNativeHandle
CFxUIString objectName() const
CFxUIObjectData * m_pData
Definition FxUIObject.h:180
CFxUIObjectImpl * m_pImpl
Definition FxUIObject.h:179
CFxUIVariant property(const char *name)
void setParent(CFxUIObject *parent)
virtual ~CFxUIObject()
bool setProperty(const char *name, const CFxUIVariant &value)
FxNativeHandle getHandle() const
void setHandle(FxNativeHandle handle)
void blockSignals(bool block)
CFxUIObject * sender()
CFxUIObject * parent()
bool signalsBlocked() const
CFxUIList< T > findChildren(const CFxUIString &name=CFxUIString())
Definition FxUIObject.h:126
void setObjectName(const CFxUIString &objectName)
CFxUIList< CFxUIObject * > children() const
const CFxUIObject * parent() const
GLuint const GLchar * name
Definition gles2_ext.h:265
GLsizei const GLfloat * value
Definition gles2_ext.h:302