/****************************************************************************
** Form implementation generated from reading ui file 'totemplateaddfileui.ui'
**
** Created: Tue Sep 18 08:21:26 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "totemplateaddfileui.h"

#include <qvariant.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qframe.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toTemplateAddFileUI 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.
 */
toTemplateAddFileUI::toTemplateAddFileUI( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "toTemplateAddFileUI" );
    toTemplateAddFileUILayout = new QGridLayout( this, 1, 1, 11, 6, "toTemplateAddFileUILayout"); 

    Filename = new QLineEdit( this, "Filename" );

    toTemplateAddFileUILayout->addMultiCellWidget( Filename, 3, 3, 0, 2 );

    Browse = new QPushButton( this, "Browse" );

    toTemplateAddFileUILayout->addWidget( Browse, 3, 4 );

    Root = new QLineEdit( this, "Root" );

    toTemplateAddFileUILayout->addMultiCellWidget( Root, 1, 1, 0, 4 );

    Line1 = new QFrame( this, "Line1" );
    Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );

    toTemplateAddFileUILayout->addMultiCellWidget( Line1, 4, 4, 0, 1 );

    PushButton2_2 = new QPushButton( this, "PushButton2_2" );

    toTemplateAddFileUILayout->addMultiCellWidget( PushButton2_2, 4, 5, 4, 4 );

    OkButton = new QPushButton( this, "OkButton" );
    OkButton->setDefault( TRUE );

    toTemplateAddFileUILayout->addMultiCellWidget( OkButton, 4, 5, 2, 2 );

    TextLabel1_2 = new QLabel( this, "TextLabel1_2" );

    toTemplateAddFileUILayout->addMultiCellWidget( TextLabel1_2, 2, 2, 0, 4 );

    TextLabel1 = new QLabel( this, "TextLabel1" );

    toTemplateAddFileUILayout->addMultiCellWidget( TextLabel1, 0, 0, 0, 4 );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toTemplateAddFileUILayout->addItem( Spacer1, 5, 1 );
    languageChange();
    resize( QSize(438, 164).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( OkButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( PushButton2_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( Browse, SIGNAL( clicked() ), this, SLOT( browse() ) );
    connect( Root, SIGNAL( textChanged(const QString&) ), this, SLOT( valid() ) );
    connect( Filename, SIGNAL( textChanged(const QString&) ), this, SLOT( valid() ) );

    // tab order
    setTabOrder( Root, Filename );
    setTabOrder( Filename, Browse );
    setTabOrder( Browse, OkButton );
    setTabOrder( OkButton, PushButton2_2 );

    // buddies
    TextLabel1_2->setBuddy( Root );
    TextLabel1->setBuddy( Root );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toTemplateAddFileUI::languageChange()
{
    setCaption( tr( "Add template file" ) );
    Browse->setText( tr( "&Browse" ) );
    PushButton2_2->setText( tr( "Canel" ) );
    OkButton->setText( tr( "&Ok" ) );
    TextLabel1_2->setText( tr( "&File" ) );
    TextLabel1->setText( tr( "&Root" ) );
}

void toTemplateAddFileUI::browse()
{
    qWarning( "toTemplateAddFileUI::browse(): Not implemented yet" );
}

void toTemplateAddFileUI::valid()
{
    qWarning( "toTemplateAddFileUI::valid(): Not implemented yet" );
}

