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

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

#include "dialog_widget.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqwidgetstack.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "dialog_widget.ui.h"

/*
 *  Constructs a DialogWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
DialogWidget::DialogWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "DialogWidget" );
    DialogWidgetLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "DialogWidgetLayout"); 

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( KDialog::spacingHint() );
    groupBox1->layout()->setMargin( KDialog::marginHint() );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    executableEdit = new KURLRequester( groupBox1, "executableEdit" );

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

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

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

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );

    groupBox1Layout->addWidget( textLabel2, 0, 0 );

    paramEdit = new KLineEdit( groupBox1, "paramEdit" );

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

    DialogWidgetLayout->addWidget( groupBox1, 0, 0 );

    stack = new TQWidgetStack( this, "stack" );

    WStackPage = new TQWidget( stack, "WStackPage" );
    WStackPageLayout = new TQGridLayout( WStackPage, 1, 1, 0, KDialog::spacingHint(), "WStackPageLayout"); 

    groupBox2 = new TQGroupBox( WStackPage, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( KDialog::spacingHint() );
    groupBox2->layout()->setMargin( KDialog::marginHint() );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    memleakBox = new TQCheckBox( groupBox2, "memleakBox" );
    memleakBox->setChecked( true );
    groupBox2Layout->addWidget( memleakBox );

    layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );

    reachableBox = new TQCheckBox( groupBox2, "reachableBox" );
    layout2->addWidget( reachableBox );
    groupBox2Layout->addLayout( layout2 );

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

    layout3 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout3"); 

    textLabel5 = new TQLabel( groupBox2, "textLabel5" );

    layout3->addWidget( textLabel5, 1, 0 );

    valParamEdit = new KLineEdit( groupBox2, "valParamEdit" );

    layout3->addWidget( valParamEdit, 1, 1 );

    valExecutableEdit = new KURLRequester( groupBox2, "valExecutableEdit" );

    layout3->addWidget( valExecutableEdit, 0, 1 );

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

    layout3->addWidget( textLabel4, 0, 0 );
    groupBox2Layout->addLayout( layout3 );

    WStackPageLayout->addWidget( groupBox2, 0, 0 );
    stack->addWidget( WStackPage, 0 );

    WStackPage_2 = new TQWidget( stack, "WStackPage_2" );
    WStackPageLayout_2 = new TQGridLayout( WStackPage_2, 1, 1, 0, KDialog::spacingHint(), "WStackPageLayout_2"); 

    groupBox3 = new TQGroupBox( WStackPage_2, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( KDialog::spacingHint() );
    groupBox3->layout()->setMargin( KDialog::marginHint() );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    layout3_2 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout3_2"); 

    textLabel5_2 = new TQLabel( groupBox3, "textLabel5_2" );

    layout3_2->addWidget( textLabel5_2, 1, 0 );

    ctParamEdit = new KLineEdit( groupBox3, "ctParamEdit" );

    layout3_2->addWidget( ctParamEdit, 1, 1 );

    ctExecutableEdit = new KURLRequester( groupBox3, "ctExecutableEdit" );

    layout3_2->addWidget( ctExecutableEdit, 0, 1 );

    textLabel4_2 = new TQLabel( groupBox3, "textLabel4_2" );

    layout3_2->addWidget( textLabel4_2, 0, 0 );

    groupBox3Layout->addLayout( layout3_2, 1, 0 );

    ctChildrenBox = new TQCheckBox( groupBox3, "ctChildrenBox" );

    groupBox3Layout->addWidget( ctChildrenBox, 0, 0 );

    WStackPageLayout_2->addWidget( groupBox3, 0, 0 );

    groupBox4 = new TQGroupBox( WStackPage_2, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( KDialog::spacingHint() );
    groupBox4->layout()->setMargin( KDialog::marginHint() );
    groupBox4Layout = new TQGridLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    kcExecutableEdit = new KURLRequester( groupBox4, "kcExecutableEdit" );

    groupBox4Layout->addWidget( kcExecutableEdit, 0, 1 );

    textLabel4_2_2 = new TQLabel( groupBox4, "textLabel4_2_2" );

    groupBox4Layout->addWidget( textLabel4_2_2, 0, 0 );

    WStackPageLayout_2->addWidget( groupBox4, 1, 0 );
    stack->addWidget( WStackPage_2, 1 );

    DialogWidgetLayout->addWidget( stack, 1, 0 );
    languageChange();
    resize( TQSize(322, 306).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( memleakBox, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( checkBoxToggled() ) );

    // tab order
    setTabOrder( executableEdit, paramEdit );
    setTabOrder( paramEdit, memleakBox );
    setTabOrder( memleakBox, reachableBox );
    setTabOrder( reachableBox, childrenBox );
    setTabOrder( childrenBox, valExecutableEdit );
    setTabOrder( valExecutableEdit, valParamEdit );
    setTabOrder( valParamEdit, ctChildrenBox );
    setTabOrder( ctChildrenBox, ctExecutableEdit );
    setTabOrder( ctExecutableEdit, ctParamEdit );
    setTabOrder( ctParamEdit, kcExecutableEdit );

    // buddies
    textLabel3->setBuddy( paramEdit );
    textLabel2->setBuddy( executableEdit );
    textLabel5->setBuddy( valParamEdit );
    textLabel4->setBuddy( valExecutableEdit );
    textLabel5_2->setBuddy( valParamEdit );
    textLabel4_2->setBuddy( valExecutableEdit );
    textLabel4_2_2->setBuddy( valExecutableEdit );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DialogWidget::languageChange()
{
    groupBox1->setTitle( tr2i18n( "Application" ) );
    textLabel3->setText( tr2i18n( "&Parameters:" ) );
    textLabel2->setText( tr2i18n( "&Executable:" ) );
    groupBox2->setTitle( tr2i18n( "Valgrind" ) );
    memleakBox->setText( tr2i18n( "Memory &leak check" ) );
    reachableBox->setText( tr2i18n( "&Show still reachable blocks" ) );
    childrenBox->setText( tr2i18n( "&Trace children" ) );
    textLabel5->setText( tr2i18n( "Additional p&arameters:" ) );
    textLabel4->setText( tr2i18n( "E&xecutable:" ) );
    groupBox3->setTitle( tr2i18n( "Valgrind" ) );
    textLabel5_2->setText( tr2i18n( "Additional p&arameters:" ) );
    textLabel4_2->setText( tr2i18n( "E&xecutable:" ) );
    ctChildrenBox->setText( tr2i18n( "&Trace children" ) );
    groupBox4->setTitle( tr2i18n( "KCachegrind" ) );
    textLabel4_2_2->setText( tr2i18n( "Exe&cutable:" ) );
}

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

TQMetaObject *DialogWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DialogWidget( "DialogWidget", &DialogWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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