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

#include "projectsettings.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqtoolbutton.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ProjectSettingsBase 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.
 */
ProjectSettingsBase::ProjectSettingsBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "ProjectSettingsBase" );
    setSizeGripEnabled( true );
    ProjectSettingsBaseLayout = new TQVBoxLayout( this, 11, 6, "ProjectSettingsBaseLayout"); 

    tabWidget = new TQTabWidget( this, "tabWidget" );

    tabSettings = new TQWidget( tabWidget, "tabSettings" );
    tabSettingsLayout = new TQGridLayout( tabSettings, 1, 1, 11, 6, "tabSettingsLayout"); 

    TextLabel1_2 = new TQLabel( tabSettings, "TextLabel1_2" );

    tabSettingsLayout->addWidget( TextLabel1_2, 0, 0 );

    TextLabel1_3 = new TQLabel( tabSettings, "TextLabel1_3" );

    tabSettingsLayout->addWidget( TextLabel1_3, 1, 0 );

    buttonDatabaseFile_2 = new TQToolButton( tabSettings, "buttonDatabaseFile_2" );

    tabSettingsLayout->addWidget( buttonDatabaseFile_2, 2, 2 );

    editDatabaseFile = new TQLineEdit( tabSettings, "editDatabaseFile" );

    tabSettingsLayout->addWidget( editDatabaseFile, 2, 1 );

    TextLabel1_2_2_2 = new TQLabel( tabSettings, "TextLabel1_2_2_2" );

    tabSettingsLayout->addWidget( TextLabel1_2_2_2, 2, 0 );

    comboLanguage = new TQComboBox( false, tabSettings, "comboLanguage" );
    comboLanguage->setEnabled( false );

    tabSettingsLayout->addMultiCellWidget( comboLanguage, 1, 1, 1, 2 );

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

    editProjectFile = new TQLineEdit( tabSettings, "editProjectFile" );
    Layout1->addWidget( editProjectFile );

    buttonProject = new TQToolButton( tabSettings, "buttonProject" );
    Layout1->addWidget( buttonProject );

    tabSettingsLayout->addMultiCellLayout( Layout1, 0, 0, 1, 2 );
    Spacer3 = new TQSpacerItem( 21, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabSettingsLayout->addItem( Spacer3, 4, 1 );
    tabWidget->insertTab( tabSettings, TQString::fromLatin1("") );
    ProjectSettingsBaseLayout->addWidget( tabWidget );

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

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

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

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout4->addWidget( buttonCancel );
    ProjectSettingsBaseLayout->addLayout( Layout4 );
    languageChange();
    resize( TQSize(375, 224).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonProject, TQ_SIGNAL( clicked() ), this, TQ_SLOT( chooseProjectFile() ) );
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( okClicked() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( buttonHelp, TQ_SIGNAL( clicked() ), this, TQ_SLOT( helpClicked() ) );
    connect( comboLanguage, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( languageChanged(const TQString&) ) );

    // tab order
    setTabOrder( tabWidget, editProjectFile );
    setTabOrder( editProjectFile, comboLanguage );
    setTabOrder( comboLanguage, buttonHelp );
    setTabOrder( buttonHelp, buttonOk );
    setTabOrder( buttonOk, buttonCancel );

    // buddies
    TextLabel1_2->setBuddy( editProjectFile );
    TextLabel1_3->setBuddy( comboLanguage );
    TextLabel1_2_2_2->setBuddy( editDatabaseFile );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ProjectSettingsBase::languageChange()
{
    setCaption( tr( "Project Settings" ) );
    TextLabel1_2->setText( tr( "&Project File:" ) );
    TextLabel1_3->setText( tr( "&Language" ) );
    buttonDatabaseFile_2->setText( tr( "..." ) );
    TextLabel1_2_2_2->setText( tr( "&Database File:" ) );
    buttonProject->setText( tr( "..." ) );
    tabWidget->changeTab( tabSettings, tr( "&Settings" ) );
    buttonHelp->setText( tr( "&Help" ) );
    buttonOk->setText( tr( "&OK" ) );
    TQWhatsThis::add( buttonOk, tr( "Close the dialog and apply all the changes." ) );
    buttonCancel->setText( tr( "&Cancel" ) );
    TQWhatsThis::add( buttonCancel, tr( "Close the dialog and discard any changes." ) );
}

void ProjectSettingsBase::chooseDatabaseFile()
{
    tqWarning( "ProjectSettingsBase::chooseDatabaseFile(): Not implemented yet" );
}

void ProjectSettingsBase::chooseProjectFile()
{
    tqWarning( "ProjectSettingsBase::chooseProjectFile(): Not implemented yet" );
}

void ProjectSettingsBase::destroy()
{
}

void ProjectSettingsBase::helpClicked()
{
    tqWarning( "ProjectSettingsBase::helpClicked(): Not implemented yet" );
}

void ProjectSettingsBase::init()
{
}

void ProjectSettingsBase::languageChanged(const TQString&)
{
    tqWarning( "ProjectSettingsBase::languageChanged(const TQString&): Not implemented yet" );
}

void ProjectSettingsBase::okClicked()
{
    tqWarning( "ProjectSettingsBase::okClicked(): Not implemented yet" );
}

