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

#include "variabledialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    varView = new TQListView( this, "varView" );
    varView->addColumn( tr( "Variable" ) );
    varView->addColumn( tr( "Access" ) );
    varView->setFrameShape( TQListView::StyledPanel );
    varView->setFrameShadow( TQListView::Sunken );
    varView->setAllColumnsShowFocus( true );
    varView->setResizeMode( TQListView::LastColumn );

    VariableDialogBaseLayout->addMultiCellWidget( varView, 0, 0, 0, 3 );

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

    VariableDialogBaseLayout->addWidget( deleteButton, 1, 3 );

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

    TextLabel2 = new TQLabel( propBox, "TextLabel2" );

    propBoxLayout->addWidget( TextLabel2, 1, 0 );

    TextLabel1 = new TQLabel( propBox, "TextLabel1" );

    propBoxLayout->addWidget( TextLabel1, 0, 0 );

    varName = new TQLineEdit( propBox, "varName" );

    propBoxLayout->addWidget( varName, 0, 1 );

    accessCombo = new TQComboBox( false, propBox, "accessCombo" );

    propBoxLayout->addWidget( accessCombo, 1, 1 );

    VariableDialogBaseLayout->addMultiCellWidget( propBox, 2, 2, 0, 3 );

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

    VariableDialogBaseLayout->addWidget( addButton, 1, 2 );
    Spacer2 = new TQSpacerItem( 0, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    VariableDialogBaseLayout->addMultiCell( Spacer2, 1, 1, 0, 1 );

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

    VariableDialogBaseLayout->addWidget( cancelButton, 3, 3 );

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

    VariableDialogBaseLayout->addMultiCellWidget( okButton, 3, 3, 1, 2 );
    Spacer3 = new TQSpacerItem( 0, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    VariableDialogBaseLayout->addItem( Spacer3, 3, 0 );
    languageChange();
    resize( TQSize(276, 320).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( addButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addVariable() ) );
    connect( okButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( okClicked() ) );
    connect( varName, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( nameChanged() ) );
    connect( deleteButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deleteVariable() ) );
    connect( accessCombo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( accessChanged() ) );
    connect( varView, TQ_SIGNAL( currentChanged(TQListViewItem*) ), this, TQ_SLOT( currentItemChanged(TQListViewItem*) ) );
    connect( varView, TQ_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQ_SLOT( currentItemChanged(TQListViewItem*) ) );

    // tab order
    setTabOrder( varView, addButton );
    setTabOrder( addButton, deleteButton );
    setTabOrder( deleteButton, varName );
    setTabOrder( varName, accessCombo );
    setTabOrder( accessCombo, okButton );
    setTabOrder( okButton, cancelButton );

    // buddies
    TextLabel2->setBuddy( accessCombo );
    TextLabel1->setBuddy( varName );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void VariableDialogBase::languageChange()
{
    setCaption( tr( "Edit Variables" ) );
    varView->header()->setLabel( 0, tr( "Variable" ) );
    varView->header()->setLabel( 1, tr( "Access" ) );
    deleteButton->setText( tr( "&Delete" ) );
    propBox->setTitle( tr( "Variable Properties" ) );
    TextLabel2->setText( tr( "Acc&ess:" ) );
    TextLabel1->setText( tr( "&Variable:" ) );
    accessCombo->clear();
    accessCombo->insertItem( tr( "public" ) );
    accessCombo->insertItem( tr( "protected" ) );
    accessCombo->insertItem( tr( "private" ) );
    addButton->setText( tr( "&Add" ) );
    cancelButton->setText( tr( "&Cancel" ) );
    okButton->setText( tr( "&OK" ) );
}

void VariableDialogBase::addVariable()
{
    tqWarning( "VariableDialogBase::addVariable(): Not implemented yet" );
}

void VariableDialogBase::deleteVariable()
{
    tqWarning( "VariableDialogBase::deleteVariable(): Not implemented yet" );
}

void VariableDialogBase::accessChanged()
{
    tqWarning( "VariableDialogBase::accessChanged(): Not implemented yet" );
}

void VariableDialogBase::nameChanged()
{
    tqWarning( "VariableDialogBase::nameChanged(): Not implemented yet" );
}

void VariableDialogBase::okClicked()
{
    tqWarning( "VariableDialogBase::okClicked(): Not implemented yet" );
}

void VariableDialogBase::currentItemChanged(TQListViewItem*)
{
    tqWarning( "VariableDialogBase::currentItemChanged(TQListViewItem*): Not implemented yet" );
}

