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

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

#include "xmltransformerconfwidget.h"

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

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

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

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

    xsltPath = new KURLRequester( this, "xsltPath" );
    layout5->addWidget( xsltPath );

    xsltprocPath = new KURLRequester( this, "xsltprocPath" );
    layout5->addWidget( xsltprocPath );

    XmlTransformerConfWidgetLayout->addLayout( layout5, 0, 1 );

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

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

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

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

    XmlTransformerConfWidgetLayout->addLayout( layout6, 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 );

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

    rootElementLineEdit = new KLineEdit( applyGroupBox, "rootElementLineEdit" );
    layout6_2->addWidget( rootElementLineEdit );

    doctypeLineEdit = new KLineEdit( applyGroupBox, "doctypeLineEdit" );
    layout6_2->addWidget( doctypeLineEdit );

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

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

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

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

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

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

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

    XmlTransformerConfWidgetLayout->addMultiCellWidget( applyGroupBox, 1, 1, 0, 1 );
    languageChange();
    resize( TQSize(548, 256).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    nameLabel->setBuddy( nameLineEdit );
    xsltLabel->setBuddy( xsltPath );
    xsltprocLabel->setBuddy( xsltprocPath );
    rootElementLabel->setBuddy( rootElementLineEdit );
    doctypeLabel->setBuddy( doctypeLineEdit );
    appIdLabel->setBuddy( appIdLineEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void XmlTransformerConfWidget::languageChange()
{
    setCaption( tr2i18n( "Configure XML Transformer" ) );
    TQWhatsThis::add( nameLineEdit, tr2i18n( "Enter any descriptive name you like for this filter." ) );
    TQWhatsThis::add( xsltPath, tr2i18n( "Enter the full path to an XML Style Language - Transforms (XSLT) stylesheet file.  XSLT files usually end with extension .xsl." ) );
    xsltprocPath->setProperty( "url", tr2i18n( "xsltproc" ) );
    TQWhatsThis::add( xsltprocPath, tr2i18n( "Enter the path to the xsltproc executable program.  If it is in the PATH environment variable, just enter \"xsltproc\"." ) );
    nameLabel->setText( tr2i18n( "&Name:" ) );
    TQWhatsThis::add( nameLabel, tr2i18n( "Enter any descriptive name you like for this filter.", "What's this text" ) );
    xsltLabel->setText( tr2i18n( "&XSLT file:" ) );
    TQWhatsThis::add( xsltLabel, tr2i18n( "Enter the full path to an XML Style Language - Transforms (XSLT) stylesheet file.  XSLT files usually end with extension .xsl." ) );
    xsltprocLabel->setText( tr2i18n( "xsltproc &executable:" ) );
    TQWhatsThis::add( xsltprocLabel, tr2i18n( "Enter the path to the xsltproc executable program.  If it is in the PATH environment variable, just enter \"xsltproc\"." ) );
    applyGroupBox->setTitle( tr2i18n( "Apply This &Filter When" ) );
    TQWhatsThis::add( applyGroupBox, tr2i18n( "These settings determines when the filter is applied to text." ) );
    TQWhatsThis::add( rootElementLineEdit, tr2i18n( "This filter will be applied only to text having the specified XML root element.  If blank, applies to all text.  You may enter more than one root element separated by commas.  Example: \"html\"." ) );
    TQWhatsThis::add( doctypeLineEdit, tr2i18n( "This filter will be applied only to text having the specified DOCTYPE specification.  If blank, applies to all text.  You may enter more than one DOCTYPE separated by commas.  Example: \"xhtml\"." ) );
    TQWhatsThis::add( appIdLineEdit, tr2i18n( "<qt>Enter a DCOP Application ID.  This filter will only apply to text 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 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>" ) );
    rootElementLabel->setText( tr2i18n( "&Root element is:" ) );
    TQWhatsThis::add( rootElementLabel, tr2i18n( "This filter will be applied only to text having the specified XML root element.  If blank, applies to all text.  You may enter more than one root element separated by commas.  Example: \"html\".", "What's this text" ) );
    doctypeLabel->setText( tr2i18n( "or DOC&TYPE is:" ) );
    TQWhatsThis::add( doctypeLabel, tr2i18n( "This filter will be applied only to text having the specified DOCTYPE specification.  If blank, applies to all text.  You may enter more than one DOCTYPE separated by commas.  Example: \"xhtml\"." ) );
    appIdLabel->setText( tr2i18n( "and Application &ID contains:" ) );
    TQWhatsThis::add( appIdLabel, tr2i18n( "<qt>Enter a DCOP Application ID.  This filter will only apply to text 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 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>" ) );
}

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

TQMetaObject *XmlTransformerConfWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_XmlTransformerConfWidget( "XmlTransformerConfWidget", &XmlTransformerConfWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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