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

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

#include "ctags2_settingswidgetbase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    tab = new TQWidget( tabWidget8, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    groupBox1 = new TQGroupBox( tab, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    showDeclarationBox = new TQCheckBox( groupBox1, "showDeclarationBox" );
    groupBox1Layout->addWidget( showDeclarationBox );

    showDefinitionBox = new TQCheckBox( groupBox1, "showDefinitionBox" );
    groupBox1Layout->addWidget( showDefinitionBox );

    showLookupBox = new TQCheckBox( groupBox1, "showLookupBox" );
    groupBox1Layout->addWidget( showLookupBox );
    tabLayout->addWidget( groupBox1 );

    groupBox3_2 = new TQGroupBox( tab, "groupBox3_2" );
    groupBox3_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, groupBox3_2->sizePolicy().hasHeightForWidth() ) );
    groupBox3_2->setColumnLayout(0, TQt::Vertical );
    groupBox3_2->layout()->setSpacing( 6 );
    groupBox3_2->layout()->setMargin( 11 );
    groupBox3_2Layout = new TQVBoxLayout( groupBox3_2->layout() );
    groupBox3_2Layout->setAlignment( TQt::AlignTop );

    jumpToFirstBox = new TQCheckBox( groupBox3_2, "jumpToFirstBox" );
    groupBox3_2Layout->addWidget( jumpToFirstBox );

    tagfileCustomBox = new TQCheckBox( groupBox3_2, "tagfileCustomBox" );
    groupBox3_2Layout->addWidget( tagfileCustomBox );

    tagfileCustomEdit = new KLineEdit( groupBox3_2, "tagfileCustomEdit" );
    tagfileCustomEdit->setEnabled( false );
    tagfileCustomEdit->setReadOnly( false );
    groupBox3_2Layout->addWidget( tagfileCustomEdit );
    tabLayout->addWidget( groupBox3_2 );

    groupBox3 = new TQGroupBox( tab, "groupBox3" );
    groupBox3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, groupBox3->sizePolicy().hasHeightForWidth() ) );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( groupBox3, "textLabel1" );
    groupBox3Layout->addWidget( textLabel1 );

    binaryPath = new KURLRequester( groupBox3, "binaryPath" );
    groupBox3Layout->addWidget( binaryPath );
    tabLayout->addWidget( groupBox3 );
    spacer2 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer2 );
    tabWidget8->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget8, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

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

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

    layout15->addWidget( textLabel2, 0, 0 );

    tagfilePath = new KURLRequester( tab_2, "tagfilePath" );

    layout15->addWidget( tagfilePath, 1, 0 );

    tabLayout_2->addMultiCellLayout( layout15, 0, 0, 0, 1 );

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

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

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

    createButton = new TQPushButton( tab_2, "createButton" );

    layout21->addWidget( createButton, 0, 0 );

    addButton = new TQPushButton( tab_2, "addButton" );

    layout21->addWidget( addButton, 1, 0 );

    removeButton = new TQPushButton( tab_2, "removeButton" );

    layout21->addWidget( removeButton, 2, 0 );

    tabLayout_2->addLayout( layout21, 2, 1 );
    spacer1 = new TQSpacerItem( 20, 61, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer1, 3, 1 );

    otherTagFiles = new TDEListView( tab_2, "otherTagFiles" );
    otherTagFiles->addColumn( tr2i18n( "Name" ) );
    otherTagFiles->addColumn( tr2i18n( "Tags file" ) );

    tabLayout_2->addMultiCellWidget( otherTagFiles, 2, 3, 0, 0 );
    tabWidget8->insertTab( tab_2, TQString::fromLatin1("") );
    CTags2SettingsWidgetBaseLayout->addWidget( tabWidget8 );
    languageChange();
    resize( TQSize(460, 456).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( addButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addNewTagFile() ) );
    connect( removeButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeTagFile() ) );
    connect( createButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( createNewTagSlot() ) );
    connect( tagfileCustomBox, TQ_SIGNAL( toggled(bool) ), tagfileCustomEdit, TQ_SLOT( setEnabled(bool) ) );
    connect( tagfileCustomBox, TQ_SIGNAL( toggled(bool) ), tagfileCustomEdit, TQ_SLOT( clear() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CTags2SettingsWidgetBase::languageChange()
{
    groupBox1->setTitle( tr2i18n( "Editor Context Menu" ) );
    showDeclarationBox->setText( tr2i18n( "Show \"&Go To Declaration\"" ) );
    TQWhatsThis::add( showDeclarationBox, tr2i18n( "If checked, an option to go directly to the matching tag declaration will be shown. If more than one match, all matches will be shown in the main ctags result view." ) );
    showDefinitionBox->setText( tr2i18n( "Show \"Go To &Definition\"" ) );
    TQWhatsThis::add( showDefinitionBox, tr2i18n( "If checked, an option to go directly to the matching tag definition will be shown. If more than one match, all matches will be shown in the main ctags result view." ) );
    showLookupBox->setText( tr2i18n( "Show \"CT&ags Lookup\"" ) );
    TQWhatsThis::add( showLookupBox, tr2i18n( "If checked, an option to do a full lookup of all macthing tags is shown in the context menu. The results will be shown in the main ctags results view." ) );
    groupBox3_2->setTitle( tr2i18n( "Options" ) );
    jumpToFirstBox->setText( tr2i18n( "When more than one hit, go directl&y to the first" ) );
    TQWhatsThis::add( jumpToFirstBox, tr2i18n( "If more than one hit was produced from an attempt to find an exact match, go to the first match in the list. Note: the <i>Go To Next Match</i> shortcut can be used to step between the matches." ) );
    tagfileCustomBox->setText( tr2i18n( "&Use custom tagfile generation arguments" ) );
    TQWhatsThis::add( tagfileCustomBox, tr2i18n( "The default arguments should be fine, but if needed a custom generation arguments string can be used." ) );
    TQWhatsThis::add( tagfileCustomEdit, tr2i18n( "Enter custom arguments to ctags database creation here. Note: do not set a custom tags file filename here, do that below instead." ) );
    groupBox3->setTitle( tr2i18n( "Paths" ) );
    TQWhatsThis::add( groupBox3, tr2i18n( "Enter the path to the exuberant ctags binary. If empty, <i>ctags</i> will be executed via $PATH. Note that it is sometimes installed as <i>exuberant-ctags</i>." ) );
    textLabel1->setText( tr2i18n( "Path to ctags binary:" ) );
    TQWhatsThis::add( binaryPath, tr2i18n( "Enter the path to the exuberant ctags binary. If empty, <i>ctags</i> will be executed via $PATH. Note that it is sometimes installed as <i>exuberant-ctags</i>." ) );
    tabWidget8->changeTab( tab, tr2i18n( "Ge&neral" ) );
    textLabel2->setText( tr2i18n( "Path to project tag file:" ) );
    TQWhatsThis::add( tagfilePath, tr2i18n( "Enter the full path of the project tagfile. If empty, the file will be called <i>tags</i> and reside in the root of the project." ) );
    textLabel1_2->setText( tr2i18n( "Other tag files:" ) );
    createButton->setText( tr2i18n( "&Create..." ) );
    addButton->setText( tr2i18n( "&Add..." ) );
    removeButton->setText( tr2i18n( "Remo&ve" ) );
    otherTagFiles->header()->setLabel( 0, tr2i18n( "Name" ) );
    otherTagFiles->header()->setLabel( 1, tr2i18n( "Tags file" ) );
    tabWidget8->changeTab( tab_2, tr2i18n( "Mana&ge tag files" ) );
}

void CTags2SettingsWidgetBase::createNewTagSlot()
{
    tqWarning( "CTags2SettingsWidgetBase::createNewTagSlot(): Not implemented yet" );
}

void CTags2SettingsWidgetBase::addNewTagFile()
{
    tqWarning( "CTags2SettingsWidgetBase::addNewTagFile(): Not implemented yet" );
}

void CTags2SettingsWidgetBase::removeTagFile()
{
    tqWarning( "CTags2SettingsWidgetBase::removeTagFile(): Not implemented yet" );
}

void CTags2SettingsWidgetBase::moveUpTagFile()
{
    tqWarning( "CTags2SettingsWidgetBase::moveUpTagFile(): Not implemented yet" );
}

void CTags2SettingsWidgetBase::moveDownTagFile()
{
    tqWarning( "CTags2SettingsWidgetBase::moveDownTagFile(): Not implemented yet" );
}

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

TQMetaObject *CTags2SettingsWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CTags2SettingsWidgetBase( "CTags2SettingsWidgetBase", &CTags2SettingsWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CTags2SettingsWidgetBase::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 = {"createNewTagSlot", 0, 0 };
    static const TQUMethod slot_1 = {"addNewTagFile", 0, 0 };
    static const TQUMethod slot_2 = {"removeTagFile", 0, 0 };
    static const TQUMethod slot_3 = {"moveUpTagFile", 0, 0 };
    static const TQUMethod slot_4 = {"moveDownTagFile", 0, 0 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "createNewTagSlot()", &slot_0, TQMetaData::Public },
	{ "addNewTagFile()", &slot_1, TQMetaData::Public },
	{ "removeTagFile()", &slot_2, TQMetaData::Public },
	{ "moveUpTagFile()", &slot_3, TQMetaData::Public },
	{ "moveDownTagFile()", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CTags2SettingsWidgetBase", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CTags2SettingsWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CTags2SettingsWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: createNewTagSlot(); break;
    case 1: addNewTagFile(); break;
    case 2: removeTagFile(); break;
    case 3: moveUpTagFile(); break;
    case 4: moveDownTagFile(); break;
    case 5: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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