示例#1
0
Script::Script()
{
    luaState.openLib("base", luaopen_base);
    luaState.openLib("math", luaopen_math);
    luaState.openLib("string", luaopen_string);
    luaState.openLib("table", luaopen_table);

    setClasses(luaState);
}
ColorSchemeGraphicsItem::ColorSchemeGraphicsItem(
    const ColorScheme & scheme, QGraphicsItem * parent) 
:   QGraphicsObject(parent)
,   m_scheme{ scheme }
,   m_deficiency{ ColorVisionDeficiency::None }
,   m_frame{ new QGraphicsRectItem(this) }
,   m_rectSize{ 17.0, 17.0 }
,   m_margin{ 3.0 } 
,   m_padding{ 2.0 }
,   m_selected{ false }
,   m_detailedTooltip{ false }
{
    setAcceptHoverEvents(true);

    m_frame->setBrush(Qt::NoBrush);
    m_frame->setPen(Qt::NoPen);

    setClasses(5);
}