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

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

#include "docprojectconfigwidgetbase.h"

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

/*
 *  Constructs a DocProjectConfigWidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
DocProjectConfigWidgetBase::DocProjectConfigWidgetBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "DocProjectConfigWidgetBase" );
    DocProjectConfigWidgetBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "DocProjectConfigWidgetBaseLayout"); 
    spacer1 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    DocProjectConfigWidgetBaseLayout->addItem( spacer1, 2, 0 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    catalogURL = new KURLRequester( groupBox1, "catalogURL" );
    catalogURL->setEnabled( false );

    groupBox1Layout->addMultiCellWidget( catalogURL, 2, 2, 0, 1 );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );

    groupBox1Layout->addMultiCellWidget( textLabel2, 1, 1, 0, 1 );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    textLabel1->setFrameShape( TQLabel::NoFrame );
    textLabel1->setFrameShadow( TQLabel::Plain );

    groupBox1Layout->addWidget( textLabel1, 0, 0 );

    docSystemCombo = new TQComboBox( false, groupBox1, "docSystemCombo" );

    groupBox1Layout->addWidget( docSystemCombo, 0, 1 );

    DocProjectConfigWidgetBaseLayout->addWidget( groupBox1, 0, 0 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

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

    groupBox2Layout->addWidget( textLabel1_2, 0, 0 );

    manualURL = new KURLRequester( groupBox2, "manualURL" );

    groupBox2Layout->addWidget( manualURL, 1, 0 );

    DocProjectConfigWidgetBaseLayout->addWidget( groupBox2, 1, 0 );
    languageChange();
    resize( TQSize(484, 292).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( docSystemCombo, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( changeDocSystem(const TQString&) ) );

    // tab order
    setTabOrder( catalogURL, docSystemCombo );

    // buddies
    textLabel2->setBuddy( catalogURL );
    textLabel1->setBuddy( docSystemCombo );
    textLabel1_2->setBuddy( manualURL );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DocProjectConfigWidgetBase::languageChange()
{
    groupBox1->setTitle( tr2i18n( "Project API Documentation" ) );
    textLabel2->setText( tr2i18n( "Ca&talog location:" ) );
    textLabel1->setText( tr2i18n( "C&ollection type:" ) );
    groupBox2->setTitle( tr2i18n( "Project User Manual" ) );
    textLabel1_2->setText( tr2i18n( "&Location:" ) );
}

void DocProjectConfigWidgetBase::changeDocSystem(const TQString&)
{
    tqWarning( "DocProjectConfigWidgetBase::changeDocSystem(const TQString&): Not implemented yet" );
}

/****************************************************************************
** DocProjectConfigWidgetBase meta object code from reading C++ file 'docprojectconfigwidgetbase.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 "docprojectconfigwidgetbase.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 *DocProjectConfigWidgetBase::className() const
{
    return "DocProjectConfigWidgetBase";
}

TQMetaObject *DocProjectConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DocProjectConfigWidgetBase( "DocProjectConfigWidgetBase", &DocProjectConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* DocProjectConfigWidgetBase::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_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"changeDocSystem", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "changeDocSystem(const TQString&)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"DocProjectConfigWidgetBase", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_DocProjectConfigWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool DocProjectConfigWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: changeDocSystem((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 1: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool DocProjectConfigWidgetBase::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

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

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