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

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

#include "dlgdirectoriesbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqtoolbutton.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

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

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

    pb_down = new TQToolButton( this, "pb_down" );
    pb_down->setEnabled( false );
    pb_down->setIconSet( TQIconSet( BarIconSet( "go-down" ) ) );

    layout1->addWidget( pb_down, 2, 1 );
    spacer5 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout1->addItem( spacer5, 1, 1 );

    pb_up = new TQToolButton( this, "pb_up" );
    pb_up->setEnabled( false );
    pb_up->setIconSet( TQIconSet( BarIconSet( "go-up" ) ) );

    layout1->addWidget( pb_up, 0, 1 );

    lv_entries = new TQListView( this, "lv_entries" );
    lv_entries->addColumn( tr2i18n( "Extension" ) );
    lv_entries->header()->setClickEnabled( false, lv_entries->header()->count() - 1 );
    lv_entries->addColumn( tr2i18n( "Default Folder" ) );
    lv_entries->header()->setClickEnabled( false, lv_entries->header()->count() - 1 );
    lv_entries->setAllColumnsShowFocus( true );

    layout1->addMultiCellWidget( lv_entries, 0, 2, 0, 0 );

    DlgDirectoriesBaseLayout->addMultiCellLayout( layout1, 0, 0, 0, 1 );

    layout12 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout12"); 

    pb_add = new TQPushButton( this, "pb_add" );
    pb_add->setEnabled( true );
    pb_add->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 5, 0, pb_add->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( pb_add );

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

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

    DlgDirectoriesBaseLayout->addMultiCellLayout( layout12, 3, 3, 0, 1 );

    le_ext = new KLineEdit( this, "le_ext" );
    le_ext->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, le_ext->sizePolicy().hasHeightForWidth() ) );

    DlgDirectoriesBaseLayout->addWidget( le_ext, 2, 0 );

    lb_ext = new TQLabel( this, "lb_ext" );

    DlgDirectoriesBaseLayout->addWidget( lb_ext, 1, 0 );

    le_dir = new KURLRequester( this, "le_dir" );

    DlgDirectoriesBaseLayout->addWidget( le_dir, 2, 1 );

    lb_dir = new TQLabel( this, "lb_dir" );

    DlgDirectoriesBaseLayout->addWidget( lb_dir, 1, 1 );
    languageChange();
    resize( TQSize(437, 275).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pb_down, TQ_SIGNAL( clicked() ), this, TQ_SLOT( downEntry() ) );
    connect( pb_up, TQ_SIGNAL( clicked() ), this, TQ_SLOT( upEntry() ) );
    connect( lv_entries, TQ_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQ_SLOT( selectEntry(TQListViewItem*) ) );
    connect( pb_add, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addEntry() ) );
    connect( pb_delete, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deleteEntry() ) );
    connect( pb_change, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changeEntry() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DlgDirectoriesBase::languageChange()
{
    pb_down->setText( TQString::null );
    pb_up->setText( TQString::null );
    lv_entries->header()->setLabel( 0, tr2i18n( "Extension" ) );
    lv_entries->header()->setLabel( 1, tr2i18n( "Default Folder" ) );
    pb_add->setText( tr2i18n( "Add" ) );
    pb_delete->setText( tr2i18n( "Remove" ) );
    pb_change->setText( tr2i18n( "Change" ) );
    lb_ext->setText( tr2i18n( "Extension (* for all files):" ) );
    lb_dir->setText( tr2i18n( "Default folder:" ) );
}

void DlgDirectoriesBase::downEntry()
{
    tqWarning( "DlgDirectoriesBase::downEntry(): Not implemented yet" );
}

void DlgDirectoriesBase::addEntry()
{
    tqWarning( "DlgDirectoriesBase::addEntry(): Not implemented yet" );
}

void DlgDirectoriesBase::deleteEntry()
{
    tqWarning( "DlgDirectoriesBase::deleteEntry(): Not implemented yet" );
}

void DlgDirectoriesBase::changeEntry()
{
    tqWarning( "DlgDirectoriesBase::changeEntry(): Not implemented yet" );
}

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

TQMetaObject *DlgDirectoriesBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DlgDirectoriesBase( "DlgDirectoriesBase", &DlgDirectoriesBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* DlgDirectoriesBase::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 = {"upEntry", 0, 0 };
    static const TQUMethod slot_1 = {"downEntry", 0, 0 };
    static const TQUMethod slot_2 = {"addEntry", 0, 0 };
    static const TQUMethod slot_3 = {"deleteEntry", 0, 0 };
    static const TQUMethod slot_4 = {"changeEntry", 0, 0 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQUParameter param_slot_6[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_6 = {"selectEntry", 1, param_slot_6 };
    static const TQMetaData slot_tbl[] = {
	{ "upEntry()", &slot_0, TQMetaData::Public },
	{ "downEntry()", &slot_1, TQMetaData::Public },
	{ "addEntry()", &slot_2, TQMetaData::Public },
	{ "deleteEntry()", &slot_3, TQMetaData::Public },
	{ "changeEntry()", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected },
	{ "selectEntry(TQListViewItem*)", &slot_6, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"DlgDirectoriesBase", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_DlgDirectoriesBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool DlgDirectoriesBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: upEntry(); break;
    case 1: downEntry(); break;
    case 2: addEntry(); break;
    case 3: deleteEntry(); break;
    case 4: changeEntry(); break;
    case 5: languageChange(); break;
    case 6: selectEntry((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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