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

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

#include "typesdialogbase.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 

    typeList = new TDEListView( this, "typeList" );
    typeList->addColumn( tr2i18n( "Icon" ) );
    typeList->header()->setClickEnabled( false, typeList->header()->count() - 1 );
    typeList->addColumn( tr2i18n( "Name" ) );
    typeList->header()->setClickEnabled( false, typeList->header()->count() - 1 );
    typeList->addColumn( tr2i18n( "Description" ) );
    typeList->header()->setClickEnabled( false, typeList->header()->count() - 1 );
    typeList->setProperty( "selectionMode", "Extended" );
    typeList->setAllColumnsShowFocus( true );
    layout1->addWidget( typeList );
    TypesDialogBaseLayout->addLayout( layout1 );

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 

    layout3 = new TQVBoxLayout( 0, 0, 6, "layout3"); 

    buttonEdit = new KPushButton( this, "buttonEdit" );
    layout3->addWidget( buttonEdit );

    buttonRemove = new KPushButton( this, "buttonRemove" );
    layout3->addWidget( buttonRemove );
    layout4->addLayout( layout3 );
    spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer3 );

    layout4_2 = new TQVBoxLayout( 0, 0, 6, "layout4_2"); 

    buttonExport = new KPushButton( this, "buttonExport" );
    layout4_2->addWidget( buttonExport );

    buttonImport = new KPushButton( this, "buttonImport" );
    layout4_2->addWidget( buttonImport );
    layout4->addLayout( layout4_2 );
    TypesDialogBaseLayout->addLayout( layout4 );

    Line1 = new TQFrame( this, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );
    TypesDialogBaseLayout->addWidget( Line1 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 

    buttonHelp = new KPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    Layout1->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new KPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new KPushButton( this, "buttonCancel" );
    Layout1->addWidget( buttonCancel );
    TypesDialogBaseLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(456, 249).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonExport, TQ_SIGNAL( clicked() ), this, TQ_SLOT( exportType() ) );
    connect( buttonHelp, TQ_SIGNAL( clicked() ), this, TQ_SLOT( helpSlot() ) );
    connect( buttonImport, TQ_SIGNAL( clicked() ), this, TQ_SLOT( importTypes() ) );
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( okSlot() ) );
    connect( buttonRemove, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deleteType() ) );
    connect( buttonEdit, TQ_SIGNAL( clicked() ), this, TQ_SLOT( editType() ) );
    connect( typeList, TQ_SIGNAL( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( cancelSlot() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TypesDialogBase::languageChange()
{
    setCaption( tr2i18n( "Manage Types" ) );
    TQWhatsThis::add( this, tr2i18n( "Here you can manage types; you can remove them, and load and save them from and to files..." ) );
    typeList->header()->setLabel( 0, tr2i18n( "Icon" ) );
    typeList->header()->setLabel( 1, tr2i18n( "Name" ) );
    typeList->header()->setLabel( 2, tr2i18n( "Description" ) );
    TQToolTip::add( typeList, tr2i18n( "Select types here..." ) );
    TQWhatsThis::add( typeList, tr2i18n( "This is a list of the current macro types... You can select, edit, delete, export and import them..." ) );
    buttonEdit->setText( tr2i18n( "Edit..." ) );
    TQWhatsThis::add( buttonEdit, tr2i18n( "Edit the selected type." ) );
    buttonRemove->setText( tr2i18n( "Delete" ) );
    TQWhatsThis::add( buttonRemove, tr2i18n( "Delete all the selected types in the list." ) );
    buttonExport->setText( tr2i18n( "Export..." ) );
    TQWhatsThis::add( buttonExport, tr2i18n( "Export all the selected types to a file." ) );
    buttonImport->setText( tr2i18n( "Import..." ) );
    TQWhatsThis::add( buttonImport, tr2i18n( "Import macros that are contained in one or more files." ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

void TypesDialogBase::deleteType()
{
    tqWarning( "TypesDialogBase::deleteType(): Not implemented yet" );
}

void TypesDialogBase::exportType()
{
    tqWarning( "TypesDialogBase::exportType(): Not implemented yet" );
}

void TypesDialogBase::helpSlot()
{
    tqWarning( "TypesDialogBase::helpSlot(): Not implemented yet" );
}

void TypesDialogBase::importTypes()
{
    tqWarning( "TypesDialogBase::importTypes(): Not implemented yet" );
}

void TypesDialogBase::okSlot()
{
    tqWarning( "TypesDialogBase::okSlot(): Not implemented yet" );
}

void TypesDialogBase::editType()
{
    tqWarning( "TypesDialogBase::editType(): Not implemented yet" );
}

void TypesDialogBase::contextMenuRequested(TQListViewItem*,const TQPoint&,int)
{
    tqWarning( "TypesDialogBase::contextMenuRequested(TQListViewItem*,const TQPoint&,int): Not implemented yet" );
}

void TypesDialogBase::cancelSlot()
{
    tqWarning( "TypesDialogBase::cancelSlot(): Not implemented yet" );
}

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

TQMetaObject *TypesDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TypesDialogBase( "TypesDialogBase", &TypesDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* TypesDialogBase::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"helpSlot", 0, 0 };
    static const TQUMethod slot_1 = {"okSlot", 0, 0 };
    static const TQUMethod slot_2 = {"cancelSlot", 0, 0 };
    static const TQUMethod slot_3 = {"languageChange", 0, 0 };
    static const TQUMethod slot_4 = {"deleteType", 0, 0 };
    static const TQUMethod slot_5 = {"exportType", 0, 0 };
    static const TQUMethod slot_6 = {"importTypes", 0, 0 };
    static const TQUMethod slot_7 = {"editType", 0, 0 };
    static const TQUParameter param_slot_8[] = {
	{ "i", &static_QUType_ptr, "TQListViewItem", TQUParameter::In },
	{ "p", &static_QUType_varptr, "\x0e", TQUParameter::In },
	{ "c", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_8 = {"contextMenuRequested", 3, param_slot_8 };
    static const TQMetaData slot_tbl[] = {
	{ "helpSlot()", &slot_0, TQMetaData::Public },
	{ "okSlot()", &slot_1, TQMetaData::Public },
	{ "cancelSlot()", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected },
	{ "deleteType()", &slot_4, TQMetaData::Protected },
	{ "exportType()", &slot_5, TQMetaData::Protected },
	{ "importTypes()", &slot_6, TQMetaData::Protected },
	{ "editType()", &slot_7, TQMetaData::Protected },
	{ "contextMenuRequested(TQListViewItem*,const TQPoint&,int)", &slot_8, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TypesDialogBase", parentObject,
	slot_tbl, 9,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TypesDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool TypesDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: helpSlot(); break;
    case 1: okSlot(); break;
    case 2: cancelSlot(); break;
    case 3: languageChange(); break;
    case 4: deleteType(); break;
    case 5: exportType(); break;
    case 6: importTypes(); break;
    case 7: editType(); break;
    case 8: contextMenuRequested((TQListViewItem*)static_QUType_ptr.get(_o+1),(const TQPoint&)*((const TQPoint*)static_QUType_ptr.get(_o+2)),(int)static_QUType_int.get(_o+3)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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