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

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

#include "highlightprefsbase.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqbuttongroup.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)3, 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 );

    m_add = new TQPushButton( groupBox1, "m_add" );

    groupBox1Layout->addWidget( m_add, 1, 0 );

    m_remove = new TQPushButton( groupBox1, "m_remove" );
    m_remove->setEnabled( false );

    groupBox1Layout->addWidget( m_remove, 1, 1 );

    m_rename = new TQPushButton( groupBox1, "m_rename" );
    m_rename->setEnabled( false );

    groupBox1Layout->addWidget( m_rename, 1, 2 );

    m_list = new TDEListView( groupBox1, "m_list" );
    m_list->addColumn( tr2i18n( "Filters" ) );
    m_list->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_list->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addMultiCellWidget( m_list, 0, 0, 0, 2 );
    HighlighPrefsUILayout->addWidget( groupBox1 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, groupBox2->sizePolicy().hasHeightForWidth() ) );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( groupBox2, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    groupBox2Layout->addWidget( textLabel1 );

    m_search = new KLineEdit( groupBox2, "m_search" );
    groupBox2Layout->addWidget( m_search );

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

    m_regexp = new TQCheckBox( groupBox2, "m_regexp" );
    layout3->addWidget( m_regexp );

    m_editregexp = new TQPushButton( groupBox2, "m_editregexp" );
    m_editregexp->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_editregexp->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( m_editregexp );
    spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer3 );
    groupBox2Layout->addLayout( layout3 );

    m_case = new TQCheckBox( groupBox2, "m_case" );
    groupBox2Layout->addWidget( m_case );
    HighlighPrefsUILayout->addWidget( groupBox2 );

    buttonGroup2 = new TQButtonGroup( this, "buttonGroup2" );
    buttonGroup2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, buttonGroup2->sizePolicy().hasHeightForWidth() ) );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQVBoxLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

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

    m_setImportance = new TQCheckBox( buttonGroup2, "m_setImportance" );
    m_setImportance->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_setImportance->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( m_setImportance );

    m_importance = new KComboBox( false, buttonGroup2, "m_importance" );
    m_importance->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, m_importance->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( m_importance );
    spacer4 = new TQSpacerItem( 31, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer4 );
    buttonGroup2Layout->addLayout( layout4 );

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

    m_setBG = new TQCheckBox( buttonGroup2, "m_setBG" );
    layout5->addWidget( m_setBG );

    m_BG = new KColorButton( buttonGroup2, "m_BG" );
    m_BG->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_BG->sizePolicy().hasHeightForWidth() ) );
    layout5->addWidget( m_BG );
    spacer5 = new TQSpacerItem( 31, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer5 );
    buttonGroup2Layout->addLayout( layout5 );

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

    m_setFG = new TQCheckBox( buttonGroup2, "m_setFG" );
    layout6->addWidget( m_setFG );

    m_FG = new KColorButton( buttonGroup2, "m_FG" );
    m_FG->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_FG->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( m_FG );
    spacer6 = new TQSpacerItem( 41, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer6 );
    buttonGroup2Layout->addLayout( layout6 );

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

    m_sound = new TQCheckBox( buttonGroup2, "m_sound" );
    layout7->addWidget( m_sound );

    m_soundFN = new KURLRequester( buttonGroup2, "m_soundFN" );
    layout7->addWidget( m_soundFN );
    buttonGroup2Layout->addLayout( layout7 );

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

    m_raise = new TQCheckBox( buttonGroup2, "m_raise" );
    layout8->addWidget( m_raise );
    buttonGroup2Layout->addLayout( layout8 );
    HighlighPrefsUILayout->addWidget( buttonGroup2 );
    languageChange();
    resize( TQSize(513, 504).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_list, m_add );
    setTabOrder( m_add, m_remove );
    setTabOrder( m_remove, m_rename );
    setTabOrder( m_rename, m_search );
    setTabOrder( m_search, m_regexp );
    setTabOrder( m_regexp, m_editregexp );
    setTabOrder( m_editregexp, m_case );
    setTabOrder( m_case, m_setImportance );
    setTabOrder( m_setImportance, m_importance );
    setTabOrder( m_importance, m_setBG );
    setTabOrder( m_setBG, m_BG );
    setTabOrder( m_BG, m_setFG );
    setTabOrder( m_setFG, m_FG );
    setTabOrder( m_FG, m_sound );
    setTabOrder( m_sound, m_soundFN );
    setTabOrder( m_soundFN, m_raise );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void HighlightPrefsUI::languageChange()
{
    setCaption( tr2i18n( "HighlighPrefsUI" ) );
    groupBox1->setTitle( tr2i18n( "Available Filters" ) );
    m_add->setText( tr2i18n( "Add" ) );
    m_remove->setText( tr2i18n( "Remove" ) );
    m_rename->setText( tr2i18n( "Rename..." ) );
    m_list->header()->setLabel( 0, tr2i18n( "Filters" ) );
    groupBox2->setTitle( tr2i18n( "Criteria" ) );
    textLabel1->setText( tr2i18n( "If the message contains:" ) );
    m_regexp->setText( tr2i18n( "Regular expression" ) );
    m_editregexp->setText( tr2i18n( "Edit..." ) );
    m_case->setText( tr2i18n( "Case sensitive" ) );
    buttonGroup2->setTitle( tr2i18n( "Action" ) );
    m_setImportance->setText( tr2i18n( "Set the message importance to:" ) );
    m_importance->clear();
    m_importance->insertItem( tr2i18n( "Low" ) );
    m_importance->insertItem( tr2i18n( "Normal" ) );
    m_importance->insertItem( tr2i18n( "Highlight" ) );
    m_setBG->setText( tr2i18n( "Change the background color to:" ) );
    m_BG->setText( TQString::null );
    m_setFG->setText( tr2i18n( "Change the foreground color to:" ) );
    m_FG->setText( TQString::null );
    m_sound->setText( tr2i18n( "Play a sound:" ) );
    m_raise->setText( tr2i18n( "Raise window" ) );
}

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

TQMetaObject *HighlightPrefsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_HighlightPrefsUI( "HighlightPrefsUI", &HighlightPrefsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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