/****************************************************************************
** Form implementation generated from reading ui file 'todebugwatch.ui'
**
** Created: Tue Sep 18 08:21:22 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "todebugwatch.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toDebugWatchUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
toDebugWatchUI::toDebugWatchUI( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "toDebugWatchUI" );
    toDebugWatchUILayout = new QGridLayout( this, 1, 1, 11, 6, "toDebugWatchUILayout"); 

    PushButton1_2 = new QPushButton( this, "PushButton1_2" );

    toDebugWatchUILayout->addWidget( PushButton1_2, 3, 1 );

    PushButton1 = new QPushButton( this, "PushButton1" );
    PushButton1->setDefault( TRUE );

    toDebugWatchUILayout->addWidget( PushButton1, 3, 0 );

    Name = new QComboBox( FALSE, this, "Name" );
    Name->setEditable( TRUE );
    Name->setDuplicatesEnabled( FALSE );

    toDebugWatchUILayout->addMultiCellWidget( Name, 2, 2, 0, 1 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );

    toDebugWatchUILayout->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 );

    Scope = new QButtonGroup( this, "Scope" );
    Scope->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, Scope->sizePolicy().hasHeightForWidth() ) );
    Scope->setColumnLayout(0, Qt::Vertical );
    Scope->layout()->setSpacing( 6 );
    Scope->layout()->setMargin( 11 );
    ScopeLayout = new QGridLayout( Scope->layout() );
    ScopeLayout->setAlignment( Qt::AlignTop );

    GlobalScope = new QRadioButton( Scope, "GlobalScope" );
    Scope->insert( GlobalScope, 4 );

    ScopeLayout->addWidget( GlobalScope, 3, 0 );

    LocalScope = new QRadioButton( Scope, "LocalScope" );
    LocalScope->setChecked( FALSE );
    Scope->insert( LocalScope, 1 );

    ScopeLayout->addWidget( LocalScope, 1, 0 );

    LocalScope_2 = new QRadioButton( Scope, "LocalScope_2" );
    LocalScope_2->setChecked( TRUE );
    Scope->insert( LocalScope_2, 5 );

    ScopeLayout->addWidget( LocalScope_2, 0, 0 );

    Package = new QRadioButton( Scope, "Package" );
    Scope->insert( Package, 3 );

    ScopeLayout->addWidget( Package, 2, 0 );

    toDebugWatchUILayout->addMultiCellWidget( Scope, 0, 0, 0, 1 );
    languageChange();
    resize( QSize(188, 228).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( PushButton1_2, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( LocalScope_2, Name );
    setTabOrder( Name, PushButton1 );
    setTabOrder( PushButton1, PushButton1_2 );
    setTabOrder( PushButton1_2, LocalScope );
    setTabOrder( LocalScope, Package );
    setTabOrder( Package, GlobalScope );

    // buddies
    TextLabel1->setBuddy( Name );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toDebugWatchUI::languageChange()
{
    setCaption( tr( "Add variable watch" ) );
    PushButton1_2->setText( tr( "Cancel" ) );
    PushButton1->setText( tr( "&Ok" ) );
    TextLabel1->setText( tr( "&Variable name" ) );
    QToolTip::add( TextLabel1, tr( "Variable name to watch." ) );
    Scope->setTitle( tr( "&Scope" ) );
    GlobalScope->setText( tr( "&Global" ) );
    QToolTip::add( GlobalScope, tr( "Global scope of variable." ) );
    LocalScope->setText( tr( "&Local" ) );
    QToolTip::add( LocalScope, tr( "Currently running scope." ) );
    LocalScope_2->setText( tr( "&Autodetect" ) );
    QToolTip::add( LocalScope_2, tr( "Currently running scope." ) );
    Package->setText( tr( "&Package" ) );
    QToolTip::add( Package, tr( "The scope of the file in the body editor." ) );
}

