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

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

#include "docglobalconfigwidgetbase.h"

#include <ntqvariant.h>
#include <kurlrequester.h>
#include <tdefontcombo.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidgetstack.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    tab = new TQWidget( docTab, "tab" );
    tabLayout = new TQHBoxLayout( tab, 11, 6, "tabLayout"); 

    viewHolder = new TQWidgetStack( tab, "viewHolder" );
    viewHolder->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, viewHolder->sizePolicy().hasHeightForWidth() ) );

    WStackPage = new TQWidget( viewHolder, "WStackPage" );
    viewHolder->addWidget( WStackPage, 0 );
    tabLayout->addWidget( viewHolder );

    layout1 = new TQVBoxLayout( 0, 0, 6, "layout1"); 

    addCollectionButton = new TQPushButton( tab, "addCollectionButton" );
    layout1->addWidget( addCollectionButton );

    editCollectionButton = new TQPushButton( tab, "editCollectionButton" );
    layout1->addWidget( editCollectionButton );

    removeCollectionButton = new TQPushButton( tab, "removeCollectionButton" );
    layout1->addWidget( removeCollectionButton );

    rescanCollectionButton = new TQPushButton( tab, "rescanCollectionButton" );
    layout1->addWidget( rescanCollectionButton );
    spacer1 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout1->addItem( spacer1 );
    tabLayout->addLayout( layout1 );
    docTab->insertTab( tab, TQString::fromLatin1("") );

    TabPage = new TQWidget( docTab, "TabPage" );
    TabPageLayout = new TQGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout"); 
    spacer20 = new TQSpacerItem( 20, 190, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer20, 1, 0 );

    layout5 = new TQGridLayout( 0, 1, 1, 0, 6, "layout5"); 

    htsearchbinLabel = new TQLabel( TabPage, "htsearchbinLabel" );

    layout5->addWidget( htsearchbinLabel, 4, 0 );

    htsearchbinEdit = new KURLRequester( TabPage, "htsearchbinEdit" );
    htsearchbinEdit->setFocusPolicy( KURLRequester::StrongFocus );

    layout5->addWidget( htsearchbinEdit, 4, 1 );
    spacer6 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout5->addItem( spacer6, 1, 1 );

    databaseDirEdit = new KURLRequester( TabPage, "databaseDirEdit" );
    databaseDirEdit->setFocusPolicy( KURLRequester::StrongFocus );

    layout5->addWidget( databaseDirEdit, 0, 1 );

    htmergebinEdit = new KURLRequester( TabPage, "htmergebinEdit" );
    htmergebinEdit->setFocusPolicy( KURLRequester::StrongFocus );

    layout5->addWidget( htmergebinEdit, 3, 1 );

    htdigbinLabel = new TQLabel( TabPage, "htdigbinLabel" );

    layout5->addWidget( htdigbinLabel, 2, 0 );

    htdigbinEdit = new KURLRequester( TabPage, "htdigbinEdit" );
    htdigbinEdit->setFocusPolicy( KURLRequester::StrongFocus );

    layout5->addWidget( htdigbinEdit, 2, 1 );

    databaseDirLabel = new TQLabel( TabPage, "databaseDirLabel" );

    layout5->addWidget( databaseDirLabel, 0, 0 );

    htmergebinLabel = new TQLabel( TabPage, "htmergebinLabel" );

    layout5->addWidget( htmergebinLabel, 3, 0 );

    TabPageLayout->addLayout( layout5, 0, 0 );
    docTab->insertTab( TabPage, TQString::fromLatin1("") );

    TabPage_2 = new TQWidget( docTab, "TabPage_2" );
    TabPageLayout_2 = new TQGridLayout( TabPage_2, 1, 1, 11, 6, "TabPageLayout_2"); 
    spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout_2->addItem( spacer4, 3, 0 );

    buttonGroup1 = new TQButtonGroup( TabPage_2, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    find_box = new TQCheckBox( buttonGroup1, "find_box" );

    buttonGroup1Layout->addWidget( find_box, 0, 0 );

    index_box = new TQCheckBox( buttonGroup1, "index_box" );

    buttonGroup1Layout->addWidget( index_box, 1, 0 );

    search_box = new TQCheckBox( buttonGroup1, "search_box" );

    buttonGroup1Layout->addWidget( search_box, 2, 0 );

    info_box = new TQCheckBox( buttonGroup1, "info_box" );

    buttonGroup1Layout->addWidget( info_box, 4, 0 );

    man_box = new TQCheckBox( buttonGroup1, "man_box" );

    buttonGroup1Layout->addWidget( man_box, 3, 0 );

    TabPageLayout_2->addWidget( buttonGroup1, 1, 0 );

    useAssistant_box = new TQCheckBox( TabPage_2, "useAssistant_box" );

    TabPageLayout_2->addWidget( useAssistant_box, 0, 0 );

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

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

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

    standardFont_combo = new TDEFontCombo( groupBox1, "standardFont_combo" );

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

    fixedFont_combo = new TDEFontCombo( groupBox1, "fixedFont_combo" );

    groupBox1Layout->addWidget( fixedFont_combo, 1, 1 );

    textLabel1_2 = new TQLabel( groupBox1, "textLabel1_2" );
    textLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );

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

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel2, 2, 0 );

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

    groupBox1Layout->addWidget( zoom_combo, 2, 1 );

    TabPageLayout_2->addWidget( groupBox1, 2, 0 );
    docTab->insertTab( TabPage_2, TQString::fromLatin1("") );

    DocGlobalConfigWidgetBaseLayout->addWidget( docTab, 0, 0 );
    languageChange();
    resize( TQSize(553, 397).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( addCollectionButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addCollectionButtonClicked() ) );
    connect( editCollectionButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( editCollectionButtonClicked() ) );
    connect( removeCollectionButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeCollectionButtonClicked() ) );
    connect( rescanCollectionButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( rescanCollectionButtonClicked() ) );

    // tab order
    setTabOrder( docTab, addCollectionButton );
    setTabOrder( addCollectionButton, editCollectionButton );
    setTabOrder( editCollectionButton, removeCollectionButton );
    setTabOrder( removeCollectionButton, rescanCollectionButton );
    setTabOrder( rescanCollectionButton, databaseDirEdit );
    setTabOrder( databaseDirEdit, htdigbinEdit );
    setTabOrder( htdigbinEdit, htmergebinEdit );
    setTabOrder( htmergebinEdit, htsearchbinEdit );
    setTabOrder( htsearchbinEdit, useAssistant_box );
    setTabOrder( useAssistant_box, find_box );
    setTabOrder( find_box, index_box );
    setTabOrder( index_box, search_box );
    setTabOrder( search_box, info_box );
    setTabOrder( info_box, man_box );

    // buddies
    htsearchbinLabel->setBuddy( htsearchbinEdit );
    htdigbinLabel->setBuddy( htdigbinEdit );
    databaseDirLabel->setBuddy( databaseDirEdit );
    htmergebinLabel->setBuddy( htmergebinEdit );
    textLabel1->setBuddy( standardFont_combo );
    textLabel1_2->setBuddy( fixedFont_combo );
    textLabel2->setBuddy( zoom_combo );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DocGlobalConfigWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Documentation" ) );
    addCollectionButton->setText( tr2i18n( "&Add..." ) );
    editCollectionButton->setText( tr2i18n( "&Edit..." ) );
    removeCollectionButton->setText( tr2i18n( "&Remove" ) );
    rescanCollectionButton->setText( tr2i18n( "&Rescan" ) );
    docTab->changeTab( tab, tr2i18n( "&Documentation Collections" ) );
    htsearchbinLabel->setText( tr2i18n( "htse&arch executable:" ) );
    htdigbinLabel->setText( tr2i18n( "htdi&g executable:" ) );
    databaseDirLabel->setText( tr2i18n( "Database di&rectory:" ) );
    htmergebinLabel->setText( tr2i18n( "ht&merge executable:" ) );
    docTab->changeTab( TabPage, tr2i18n( "Full Text &Search" ) );
    buttonGroup1->setTitle( tr2i18n( "Editor Context Menu Items" ) );
    find_box->setText( tr2i18n( "&Find in documentation" ) );
    index_box->setText( tr2i18n( "&Look in documentation index" ) );
    search_box->setText( tr2i18n( "S&earch in documentation" ) );
    info_box->setText( tr2i18n( "Goto &infopage" ) );
    man_box->setText( tr2i18n( "Goto &manpage" ) );
    useAssistant_box->setText( tr2i18n( "Use TDevelop &Assistant to browse documentation" ) );
    groupBox1->setTitle( tr2i18n( "Fonts && Sizes" ) );
    textLabel1->setText( tr2i18n( "Sta&ndard font:" ) );
    textLabel1_2->setText( tr2i18n( "Fi&xed font:" ) );
    textLabel2->setText( tr2i18n( "&Zoom factor:" ) );
    zoom_combo->clear();
    zoom_combo->insertItem( tr2i18n( "20" ) );
    zoom_combo->insertItem( tr2i18n( "40" ) );
    zoom_combo->insertItem( tr2i18n( "60" ) );
    zoom_combo->insertItem( tr2i18n( "80" ) );
    zoom_combo->insertItem( tr2i18n( "90" ) );
    zoom_combo->insertItem( tr2i18n( "95" ) );
    zoom_combo->insertItem( tr2i18n( "100" ) );
    zoom_combo->insertItem( tr2i18n( "105" ) );
    zoom_combo->insertItem( tr2i18n( "110" ) );
    zoom_combo->insertItem( tr2i18n( "120" ) );
    zoom_combo->insertItem( tr2i18n( "140" ) );
    zoom_combo->insertItem( tr2i18n( "160" ) );
    zoom_combo->insertItem( tr2i18n( "180" ) );
    zoom_combo->insertItem( tr2i18n( "200" ) );
    zoom_combo->insertItem( tr2i18n( "250" ) );
    zoom_combo->insertItem( tr2i18n( "300" ) );
    zoom_combo->setCurrentItem( 6 );
    docTab->changeTab( TabPage_2, tr2i18n( "O&ther" ) );
}

