/****************************************************************************
** Form implementation generated from reading ui file 'createtemplate.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "createtemplate.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlistbox.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a CreateTemplate as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
CreateTemplate::CreateTemplate( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CreateTemplate" );
    setSizeGripEnabled( true );
    CreateTemplateLayout = new TQGridLayout( this, 1, 1, 11, 6, "CreateTemplateLayout"); 

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

    CreateTemplateLayout->addWidget( TextLabel1, 0, 0 );

    editName = new TQLineEdit( this, "editName" );

    CreateTemplateLayout->addWidget( editName, 0, 1 );

    listClass = new TQListBox( this, "listClass" );

    CreateTemplateLayout->addMultiCellWidget( listClass, 1, 2, 1, 1 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Spacer1 );

    buttonCreate = new TQPushButton( this, "buttonCreate" );
    buttonCreate->setDefault( true );
    Layout1->addWidget( buttonCreate );

    PushButton1 = new TQPushButton( this, "PushButton1" );
    Layout1->addWidget( PushButton1 );

    CreateTemplateLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );

    CreateTemplateLayout->addWidget( TextLabel2, 1, 0 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    CreateTemplateLayout->addItem( Spacer2, 2, 0 );
    languageChange();
    resize( TQSize(347, 248).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonCreate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( PushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // buddies
    TextLabel1->setBuddy( editName );
    TextLabel2->setBuddy( listClass );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CreateTemplate::languageChange()
{
    setCaption( tr( "Create Template" ) );
    TextLabel1->setText( tr( "Template &Name:" ) );
    TQToolTip::add( editName, tr( "Name of the new template" ) );
    TQWhatsThis::add( editName, tr( "Enter the name of the new template" ) );
    TQToolTip::add( listClass, tr( "Class of the new template" ) );
    TQWhatsThis::add( listClass, tr( "Enter the name of the class which should be used as the template's base class" ) );
    buttonCreate->setText( tr( "C&reate" ) );
    TQWhatsThis::add( buttonCreate, tr( "Creates the new template" ) );
    PushButton1->setText( tr( "&Cancel" ) );
    TQWhatsThis::add( PushButton1, tr( "Closes the Dialog" ) );
    TextLabel2->setText( tr( "&Baseclass for Template:" ) );
}

