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

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

#include "talkerchooserconfwidget.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    nameLabel = new TQLabel( this, "nameLabel" );
    nameLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout3->addWidget( nameLabel );

    nameLineEdit = new KLineEdit( this, "nameLineEdit" );
    layout3->addWidget( nameLineEdit );

    TalkerChooserConfWidgetLayout->addLayout( layout3, 0, 0 );

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

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

    reLabel = new TQLabel( applyGroupBox, "reLabel" );
    reLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout11->addWidget( reLabel );

    appIdLabel = new TQLabel( applyGroupBox, "appIdLabel" );
    appIdLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout11->addWidget( appIdLabel );

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

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

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

    reLineEdit = new KLineEdit( applyGroupBox, "reLineEdit" );
    layout12->addWidget( reLineEdit );

    reEditorButton = new KPushButton( applyGroupBox, "reEditorButton" );
    layout12->addWidget( reEditorButton );
    layout13->addLayout( layout12 );

    appIdLineEdit = new KLineEdit( applyGroupBox, "appIdLineEdit" );
    layout13->addWidget( appIdLineEdit );

    applyGroupBoxLayout->addLayout( layout13, 0, 1 );

    TalkerChooserConfWidgetLayout->addWidget( applyGroupBox, 1, 0 );

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

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

    talkerLineEdit = new KLineEdit( this, "talkerLineEdit" );
    talkerLineEdit->setEnabled( false );
    talkerLineEdit->setPaletteForegroundColor( TQColor( 0, 0, 0 ) );
    layout19_2->addWidget( talkerLineEdit );

    talkerButton = new KPushButton( this, "talkerButton" );
    layout19_2->addWidget( talkerButton );

    TalkerChooserConfWidgetLayout->addLayout( layout19_2, 2, 0 );

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

    loadButton = new KPushButton( this, "loadButton" );
    loadButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, loadButton->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( loadButton );

    saveButton = new KPushButton( this, "saveButton" );
    saveButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, saveButton->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( saveButton );

    clearButton = new KPushButton( this, "clearButton" );
    clearButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, clearButton->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( clearButton );

    TalkerChooserConfWidgetLayout->addLayout( layout6, 3, 0 );
    languageChange();
    resize( TQSize(547, 240).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( nameLineEdit, reLineEdit );
    setTabOrder( reLineEdit, reEditorButton );
    setTabOrder( reEditorButton, appIdLineEdit );

    // buddies
    nameLabel->setBuddy( nameLineEdit );
    reLabel->setBuddy( reLineEdit );
    appIdLabel->setBuddy( appIdLineEdit );
    talkerLabel->setBuddy( talkerLineEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TalkerChooserConfWidget::languageChange()
{
    setCaption( tr2i18n( "Configure Talker Chooser" ) );
    nameLabel->setText( tr2i18n( "&Name:" ) );
    TQWhatsThis::add( nameLabel, tr2i18n( "Enter any name you like for this filter.", "What's this text" ) );
    TQWhatsThis::add( nameLineEdit, tr2i18n( "Enter any name you like for this filter." ) );
    applyGroupBox->setTitle( tr2i18n( "&Apply This Filter When" ) );
    TQWhatsThis::add( applyGroupBox, tr2i18n( "These settings determines when the filter is applied to text." ) );
    reLabel->setText( tr2i18n( "Te&xt contains:" ) );
    TQWhatsThis::add( reLabel, tr2i18n( "This filter is applied to text jobs of the specified language.  You may select more than one language by clicking the browse button and Ctrl-clicking on more than one in the list.  If blank, the filter applies to all text jobs of any language.", "What's this text" ) );
    appIdLabel->setText( tr2i18n( "Application &ID contains:" ) );
    TQWhatsThis::add( appIdLabel, tr2i18n( "Enter a DCOP Application ID.  This filter will only apply to text jobs queued by that application.  You may enter more than one ID separated by commas.  If blank, this filter applies to text jobs queued by all applications.  Tip: Use kdcop from the command line to get the Application IDs of running applications.  Example: \"konversation, kvirc,ksirc,kopete\"" ) );
    TQWhatsThis::add( reLineEdit, tr2i18n( "This filter is applied to text jobs of the specified language.  You may select more than one language by clicking the browse button and Ctrl-clicking on more than one in the list.  If blank, the filter applies to all text jobs of any language." ) );
    reEditorButton->setText( tr2i18n( "..." ) );
    TQWhatsThis::add( reEditorButton, tr2i18n( "Click to select one or more languages.  This filter will be applied to text jobs of those languages." ) );
    TQWhatsThis::add( appIdLineEdit, tr2i18n( "<qt>Enter a DCOP Application ID.  This filter will only apply to text jobs queued by that application.  You may enter more than one ID separated by commas.  Use <b>knotify</b> to match all messages sent as TDE notifications.  If blank, this filter applies to text jobs queued by all applications.  Tip: Use kdcop from the command line to get the Application IDs of running applications.  Example: \"konversation, kvirc,ksirc,kopete\"</qt>" ) );
    talkerLabel->setText( tr2i18n( "&Talker:" ) );
    TQWhatsThis::add( talkerLabel, tr2i18n( "The new Talker that will be used when the conditions above are met.  The default Talker is the topmost in the Talkers tab.  Click the button to choose a Talker." ) );
    TQWhatsThis::add( talkerLineEdit, tr2i18n( "The new Talker that will be used when the conditions above are met.  The default Talker is the topmost in the Talkers tab.  Click the button to choose a Talker." ) );
    talkerButton->setText( tr2i18n( "..." ) );
    TQWhatsThis::add( talkerButton, tr2i18n( "Click to select a Talker." ) );
    loadButton->setText( tr2i18n( "&Load..." ) );
    TQWhatsThis::add( loadButton, tr2i18n( "Click to load a Talker Chooser configuration from a file.", "What's this text" ) );
    saveButton->setText( tr2i18n( "&Save..." ) );
    TQWhatsThis::add( saveButton, tr2i18n( "Click to save this Talker Chooser to a file.", "What's this text" ) );
    clearButton->setText( tr2i18n( "Cl&ear" ) );
    TQWhatsThis::add( clearButton, tr2i18n( "Click to clear everything.", "What's this text" ) );
}

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

TQMetaObject *TalkerChooserConfWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TalkerChooserConfWidget( "TalkerChooserConfWidget", &TalkerChooserConfWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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