void DocGlobalConfigWidgetBase::addCollectionButtonClicked()
{
    tqWarning( "DocGlobalConfigWidgetBase::addCollectionButtonClicked(): Not implemented yet" );
}

void DocGlobalConfigWidgetBase::editCollectionButtonClicked()
{
    tqWarning( "DocGlobalConfigWidgetBase::editCollectionButtonClicked(): Not implemented yet" );
}

void DocGlobalConfigWidgetBase::removeCollectionButtonClicked()
{
    tqWarning( "DocGlobalConfigWidgetBase::removeCollectionButtonClicked(): Not implemented yet" );
}

void DocGlobalConfigWidgetBase::rescanCollectionButtonClicked()
{
    tqWarning( "DocGlobalConfigWidgetBase::rescanCollectionButtonClicked(): Not implemented yet" );
}

void DocGlobalConfigWidgetBase::collectionsBoxCurrentChanged(int)
{
    tqWarning( "DocGlobalConfigWidgetBase::collectionsBoxCurrentChanged(int): Not implemented yet" );
}

void DocGlobalConfigWidgetBase::updateConfig()
{
    tqWarning( "DocGlobalConfigWidgetBase::updateConfig(): Not implemented yet" );
}

void DocGlobalConfigWidgetBase::updateIndex()
{
    tqWarning( "DocGlobalConfigWidgetBase::updateIndex(): Not implemented yet" );
}

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

