QCodeEdit  2.2
Classes | Defines
lib/widgets/qpanel.h File Reference

Definition of the QPanel class. More...

#include "qce-config.h"
#include <QHash>
#include <QWidget>
#include <QPointer>
Include dependency graph for qpanel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QPanel
 Helper class for panels displayed by QCodeEdit. More...
class  QPanelCreator

Defines

#define Q_PANEL(T, SID)
#define Q_PANEL_ID(T)   T::Creator::instance()->id() \
#define Q_CREATE_PANEL(T)   QPanel::panel(Q_PANEL_ID(T)) \

Detailed Description

Definition of the QPanel class.

See also:
QPanel

Define Documentation

#define Q_PANEL (   T,
  SID 
)
Value:
public:                                             \
    class Creator : public QPanelCreator                \
    {                                                   \
        public:                                         \
            virtual QString id() const                  \
            {                                           \
                return SID;                             \
            }                                           \
                                                        \
            virtual QPanel* panel(QWidget *p)           \
            {                                           \
                return new T(p);                        \
            }                                           \
                                                        \
            static QPanelCreator* instance()            \
            {                                           \
                static Creator global;                  \
                return &global;                         \
            }                                           \
                                                        \
            Creator() {}                                \
            virtual ~Creator() {}                       \
    };                                                  \
                                                        \
    QString id() const { return SID; }                  \
                                                        \
    static void _register()                             \
    {                                                   \
        QPanel::registerCreator(Creator::instance());   \
    }                                                   \