OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Data Structures | Namespaces | Macros
widget_registry.hh File Reference
#include <QWidget>
#include <QMap>
#include <ost/gui/module_config.hh>

Go to the source code of this file.

Data Structures

class  WidgetFactory
 
class  WidgetRegistry
 

Namespaces

 ost
 
 ost::gui
 

Macros

#define OST_REGISTER_WIDGET_WITH_DEFAULT_FACTORY(ns, class_name, full_name)
 
#define OST_REGISTER_WIDGET(class_name, factory)
 

Macro Definition Documentation

#define OST_REGISTER_WIDGET (   class_name,
  factory 
)
Value:
bool class_name##_registered=WidgetRegistry::Instance()-> \
RegisterWidgetFactory(new factory)

Definition at line 61 of file widget_registry.hh.

#define OST_REGISTER_WIDGET_WITH_DEFAULT_FACTORY (   ns,
  class_name,
  full_name 
)
Value:
class class_name##Factory : public WidgetFactory { \
public: \
class_name##Factory(): WidgetFactory(#ns"::"#class_name, full_name) {} \
Widget* Create(QWidget* parent) \
{ \
return new class_name(parent); \
} \
}; \
bool class_name##_registered=WidgetRegistry::Instance()-> \
RegisterWidgetFactory(new class_name##Factory)

Definition at line 49 of file widget_registry.hh.