TQMetaObject *DocGlobalConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DocGlobalConfigWidgetBase( "DocGlobalConfigWidgetBase", &DocGlobalConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* DocGlobalConfigWidgetBase::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 TQUMethod slot_0 = {"addCollectionButtonClicked", 0, 0 };
    static const TQUMethod slot_1 = {"editCollectionButtonClicked", 0, 0 };
    static const TQUMethod slot_2 = {"removeCollectionButtonClicked", 0, 0 };
    static const TQUMethod slot_3 = {"rescanCollectionButtonClicked", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"collectionsBoxCurrentChanged", 1, param_slot_4 };
    static const TQUMethod slot_5 = {"updateConfig", 0, 0 };
    static const TQUMethod slot_6 = {"updateIndex", 0, 0 };
    static const TQUMethod slot_7 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "addCollectionButtonClicked()", &slot_0, TQMetaData::Public },
	{ "editCollectionButtonClicked()", &slot_1, TQMetaData::Public },
	{ "removeCollectionButtonClicked()", &slot_2, TQMetaData::Public },
	{ "rescanCollectionButtonClicked()", &slot_3, TQMetaData::Public },
	{ "collectionsBoxCurrentChanged(int)", &slot_4, TQMetaData::Public },
	{ "updateConfig()", &slot_5, TQMetaData::Public },
	{ "updateIndex()", &slot_6, TQMetaData::Public },
	{ "languageChange()", &slot_7, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"DocGlobalConfigWidgetBase", parentObject,
	slot_tbl, 8,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_DocGlobalConfigWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool DocGlobalConfigWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: addCollectionButtonClicked(); break;
    case 1: editCollectionButtonClicked(); break;
    case 2: removeCollectionButtonClicked(); break;
    case 3: rescanCollectionButtonClicked(); break;
    case 4: collectionsBoxCurrentChanged((int)static_QUType_int.get(_o+1)); break;
    case 5: updateConfig(); break;
    case 6: updateIndex(); break;
    case 7: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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