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

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

#include "fcconfigwidgetbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "addglobaldlg.h"

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

    fc_tabs = new TQTabWidget( this, "fc_tabs" );

    tab1 = new TQWidget( fc_tabs, "tab1" );
    tab1Layout = new TQGridLayout( tab1, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tab1Layout"); 

    remove_button = new TQPushButton( tab1, "remove_button" );

    tab1Layout->addWidget( remove_button, 3, 1 );

    edittype_button = new TQPushButton( tab1, "edittype_button" );

    tab1Layout->addWidget( edittype_button, 2, 1 );

    newsubtype_button = new TQPushButton( tab1, "newsubtype_button" );

    tab1Layout->addWidget( newsubtype_button, 1, 1 );

    newtype_button = new TQPushButton( tab1, "newtype_button" );

    tab1Layout->addWidget( newtype_button, 0, 1 );

    fc_view = new TQListView( tab1, "fc_view" );
    fc_view->addColumn( tr2i18n( "Type Extension" ) );
    fc_view->addColumn( tr2i18n( "Type Name" ) );
    fc_view->addColumn( tr2i18n( "Icon" ) );
    fc_view->addColumn( tr2i18n( "Description" ) );
    fc_view->setResizePolicy( TQScrollView::Manual );
    fc_view->setAllColumnsShowFocus( true );
    fc_view->setRootIsDecorated( true );
    fc_view->setResizeMode( TQListView::AllColumns );

    tab1Layout->addMultiCellWidget( fc_view, 0, 10, 0, 0 );
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tab1Layout->addItem( spacer2, 9, 1 );

    moveup_button = new TQPushButton( tab1, "moveup_button" );

    tab1Layout->addWidget( moveup_button, 7, 1 );

    movedown_button = new TQPushButton( tab1, "movedown_button" );

    tab1Layout->addWidget( movedown_button, 8, 1 );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    tab1Layout->addItem( spacer1, 6, 1 );
    spacer1_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    tab1Layout->addItem( spacer1_2, 4, 1 );

    edit_type_content_button = new TQPushButton( tab1, "edit_type_content_button" );

    tab1Layout->addWidget( edit_type_content_button, 5, 1 );
    fc_tabs->insertTab( tab1, TQString::fromLatin1("") );

    tab2 = new TQWidget( fc_tabs, "tab2" );
    tab2Layout = new TQGridLayout( tab2, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tab2Layout"); 

    fcglobal_view = new TQListView( tab2, "fcglobal_view" );
    fcglobal_view->addColumn( tr2i18n( "Type Extension" ) );
    fcglobal_view->addColumn( tr2i18n( "Type Name" ) );
    fcglobal_view->addColumn( tr2i18n( "Icon" ) );
    fcglobal_view->addColumn( tr2i18n( "Description" ) );
    fcglobal_view->setAllColumnsShowFocus( true );
    fcglobal_view->setRootIsDecorated( true );
    fcglobal_view->setResizeMode( TQListView::AllColumns );

    tab2Layout->addMultiCellWidget( fcglobal_view, 0, 0, 0, 1 );
    spacer4_2 = new TQSpacerItem( 330, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tab2Layout->addItem( spacer4_2, 1, 0 );

    copyToProject_button = new TQPushButton( tab2, "copyToProject_button" );

    tab2Layout->addWidget( copyToProject_button, 1, 1 );
    fc_tabs->insertTab( tab2, TQString::fromLatin1("") );

    tab3 = new TQWidget( fc_tabs, "tab3" );
    tab3Layout = new TQGridLayout( tab3, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tab3Layout"); 

    fctemplates_view = new TQListView( tab3, "fctemplates_view" );
    fctemplates_view->addColumn( tr2i18n( "Template Name" ) );
    fctemplates_view->setAllColumnsShowFocus( true );
    fctemplates_view->setRootIsDecorated( true );
    fctemplates_view->setResizeMode( TQListView::AllColumns );

    tab3Layout->addMultiCellWidget( fctemplates_view, 1, 6, 0, 0 );

    edittemplate_button = new TQPushButton( tab3, "edittemplate_button" );

    tab3Layout->addWidget( edittemplate_button, 2, 1 );

    newtemplate_button = new TQPushButton( tab3, "newtemplate_button" );

    tab3Layout->addWidget( newtemplate_button, 1, 1 );

    templatesDir_label = new TQLabel( tab3, "templatesDir_label" );

    tab3Layout->addMultiCellWidget( templatesDir_label, 0, 0, 0, 1 );

    removetemplate_button = new TQPushButton( tab3, "removetemplate_button" );

    tab3Layout->addWidget( removetemplate_button, 3, 1 );
    spacer4 = new TQSpacerItem( 20, 150, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tab3Layout->addItem( spacer4, 6, 1 );

    edit_template_content_button = new TQPushButton( tab3, "edit_template_content_button" );

    tab3Layout->addWidget( edit_template_content_button, 5, 1 );
    spacer6 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    tab3Layout->addItem( spacer6, 4, 1 );
    fc_tabs->insertTab( tab3, TQString::fromLatin1("") );

    FCConfigWidgetBaseLayout->addWidget( fc_tabs, 0, 0 );
    languageChange();
    resize( TQSize(505, 388).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( newtype_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( newtype_button_clicked() ) );
    connect( newsubtype_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( newsubtype_button_clicked() ) );
    connect( remove_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( remove_button_clicked() ) );
    connect( moveup_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( moveup_button_clicked() ) );
    connect( movedown_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( movedown_button_clicked() ) );
    connect( edittype_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( edittype_button_clicked() ) );
    connect( newtemplate_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( newtemplate_button_clicked() ) );
    connect( edittemplate_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( edittemplate_button_clicked() ) );
    connect( removetemplate_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removetemplate_button_clicked() ) );
    connect( copyToProject_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( copyToProject_button_clicked() ) );
    connect( edit_template_content_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( edit_template_content_button_clicked() ) );
    connect( edit_type_content_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( edit_type_content_button_clicked() ) );

    // tab order
    setTabOrder( fc_view, newtype_button );
    setTabOrder( newtype_button, newsubtype_button );
    setTabOrder( newsubtype_button, edittype_button );
    setTabOrder( edittype_button, remove_button );
    setTabOrder( remove_button, edit_type_content_button );
    setTabOrder( edit_type_content_button, moveup_button );
    setTabOrder( moveup_button, movedown_button );
    setTabOrder( movedown_button, fc_tabs );
    setTabOrder( fc_tabs, fcglobal_view );
    setTabOrder( fcglobal_view, copyToProject_button );
    setTabOrder( copyToProject_button, fctemplates_view );
    setTabOrder( fctemplates_view, newtemplate_button );
    setTabOrder( newtemplate_button, edittemplate_button );
    setTabOrder( edittemplate_button, removetemplate_button );
    setTabOrder( removetemplate_button, edit_template_content_button );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FCConfigWidgetBase::languageChange()
{
    setCaption( tr2i18n( "New File Wizard Options" ) );
    remove_button->setText( tr2i18n( "Re&move Type" ) );
    edittype_button->setText( tr2i18n( "Edit T&ype..." ) );
    newsubtype_button->setText( tr2i18n( "New &Subtype..." ) );
    newtype_button->setText( tr2i18n( "&New Type..." ) );
    fc_view->header()->setLabel( 0, tr2i18n( "Type Extension" ) );
    fc_view->header()->setLabel( 1, tr2i18n( "Type Name" ) );
    fc_view->header()->setLabel( 2, tr2i18n( "Icon" ) );
    fc_view->header()->setLabel( 3, tr2i18n( "Description" ) );
    moveup_button->setText( tr2i18n( "Move &Up" ) );
    movedown_button->setText( tr2i18n( "Move &Down" ) );
    edit_type_content_button->setText( tr2i18n( "Ed&it Template" ) );
    fc_tabs->changeTab( tab1, tr2i18n( "Pro&ject Types" ) );
    fcglobal_view->header()->setLabel( 0, tr2i18n( "Type Extension" ) );
    fcglobal_view->header()->setLabel( 1, tr2i18n( "Type Name" ) );
    fcglobal_view->header()->setLabel( 2, tr2i18n( "Icon" ) );
    fcglobal_view->header()->setLabel( 3, tr2i18n( "Description" ) );
    copyToProject_button->setText( tr2i18n( "Copy to Pro&ject Types" ) );
    fc_tabs->changeTab( tab2, tr2i18n( "Used &Global Types" ) );
    fctemplates_view->header()->setLabel( 0, tr2i18n( "Template Name" ) );
    edittemplate_button->setText( tr2i18n( "C&hange Content..." ) );
    newtemplate_button->setText( tr2i18n( "&New Template..." ) );
    templatesDir_label->setText( TQString::null );
    removetemplate_button->setText( tr2i18n( "Re&move Template" ) );
    edit_template_content_button->setText( tr2i18n( "&Edit Template" ) );
    fc_tabs->changeTab( tab3, tr2i18n( "Proje&ct Templates" ) );
}

void FCConfigWidgetBase::removetemplate_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::removetemplate_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::copyToProject_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::copyToProject_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::newtype_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::newtype_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::newsubtype_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::newsubtype_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::remove_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::remove_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::moveup_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::moveup_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::movedown_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::movedown_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::edittype_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::edittype_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::newtemplate_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::newtemplate_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::edittemplate_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::edittemplate_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::edit_template_contents_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::edit_template_contents_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::edit_template_content_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::edit_template_content_button_clicked(): Not implemented yet" );
}

void FCConfigWidgetBase::edit_type_content_button_clicked()
{
    tqWarning( "FCConfigWidgetBase::edit_type_content_button_clicked(): Not implemented yet" );
}

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

TQMetaObject *FCConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FCConfigWidgetBase( "FCConfigWidgetBase", &FCConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* FCConfigWidgetBase::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 = {"removetemplate_button_clicked", 0, 0 };
    static const TQUMethod slot_1 = {"copyToProject_button_clicked", 0, 0 };
    static const TQUMethod slot_2 = {"newtype_button_clicked", 0, 0 };
    static const TQUMethod slot_3 = {"newsubtype_button_clicked", 0, 0 };
    static const TQUMethod slot_4 = {"remove_button_clicked", 0, 0 };
    static const TQUMethod slot_5 = {"moveup_button_clicked", 0, 0 };
    static const TQUMethod slot_6 = {"movedown_button_clicked", 0, 0 };
    static const TQUMethod slot_7 = {"edittype_button_clicked", 0, 0 };
    static const TQUMethod slot_8 = {"newtemplate_button_clicked", 0, 0 };
    static const TQUMethod slot_9 = {"edittemplate_button_clicked", 0, 0 };
    static const TQUMethod slot_10 = {"edit_template_contents_button_clicked", 0, 0 };
    static const TQUMethod slot_11 = {"edit_template_content_button_clicked", 0, 0 };
    static const TQUMethod slot_12 = {"edit_type_content_button_clicked", 0, 0 };
    static const TQUMethod slot_13 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "removetemplate_button_clicked()", &slot_0, TQMetaData::Public },
	{ "copyToProject_button_clicked()", &slot_1, TQMetaData::Public },
	{ "newtype_button_clicked()", &slot_2, TQMetaData::Public },
	{ "newsubtype_button_clicked()", &slot_3, TQMetaData::Public },
	{ "remove_button_clicked()", &slot_4, TQMetaData::Public },
	{ "moveup_button_clicked()", &slot_5, TQMetaData::Public },
	{ "movedown_button_clicked()", &slot_6, TQMetaData::Public },
	{ "edittype_button_clicked()", &slot_7, TQMetaData::Public },
	{ "newtemplate_button_clicked()", &slot_8, TQMetaData::Public },
	{ "edittemplate_button_clicked()", &slot_9, TQMetaData::Public },
	{ "edit_template_contents_button_clicked()", &slot_10, TQMetaData::Public },
	{ "edit_template_content_button_clicked()", &slot_11, TQMetaData::Public },
	{ "edit_type_content_button_clicked()", &slot_12, TQMetaData::Public },
	{ "languageChange()", &slot_13, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"FCConfigWidgetBase", parentObject,
	slot_tbl, 14,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_FCConfigWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool FCConfigWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: removetemplate_button_clicked(); break;
    case 1: copyToProject_button_clicked(); break;
    case 2: newtype_button_clicked(); break;
    case 3: newsubtype_button_clicked(); break;
    case 4: remove_button_clicked(); break;
    case 5: moveup_button_clicked(); break;
    case 6: movedown_button_clicked(); break;
    case 7: edittype_button_clicked(); break;
    case 8: newtemplate_button_clicked(); break;
    case 9: edittemplate_button_clicked(); break;
    case 10: edit_template_contents_button_clicked(); break;
    case 11: edit_template_content_button_clicked(); break;
    case 12: edit_type_content_button_clicked(); break;
    case 13: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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