23 #if defined (HAVE_CONFIG_H) 27 #include <QApplication> 62 static bool s_instanceCreated =
false;
64 if (! s_instanceCreated)
66 if (QThread::currentThread () != QApplication::instance ()->thread ())
67 s_instance.moveToThread (QApplication::instance ()->thread ());
68 s_instanceCreated =
true;
84 qWarning (
"ObjectFactory::createObject: object is being deleted");
92 "create %s from thread %08x",
93 go.
type ().c_str (), QThread::currentThreadId ());
97 if (go.
isa (
"figure"))
99 else if (go.
isa (
"uicontrol"))
102 Utils::properties<uicontrol> (go);
104 if (up.style_is (
"pushbutton"))
106 else if (up.style_is (
"edit"))
108 else if (up.style_is (
"checkbox"))
110 else if (up.style_is (
"radiobutton"))
112 else if (up.style_is (
"togglebutton"))
114 else if (up.style_is (
"text"))
116 else if (up.style_is (
"popupmenu"))
118 else if (up.style_is (
"slider"))
120 else if (up.style_is (
"listbox"))
123 else if (go.
isa (
"uibuttongroup"))
125 else if (go.
isa (
"uipanel"))
127 else if (go.
isa (
"uimenu"))
129 else if (go.
isa (
"uicontextmenu"))
131 else if (go.
isa (
"uitoolbar"))
133 else if (go.
isa (
"uipushtool"))
135 else if (go.
isa (
"uitoggletool"))
138 qWarning (
"ObjectFactory::createObject: unsupported type `%s'",
139 go.
type ().c_str ());
145 qWarning (
"ObjectFactory::createObject: no proxy for handle %g",
150 qWarning (
"ObjectFactory::createObject: invalid object for handle %g",
static PopupMenuControl * create(const graphics_object &go)
void setObject(Object *obj)
static SliderControl * create(const graphics_object &go)
static Panel * create(const graphics_object &go)
bool isa(const std::string &go_name) const
void createObject(double handle)
bool valid_object(void) const
static Menu * create(const graphics_object &go)
static ObjectFactory * instance(void)
static CheckBoxControl * create(const graphics_object &go)
static void debug(const char *fmt,...)
static ObjectProxy * toolkitObjectProxy(const graphics_object &go)
base_properties & get_properties(void)
static EditControl * create(const graphics_object &go)
static TextControl * create(const graphics_object &go)
static ListBoxControl * create(const graphics_object &go)
static graphics_object get_object(double val)
std::string type(void) const
static ContextMenu * create(const graphics_object &go)