#include <kdialog.h>
#include <tdelocale.h>

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

#include "settingsdialogbase.h"

#include <ntqvariant.h>
#include <kurlrequester.h>
#include <tdelistbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    SettingsDialogBaseLayout->addMultiCellWidget( textLabel1_2, 0, 0, 0, 3 );

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

    SettingsDialogBaseLayout->addWidget( cbParsingScope, 3, 1 );

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

    SettingsDialogBaseLayout->addWidget( textLabel1, 3, 0 );

    kdeUrl = new KURLRequester( this, "kdeUrl" );
    kdeUrl->setEnabled( true );

    SettingsDialogBaseLayout->addMultiCellWidget( kdeUrl, 2, 2, 0, 2 );

    addUrlButton = new TQPushButton( this, "addUrlButton" );
    addUrlButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, addUrlButton->sizePolicy().hasHeightForWidth() ) );

    SettingsDialogBaseLayout->addWidget( addUrlButton, 2, 3 );

    kdeListBox = new TDEListBox( this, "kdeListBox" );

    SettingsDialogBaseLayout->addMultiCellWidget( kdeListBox, 1, 1, 0, 3 );
    spacer1 = new TQSpacerItem( 220, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    SettingsDialogBaseLayout->addMultiCell( spacer1, 3, 3, 2, 3 );
    languageChange();
    resize( TQSize(403, 266).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kdeListBox, TQ_SIGNAL( selectionChanged(TQListBoxItem*) ), this, TQ_SLOT( slotSelectionChanged(TQListBoxItem*) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SettingsDialogBase::languageChange()
{
    textLabel1_2->setText( tr2i18n( "TDE include directories:\n"
"Only the selected entry will be used" ) );
    cbParsingScope->clear();
    cbParsingScope->insertItem( tr2i18n( "TDE Libs Headers" ) );
    cbParsingScope->insertItem( tr2i18n( "All TDE Headers" ) );
    TQToolTip::add( cbParsingScope, TQString::null );
    TQWhatsThis::add( cbParsingScope, tr2i18n( "Decide if you want to restrict the Code Completion database to only the base tdelibs API or the entire TDE include structure" ) );
    textLabel1->setText( tr2i18n( "Scope:" ) );
    TQWhatsThis::add( kdeUrl, tr2i18n( "If none of the directories TDevelop found is what you want,you can enter a directory of your choice here" ) );
    addUrlButton->setText( tr2i18n( "&Add" ) );
}

void SettingsDialogBase::slotSelectionChanged(TQListBoxItem*)
{
    tqWarning( "SettingsDialogBase::slotSelectionChanged(TQListBoxItem*): Not implemented yet" );
}

/****************************************************************************
** SettingsDialogBase meta object code from reading C++ file 'settingsdialogbase.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "settingsdialogbase.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *SettingsDialogBase::className() const
{
    return "SettingsDialogBase";
}

TQMetaObject *SettingsDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SettingsDialogBase( "SettingsDialogBase", &SettingsDialogBase::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString SettingsDialogBase::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "SettingsDialogBase", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString SettingsDialogBase::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "SettingsDialogBase", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* SettingsDialogBase::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_ptr, "TQListBoxItem", TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"slotSelectionChanged", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotSelectionChanged(TQListBoxItem*)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    static const TQUParameter param_signal_0[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_0 = {"enabled", 1, param_signal_0 };
    static const TQMetaData signal_tbl[] = {
	{ "enabled(int)", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SettingsDialogBase", parentObject,
	slot_tbl, 2,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SettingsDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* SettingsDialogBase::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "SettingsDialogBase" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

// TQ_SIGNAL enabled
void SettingsDialogBase::enabled( int t0 )
{
    activate_signal( staticMetaObject()->signalOffset() + 0, t0 );
}

bool SettingsDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotSelectionChanged((TQListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 1: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool SettingsDialogBase::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: enabled((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

bool SettingsDialogBase::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool SettingsDialogBase::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
