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

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

#include "quantapropertiespage.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqwidgetstack.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqtextedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a QuantaPropertiesPage as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
QuantaPropertiesPage::QuantaPropertiesPage( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "QuantaPropertiesPage" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 300, 400 ) );
    QuantaPropertiesPageLayout = new TQGridLayout( this, 1, 1, 11, 6, "QuantaPropertiesPageLayout"); 

    typeStack = new TQWidgetStack( this, "typeStack" );

    WStackPage = new TQWidget( typeStack, "WStackPage" );
    WStackPageLayout = new TQGridLayout( WStackPage, 1, 1, 11, 6, "WStackPageLayout"); 

    parentAttr = new TQCheckBox( WStackPage, "parentAttr" );

    WStackPageLayout->addMultiCellWidget( parentAttr, 1, 1, 0, 3 );

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

    WStackPageLayout->addWidget( TextLabel1, 0, 0 );
    Spacer2 = new TQSpacerItem( 92, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    WStackPageLayout->addItem( Spacer2, 0, 3 );

    typesCombo = new KComboBox( false, WStackPage, "typesCombo" );

    WStackPageLayout->addWidget( typesCombo, 0, 2 );

    prePostGroup = new TQButtonGroup( WStackPage, "prePostGroup" );
    prePostGroup->setColumnLayout(0, TQt::Vertical );
    prePostGroup->layout()->setSpacing( 6 );
    prePostGroup->layout()->setMargin( 11 );
    prePostGroupLayout = new TQGridLayout( prePostGroup->layout() );
    prePostGroupLayout->setAlignment( TQt::AlignTop );

    usePrePostText = new TQCheckBox( prePostGroup, "usePrePostText" );

    prePostGroupLayout->addWidget( usePrePostText, 0, 0 );

    TextLabel1_2 = new TQLabel( prePostGroup, "TextLabel1_2" );

    prePostGroupLayout->addWidget( TextLabel1_2, 1, 0 );

    preTextEdit = new TQTextEdit( prePostGroup, "preTextEdit" );
    preTextEdit->setEnabled( false );

    prePostGroupLayout->addWidget( preTextEdit, 2, 0 );

    TextLabel2 = new TQLabel( prePostGroup, "TextLabel2" );

    prePostGroupLayout->addWidget( TextLabel2, 3, 0 );

    postTextEdit = new TQTextEdit( prePostGroup, "postTextEdit" );
    postTextEdit->setEnabled( false );

    prePostGroupLayout->addWidget( postTextEdit, 4, 0 );

    WStackPageLayout->addMultiCellWidget( prePostGroup, 2, 2, 0, 3 );
    Spacer1 = new TQSpacerItem( 93, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    WStackPageLayout->addItem( Spacer1, 0, 1 );
    typeStack->addWidget( WStackPage, 0 );

    WStackPage_2 = new TQWidget( typeStack, "WStackPage_2" );
    WStackPageLayout_2 = new TQGridLayout( WStackPage_2, 1, 1, 11, 6, "WStackPageLayout_2"); 

    filteringLabel = new TQLabel( WStackPage_2, "filteringLabel" );

    WStackPageLayout_2->addWidget( filteringLabel, 0, 0 );

    actionCombo = new KComboBox( false, WStackPage_2, "actionCombo" );

    WStackPageLayout_2->addWidget( actionCombo, 0, 1 );
    spacer3 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WStackPageLayout_2->addItem( spacer3, 1, 1 );
    typeStack->addWidget( WStackPage_2, 1 );

    QuantaPropertiesPageLayout->addWidget( typeStack, 0, 0 );
    languageChange();
    resize( TQSize(343, 443).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( parentAttr, TQ_SIGNAL( toggled(bool) ), typesCombo, TQ_SLOT( setDisabled(bool) ) );
    connect( usePrePostText, TQ_SIGNAL( toggled(bool) ), preTextEdit, TQ_SLOT( setEnabled(bool) ) );
    connect( usePrePostText, TQ_SIGNAL( toggled(bool) ), postTextEdit, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( typesCombo, parentAttr );

    // buddies
    TextLabel1->setBuddy( typesCombo );
    filteringLabel->setBuddy( actionCombo );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void QuantaPropertiesPage::languageChange()
{
    setCaption( tr2i18n( "Quanta Properties" ) );
    parentAttr->setText( tr2i18n( "&Inherit type from parent (nothing)" ) );
    TextLabel1->setText( tr2i18n( "&Type:" ) );
    prePostGroup->setTitle( TQString::null );
    usePrePostText->setText( tr2i18n( "Use &pre/post text" ) );
    TextLabel1_2->setText( tr2i18n( "Pre-text:" ) );
    TextLabel2->setText( tr2i18n( "Post-text:" ) );
    filteringLabel->setText( tr2i18n( "Filtering &action:" ) );
}

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

TQMetaObject *QuantaPropertiesPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_QuantaPropertiesPage( "QuantaPropertiesPage", &QuantaPropertiesPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* QuantaPropertiesPage::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 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"QuantaPropertiesPage", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_QuantaPropertiesPage.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool QuantaPropertiesPage::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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