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

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

#include "symbollayout.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a SymbolLayout as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
SymbolLayout::SymbolLayout( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SymbolLayout" );
    SymbolLayoutLayout = new TQVBoxLayout( this, 11, 6, "SymbolLayoutLayout"); 

    layout15 = new TQHBoxLayout( 0, 0, 6, "layout15"); 

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

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

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
    layout14->addWidget( textLabel2 );
    layout15->addLayout( layout14 );

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

    m_pTypeCombo = new TQComboBox( false, this, "m_pTypeCombo" );
    m_pTypeCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pTypeCombo->sizePolicy().hasHeightForWidth() ) );
    layout13->addWidget( m_pTypeCombo );

    m_pSymbolHC = new KHistoryCombo( this, "m_pSymbolHC" );
    m_pSymbolHC->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pSymbolHC->sizePolicy().hasHeightForWidth() ) );
    m_pSymbolHC->setInsertionPolicy( KHistoryCombo::AtTop );
    m_pSymbolHC->setDuplicatesEnabled( false );
    layout13->addWidget( m_pSymbolHC );
    layout15->addLayout( layout13 );
    SymbolLayoutLayout->addLayout( layout15 );

    m_pSubStringCheck = new TQCheckBox( this, "m_pSubStringCheck" );
    SymbolLayoutLayout->addWidget( m_pSubStringCheck );

    m_pCaseCheck = new TQCheckBox( this, "m_pCaseCheck" );
    SymbolLayoutLayout->addWidget( m_pCaseCheck );

    line2 = new TQFrame( this, "line2" );
    line2->setFrameShape( TQFrame::HLine );
    line2->setFrameShadow( TQFrame::Sunken );
    line2->setFrameShape( TQFrame::HLine );
    SymbolLayoutLayout->addWidget( line2 );

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 
    spacer2 = new TQSpacerItem( 71, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer2 );

    m_pOKButton = new TQPushButton( this, "m_pOKButton" );
    layout3->addWidget( m_pOKButton );

    m_pHintButton = new TQPushButton( this, "m_pHintButton" );
    layout3->addWidget( m_pHintButton );

    m_pCancelButton = new TQPushButton( this, "m_pCancelButton" );
    layout3->addWidget( m_pCancelButton );
    SymbolLayoutLayout->addLayout( layout3 );

    m_pHintList = new TQListView( this, "m_pHintList" );
    SymbolLayoutLayout->addWidget( m_pHintList );

    m_pHintGroup = new TQButtonGroup( this, "m_pHintGroup" );
    m_pHintGroup->setColumnLayout(0, TQt::Vertical );
    m_pHintGroup->layout()->setSpacing( 6 );
    m_pHintGroup->layout()->setMargin( 11 );
    m_pHintGroupLayout = new TQVBoxLayout( m_pHintGroup->layout() );
    m_pHintGroupLayout->setAlignment( TQt::AlignTop );

    m_pBeginWithRadio = new TQRadioButton( m_pHintGroup, "m_pBeginWithRadio" );
    m_pHintGroupLayout->addWidget( m_pBeginWithRadio );

    m_pContainRadio = new TQRadioButton( m_pHintGroup, "m_pContainRadio" );
    m_pHintGroupLayout->addWidget( m_pContainRadio );
    SymbolLayoutLayout->addWidget( m_pHintGroup );
    languageChange();
    resize( TQSize(343, 456).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_pSymbolHC, m_pTypeCombo );
    setTabOrder( m_pTypeCombo, m_pSubStringCheck );
    setTabOrder( m_pSubStringCheck, m_pOKButton );
    setTabOrder( m_pOKButton, m_pHintButton );
    setTabOrder( m_pHintButton, m_pCancelButton );
    setTabOrder( m_pCancelButton, m_pHintList );
    setTabOrder( m_pHintList, m_pBeginWithRadio );
    setTabOrder( m_pBeginWithRadio, m_pContainRadio );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SymbolLayout::languageChange()
{
    setCaption( tr2i18n( "KScope Query" ) );
    textLabel1->setText( tr2i18n( "Type" ) );
    textLabel2->setText( tr2i18n( "Symbol" ) );
    m_pTypeCombo->clear();
    m_pTypeCombo->insertItem( tr2i18n( "References to" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Definition of" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Functions called by" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Functions calling" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Find text" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Find EGrep pattern" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Find file" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Files #including" ) );
    m_pTypeCombo->insertItem( tr2i18n( "Call graph for" ) );
    m_pSubStringCheck->setText( tr2i18n( "Search for &a Sub-String" ) );
    m_pCaseCheck->setText( tr2i18n( "Case Insensitive" ) );
    m_pOKButton->setText( tr2i18n( "OK" ) );
    m_pHintButton->setText( tr2i18n( "Hi&nt" ) );
    m_pCancelButton->setText( tr2i18n( "Cancel" ) );
    m_pHintGroup->setTitle( tr2i18n( "Hint Options" ) );
    m_pBeginWithRadio->setText( tr2i18n( "S&ymbols Beginning With..." ) );
    m_pContainRadio->setText( tr2i18n( "Sym&bols Containing..." ) );
}

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

TQMetaObject *SymbolLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SymbolLayout( "SymbolLayout", &SymbolLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SymbolLayout::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SymbolLayout", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SymbolLayout.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool SymbolLayout::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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