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

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

#include "environmentvariableswidgetbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    listview = new TQListView( this, "listview" );
    listview->addColumn( tr2i18n( "Name" ) );
    listview->addColumn( tr2i18n( "Value" ) );
    listview->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, listview->sizePolicy().hasHeightForWidth() ) );
    listview->setShowSortIndicator( true );
    listview->setResizeMode( TQListView::AllColumns );

    EnvironmentVariablesWidgetBaseLayout->addMultiCellWidget( listview, 0, 5, 0, 0 );

    removevar_button = new TQPushButton( this, "removevar_button" );
    removevar_button->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, removevar_button->sizePolicy().hasHeightForWidth() ) );

    EnvironmentVariablesWidgetBaseLayout->addWidget( removevar_button, 2, 1 );

    editvar_button = new TQPushButton( this, "editvar_button" );
    editvar_button->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, editvar_button->sizePolicy().hasHeightForWidth() ) );

    EnvironmentVariablesWidgetBaseLayout->addWidget( editvar_button, 1, 1 );

    addvar_button = new TQPushButton( this, "addvar_button" );
    addvar_button->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, addvar_button->sizePolicy().hasHeightForWidth() ) );

    EnvironmentVariablesWidgetBaseLayout->addWidget( addvar_button, 0, 1 );
    Spacer12 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    EnvironmentVariablesWidgetBaseLayout->addItem( Spacer12, 3, 1 );

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

    EnvironmentVariablesWidgetBaseLayout->addWidget( environmentButton, 4, 1 );
    spacer2 = new TQSpacerItem( 20, 171, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    EnvironmentVariablesWidgetBaseLayout->addItem( spacer2, 5, 1 );
    languageChange();
    resize( TQSize(566, 451).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( addvar_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addVarClicked() ) );
    connect( removevar_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeVarClicked() ) );
    connect( editvar_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( editVarClicked() ) );
    connect( environmentButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( environmentClicked() ) );

    // tab order
    setTabOrder( listview, addvar_button );
    setTabOrder( addvar_button, removevar_button );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EnvironmentVariablesWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Environment Variables" ) );
    listview->header()->setLabel( 0, tr2i18n( "Name" ) );
    listview->header()->setLabel( 1, tr2i18n( "Value" ) );
    removevar_button->setText( tr2i18n( "&Remove" ) );
    editvar_button->setText( tr2i18n( "&Edit" ) );
    addvar_button->setText( tr2i18n( "A&dd / Copy" ) );
    environmentButton->setText( tr2i18n( "E&nvironment" ) );
}

void EnvironmentVariablesWidgetBase::addVarClicked()
{
    tqWarning( "EnvironmentVariablesWidgetBase::addVarClicked(): Not implemented yet" );
}

void EnvironmentVariablesWidgetBase::removeVarClicked()
{
    tqWarning( "EnvironmentVariablesWidgetBase::removeVarClicked(): Not implemented yet" );
}

void EnvironmentVariablesWidgetBase::editVarClicked()
{
    tqWarning( "EnvironmentVariablesWidgetBase::editVarClicked(): Not implemented yet" );
}

void EnvironmentVariablesWidgetBase::environmentClicked()
{
    tqWarning( "EnvironmentVariablesWidgetBase::environmentClicked(): Not implemented yet" );
}

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

TQMetaObject *EnvironmentVariablesWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EnvironmentVariablesWidgetBase( "EnvironmentVariablesWidgetBase", &EnvironmentVariablesWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* EnvironmentVariablesWidgetBase::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 = {"addVarClicked", 0, 0 };
    static const TQUMethod slot_1 = {"removeVarClicked", 0, 0 };
    static const TQUMethod slot_2 = {"editVarClicked", 0, 0 };
    static const TQUMethod slot_3 = {"environmentClicked", 0, 0 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "addVarClicked()", &slot_0, TQMetaData::Public },
	{ "removeVarClicked()", &slot_1, TQMetaData::Public },
	{ "editVarClicked()", &slot_2, TQMetaData::Public },
	{ "environmentClicked()", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"EnvironmentVariablesWidgetBase", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_EnvironmentVariablesWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool EnvironmentVariablesWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: addVarClicked(); break;
    case 1: removeVarClicked(); break;
    case 2: editVarClicked(); break;
    case 3: environmentClicked(); break;
    case 4: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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