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

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

#include "conditionalbreakpointdialogs.h"

#include <ntqvariant.h>
#include <kled.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ConditionalBreakpointDialogS as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
ConditionalBreakpointDialogS::ConditionalBreakpointDialogS( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "ConditionalBreakpointDialogS" );
    setSizeGripEnabled( true );
    ConditionalBreakpointDialogSLayout = new TQGridLayout( this, 1, 1, 11, 6, "ConditionalBreakpointDialogSLayout"); 

    lblExpression = new TQLabel( this, "lblExpression" );
    lblExpression->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, lblExpression->sizePolicy().hasHeightForWidth() ) );

    ConditionalBreakpointDialogSLayout->addWidget( lblExpression, 0, 0 );

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

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );

    ConditionalBreakpointDialogSLayout->addMultiCellLayout( Layout1, 4, 4, 0, 2 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    radioOnTrue = new TQRadioButton( buttonGroup1, "radioOnTrue" );

    buttonGroup1Layout->addWidget( radioOnTrue, 0, 0 );

    radioOnChange = new TQRadioButton( buttonGroup1, "radioOnChange" );
    radioOnChange->setChecked( true );

    buttonGroup1Layout->addWidget( radioOnChange, 1, 0 );

    ConditionalBreakpointDialogSLayout->addMultiCellWidget( buttonGroup1, 2, 2, 0, 2 );
    spacer8 = new TQSpacerItem( 30, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ConditionalBreakpointDialogSLayout->addItem( spacer8, 3, 1 );

    comboExpression = new KComboBox( false, this, "comboExpression" );
    comboExpression->setEditable( true );

    ConditionalBreakpointDialogSLayout->addWidget( comboExpression, 0, 1 );

    ledWarning = new KLed( this, "ledWarning" );
    ledWarning->setMinimumSize( TQSize( 22, 22 ) );
    ledWarning->setMaximumSize( TQSize( 22, 22 ) );
    ledWarning->setState( KLed::Off );
    ledWarning->setColor( TQColor( 255, 0, 0 ) );

    ConditionalBreakpointDialogSLayout->addWidget( ledWarning, 0, 2 );

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

    lblValue = new TQLabel( groupBox10, "lblValue" );
    lblValue->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblValue->sizePolicy().hasHeightForWidth() ) );
    lblValue->setAlignment( int( TQLabel::AlignVCenter ) );

    groupBox10Layout->addWidget( lblValue, 0, 0 );

    lblValue_2 = new TQLabel( groupBox10, "lblValue_2" );
    lblValue_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblValue_2->sizePolicy().hasHeightForWidth() ) );
    lblValue_2->setAlignment( int( TQLabel::AlignVCenter ) );

    groupBox10Layout->addWidget( lblValue_2, 1, 0 );

    lblValue_3 = new TQLabel( groupBox10, "lblValue_3" );
    lblValue_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblValue_3->sizePolicy().hasHeightForWidth() ) );
    lblValue_3->setAlignment( int( TQLabel::AlignVCenter ) );

    groupBox10Layout->addWidget( lblValue_3, 2, 0 );

    lineFile = new TQLineEdit( groupBox10, "lineFile" );

    groupBox10Layout->addWidget( lineFile, 0, 1 );

    lineFunction = new TQLineEdit( groupBox10, "lineFunction" );

    groupBox10Layout->addWidget( lineFunction, 2, 1 );

    buttonClearFile = new TQPushButton( groupBox10, "buttonClearFile" );

    groupBox10Layout->addWidget( buttonClearFile, 0, 2 );

    buttonClearFunction = new TQPushButton( groupBox10, "buttonClearFunction" );

    groupBox10Layout->addWidget( buttonClearFunction, 2, 2 );

    buttonClearClass = new TQPushButton( groupBox10, "buttonClearClass" );

    groupBox10Layout->addWidget( buttonClearClass, 1, 2 );

    lineClass = new TQLineEdit( groupBox10, "lineClass" );

    groupBox10Layout->addWidget( lineClass, 1, 1 );

    ConditionalBreakpointDialogSLayout->addMultiCellWidget( groupBox10, 1, 1, 0, 2 );
    languageChange();
    resize( TQSize(564, 432).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConditionalBreakpointDialogS::languageChange()
{
    setCaption( tr2i18n( "Add Conditional Breakpoint" ) );
    lblExpression->setText( tr2i18n( "Expression:" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    buttonGroup1->setTitle( tr2i18n( "Break When" ) );
    radioOnTrue->setText( tr2i18n( "When expression is true" ) );
    radioOnChange->setText( tr2i18n( "When expression changes" ) );
    TQToolTip::add( ledWarning, tr2i18n( "Lit when a finding a single equal sign in expression (common error)" ) );
    groupBox10->setTitle( tr2i18n( "Only Break In" ) );
    lblValue->setText( tr2i18n( "File:" ) );
    lblValue_2->setText( tr2i18n( "Objects of class:" ) );
    lblValue_3->setText( tr2i18n( "Function:" ) );
    buttonClearFile->setText( tr2i18n( "x" ) );
    buttonClearFunction->setText( tr2i18n( "x" ) );
    buttonClearClass->setText( tr2i18n( "x" ) );
}

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

TQMetaObject *ConditionalBreakpointDialogS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConditionalBreakpointDialogS( "ConditionalBreakpointDialogS", &ConditionalBreakpointDialogS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConditionalBreakpointDialogS::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ConditionalBreakpointDialogS", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConditionalBreakpointDialogS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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