/****************************************************************************
** Form implementation generated from reading ui file 'totemplatesetupui.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 "totemplatesetupui.h"

#include <qvariant.h>
#include <qheader.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toTemplateSetupUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
toTemplateSetupUI::toTemplateSetupUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "toTemplateSetupUI" );
    toTemplateSetupUILayout = new QGridLayout( this, 1, 1, 0, 6, "toTemplateSetupUILayout"); 

    FileList = new QListView( this, "FileList" );
    FileList->addColumn( tr( "Root" ) );
    FileList->addColumn( tr( "Filename" ) );
    FileList->setAllColumnsShowFocus( TRUE );

    toTemplateSetupUILayout->addMultiCellWidget( FileList, 0, 0, 0, 4 );

    AddButton = new QPushButton( this, "AddButton" );
    AddButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, AddButton->sizePolicy().hasHeightForWidth() ) );

    toTemplateSetupUILayout->addWidget( AddButton, 1, 4 );

    RemoveButton = new QPushButton( this, "RemoveButton" );
    RemoveButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, RemoveButton->sizePolicy().hasHeightForWidth() ) );

    toTemplateSetupUILayout->addWidget( RemoveButton, 1, 0 );

    EditButton = new QPushButton( this, "EditButton" );
    EditButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, EditButton->sizePolicy().hasHeightForWidth() ) );

    toTemplateSetupUILayout->addWidget( EditButton, 1, 2 );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toTemplateSetupUILayout->addItem( Spacer1, 1, 1 );
    Spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toTemplateSetupUILayout->addItem( Spacer2, 1, 3 );
    languageChange();
    resize( QSize(526, 448).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( EditButton, SIGNAL( clicked() ), this, SLOT( editFile() ) );
    connect( RemoveButton, SIGNAL( clicked() ), this, SLOT( delFile() ) );
    connect( AddButton, SIGNAL( clicked() ), this, SLOT( addFile() ) );

    // tab order
    setTabOrder( EditButton, FileList );
    setTabOrder( FileList, AddButton );
    setTabOrder( AddButton, RemoveButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toTemplateSetupUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    FileList->header()->setLabel( 0, tr( "Root" ) );
    FileList->header()->setLabel( 1, tr( "Filename" ) );
    AddButton->setText( tr( "&Add File" ) );
    RemoveButton->setText( tr( "&Remove File" ) );
    EditButton->setText( tr( "&Edit File" ) );
}

void toTemplateSetupUI::addFile()
{
    qWarning( "toTemplateSetupUI::addFile(): Not implemented yet" );
}

void toTemplateSetupUI::editFile()
{
    qWarning( "toTemplateSetupUI::editFile(): Not implemented yet" );
}

void toTemplateSetupUI::delFile()
{
    qWarning( "toTemplateSetupUI::delFile(): Not implemented yet" );
}

