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

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

#include "detectwidgetbase.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KWinInternal::DetectWidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KWinInternal::DetectWidgetBase::DetectWidgetBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "Form3" );
    Form3Layout = new TQGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "Form3Layout"); 
    spacer1 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Form3Layout->addMultiCell( spacer1, 9, 9, 0, 1 );

    textLabel11 = new TQLabel( this, "textLabel11" );

    Form3Layout->addWidget( textLabel11, 6, 0 );

    textLabel1 = new TQLabel( this, "textLabel1" );

    Form3Layout->addWidget( textLabel1, 2, 0 );

    textLabel3 = new TQLabel( this, "textLabel3" );

    Form3Layout->addWidget( textLabel3, 3, 0 );

    type_label = new TQLabel( this, "type_label" );

    Form3Layout->addWidget( type_label, 4, 1 );

    textLabel8 = new TQLabel( this, "textLabel8" );

    Form3Layout->addWidget( textLabel8, 5, 0 );

    class_label = new TQLabel( this, "class_label" );

    Form3Layout->addWidget( class_label, 2, 1 );

    role_label = new TQLabel( this, "role_label" );

    Form3Layout->addWidget( role_label, 3, 1 );

    title_label = new TQLabel( this, "title_label" );

    Form3Layout->addWidget( title_label, 5, 1 );

    machine_label = new TQLabel( this, "machine_label" );

    Form3Layout->addWidget( machine_label, 7, 1 );

    textLabel4 = new TQLabel( this, "textLabel4" );

    Form3Layout->addWidget( textLabel4, 4, 0 );

    extrarole_label = new TQLabel( this, "extrarole_label" );

    Form3Layout->addWidget( extrarole_label, 6, 1 );

    textLabel13 = new TQLabel( this, "textLabel13" );

    Form3Layout->addWidget( textLabel13, 7, 0 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    Form3Layout->addMultiCellWidget( line1, 1, 1, 0, 1 );

    textLabel9 = new TQLabel( this, "textLabel9" );

    Form3Layout->addMultiCellWidget( textLabel9, 0, 0, 0, 1 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( KDialog::spacingHint() );
    buttonGroup1->layout()->setMargin( KDialog::marginHint() );
    buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    use_class = new TQRadioButton( buttonGroup1, "use_class" );
    use_class->setChecked( true );
    buttonGroup1Layout->addWidget( use_class );

    use_role = new TQRadioButton( buttonGroup1, "use_role" );
    buttonGroup1Layout->addWidget( use_role );

    use_whole_class = new TQRadioButton( buttonGroup1, "use_whole_class" );
    buttonGroup1Layout->addWidget( use_whole_class );

    match_title = new TQCheckBox( buttonGroup1, "match_title" );
    buttonGroup1Layout->addWidget( match_title );

    Form3Layout->addMultiCellWidget( buttonGroup1, 8, 8, 0, 1 );
    languageChange();
    resize( TQSize(523, 325).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KWinInternal::DetectWidgetBase::languageChange()
{
    textLabel11->setText( tr2i18n( "Extra role:" ) );
    textLabel1->setText( tr2i18n( "Class:" ) );
    textLabel3->setText( tr2i18n( "Role:" ) );
    type_label->setText( TQString::null );
    textLabel8->setText( tr2i18n( "Title:" ) );
    class_label->setText( TQString::null );
    role_label->setText( TQString::null );
    title_label->setText( TQString::null );
    machine_label->setText( TQString::null );
    textLabel4->setText( tr2i18n( "Type:" ) );
    extrarole_label->setText( TQString::null );
    textLabel13->setText( tr2i18n( "Machine:" ) );
    textLabel9->setText( tr2i18n( "Information About Selected Window" ) );
    buttonGroup1->setTitle( TQString::null );
    use_class->setText( tr2i18n( "Use window &class (whole application)" ) );
    TQWhatsThis::add( use_class, tr2i18n( "For selecting all windows belonging to a specific application, selecting only window class should usually work." ) );
    use_role->setText( tr2i18n( "Use window class and window &role (specific window)" ) );
    TQWhatsThis::add( use_role, tr2i18n( "For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though." ) );
    use_whole_class->setText( tr2i18n( "Use &whole window class (specific window)" ) );
    TQWhatsThis::add( use_whole_class, tr2i18n( "With some (non-TDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role." ) );
    match_title->setText( tr2i18n( "Match also window &title" ) );
}

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

TQMetaObject *KWinInternal::DetectWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KWinInternal__DetectWidgetBase( "KWinInternal::DetectWidgetBase", &KWinInternal::DetectWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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