Logo Search packages:      
Sourcecode: qsstv version File versions  Download package

posform.cpp

/****************************************************************************
** Form implementation generated from reading ui file './posform.ui'
**
** Created: Sun Dec 19 16:10:19 2004
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.2.1   edited May 19 14:22 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "posform.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a posForm as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
posForm::posForm( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
      setName( "posForm" );
    QFont f( font() );
    f.setPointSize( 10 );
    f.setBold( TRUE );
    setFont( f ); 
    posFormLayout = new QVBoxLayout( this, 11, 6, "posFormLayout"); 

    Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 

    horizontalButtonGroup = new QButtonGroup( this, "horizontalButtonGroup" );
    horizontalButtonGroup->setExclusive( FALSE );
    horizontalButtonGroup->setColumnLayout(0, Qt::Vertical );
    horizontalButtonGroup->layout()->setSpacing( 6 );
    horizontalButtonGroup->layout()->setMargin( 11 );
    horizontalButtonGroupLayout = new QVBoxLayout( horizontalButtonGroup->layout() );
    horizontalButtonGroupLayout->setAlignment( Qt::AlignTop );

    leftRadioButton = new QRadioButton( horizontalButtonGroup, "leftRadioButton" );
    horizontalButtonGroupLayout->addWidget( leftRadioButton );

    centerRadioButton = new QRadioButton( horizontalButtonGroup, "centerRadioButton" );
    horizontalButtonGroupLayout->addWidget( centerRadioButton );

    rightRadioButton = new QRadioButton( horizontalButtonGroup, "rightRadioButton" );
    horizontalButtonGroupLayout->addWidget( rightRadioButton );
    Layout1->addWidget( horizontalButtonGroup );

    verticalButtonGroup = new QButtonGroup( this, "verticalButtonGroup" );
    verticalButtonGroup->setColumnLayout(0, Qt::Vertical );
    verticalButtonGroup->layout()->setSpacing( 6 );
    verticalButtonGroup->layout()->setMargin( 11 );
    verticalButtonGroupLayout = new QVBoxLayout( verticalButtonGroup->layout() );
    verticalButtonGroupLayout->setAlignment( Qt::AlignTop );

    topRadioButton = new QRadioButton( verticalButtonGroup, "topRadioButton" );
    verticalButtonGroupLayout->addWidget( topRadioButton );

    middleRadioButton = new QRadioButton( verticalButtonGroup, "middleRadioButton" );
    verticalButtonGroupLayout->addWidget( middleRadioButton );

    bottomRadioButton = new QRadioButton( verticalButtonGroup, "bottomRadioButton" );
    verticalButtonGroupLayout->addWidget( bottomRadioButton );
    Layout1->addWidget( verticalButtonGroup );
    posFormLayout->addLayout( Layout1 );

    Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8"); 

    borderButton = new QPushButton( this, "borderButton" );
    borderButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, borderButton->sizePolicy().hasHeightForWidth() ) );
    Layout8->addWidget( borderButton );

    Layout7 = new QVBoxLayout( 0, 0, 6, "Layout7"); 

    keepARCheckBox = new QCheckBox( this, "keepARCheckBox" );
    Layout7->addWidget( keepARCheckBox );

    scaledCheckBox = new QCheckBox( this, "scaledCheckBox" );
    Layout7->addWidget( scaledCheckBox );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout7->addItem( spacer );
    Layout8->addLayout( Layout7 );
    posFormLayout->addLayout( Layout8 );

    Layout4 = new QHBoxLayout( 0, 0, 6, "Layout4"); 

    okButton = new QPushButton( this, "okButton" );
    Layout4->addWidget( okButton );

    cancelButton = new QPushButton( this, "cancelButton" );
    Layout4->addWidget( cancelButton );
    posFormLayout->addLayout( Layout4 );
    languageChange();
    resize( QSize(365, 254).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( borderButton, SIGNAL( clicked() ), this, SLOT( slotSelectColor() ) );
    connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( okButton, SIGNAL( clicked() ), this, SLOT( slotAccept() ) );

    // tab order
    setTabOrder( leftRadioButton, centerRadioButton );
    setTabOrder( centerRadioButton, rightRadioButton );
    setTabOrder( rightRadioButton, topRadioButton );
    setTabOrder( topRadioButton, middleRadioButton );
    setTabOrder( middleRadioButton, bottomRadioButton );
    setTabOrder( bottomRadioButton, borderButton );
    setTabOrder( borderButton, okButton );
}

/*
 *  Destroys the object and frees any allocated resources
 */
posForm::~posForm()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void posForm::languageChange()
{
    setCaption( tr( "Image Position" ) );
    horizontalButtonGroup->setTitle( tr( "Horizontal" ) );
    leftRadioButton->setText( tr( "Left" ) );
    centerRadioButton->setText( tr( "Center" ) );
    rightRadioButton->setText( tr( "Right" ) );
    verticalButtonGroup->setTitle( tr( "Vertical" ) );
    topRadioButton->setText( tr( "Top" ) );
    middleRadioButton->setText( tr( "Middle" ) );
    bottomRadioButton->setText( tr( "Bottom" ) );
    borderButton->setText( tr( "Border Color" ) );
    keepARCheckBox->setText( tr( "Keep Aspect Ratio" ) );
    scaledCheckBox->setText( tr( "Scaled" ) );
    okButton->setText( tr( "OK" ) );
    cancelButton->setText( tr( "Cancel" ) );
}

void posForm::slotAccept()
{
    qWarning( "posForm::slotAccept(): Not implemented yet" );
}

void posForm::slotSelectColor()
{
    qWarning( "posForm::slotSelectColor(): Not implemented yet" );
}

#include "posform.moc"

Generated by  Doxygen 1.6.0   Back to index