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

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

#include "FilterRuleWidget.h"

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

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

    Layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout9"); 

    InsertButton = new TQPushButton( this, "InsertButton" );

    Layout9->addWidget( InsertButton, 1, 1 );

    DeleteButton = new TQPushButton( this, "DeleteButton" );

    Layout9->addWidget( DeleteButton, 0, 0 );

    NewButton = new TQPushButton( this, "NewButton" );

    Layout9->addWidget( NewButton, 1, 0 );

    ModifyButton = new TQPushButton( this, "ModifyButton" );

    Layout9->addWidget( ModifyButton, 0, 1 );

    FilterRuleWidgetLayout->addLayout( Layout9, 1, 1 );

    Layout3 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout3"); 

    DownButton = new TQPushButton( this, "DownButton" );
    DownButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, DownButton->sizePolicy().hasHeightForWidth() ) );

    Layout3->addWidget( DownButton, 1, 1 );

    UpButton = new TQPushButton( this, "UpButton" );
    UpButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, UpButton->sizePolicy().hasHeightForWidth() ) );

    Layout3->addWidget( UpButton, 1, 0 );

    RuleList = new TQListBox( this, "RuleList" );
    RuleList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, RuleList->sizePolicy().hasHeightForWidth() ) );

    Layout3->addMultiCellWidget( RuleList, 0, 0, 0, 2 );
    Spacer3 = new TQSpacerItem( 0, 0, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    Layout3->addItem( Spacer3, 1, 2 );

    FilterRuleWidgetLayout->addMultiCellLayout( Layout3, 0, 1, 0, 0 );

    GroupBox1 = new TQGroupBox( this, "GroupBox1" );
    GroupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
    GroupBox1->setColumnLayout(0, TQt::Vertical );
    GroupBox1->layout()->setSpacing( 6 );
    GroupBox1->layout()->setMargin( 11 );
    GroupBox1Layout = new TQGridLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( TQt::AlignTop );

    LineTitle = new TQLineEdit( GroupBox1, "LineTitle" );

    GroupBox1Layout->addWidget( LineTitle, 0, 1 );

    TextLabel1 = new TQLabel( GroupBox1, "TextLabel1" );

    GroupBox1Layout->addWidget( TextLabel1, 0, 0 );

    TextLabel4 = new TQLabel( GroupBox1, "TextLabel4" );

    GroupBox1Layout->addWidget( TextLabel4, 3, 0 );

    LineTo = new TQLineEdit( GroupBox1, "LineTo" );

    GroupBox1Layout->addWidget( LineTo, 3, 1 );

    LineSearch = new TQLineEdit( GroupBox1, "LineSearch" );

    GroupBox1Layout->addWidget( LineSearch, 1, 1 );

    LineFrom = new TQLineEdit( GroupBox1, "LineFrom" );

    GroupBox1Layout->addWidget( LineFrom, 2, 1 );

    TextLabel2 = new TQLabel( GroupBox1, "TextLabel2" );

    GroupBox1Layout->addWidget( TextLabel2, 1, 0 );

    TextLabel3 = new TQLabel( GroupBox1, "TextLabel3" );

    GroupBox1Layout->addWidget( TextLabel3, 2, 0 );

    FilterRuleWidgetLayout->addWidget( GroupBox1, 0, 1 );
    languageChange();
    resize( TQSize(541, 229).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    TextLabel1->setBuddy( LineTitle );
    TextLabel4->setBuddy( LineTo );
    TextLabel2->setBuddy( LineSearch );
    TextLabel3->setBuddy( LineFrom );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FilterRuleWidget::languageChange()
{
    InsertButton->setText( tr2i18n( "&Insert" ) );
    DeleteButton->setText( tr2i18n( "&Delete" ) );
    NewButton->setText( tr2i18n( "&New" ) );
    ModifyButton->setText( tr2i18n( "&Modify" ) );
    DownButton->setText( TQString::null );
    UpButton->setText( TQString::null );
    GroupBox1->setTitle( tr2i18n( "Details" ) );
    TextLabel1->setText( tr2i18n( "D&escription:" ) );
    TextLabel4->setText( tr2i18n( "&To:" ) );
    TextLabel2->setText( tr2i18n( "M&atch:" ) );
    TextLabel3->setText( tr2i18n( "&From:" ) );
}

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

TQMetaObject *FilterRuleWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FilterRuleWidget( "FilterRuleWidget", &FilterRuleWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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