예제 #1
0
파일: ms_map.cpp 프로젝트: xsoameix/cmsc
	__MSLIB_CTOR	Map::Portal::Portal(WZLib_SubProperty* parent):Object("__mslib_portal"){
		WZLib_Object* obj=(WZLib_Object*)parent;
		this->pt=_get(obj,"pt").intVal;
		this->pn=NSH(_get(obj,"pn").strVal);
		this->tm=_get(obj,"tm").intVal;
		this->tn=NSH(_get(obj,"tn").strVal);
		this->hi=_get(obj,"horizontalImpact").intVal;
		this->vi=_get(obj,"verticalImpact").intVal;
		this->script=NSH(_get(obj,"script").strVal);
		this->onlyOnce=_get(obj,"onlyOnce").intVal;
		this->hideTooltip=_get(obj,"hideTooltip").intVal;
		this->uDelay=_get(obj,"delay").intVal;
	}
예제 #2
0
//-----------------------------------------------------------------------------
//!
//-----------------------------------------------------------------------------
tCZoneMainLayer::tCZoneMainLayer( 
        QWidget* pParent, 
        tCZoneModesModel& modesModel)
: tCZoneMainLayerBase( pParent )
, m_ModesModel(modesModel)
{
    m_pLoadingModesLabel = new QLabel( tr("Loading modes"), this );
    m_pLoadingModesLabel->setAlignment( Qt::AlignCenter );
    m_pLoadingModesLabel->hide();

    m_pGrid = new tGridMenu( 3, 3, this );
    m_pGrid->SetIndexing( ( style()->styleHint( NSH( tNOSStyle::NSH_GridMenuIndexing ) ) !=0 ) );

    QVBoxLayout* pVLayout = new QVBoxLayout();
    int margin = style()->pixelMetric( NPM( tNOSStyle::NPM_GridMenuMargin ) );
    pVLayout->setContentsMargins( margin, margin, margin, margin );
    pVLayout->addWidget( m_pLoadingModesLabel );
    pVLayout->addWidget( m_pGrid );
    setLayout( pVLayout );
    
    CreateFixedItems();

    if ( m_ModesModel.IsPopulated() )
    {
        CreateModeItems();
    }
    else
    {
        m_pLoadingModesLabel->show();
        Connect( &m_ModesModel, SIGNAL( Populated() ), this, SLOT( CreateModeItems() ) );
    }
}
예제 #3
0
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
QSize tCZoneSwitchWidget::sizeHint() const
{
    return QSize( WIDTH, (style()->styleHint( NSH( tNOSStyle::NSH_SwitchHeight ) ) ) );
}