stage/include/ost/gui/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
 central registry for widgets More...

Namespaces

namespace  ost
namespace  ost::gui

Defines

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

Define 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.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 6 Dec 2017 for OpenStructure by  doxygen 1.6.1