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

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

#include "autoreplaceprefs.h"

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

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

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

    DotEndSentence = new TQCheckBox( gb_sentences, "DotEndSentence" );
    gb_sentencesLayout->addWidget( DotEndSentence );

    CapitalizeBeginningSentence = new TQCheckBox( gb_sentences, "CapitalizeBeginningSentence" );
    gb_sentencesLayout->addWidget( CapitalizeBeginningSentence );

    AutoReplacePrefsUILayout->addWidget( gb_sentences, 0, 0 );

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

    AutoReplaceIncoming = new TQCheckBox( gb_options, "AutoReplaceIncoming" );
    gb_optionsLayout->addWidget( AutoReplaceIncoming );

    AutoReplaceOutgoing = new TQCheckBox( gb_options, "AutoReplaceOutgoing" );
    AutoReplaceOutgoing->setChecked( true );
    gb_optionsLayout->addWidget( AutoReplaceOutgoing );

    AutoReplacePrefsUILayout->addWidget( gb_options, 2, 0 );

    replacementsGroup = new TQGroupBox( this, "replacementsGroup" );
    replacementsGroup->setColumnLayout(0, TQt::Vertical );
    replacementsGroup->layout()->setSpacing( 6 );
    replacementsGroup->layout()->setMargin( 11 );
    replacementsGroupLayout = new TQGridLayout( replacementsGroup->layout() );
    replacementsGroupLayout->setAlignment( TQt::AlignTop );

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

    m_add = new TQPushButton( replacementsGroup, "m_add" );
    m_add->setEnabled( true );
    m_add->setOn( false );
    layout5->addWidget( m_add );

    m_edit = new TQPushButton( replacementsGroup, "m_edit" );
    m_edit->setEnabled( false );
    m_edit->setOn( false );
    layout5->addWidget( m_edit );
    spacer1 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout5->addItem( spacer1 );

    m_remove = new TQPushButton( replacementsGroup, "m_remove" );
    m_remove->setEnabled( false );
    layout5->addWidget( m_remove );

    replacementsGroupLayout->addMultiCellLayout( layout5, 1, 2, 1, 1 );

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

    textLabel1 = new TQLabel( replacementsGroup, "textLabel1" );
    layout1->addWidget( textLabel1 );

    m_key = new TQLineEdit( replacementsGroup, "m_key" );
    layout1->addWidget( m_key );

    textLabel2 = new TQLabel( replacementsGroup, "textLabel2" );
    layout1->addWidget( textLabel2 );

    m_value = new TQLineEdit( replacementsGroup, "m_value" );
    layout1->addWidget( m_value );

    replacementsGroupLayout->addMultiCellLayout( layout1, 0, 0, 0, 1 );

    m_list = new TQListView( replacementsGroup, "m_list" );
    m_list->setSelectionMode( TQListView::Single );
    m_list->setAllColumnsShowFocus( true );
    m_list->setShowSortIndicator( true );

    replacementsGroupLayout->addWidget( m_list, 2, 0 );

    AutoReplacePrefsUILayout->addWidget( replacementsGroup, 1, 0 );
    languageChange();
    resize( TQSize(458, 378).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel1->setBuddy( m_key );
    textLabel2->setBuddy( m_value );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AutoReplacePrefsUI::languageChange()
{
    gb_sentences->setTitle( tr2i18n( "Sentence Options" ) );
    DotEndSentence->setText( tr2i18n( "Add a dot at the end of each sent line" ) );
    CapitalizeBeginningSentence->setText( tr2i18n( "Start each sent line with a capital letter" ) );
    gb_options->setTitle( tr2i18n( "Replacement Options" ) );
    AutoReplaceIncoming->setText( tr2i18n( "Auto replace on incoming messages" ) );
    AutoReplaceOutgoing->setText( tr2i18n( "Auto replace on outgoing messages" ) );
    replacementsGroup->setTitle( tr2i18n( "Replacements List" ) );
    m_add->setText( tr2i18n( "&Add" ) );
    m_edit->setText( tr2i18n( "&Edit" ) );
    m_remove->setText( tr2i18n( "&Remove" ) );
    textLabel1->setText( tr2i18n( "Te&xt:" ) );
    textLabel2->setText( tr2i18n( "Re&placement:" ) );
}

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

TQMetaObject *AutoReplacePrefsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AutoReplacePrefsUI( "AutoReplacePrefsUI", &AutoReplacePrefsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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