Exemplo n.º 1
0
void CTcContainer::CreateLabelsL( const TRect& /*aRect*/ )
{
    // Create labels
    CEikLabel* label;
    TRect rect( KLabelTlX, KLabelTlY, KLabelBrX, KLabelBrY );
    label = CreateLabelL( rect, KTestCase );
    rect.Move( 0, KLabelSpacing );
    label = CreateLabelL( rect, KNone );
    // Use smaller for for this label
    label->SetFont( CEikonEnv::Static()->AnnotationFont() );

    rect.Move( 0, KLabelSpacing );
    label = CreateLabelL( rect, KRequest );
    rect.Move( 0, KLabelSpacing );
    label = CreateLabelL( rect, KNone );
    // Use smaller for for this label
    label->SetFont( CEikonEnv::Static()->AnnotationFont() );

    rect.Move( 0, KLabelSpacing );
    label = CreateLabelL( rect, KStatus );
    rect.Move( 0, KLabelSpacing );
    label = CreateLabelL( rect, KNone );
    // Use smaller for for this label
    label->SetFont( CEikonEnv::Static()->AnnotationFont() );
}
Exemplo n.º 2
0
void CExampleShellContainer::ConstructL(const TRect& aRect,
		TExampleShellModel* aModel)
	{
	iModel = aModel;
	CreateWindowL();
	Window().SetShadowDisabled(ETrue);
	iContext = this;
	iBrushStyle = CGraphicsContext::ESolidBrush;
	iBrushColor = KRgbWhite;
	SetRect(aRect);
	CreateLabelL();
	ActivateL();
	}
