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);
110 else if (up.
style_is (
"radiobutton"))
112 else if (up.
style_is (
"togglebutton"))
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)
bool isa(const std::string &go_name) const
static Panel * create(const graphics_object &go)
void createObject(double handle)
static Menu * create(const graphics_object &go)
static ObjectFactory * instance(void)
static CheckBoxControl * create(const graphics_object &go)
static void debug(const char *fmt,...)
bool is_beingdeleted(void) const
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)
std::string type(void) const
bool valid_object(void) const
static ListBoxControl * create(const graphics_object &go)
static graphics_object get_object(double val)
static ContextMenu * create(const graphics_object &go)
bool style_is(const std::string &v) const