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

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

#include "windowdef_simple_widget_ui.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    comment_label = new TQLabel( this, "comment_label" );
    Windowdef_simple_widget_uiLayout->addWidget( comment_label );

    comment_lineedit = new TQLineEdit( this, "comment_lineedit" );
    Windowdef_simple_widget_uiLayout->addWidget( comment_lineedit );
    Spacer3 = new TQSpacerItem( 0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Windowdef_simple_widget_uiLayout->addItem( Spacer3 );

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

    window_title_label = new TQLabel( this, "window_title_label" );
    Layout1->addWidget( window_title_label );

    window_title_combo = new TQComboBox( false, this, "window_title_combo" );
    Layout1->addWidget( window_title_combo );
    Windowdef_simple_widget_uiLayout->addLayout( Layout1 );

    window_title_lineedit = new TQLineEdit( this, "window_title_lineedit" );
    Windowdef_simple_widget_uiLayout->addWidget( window_title_lineedit );
    Spacer5 = new TQSpacerItem( 0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Windowdef_simple_widget_uiLayout->addItem( Spacer5 );

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

    window_class_label = new TQLabel( this, "window_class_label" );
    Layout2->addWidget( window_class_label );

    window_class_combo = new TQComboBox( false, this, "window_class_combo" );
    Layout2->addWidget( window_class_combo );
    Windowdef_simple_widget_uiLayout->addLayout( Layout2 );

    window_class_lineedit = new TQLineEdit( this, "window_class_lineedit" );
    Windowdef_simple_widget_uiLayout->addWidget( window_class_lineedit );
    Spacer7 = new TQSpacerItem( 0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Windowdef_simple_widget_uiLayout->addItem( Spacer7 );

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

    window_role_label = new TQLabel( this, "window_role_label" );
    Layout3->addWidget( window_role_label );

    window_role_combo = new TQComboBox( false, this, "window_role_combo" );
    Layout3->addWidget( window_role_combo );
    Windowdef_simple_widget_uiLayout->addLayout( Layout3 );

    window_role_lineedit = new TQLineEdit( this, "window_role_lineedit" );
    Windowdef_simple_widget_uiLayout->addWidget( window_role_lineedit );
    Spacer15 = new TQSpacerItem( 0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Windowdef_simple_widget_uiLayout->addItem( Spacer15 );

    Layout6 = new TQHBoxLayout( 0, 0, 6, "Layout6"); 
    Spacer13 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout6->addItem( Spacer13 );

    autodetect_button = new TQPushButton( this, "autodetect_button" );
    Layout6->addWidget( autodetect_button );
    Spacer14 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout6->addItem( Spacer14 );
    Windowdef_simple_widget_uiLayout->addLayout( Layout6 );
    Spacer7_2 = new TQSpacerItem( 0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Windowdef_simple_widget_uiLayout->addItem( Spacer7_2 );

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

    type_normal_checkbox = new TQCheckBox( window_types_groupbox, "type_normal_checkbox" );

    window_types_groupboxLayout->addWidget( type_normal_checkbox, 0, 0 );

    type_dialog_checkbox = new TQCheckBox( window_types_groupbox, "type_dialog_checkbox" );

    window_types_groupboxLayout->addWidget( type_dialog_checkbox, 1, 0 );

    type_desktop_checkbox = new TQCheckBox( window_types_groupbox, "type_desktop_checkbox" );

    window_types_groupboxLayout->addWidget( type_desktop_checkbox, 1, 1 );

    type_dock_checkbox = new TQCheckBox( window_types_groupbox, "type_dock_checkbox" );

    window_types_groupboxLayout->addWidget( type_dock_checkbox, 0, 1 );
    Windowdef_simple_widget_uiLayout->addWidget( window_types_groupbox );
    languageChange();
    resize( TQSize(588, 497).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( window_class_combo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( window_class_combo_changed(int) ) );
    connect( window_role_combo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( window_role_combo_changed(int) ) );
    connect( window_title_combo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( window_title_combo_changed(int) ) );

    // tab order
    setTabOrder( comment_lineedit, window_title_combo );
    setTabOrder( window_title_combo, window_title_lineedit );
    setTabOrder( window_title_lineedit, window_class_combo );
    setTabOrder( window_class_combo, window_class_lineedit );
    setTabOrder( window_class_lineedit, window_role_combo );
    setTabOrder( window_role_combo, window_role_lineedit );
    setTabOrder( window_role_lineedit, autodetect_button );

    // buddies
    comment_label->setBuddy( comment_lineedit );
    window_title_label->setBuddy( window_title_lineedit );
    window_class_label->setBuddy( window_class_lineedit );
    window_role_label->setBuddy( window_role_lineedit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KHotKeys::Windowdef_simple_widget_ui::languageChange()
{
    comment_label->setText( tr2i18n( "&Comment:" ) );
    window_title_label->setText( tr2i18n( "Window &title:" ) );
    window_title_combo->clear();
    window_title_combo->insertItem( tr2i18n( "Is Not Important" ) );
    window_title_combo->insertItem( tr2i18n( "Contains" ) );
    window_title_combo->insertItem( tr2i18n( "Is" ) );
    window_title_combo->insertItem( tr2i18n( "Matches Regular Expression" ) );
    window_title_combo->insertItem( tr2i18n( "Does Not Contain" ) );
    window_title_combo->insertItem( tr2i18n( "Is Not" ) );
    window_title_combo->insertItem( tr2i18n( "Does Not Match Regular Expression" ) );
    window_class_label->setText( tr2i18n( "Window c&lass:" ) );
    window_class_combo->clear();
    window_class_combo->insertItem( tr2i18n( "Is Not Important" ) );
    window_class_combo->insertItem( tr2i18n( "Contains" ) );
    window_class_combo->insertItem( tr2i18n( "Is" ) );
    window_class_combo->insertItem( tr2i18n( "Matches Regular Expression" ) );
    window_class_combo->insertItem( tr2i18n( "Does Not Contain" ) );
    window_class_combo->insertItem( tr2i18n( "Is Not" ) );
    window_class_combo->insertItem( tr2i18n( "Does Not Match Regular Expression" ) );
    window_role_label->setText( tr2i18n( "Window &role:" ) );
    window_role_combo->clear();
    window_role_combo->insertItem( tr2i18n( "Is Not Important" ) );
    window_role_combo->insertItem( tr2i18n( "Contains" ) );
    window_role_combo->insertItem( tr2i18n( "Is" ) );
    window_role_combo->insertItem( tr2i18n( "Matches Regular Expression" ) );
    window_role_combo->insertItem( tr2i18n( "Does Not Contain" ) );
    window_role_combo->insertItem( tr2i18n( "Is Not" ) );
    window_role_combo->insertItem( tr2i18n( "Does Not Match Regular Expression" ) );
    autodetect_button->setText( tr2i18n( "&Autodetect" ) );
    window_types_groupbox->setTitle( tr2i18n( "Window Types" ) );
    type_normal_checkbox->setText( tr2i18n( "Normal" ) );
    type_dialog_checkbox->setText( tr2i18n( "Dialog" ) );
    type_desktop_checkbox->setText( tr2i18n( "Desktop" ) );
    type_dock_checkbox->setText( tr2i18n( "Dock" ) );
}

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

TQMetaObject *KHotKeys::Windowdef_simple_widget_ui::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KHotKeys__Windowdef_simple_widget_ui( "KHotKeys::Windowdef_simple_widget_ui", &KHotKeys::Windowdef_simple_widget_ui::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KHotKeys::Windowdef_simple_widget_ui::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 TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"window_class_combo_changed", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"window_role_combo_changed", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"window_title_combo_changed", 1, param_slot_3 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "window_class_combo_changed(int)", &slot_1, TQMetaData::Protected },
	{ "window_role_combo_changed(int)", &slot_2, TQMetaData::Protected },
	{ "window_title_combo_changed(int)", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KHotKeys::Windowdef_simple_widget_ui", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KHotKeys__Windowdef_simple_widget_ui.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KHotKeys::Windowdef_simple_widget_ui::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: window_class_combo_changed((int)static_QUType_int.get(_o+1)); break;
    case 2: window_role_combo_changed((int)static_QUType_int.get(_o+1)); break;
    case 3: window_title_combo_changed((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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