#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './srkcommentpropertiesdialogbase.ui'
**
** Created: wo sep 6 18:04:31 2006
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "srkcommentpropertiesdialogbase.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <kcolorbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a SRKCommentPropertiesDialogBase 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.
 */
SRKCommentPropertiesDialogBase::SRKCommentPropertiesDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SRKCommentPropertiesDialogBase" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( TRUE );
    SRKCommentPropertiesDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "SRKCommentPropertiesDialogBaseLayout"); 

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

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    layout2->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    layout2->addWidget( buttonCancel );
    spacer2 = new QSpacerItem( 400, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer2 );

    SRKCommentPropertiesDialogBaseLayout->addMultiCellLayout( layout2, 2, 2, 0, 1 );

    groupBox2 = new QGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, Qt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new QGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( Qt::AlignTop );

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

    textLabel1_5_2 = new QLabel( groupBox2, "textLabel1_5_2" );
    layout10->addWidget( textLabel1_5_2 );
    spacer6 = new QSpacerItem( 31, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout10->addItem( spacer6 );

    height = new QSpinBox( groupBox2, "height" );
    height->setMaxValue( 100000 );
    height->setMinValue( 10 );
    layout10->addWidget( height );

    textLabel1_5_2_3 = new QLabel( groupBox2, "textLabel1_5_2_3" );
    layout10->addWidget( textLabel1_5_2_3 );

    groupBox2Layout->addLayout( layout10, 1, 0 );

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

    textLabel1_5 = new QLabel( groupBox2, "textLabel1_5" );
    layout9->addWidget( textLabel1_5 );
    spacer5 = new QSpacerItem( 36, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout9->addItem( spacer5 );

    width = new QSpinBox( groupBox2, "width" );
    width->setMaxValue( 100000 );
    width->setMinValue( 10 );
    layout9->addWidget( width );

    textLabel1_5_4 = new QLabel( groupBox2, "textLabel1_5_4" );
    layout9->addWidget( textLabel1_5_4 );

    groupBox2Layout->addLayout( layout9, 0, 0 );

    layout23 = new QHBoxLayout( 0, 0, 6, "layout23"); 
    spacer8 = new QSpacerItem( 19, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout23->addItem( spacer8 );

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

    mirrorH = new QCheckBox( groupBox2, "mirrorH" );
    layout22->addWidget( mirrorH );

    mirrorV = new QCheckBox( groupBox2, "mirrorV" );
    layout22->addWidget( mirrorV );
    layout23->addLayout( layout22 );
    spacer10 = new QSpacerItem( 25, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout23->addItem( spacer10 );

    groupBox2Layout->addLayout( layout23, 2, 0 );

    SRKCommentPropertiesDialogBaseLayout->addWidget( groupBox2, 0, 1 );

    groupBox1 = new QGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, Qt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new QGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( Qt::AlignTop );

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

    textLabel1_4_2 = new QLabel( groupBox1, "textLabel1_4_2" );
    layout8->addWidget( textLabel1_4_2 );
    spacer4 = new QSpacerItem( 31, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout8->addItem( spacer4 );

    textColor = new KColorButton( groupBox1, "textColor" );
    layout8->addWidget( textColor );

    groupBox1Layout->addLayout( layout8, 2, 0 );

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

    textLabel1 = new QLabel( groupBox1, "textLabel1" );
    layout6->addWidget( textLabel1 );
    spacer2_2 = new QSpacerItem( 36, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout6->addItem( spacer2_2 );

    opacity = new QSpinBox( groupBox1, "opacity" );
    opacity->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, opacity->sizePolicy().hasHeightForWidth() ) );
    opacity->setMaxValue( 100 );
    opacity->setMinValue( 0 );
    opacity->setValue( 50 );
    layout6->addWidget( opacity );

    textLabel1_3 = new QLabel( groupBox1, "textLabel1_3" );
    textLabel1_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( textLabel1_3 );

    groupBox1Layout->addLayout( layout6, 0, 0 );

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

    textLabel1_2 = new QLabel( groupBox1, "textLabel1_2" );
    layout7->addWidget( textLabel1_2 );
    spacer3 = new QSpacerItem( 41, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout7->addItem( spacer3 );

    fillColor = new KColorButton( groupBox1, "fillColor" );
    layout7->addWidget( fillColor );

    groupBox1Layout->addLayout( layout7, 1, 0 );

    SRKCommentPropertiesDialogBaseLayout->addWidget( groupBox1, 0, 0 );

    groupBox2_2 = new QGroupBox( this, "groupBox2_2" );
    groupBox2_2->setColumnLayout(0, Qt::Vertical );
    groupBox2_2->layout()->setSpacing( 6 );
    groupBox2_2->layout()->setMargin( 11 );
    groupBox2_2Layout = new QGridLayout( groupBox2_2->layout() );
    groupBox2_2Layout->setAlignment( Qt::AlignTop );

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

    textLabel1_5_2_2 = new QLabel( groupBox2_2, "textLabel1_5_2_2" );
    layout16->addWidget( textLabel1_5_2_2 );
    spacer11_2 = new QSpacerItem( 16, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout16->addItem( spacer11_2 );

    duration = new QSpinBox( groupBox2_2, "duration" );
    duration->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, duration->sizePolicy().hasHeightForWidth() ) );
    duration->setMaxValue( 100000 );
    duration->setMinValue( 10 );
    duration->setValue( 2500 );
    layout16->addWidget( duration );

    textLabel1_5_2_3_2 = new QLabel( groupBox2_2, "textLabel1_5_2_3_2" );
    layout16->addWidget( textLabel1_5_2_3_2 );

    groupBox2_2Layout->addLayout( layout16, 1, 0 );

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

    textLabel1_5_3 = new QLabel( groupBox2_2, "textLabel1_5_3" );
    layout25->addWidget( textLabel1_5_3 );
    spacer11 = new QSpacerItem( 16, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout25->addItem( spacer11 );

    startTime = new QSpinBox( groupBox2_2, "startTime" );
    startTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, startTime->sizePolicy().hasHeightForWidth() ) );
    startTime->setMaxValue( 10000000 );
    layout25->addWidget( startTime );

    textLabel1_5_4_2 = new QLabel( groupBox2_2, "textLabel1_5_4_2" );
    layout25->addWidget( textLabel1_5_4_2 );

    groupBox2_2Layout->addLayout( layout25, 0, 0 );

    SRKCommentPropertiesDialogBaseLayout->addWidget( groupBox2_2, 1, 1 );
    languageChange();
    resize( QSize(506, 288).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( opacity, fillColor );
    setTabOrder( fillColor, textColor );
    setTabOrder( textColor, width );
    setTabOrder( width, height );
    setTabOrder( height, mirrorH );
    setTabOrder( mirrorH, mirrorV );
    setTabOrder( mirrorV, startTime );
    setTabOrder( startTime, duration );
    setTabOrder( duration, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SRKCommentPropertiesDialogBase::languageChange()
{
    setCaption( tr2i18n( "Comment properties" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonOk->setAccel( QKeySequence( QString::null ) );
    buttonCancel->setText( tr2i18n( "C&ancel" ) );
    buttonCancel->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
    groupBox2->setTitle( tr2i18n( "geometry" ) );
    textLabel1_5_2->setText( tr2i18n( "height" ) );
    textLabel1_5_2_3->setText( tr2i18n( "px" ) );
    textLabel1_5->setText( tr2i18n( "width" ) );
    textLabel1_5_4->setText( tr2i18n( "px" ) );
    mirrorH->setText( tr2i18n( "mirror hori&zontally" ) );
    mirrorH->setAccel( QKeySequence( tr2i18n( "Alt+Z" ) ) );
    mirrorV->setText( tr2i18n( "mirror v&ertically" ) );
    mirrorV->setAccel( QKeySequence( tr2i18n( "Alt+E" ) ) );
    groupBox1->setTitle( tr2i18n( "colors" ) );
    textLabel1_4_2->setText( tr2i18n( "text color" ) );
    textColor->setText( QString::null );
    textLabel1->setText( tr2i18n( "opacity" ) );
    textLabel1_3->setText( tr2i18n( "%" ) );
    textLabel1_2->setText( tr2i18n( "fill color hint" ) );
    fillColor->setText( QString::null );
    groupBox2_2->setTitle( tr2i18n( "timing" ) );
    textLabel1_5_2_2->setText( tr2i18n( "duration" ) );
    textLabel1_5_2_3_2->setText( tr2i18n( "millisec" ) );
    textLabel1_5_3->setText( tr2i18n( "starttime" ) );
    textLabel1_5_4_2->setText( tr2i18n( "millisec" ) );
}

#include "srkcommentpropertiesdialogbase.moc"
