27 #include <QApplication>
61 static bool s_instanceCreated =
false;
63 if (! s_instanceCreated)
65 if (QThread::currentThread () != QApplication::instance ()->thread ())
66 s_instance.moveToThread (QApplication::instance ()->thread ());
67 s_instanceCreated =
true;
83 qWarning (
"ObjectFactory::createObject: object is being deleted");
91 "create %s from thread %08x",
92 go.
type ().c_str (), QThread::currentThreadId ());
96 if (go.
isa (
"figure"))
98 else if (go.
isa (
"uicontrol"))
101 Utils::properties<uicontrol> (go);
109 else if (up.
style_is (
"radiobutton"))
111 else if (up.
style_is (
"togglebutton"))
122 else if (go.
isa (
"uipanel"))
124 else if (go.
isa (
"uimenu"))
126 else if (go.
isa (
"uicontextmenu"))
128 else if (go.
isa (
"uitoolbar"))
130 else if (go.
isa (
"uipushtool"))
132 else if (go.
isa (
"uitoggletool"))
135 qWarning (
"ObjectFactory::createObject: unsupported type `%s'",
136 go.
type ().c_str ());
142 qWarning (
"ObjectFactory::createObject: no proxy for handle %g",
147 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