Exemplo n.º 3
0
void CTcContainer::CreateLabelsL( const TRect& aRect )
{
    // Create labels
    CEikLabel* label;

    TInt primaryFontTotalHeight( FontTotalHeightInPixels( EAknLogicalFontPrimaryFont ) );
    TInt secondaryFontTotalHeight( FontTotalHeightInPixels( EAknLogicalFontSecondaryFont ) );

    TInt labelBase = KLabelTlY + primaryFontTotalHeight;
    AknLayoutUtils::SAknLayoutTextMultiline labelLayout =
        GetLabelLayout( aRect, labelBase, EAknLogicalFontPrimaryFont );
    TRect rect( KLabelTlX, KLabelTlY,
                aRect.Width() - KLabelTlX, KLabelTlY + primaryFontTotalHeight );

    label = CreateLabelL( rect, KTestCase );
    AknLayoutUtils::LayoutLabel( label, rect, labelLayout );

    rect.Move( 0, secondaryFontTotalHeight );
    labelBase += secondaryFontTotalHeight;
    labelLayout = GetLabelLayout( aRect, labelBase, EAknLogicalFontSecondaryFont );
    label = CreateLabelL( rect, KNone );
    AknLayoutUtils::LayoutLabel( label, rect, labelLayout );

    rect.Move( 0, primaryFontTotalHeight );
    labelBase += primaryFontTotalHeight;
    labelLayout = GetLabelLayout( aRect, labelBase, EAknLogicalFontPrimaryFont );
    label = CreateLabelL( rect, KRequest );
    AknLayoutUtils::LayoutLabel( label, rect, labelLayout );
    rect.Move( 0, secondaryFontTotalHeight );
    labelBase += secondaryFontTotalHeight;
    labelLayout = GetLabelLayout( aRect, labelBase, EAknLogicalFontSecondaryFont );
    label = CreateLabelL( rect, KNone );
    AknLayoutUtils::LayoutLabel( label, rect, labelLayout );


    rect.Move( 0, primaryFontTotalHeight );
    labelBase += primaryFontTotalHeight;
    labelLayout = GetLabelLayout( aRect, labelBase, EAknLogicalFontPrimaryFont );
    label = CreateLabelL( rect, KStatus );
    AknLayoutUtils::LayoutLabel( label, rect, labelLayout );
    rect.Move( 0, secondaryFontTotalHeight );
    labelBase += secondaryFontTotalHeight;
    labelLayout = GetLabelLayout( aRect, labelBase, EAknLogicalFontSecondaryFont );
    label = CreateLabelL( rect, KNone );
    AknLayoutUtils::LayoutLabel( label, rect, labelLayout );
}
Exemplo n.º 4
0
RenderPropWindow::RenderPropWindow( MainWindow *mainWnd, TexInfoWidget *texInfo ) : QDialog( mainWnd )
{
    this->setWindowFlags( this->windowFlags() & ~Qt::WindowContextHelpButtonHint );

    this->mainWnd = mainWnd;
    this->texInfo = texInfo;

    this->setAttribute( Qt::WA_DeleteOnClose );
    this->setWindowModality( Qt::WindowModal );

    // Decide what status to give the dialog first.
    rw::eRasterStageFilterMode begFilterMode = rw::RWFILTER_POINT;
    rw::eRasterStageAddressMode begUAddrMode = rw::RWTEXADDRESS_WRAP;
    rw::eRasterStageAddressMode begVAddrMode = rw::RWTEXADDRESS_WRAP;

    if ( texInfo )
    {
        if ( rw::TextureBase *texHandle = texInfo->GetTextureHandle() )
        {
            begFilterMode = texHandle->GetFilterMode();
            begUAddrMode = texHandle->GetUAddressing();
            begVAddrMode = texHandle->GetVAddressing();
        }
    }

    // We want to put rows of combo boxes.
    // Best put them into a form layout.
    MagicLayout<QFormLayout> layout(this);

    QComboBox *filteringSelectBox = createFilterBox();
    {
        QString natural;

        bool gotNatural = filterToNaturalList.getNaturalFromMode( begFilterMode, natural );

        if ( gotNatural )
        {
            filteringSelectBox->setCurrentText( natural );
        }
    }

    this->filterComboBox = filteringSelectBox;

    connect( filteringSelectBox, (void (QComboBox::*)( const QString& ))&QComboBox::activated, this, &RenderPropWindow::OnAnyPropertyChange );

    layout.top->addRow( CreateLabelL( "Main.SetupRP.Filter" ), filteringSelectBox );

    QComboBox *uaddrSelectBox = createAddressingBox();
    {
        QString natural;

        bool gotNatural = addrToNaturalList.getNaturalFromMode( begUAddrMode, natural );

        if ( gotNatural )
        {
            uaddrSelectBox->setCurrentText( natural );
        }
    }

    this->uaddrComboBox = uaddrSelectBox;

    connect( uaddrSelectBox, (void (QComboBox::*)( const QString& ))&QComboBox::activated, this, &RenderPropWindow::OnAnyPropertyChange );

    layout.top->addRow( CreateLabelL( "Main.SetupRP.UAddr" ), uaddrSelectBox );

    QComboBox *vaddrSelectBox = createAddressingBox();
    {
        QString natural;

        bool gotNatural = addrToNaturalList.getNaturalFromMode( begVAddrMode, natural );

        if ( gotNatural )
        {
            vaddrSelectBox->setCurrentText( natural );
        }
    }

    this->vaddrComboBox = vaddrSelectBox;

    connect( vaddrSelectBox, (void (QComboBox::*)( const QString& ))&QComboBox::activated, this, &RenderPropWindow::OnAnyPropertyChange );

    layout.top->addRow( CreateLabelL( "Main.SetupRP.VAddr" ), vaddrSelectBox );

    // And now add the usual buttons.
    QPushButton *buttonSet = CreateButtonL( "Main.SetupRP.Set" );
    layout.bottom->addWidget( buttonSet );

    this->buttonSet = buttonSet;

    connect( buttonSet, &QPushButton::clicked, this, &RenderPropWindow::OnRequestSet );

    QPushButton *buttonCancel = CreateButtonL( "Main.SetupRP.Cancel" );
    layout.bottom->addWidget( buttonCancel );

    connect( buttonCancel, &QPushButton::clicked, this, &RenderPropWindow::OnRequestCancel );

    mainWnd->renderPropDlg = this;

    RegisterTextLocalizationItem( this );

    // Initialize the dialog.
    this->UpdateAccessibility();
}