Ejemplo n.º 1
0
/**
 * コンストラクタ
 */
TJSObject::TJSObject(HSQUIRRELVM v, int idx, tTJSVariant &instance) : instance(instance)
{
    initSelf(v, idx);
    iTJSDispatch2 *objthis = instance.AsObjectNoAddRef();

    // TJSインスタンスにネイティブインスタンスとして登録しておく
    iTJSNativeInstance *ninstance = this;
    objthis->NativeInstanceSupport(TJS_NIS_REGISTER, classId, &ninstance);

    // callSQ メソッド登録
    tCallSQFunction *callSQ = new tCallSQFunction();
    if (callSQ) {
        tTJSVariant val(callSQ, objthis);
        objthis->PropSet(TJS_MEMBERENSURE, TJS_W("callSQ"), NULL, &val, objthis);
        callSQ->Release();
    }

    // missing メソッド登録
    tMissingFunction *missing = new tMissingFunction();
    if (missing) {
        tTJSVariant val(missing, objthis);
        const tjs_char *missingName = TJS_W("missing");
        objthis->PropSet(TJS_MEMBERENSURE, missingName, NULL, &val, objthis);
        missing->Release();
        // missing 有効化
        tTJSVariant name(missingName);
        objthis->ClassInstanceInfo(TJS_CII_SET_MISSING, 0, &name);
    }
}
Ejemplo n.º 2
0
void
QSFieldView::setAll(FieldContainerPtr pFC, UInt32 uiFieldId, UInt32 uiAspect)
{
    endEdit();

    delete _pLabel;
    delete _pEditor;

    Inherited::setAll(pFC, uiFieldId, uiAspect);

    initSelf();
}
Ejemplo n.º 3
0
QSFieldView::QSFieldView(FieldContainerPtr  pFC,          
                         UInt32             uiFieldId,
                         UInt32             uiAspect,
                         QWidget           *parent,   const char   *name      )
    : Inherited(pFC, uiFieldId, uiAspect, parent, name),
      _pLabel  (NULL                                  ),
      _pEditor (NULL                                  )
{
    setBackgroundMode(NoBackground);

    initSelf();
}
Ejemplo n.º 4
0
void
QMFieldView::setAll(FieldContainerPtr pFC, UInt32 uiFieldId, UInt32 uiAspect)
{
    endEdit();

    deleteAllLabels();
    delete _pEditor;

    Inherited::setAll(pFC, uiFieldId, uiAspect);

    initSelf     ();
    initScrollbar();
    
    _bContentsChanged = true;
}
Ejemplo n.º 5
0
void
QSFieldView::setAspect(UInt32 uiAspect)
{
    if(uiAspect == getAspect())
        return;

    endEdit();

    delete _pLabel;
    delete _pEditor;

    Inherited::setAspect(uiAspect);

    initSelf();
}
Ejemplo n.º 6
0
void
QSFieldView::setFieldId(UInt32 uiFieldId)
{
    if(uiFieldId == getFieldId())
        return;

    endEdit();

    delete _pLabel;
    delete _pEditor;

    Inherited::setFieldId(uiFieldId);

    initSelf();
}
Ejemplo n.º 7
0
void
QSFieldView::setFieldContainer(FieldContainerPtr pFC)
{
    if(pFC == getFieldContainer())
        return;

    endEdit();

    delete _pLabel;
    delete _pEditor;

    Inherited::setFieldContainer(pFC);

    initSelf();
}
Ejemplo n.º 8
0
void
QMFieldView::setAspect(UInt32 uiAspect)
{
    if(uiAspect == getAspect())
        return;

    endEdit();

    deleteAllLabels();
    delete _pEditor;

    Inherited::setAspect(uiAspect);

    initSelf     ();
    initScrollbar();

    _bContentsChanged = true;
}
Ejemplo n.º 9
0
void
QMFieldView::setFieldContainer(FieldContainerPtr pFC)
{
    if(pFC == getFieldContainer())
        return;

    endEdit();

    deleteAllLabels();
    delete _pEditor;

    Inherited::setFieldContainer(pFC);

    initSelf     ();
    initScrollbar();

    _bContentsChanged = true;
}
Ejemplo n.º 10
0
QMFieldView::QMFieldView(FieldContainerPtr  pFC,
                         UInt32             uiFieldId,
                         UInt32             uiAspect,
                         QWidget           *parent,   const char   *name      )
    : Inherited        (pFC, uiFieldId, uiAspect, parent, name),
      _pScrollbar      (NULL                                  ),
      _pEditor         (NULL                                  ),
      _poolLabels      (                                      ),
      _usedLabels      (                                      ),
      _bContentsChanged(true                                  ),
      _uiBeginIndex    (0                                     ),
      _uiEndIndex      (0                                     )
{
    initSelf     ();
    initScrollbar();

    connect(_pScrollbar, SIGNAL(valueChanged(int)),
            this,        SLOT  (onSBValueChanged(int)));
}
Ejemplo n.º 11
0
QInt32Editor::QInt32Editor(QWidget *pParent, const char *name)
    : Inherited  (pParent, name),
      _editHelper(this         )
{
    initSelf();
}