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

#include "mainfilesettings.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>
#include <ntqimage.h>
#include <ntqpixmap.h>

#include "mainfilesettings.ui.h"
/*
 *  Constructs a CppMainFile 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.
 */
CppMainFile::CppMainFile( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CppMainFile" );
    CppMainFileLayout = new TQGridLayout( this, 1, 1, 11, 6, "CppMainFileLayout"); 

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

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

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

    CppMainFileLayout->addWidget( editFileName, 0, 1 );

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

    CppMainFileLayout->addWidget( TextLabel2, 1, 0 );

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

    CppMainFileLayout->addMultiCellWidget( listForms, 2, 2, 0, 1 );

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

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    Layout1->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

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

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );

    CppMainFileLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );
    languageChange();
    resize( TQSize(308, 283).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( listForms, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( updateOkButton() ) );
    connect( listForms, TQ_SIGNAL( currentChanged(TQListBoxItem*) ), this, TQ_SLOT( updateOkButton() ) );
    connect( editFileName, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateOkButton() ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CppMainFile::languageChange()
{
    setCaption( tr( "Configure Main-File" ) );
    TextLabel1->setText( tr( "Filename:" ) );
    TextLabel2->setText( tr( "Main-Form:" ) );
    buttonHelp->setText( tr( "Help" ) );
    buttonOk->setText( tr( "OK" ) );
    buttonCancel->setText( tr( "Cancel" ) );
}

