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

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

#include "pluginconfig.h"

#include <ntqvariant.h>
#include <kicondialog.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a PluginConfig as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
PluginConfig::PluginConfig( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "PluginConfig" );
    setMinimumSize( TQSize( 560, 280 ) );
    PluginConfigLayout = new TQGridLayout( this, 1, 1, 11, 6, "PluginConfigLayout"); 

    validateCheckBox = new TQCheckBox( this, "validateCheckBox" );
    validateCheckBox->setChecked( true );

    PluginConfigLayout->addWidget( validateCheckBox, 1, 0 );
    Spacer10 = new TQSpacerItem( 247, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    PluginConfigLayout->addItem( Spacer10, 1, 1 );

    GroupBox2 = new TQGroupBox( this, "GroupBox2" );
    GroupBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 1, 0, GroupBox2->sizePolicy().hasHeightForWidth() ) );
    GroupBox2->setMargin( 0 );
    GroupBox2->setMidLineWidth( 0 );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new TQGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    TextLabel3_2 = new TQLabel( GroupBox2, "TextLabel3_2" );

    GroupBox2Layout->addWidget( TextLabel3_2, 0, 0 );

    pluginName = new TQLineEdit( GroupBox2, "pluginName" );

    GroupBox2Layout->addMultiCellWidget( pluginName, 0, 0, 1, 2 );

    iconButton = new TDEIconButton( GroupBox2, "iconButton" );
    iconButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, iconButton->sizePolicy().hasHeightForWidth() ) );
    iconButton->setMinimumSize( TQSize( 48, 48 ) );
    iconButton->setMaximumSize( TQSize( 48, 48 ) );

    GroupBox2Layout->addWidget( iconButton, 0, 3 );

    TextLabel3 = new TQLabel( GroupBox2, "TextLabel3" );

    GroupBox2Layout->addWidget( TextLabel3, 2, 0 );

    location = new TQLineEdit( GroupBox2, "location" );

    GroupBox2Layout->addMultiCellWidget( location, 2, 2, 1, 3 );

    pluginFileName = new TQLineEdit( GroupBox2, "pluginFileName" );

    GroupBox2Layout->addMultiCellWidget( pluginFileName, 3, 3, 1, 4 );

    TextLabel4_2 = new TQLabel( GroupBox2, "TextLabel4_2" );

    GroupBox2Layout->addWidget( TextLabel4_2, 3, 0 );

    outputWindow = new TQComboBox( false, GroupBox2, "outputWindow" );
    outputWindow->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, outputWindow->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addMultiCellWidget( outputWindow, 1, 1, 1, 4 );

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

    GroupBox2Layout->addWidget( TextLabel1, 1, 0 );

    locationButton = new TQPushButton( GroupBox2, "locationButton" );
    locationButton->setMaximumSize( TQSize( 28, 32767 ) );

    GroupBox2Layout->addWidget( locationButton, 2, 4 );

    readOnlyBox = new TQCheckBox( GroupBox2, "readOnlyBox" );

    GroupBox2Layout->addMultiCellWidget( readOnlyBox, 5, 5, 0, 1 );

    textLabel1 = new TQLabel( GroupBox2, "textLabel1" );

    GroupBox2Layout->addMultiCellWidget( textLabel1, 4, 4, 0, 1 );

    inputBox = new TQComboBox( false, GroupBox2, "inputBox" );

    GroupBox2Layout->addMultiCellWidget( inputBox, 4, 4, 2, 4 );

    PluginConfigLayout->addMultiCellWidget( GroupBox2, 0, 0, 0, 3 );
    languageChange();
    resize( TQSize(560, 281).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( pluginName, iconButton );
    setTabOrder( iconButton, outputWindow );
    setTabOrder( outputWindow, location );
    setTabOrder( location, locationButton );
    setTabOrder( locationButton, pluginFileName );
    setTabOrder( pluginFileName, inputBox );
    setTabOrder( inputBox, readOnlyBox );
    setTabOrder( readOnlyBox, validateCheckBox );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PluginConfig::languageChange()
{
    setCaption( tr2i18n( "Configure Plugin" ) );
    validateCheckBox->setText( tr2i18n( "Validate plugin" ) );
    GroupBox2->setTitle( tr2i18n( "Plugin Options" ) );
    TextLabel3_2->setText( tr2i18n( "Name:" ) );
    TQToolTip::add( pluginName, tr2i18n( "The plugin name as it appears in the Plugins menu." ) );
    iconButton->setText( TQString::null );
    TextLabel3->setText( tr2i18n( "Location:" ) );
    TQToolTip::add( location, tr2i18n( "The exact location of the plugin. If not set the global search paths setting is used." ) );
    TQToolTip::add( pluginFileName, tr2i18n( "The plugin executable or library name (with extension)." ) );
    TextLabel4_2->setText( tr2i18n( "File name:" ) );
    TextLabel1->setText( tr2i18n( "Output window:" ) );
    locationButton->setText( tr2i18n( "..." ) );
    readOnlyBox->setText( tr2i18n( "&Read only part" ) );
    textLabel1->setText( tr2i18n( "Input:" ) );
    inputBox->clear();
    inputBox->insertItem( tr2i18n( "None" ) );
    inputBox->insertItem( tr2i18n( "Current File" ) );
    inputBox->insertItem( tr2i18n( "Current File Path" ) );
    inputBox->insertItem( tr2i18n( "Project Folder" ) );
}

void PluginConfig::pluginType_highlighted(const TQString&)
{
    tqWarning( "PluginConfig::pluginType_highlighted(const TQString&): Not implemented yet" );
}

void PluginConfig::slotPluginTypeHighlighted(const TQString&)
{
    tqWarning( "PluginConfig::slotPluginTypeHighlighted(const TQString&): Not implemented yet" );
}

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

TQMetaObject *PluginConfig::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PluginConfig( "PluginConfig", &PluginConfig::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PluginConfig::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"pluginType_highlighted", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"slotPluginTypeHighlighted", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "pluginType_highlighted(const TQString&)", &slot_0, TQMetaData::Public },
	{ "slotPluginTypeHighlighted(const TQString&)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PluginConfig", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PluginConfig.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool PluginConfig::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: pluginType_highlighted((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 1: slotPluginTypeHighlighted((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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