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

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

#include "stylepreview.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqtabwidget.h>
#include <ntqprogressbar.h>
#include <ntqspinbox.h>
#include <ntqcombobox.h>
#include <ntqslider.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqscrollbar.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kdialog.h"
#include "stylepreview.ui.h"

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

    Frame3 = new TQFrame( this, "Frame3" );
    Frame3->setFrameShape( TQFrame::StyledPanel );
    Frame3->setFrameShadow( TQFrame::Sunken );
    Frame3Layout = new TQGridLayout( Frame3, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "Frame3Layout"); 

    TabWidget2 = new TQTabWidget( Frame3, "TabWidget2" );

    tab = new TQWidget( TabWidget2, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout"); 

    ProgressBar1 = new TQProgressBar( tab, "ProgressBar1" );
    ProgressBar1->setProgress( 70 );

    tabLayout->addMultiCellWidget( ProgressBar1, 0, 0, 1, 2 );

    PushButton1 = new TQPushButton( tab, "PushButton1" );

    tabLayout->addWidget( PushButton1, 2, 2 );

    SpinBox1 = new TQSpinBox( tab, "SpinBox1" );

    tabLayout->addWidget( SpinBox1, 2, 1 );

    ComboBox1 = new TQComboBox( false, tab, "ComboBox1" );

    tabLayout->addMultiCellWidget( ComboBox1, 3, 3, 1, 2 );

    Slider1 = new TQSlider( tab, "Slider1" );
    Slider1->setOrientation( TQSlider::Horizontal );

    tabLayout->addMultiCellWidget( Slider1, 1, 1, 1, 2 );

    ButtonGroup1 = new TQButtonGroup( tab, "ButtonGroup1" );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( KDialog::spacingHint() );
    ButtonGroup1->layout()->setMargin( KDialog::marginHint() );
    ButtonGroup1Layout = new TQVBoxLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    RadioButton1 = new TQRadioButton( ButtonGroup1, "RadioButton1" );
    RadioButton1->setChecked( true );
    ButtonGroup1Layout->addWidget( RadioButton1 );

    RadioButton2 = new TQRadioButton( ButtonGroup1, "RadioButton2" );
    ButtonGroup1Layout->addWidget( RadioButton2 );

    Line1 = new TQFrame( ButtonGroup1, "Line1" );
    Line1->setProperty( "frameShape", "HLine" );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );
    ButtonGroup1Layout->addWidget( Line1 );

    CheckBox1 = new TQCheckBox( ButtonGroup1, "CheckBox1" );
    CheckBox1->setChecked( true );
    CheckBox1->setTristate( false );
    ButtonGroup1Layout->addWidget( CheckBox1 );

    tabLayout->addMultiCellWidget( ButtonGroup1, 0, 3, 0, 0 );

    ScrollBar1 = new TQScrollBar( tab, "ScrollBar1" );
    ScrollBar1->setMaxValue( 19 );
    ScrollBar1->setOrientation( TQScrollBar::Vertical );

    tabLayout->addMultiCellWidget( ScrollBar1, 0, 3, 3, 3 );
    TabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( TabWidget2, "tab_2" );
    TabWidget2->insertTab( tab_2, TQString::fromLatin1("") );

    Frame3Layout->addWidget( TabWidget2, 0, 0 );
    StylePreviewLayout->addWidget( Frame3 );
    languageChange();
    resize( TQSize(343, 231).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void StylePreview::languageChange()
{
    PushButton1->setText( tr2i18n( "Button" ) );
    ComboBox1->clear();
    ComboBox1->insertItem( tr2i18n( "ComboBox" ) );
    ButtonGroup1->setTitle( tr2i18n( "Button Group" ) );
    RadioButton1->setText( tr2i18n( "RadioButton" ) );
    RadioButton2->setText( tr2i18n( "RadioButton" ) );
    CheckBox1->setText( tr2i18n( "CheckBox" ) );
    TabWidget2->changeTab( tab, tr2i18n( "Tab 1" ) );
    TabWidget2->changeTab( tab_2, tr2i18n( "Tab 2" ) );
}

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

TQMetaObject *StylePreview::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_StylePreview( "StylePreview", &StylePreview::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* StylePreview::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 = {"init", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::Out },
	{ "obj", &static_QUType_ptr, "TQObject", TQUParameter::In },
	{ "ev", &static_QUType_ptr, "TQEvent", TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"eventFilter", 3, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "init()", &slot_0, TQMetaData::Public },
	{ "eventFilter(TQObject*,TQEvent*)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"StylePreview", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_StylePreview.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool StylePreview::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: init(); break;
    case 1: static_QUType_bool.set(_o,eventFilter((TQObject*)static_QUType_ptr.get(_o+1),(TQEvent*)static_QUType_ptr.get(_o+2))); break;
    case 2: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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