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

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

#include "kaddstringdlgs.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqtextedit.h>
#include <ntqwidgetstack.h>
#include <ntqwidget.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KAddStringDlgS 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.
 */
KAddStringDlgS::KAddStringDlgS( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KAddStringDlgS" );
    setSizeGripEnabled( true );
    KAddStringDlgSLayout = new TQGridLayout( this, 1, 1, 11, 6, "KAddStringDlgSLayout"); 

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

    bgChoose = new TQButtonGroup( this, "bgChoose" );
    bgChoose->setExclusive( true );
    bgChoose->setColumnLayout(0, TQt::Vertical );
    bgChoose->layout()->setSpacing( 6 );
    bgChoose->layout()->setMargin( 11 );
    bgChooseLayout = new TQGridLayout( bgChoose->layout() );
    bgChooseLayout->setAlignment( TQt::AlignTop );

    m_rbSearchReplace = new TQRadioButton( bgChoose, "m_rbSearchReplace" );

    bgChooseLayout->addWidget( m_rbSearchReplace, 1, 0 );

    m_rbSearchOnly = new TQRadioButton( bgChoose, "m_rbSearchOnly" );
    m_rbSearchOnly->setChecked( true );

    bgChooseLayout->addWidget( m_rbSearchOnly, 0, 0 );
    layout14->addWidget( bgChoose );

    frame4 = new TQFrame( this, "frame4" );
    frame4->setFrameShape( TQFrame::StyledPanel );
    frame4->setFrameShadow( TQFrame::Raised );
    frame4Layout = new TQGridLayout( frame4, 1, 1, 11, 6, "frame4Layout"); 

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

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

    m_tlSearch = new TQLabel( frame4, "m_tlSearch" );
    layout13->addWidget( m_tlSearch );

    m_edSearch = new TQTextEdit( frame4, "m_edSearch" );
    m_edSearch->setTextFormat( TQTextEdit::PlainText );
    layout13->addWidget( m_edSearch );
    layout11->addLayout( layout13 );

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

    m_tlReplace = new TQLabel( frame4, "m_tlReplace" );
    m_tlReplace->setEnabled( false );
    layout14_2->addWidget( m_tlReplace );

    m_edReplace = new TQTextEdit( frame4, "m_edReplace" );
    m_edReplace->setEnabled( false );
    m_edReplace->setTextFormat( TQTextEdit::PlainText );
    m_edReplace->setAutoFormatting( int( TQTextEdit::AutoAll ) );
    layout14_2->addWidget( m_edReplace );
    layout11->addLayout( layout14_2 );

    frame4Layout->addLayout( layout11, 0, 0 );

    layout16 = new TQVBoxLayout( 0, 0, 6, "layout16"); 
    spacer8 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout16->addItem( spacer8 );

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

    m_pbDel = new TQPushButton( frame4, "m_pbDel" );
    m_pbDel->setMaximumSize( TQSize( 30, 32767 ) );
    layout15->addWidget( m_pbDel );

    m_pbAdd = new TQPushButton( frame4, "m_pbAdd" );
    m_pbAdd->setMaximumSize( TQSize( 30, 32767 ) );
    m_pbAdd->setFlat( false );
    layout15->addWidget( m_pbAdd );
    layout16->addLayout( layout15 );
    spacer9 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout16->addItem( spacer9 );

    frame4Layout->addLayout( layout16, 0, 1 );

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

    WStackPage = new TQWidget( m_stack, "WStackPage" );
    WStackPageLayout = new TQGridLayout( WStackPage, 1, 1, 0, 6, "WStackPageLayout"); 

    m_stringView_2 = new TQListView( WStackPage, "m_stringView_2" );
    m_stringView_2->addColumn( tr2i18n( "Search For" ) );
    m_stringView_2->setAllColumnsShowFocus( true );
    m_stringView_2->setShowSortIndicator( false );
    m_stringView_2->setResizeMode( TQListView::AllColumns );

    WStackPageLayout->addWidget( m_stringView_2, 0, 0 );
    m_stack->addWidget( WStackPage, 0 );

    WStackPage_2 = new TQWidget( m_stack, "WStackPage_2" );
    WStackPageLayout_2 = new TQGridLayout( WStackPage_2, 1, 1, 0, 6, "WStackPageLayout_2"); 

    m_stringView = new TQListView( WStackPage_2, "m_stringView" );
    m_stringView->addColumn( tr2i18n( "Search For" ) );
    m_stringView->addColumn( tr2i18n( "Replace With" ) );
    m_stringView->setAllColumnsShowFocus( true );
    m_stringView->setShowSortIndicator( false );
    m_stringView->setResizeMode( TQListView::AllColumns );

    WStackPageLayout_2->addWidget( m_stringView, 0, 0 );
    m_stack->addWidget( WStackPage_2, 1 );

    frame4Layout->addWidget( m_stack, 0, 2 );
    layout14->addWidget( frame4 );

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

    m_pbHelp = new TQPushButton( this, "m_pbHelp" );
    m_pbHelp->setEnabled( true );
    layout2->addWidget( m_pbHelp );
    spacer1 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );

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

    m_pbOK = new TQPushButton( this, "m_pbOK" );
    layout1->addWidget( m_pbOK );

    m_pbCancel = new TQPushButton( this, "m_pbCancel" );
    layout1->addWidget( m_pbCancel );
    layout2->addLayout( layout1 );
    layout14->addLayout( layout2 );

    KAddStringDlgSLayout->addLayout( layout14, 0, 0 );
    languageChange();
    resize( TQSize(586, 347).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_pbCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KAddStringDlgS::languageChange()
{
    setCaption( tr2i18n( "Insert Searching/Replacing Strings" ) );
    bgChoose->setTitle( tr2i18n( "Choose String Adding Mode" ) );
    m_rbSearchReplace->setText( tr2i18n( "Search and replace mode" ) );
    m_rbSearchOnly->setText( tr2i18n( "Search only mode" ) );
    m_tlSearch->setText( tr2i18n( "Search for:" ) );
    m_tlReplace->setText( tr2i18n( "Replace with:" ) );
    m_pbDel->setText( TQString::null );
    m_pbAdd->setText( TQString::null );
    m_stringView_2->header()->setLabel( 0, tr2i18n( "Search For" ) );
    m_stringView->header()->setLabel( 0, tr2i18n( "Search For" ) );
    m_stringView->header()->setLabel( 1, tr2i18n( "Replace With" ) );
    m_pbHelp->setText( tr2i18n( "&Help" ) );
    m_pbOK->setText( tr2i18n( "&OK" ) );
    m_pbCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *KAddStringDlgS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KAddStringDlgS( "KAddStringDlgS", &KAddStringDlgS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KAddStringDlgS::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(
	"KAddStringDlgS", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KAddStringDlgS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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