/****************************************************************************
** 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 <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

#include "projectsettings.ui.h"
/*
 *  Constructs a CppProjectSettings as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CppProjectSettings::CppProjectSettings( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "CppProjectSettings" );
    CppProjectSettingsLayout = new TQGridLayout( this, 1, 1, 11, 6, "CppProjectSettingsLayout"); 

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

    CppProjectSettingsLayout->addWidget( TextLabel1, 1, 0 );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    CppProjectSettingsLayout->addItem( Spacer1, 5, 2 );

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

    CppProjectSettingsLayout->addWidget( TextLabel2_2, 3, 0 );

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

    CppProjectSettingsLayout->addWidget( editDefines, 3, 2 );

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

    CppProjectSettingsLayout->addWidget( TextLabel2, 2, 0 );

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

    CppProjectSettingsLayout->addWidget( TextLabel2_3, 4, 0 );

    comboDefines = new TQComboBox( false, this, "comboDefines" );

    CppProjectSettingsLayout->addWidget( comboDefines, 3, 1 );

    comboInclude = new TQComboBox( false, this, "comboInclude" );

    CppProjectSettingsLayout->addWidget( comboInclude, 4, 1 );

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

    CppProjectSettingsLayout->addWidget( editInclude, 4, 2 );

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

    CppProjectSettingsLayout->addWidget( editLibs, 2, 2 );

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

    CppProjectSettingsLayout->addWidget( editConfig, 1, 2 );

    comboLibs = new TQComboBox( false, this, "comboLibs" );

    CppProjectSettingsLayout->addWidget( comboLibs, 2, 1 );

    comboConfig = new TQComboBox( false, this, "comboConfig" );

    CppProjectSettingsLayout->addWidget( comboConfig, 1, 1 );

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

    CppProjectSettingsLayout->addWidget( TextLabel3, 0, 0 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    CppProjectSettingsLayout->addItem( Spacer2, 0, 2 );

    comboTemplate = new TQComboBox( false, this, "comboTemplate" );

    CppProjectSettingsLayout->addWidget( comboTemplate, 0, 1 );
    languageChange();
    resize( TQSize(373, 191).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( comboConfig, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( configPlatformChanged(const TQString&) ) );
    connect( comboLibs, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( libsPlatformChanged(const TQString&) ) );
    connect( comboDefines, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( definesPlatformChanged(const TQString&) ) );
    connect( editConfig, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( configChanged(const TQString&) ) );
    connect( editLibs, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( libsChanged(const TQString&) ) );
    connect( editDefines, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( definesChanged(const TQString&) ) );
    connect( editInclude, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( includesChanged(const TQString&) ) );
    connect( comboInclude, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( includesPlatformChanged(const TQString&) ) );

    // tab order
    setTabOrder( comboTemplate, comboConfig );
    setTabOrder( comboConfig, editConfig );
    setTabOrder( editConfig, comboLibs );
    setTabOrder( comboLibs, editLibs );
    setTabOrder( editLibs, comboDefines );
    setTabOrder( comboDefines, editDefines );
    setTabOrder( editDefines, comboInclude );
    setTabOrder( comboInclude, editInclude );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CppProjectSettings::languageChange()
{
    setCaption( tr( "Project Settings" ) );
    TextLabel1->setText( tr( "Config:" ) );
    TextLabel2_2->setText( tr( "Defines:" ) );
    TextLabel2->setText( tr( "Libs:" ) );
    TextLabel2_3->setText( tr( "Includepath:" ) );
    comboDefines->clear();
    comboDefines->insertItem( tr( "(all)" ) );
    comboDefines->insertItem( tr( "unix" ) );
    comboDefines->insertItem( tr( "win32" ) );
    comboDefines->insertItem( tr( "mac" ) );
    comboInclude->clear();
    comboInclude->insertItem( tr( "(all)" ) );
    comboInclude->insertItem( tr( "unix" ) );
    comboInclude->insertItem( tr( "win32" ) );
    comboInclude->insertItem( tr( "mac" ) );
    comboLibs->clear();
    comboLibs->insertItem( tr( "(all)" ) );
    comboLibs->insertItem( tr( "unix" ) );
    comboLibs->insertItem( tr( "win32" ) );
    comboLibs->insertItem( tr( "mac" ) );
    comboConfig->clear();
    comboConfig->insertItem( tr( "(all)" ) );
    comboConfig->insertItem( tr( "unix" ) );
    comboConfig->insertItem( tr( "win32" ) );
    comboConfig->insertItem( tr( "mac" ) );
    TextLabel3->setText( tr( "Template:" ) );
    comboTemplate->clear();
    comboTemplate->insertItem( tr( "app" ) );
    comboTemplate->insertItem( tr( "lib" ) );
}

