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

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

#include "debuggertracingdialogbase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <keditlistbox.h>
#include <ntqcheckbox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a DebuggerTracingDialogBase 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.
 */
DebuggerTracingDialogBase::DebuggerTracingDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "DebuggerTracingDialogBase" );
    DebuggerTracingDialogBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "DebuggerTracingDialogBaseLayout"); 

    enable = new TQCheckBox( this, "enable" );

    DebuggerTracingDialogBaseLayout->addMultiCellWidget( enable, 0, 0, 0, 2 );

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

    DebuggerTracingDialogBaseLayout->addWidget( cancelButton, 5, 2 );

    enableCustomFormat = new TQCheckBox( this, "enableCustomFormat" );
    enableCustomFormat->setEnabled( false );

    DebuggerTracingDialogBaseLayout->addWidget( enableCustomFormat, 3, 0 );

    okButton = new TQPushButton( this, "okButton" );
    okButton->setDefault( true );

    DebuggerTracingDialogBaseLayout->addWidget( okButton, 5, 1 );
    spacer4 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    DebuggerTracingDialogBaseLayout->addItem( spacer4, 5, 0 );

    customFormat = new KLineEdit( this, "customFormat" );
    customFormat->setEnabled( false );

    DebuggerTracingDialogBaseLayout->addMultiCellWidget( customFormat, 4, 4, 0, 2 );

    expressions = new KEditListBox( this, "expressions" );
    expressions->setEnabled( false );

    DebuggerTracingDialogBaseLayout->addMultiCellWidget( expressions, 2, 2, 0, 2 );

    expressionsLabel = new TQLabel( this, "expressionsLabel" );
    expressionsLabel->setEnabled( false );

    DebuggerTracingDialogBaseLayout->addMultiCellWidget( expressionsLabel, 1, 1, 0, 2 );
    languageChange();
    resize( TQSize(348, 409).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DebuggerTracingDialogBase::languageChange()
{
    setCaption( tr2i18n( "Tracing Configuration" ) );
    enable->setText( tr2i18n( "Enable tracing" ) );
    TQWhatsThis::add( enable, tr2i18n( "<b>Enable tracing</b>\n"
"<p>Tracing is a mechanism to automatically print values of the choosed expressions and continue execution when breakpoint is hit. You can think of it as printf debugging that does not require modifying the source.</p>" ) );
    cancelButton->setText( tr2i18n( "Cancel" ) );
    enableCustomFormat->setText( tr2i18n( "Custom format string" ) );
    okButton->setText( tr2i18n( "OK" ) );
    TQWhatsThis::add( customFormat, tr2i18n( "<b>Custom format string</b>\n"
"<p>Specify a C-style format string that will be used when printing the choosen expression. For example:\n"
"<p align=\"center\"> <tt>Tracepoint 1: g = %d</tt></p>\n"
"If custom format string is not enabled, names and values of all expressions will be printed, using \"%d\" as format specifier for all expressions." ) );
    expressions->setTitle( TQString::null );
    expressionsLabel->setText( tr2i18n( "Expressions to print:" ) );
}

void DebuggerTracingDialogBase::enableOrDisable()
{
    tqWarning( "DebuggerTracingDialogBase::enableOrDisable(): Not implemented yet" );
}

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

TQMetaObject *DebuggerTracingDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DebuggerTracingDialogBase( "DebuggerTracingDialogBase", &DebuggerTracingDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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