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

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

#include "gssettingswidget.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "gssettingswidget.ui.h"

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

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

    GSSettingsWidgetLayout->addWidget( mConfigureButton, 0, 0 );
    spacer1 = new TQSpacerItem( 286, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GSSettingsWidgetLayout->addItem( spacer1, 0, 1 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( KDialog::spacingHint() );
    groupBox1->layout()->setMargin( KDialog::marginHint() );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    groupBox1Layout->addWidget( textLabel1 );

    kcfg_Interpreter = new KURLRequester( groupBox1, "kcfg_Interpreter" );
    groupBox1Layout->addWidget( kcfg_Interpreter );

    mDetectedVersion = new TQLabel( groupBox1, "mDetectedVersion" );
    groupBox1Layout->addWidget( mDetectedVersion );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    groupBox1Layout->addWidget( textLabel2 );

    kcfg_NonAntialiasingArguments = new KLineEdit( groupBox1, "kcfg_NonAntialiasingArguments" );
    groupBox1Layout->addWidget( kcfg_NonAntialiasingArguments );

    textLabel3 = new TQLabel( groupBox1, "textLabel3" );
    groupBox1Layout->addWidget( textLabel3 );

    kcfg_AntialiasingArguments = new KLineEdit( groupBox1, "kcfg_AntialiasingArguments" );
    groupBox1Layout->addWidget( kcfg_AntialiasingArguments );

    GSSettingsWidgetLayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 );
    languageChange();
    resize( TQSize(395, 243).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel1->setBuddy( kcfg_Interpreter );
    textLabel2->setBuddy( kcfg_NonAntialiasingArguments );
    textLabel3->setBuddy( kcfg_AntialiasingArguments );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GSSettingsWidget::languageChange()
{
    mConfigureButton->setText( tr2i18n( "Auto Con&figure" ) );
    groupBox1->setTitle( tr2i18n( "Settings" ) );
    textLabel1->setText( tr2i18n( "&Interpreter:" ) );
    TQWhatsThis::add( kcfg_Interpreter, tr2i18n( "Ghostscript is the basic renderer (i.e. the program which draws)" ) );
    mDetectedVersion->setText( tr2i18n( "(detected gs version: %1)" ) );
    textLabel2->setText( tr2i18n( "&Non-antialiasing arguments:" ) );
    TQWhatsThis::add( kcfg_NonAntialiasingArguments, tr2i18n( "Anti-aliasing makes the result look better, but it makes the display take longer" ) );
    textLabel3->setText( tr2i18n( "An&tialiasing arguments:" ) );
    TQWhatsThis::add( kcfg_AntialiasingArguments, tr2i18n( "Anti-aliasing makes the result look better, but it makes the display take longer" ) );
}

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

TQMetaObject *GSSettingsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GSSettingsWidget( "GSSettingsWidget", &GSSettingsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* GSSettingsWidget::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[] = {
	{ "v", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"setDetectedVersion", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "setDetectedVersion(TQString)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    static const TQUMethod signal_0 = {"configClicked", 0, 0 };
    static const TQMetaData signal_tbl[] = {
	{ "configClicked()", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"GSSettingsWidget", parentObject,
	slot_tbl, 2,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_GSSettingsWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL configClicked
void GSSettingsWidget::configClicked()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

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

bool GSSettingsWidget::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: configClicked(); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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