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

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

#include "kxesearchdialogbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KXESearchDialogBase 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.
 */
KXESearchDialogBase::KXESearchDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KXESearchDialogBase" );
    setMinimumSize( TQSize( 330, 240 ) );
    setSizeIncrement( TQSize( 0, 0 ) );
    KXESearchDialogBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "KXESearchDialogBaseLayout"); 

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

    m_pTextLabelSearchedString = new TQLabel( this, "m_pTextLabelSearchedString" );
    m_pTextLabelSearchedString->setFrameShape( TQLabel::MShape );
    m_pTextLabelSearchedString->setFrameShadow( TQLabel::MShadow );
    Layout5->addWidget( m_pTextLabelSearchedString );
    Spacer3 = new TQSpacerItem( 262, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout5->addItem( Spacer3 );

    KXESearchDialogBaseLayout->addMultiCellLayout( Layout5, 0, 0, 0, 1 );

    m_pEditSearchedString = new TQLineEdit( this, "m_pEditSearchedString" );

    KXESearchDialogBaseLayout->addMultiCellWidget( m_pEditSearchedString, 1, 1, 0, 1 );

    layout13 = new TQHBoxLayout( 0, 0, 6, "layout13"); 
    Spacer2 = new TQSpacerItem( 154, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout13->addItem( Spacer2 );

    m_pPushButtonFind = new TQPushButton( this, "m_pPushButtonFind" );
    layout13->addWidget( m_pPushButtonFind );

    m_pPushButtonCancel = new TQPushButton( this, "m_pPushButtonCancel" );
    layout13->addWidget( m_pPushButtonCancel );

    KXESearchDialogBaseLayout->addMultiCellLayout( layout13, 4, 4, 0, 1 );
    Spacer9 = new TQSpacerItem( 16, 131, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KXESearchDialogBaseLayout->addItem( Spacer9, 3, 1 );

    m_pGroupBoxSearchIn = new TQGroupBox( this, "m_pGroupBoxSearchIn" );
    m_pGroupBoxSearchIn->setColumnLayout(0, TQt::Vertical );
    m_pGroupBoxSearchIn->layout()->setSpacing( 6 );
    m_pGroupBoxSearchIn->layout()->setMargin( 11 );
    m_pGroupBoxSearchInLayout = new TQVBoxLayout( m_pGroupBoxSearchIn->layout() );
    m_pGroupBoxSearchInLayout->setAlignment( TQt::AlignTop );

    m_pCheckBoxElementNames = new TQCheckBox( m_pGroupBoxSearchIn, "m_pCheckBoxElementNames" );
    m_pGroupBoxSearchInLayout->addWidget( m_pCheckBoxElementNames );

    m_pCheckBoxAttributeNames = new TQCheckBox( m_pGroupBoxSearchIn, "m_pCheckBoxAttributeNames" );
    m_pGroupBoxSearchInLayout->addWidget( m_pCheckBoxAttributeNames );

    m_pCheckBoxAttributeValues = new TQCheckBox( m_pGroupBoxSearchIn, "m_pCheckBoxAttributeValues" );
    m_pGroupBoxSearchInLayout->addWidget( m_pCheckBoxAttributeValues );

    m_pCheckBoxContents = new TQCheckBox( m_pGroupBoxSearchIn, "m_pCheckBoxContents" );
    m_pGroupBoxSearchInLayout->addWidget( m_pCheckBoxContents );

    KXESearchDialogBaseLayout->addMultiCellWidget( m_pGroupBoxSearchIn, 2, 3, 0, 0 );

    layout23 = new TQHBoxLayout( 0, 0, 6, "layout23"); 
    spacer19 = new TQSpacerItem( 18, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout23->addItem( spacer19 );

    m_pCheckBoxMatchCase = new TQCheckBox( this, "m_pCheckBoxMatchCase" );
    layout23->addWidget( m_pCheckBoxMatchCase );
    spacer20 = new TQSpacerItem( 19, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout23->addItem( spacer20 );

    KXESearchDialogBaseLayout->addLayout( layout23, 2, 1 );
    languageChange();
    resize( TQSize(354, 244).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_pEditSearchedString, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( slotTextChanged(const TQString&) ) );
    connect( m_pPushButtonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( m_pPushButtonFind, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( m_pCheckBoxElementNames, TQ_SIGNAL( stateChanged(int) ), this, TQ_SLOT( slotFindInChanged() ) );
    connect( m_pCheckBoxAttributeNames, TQ_SIGNAL( stateChanged(int) ), this, TQ_SLOT( slotFindInChanged() ) );
    connect( m_pCheckBoxAttributeValues, TQ_SIGNAL( stateChanged(int) ), this, TQ_SLOT( slotFindInChanged() ) );
    connect( m_pCheckBoxContents, TQ_SIGNAL( stateChanged(int) ), this, TQ_SLOT( slotFindInChanged() ) );

    // tab order
    setTabOrder( m_pEditSearchedString, m_pCheckBoxElementNames );
    setTabOrder( m_pCheckBoxElementNames, m_pCheckBoxAttributeNames );
    setTabOrder( m_pCheckBoxAttributeNames, m_pCheckBoxAttributeValues );
    setTabOrder( m_pCheckBoxAttributeValues, m_pCheckBoxContents );
    setTabOrder( m_pCheckBoxContents, m_pCheckBoxMatchCase );
    setTabOrder( m_pCheckBoxMatchCase, m_pPushButtonFind );
    setTabOrder( m_pPushButtonFind, m_pPushButtonCancel );

    // buddies
    m_pTextLabelSearchedString->setBuddy( m_pEditSearchedString );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KXESearchDialogBase::languageChange()
{
    setCaption( tr2i18n( "Search" ) );
    m_pTextLabelSearchedString->setText( tr2i18n( "&Search string:" ) );
    TQWhatsThis::add( m_pTextLabelSearchedString, tr2i18n( "<b>Search string</b></br>\n"
"Here you can enter the string you want to search for in your XML document." ) );
    TQWhatsThis::add( m_pEditSearchedString, tr2i18n( "<b>Search string</b></br>\n"
"Here you can enter the string you want to search for in your XML document." ) );
    m_pPushButtonFind->setText( tr2i18n( "&Find" ) );
    m_pPushButtonCancel->setText( tr2i18n( "&Cancel" ) );
    m_pGroupBoxSearchIn->setTitle( tr2i18n( "Find &in" ) );
    TQWhatsThis::add( m_pGroupBoxSearchIn, tr2i18n( "<b>Find in</b>\n"
"<br/>\n"
"Here you can choose the parts of your XML document that should be inspected during the search. \n"
"<br/>\n"
"These are\n"
"<br/>\n"
"<br/>\n"
"<b><i>Element names</i></b><br/>\n"
"<b><i>Attribute names</i></b><br/>\n"
"<b><i>Attribute values</i></b><br/>\n"
"<b><i>Content</i></b>" ) );
    m_pCheckBoxElementNames->setText( tr2i18n( "Element names" ) );
    m_pCheckBoxAttributeNames->setText( tr2i18n( "Attribute names" ) );
    m_pCheckBoxAttributeValues->setText( tr2i18n( "Attribute values" ) );
    m_pCheckBoxContents->setText( tr2i18n( "Content" ) );
    m_pCheckBoxMatchCase->setText( tr2i18n( "&Match case" ) );
    TQWhatsThis::add( m_pCheckBoxMatchCase, tr2i18n( "<b>Match case</b><br/>\n"
"Check this for case sensitive search." ) );
}

void KXESearchDialogBase::slotFindInChanged()
{
    tqWarning( "KXESearchDialogBase::slotFindInChanged(): Not implemented yet" );
}

void KXESearchDialogBase::slotTextChanged(const TQString&)
{
    tqWarning( "KXESearchDialogBase::slotTextChanged(const TQString&): Not implemented yet" );
}

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

TQMetaObject *KXESearchDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KXESearchDialogBase( "KXESearchDialogBase", &KXESearchDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KXESearchDialogBase::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 TQUMethod slot_1 = {"slotFindInChanged", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"slotTextChanged", 1, param_slot_2 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotFindInChanged()", &slot_1, TQMetaData::Protected },
	{ "slotTextChanged(const TQString&)", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KXESearchDialogBase", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KXESearchDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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