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

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

#include "previewwidget.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqprogressbar.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqspinbox.h>
#include <ntqscrollbar.h>
#include <ntqslider.h>
#include <ntqtextview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    Layout6 = new TQHBoxLayout( 0, 0, 6, "Layout6"); 

    Layout17 = new TQVBoxLayout( 0, 0, 6, "Layout17"); 

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    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 );

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

    ButtonGroup2 = new TQButtonGroup( this, "ButtonGroup2" );
    ButtonGroup2->setColumnLayout(0, TQt::Vertical );
    ButtonGroup2->layout()->setSpacing( 6 );
    ButtonGroup2->layout()->setMargin( 11 );
    ButtonGroup2Layout = new TQVBoxLayout( ButtonGroup2->layout() );
    ButtonGroup2Layout->setAlignment( TQt::AlignTop );

    CheckBox1 = new TQCheckBox( ButtonGroup2, "CheckBox1" );
    CheckBox1->setChecked( true );
    ButtonGroup2Layout->addWidget( CheckBox1 );

    CheckBox2 = new TQCheckBox( ButtonGroup2, "CheckBox2" );
    ButtonGroup2Layout->addWidget( CheckBox2 );
    Layout17->addWidget( ButtonGroup2 );

    ProgressBar1 = new TQProgressBar( this, "ProgressBar1" );
    ProgressBar1->setProgress( 50 );
    Layout17->addWidget( ProgressBar1 );
    Layout6->addLayout( Layout17 );

    Layout5 = new TQVBoxLayout( 0, 0, 6, "Layout5"); 

    LineEdit1 = new TQLineEdit( this, "LineEdit1" );
    Layout5->addWidget( LineEdit1 );

    ComboBox1 = new TQComboBox( false, this, "ComboBox1" );
    Layout5->addWidget( ComboBox1 );

    Layout13 = new TQHBoxLayout( 0, 0, 6, "Layout13"); 

    SpinBox1 = new TQSpinBox( this, "SpinBox1" );
    Layout13->addWidget( SpinBox1 );

    PushButton1 = new TQPushButton( this, "PushButton1" );
    Layout13->addWidget( PushButton1 );
    Layout5->addLayout( Layout13 );

    ScrollBar1 = new TQScrollBar( this, "ScrollBar1" );
    ScrollBar1->setOrientation( TQScrollBar::Horizontal );
    Layout5->addWidget( ScrollBar1 );

    Slider1 = new TQSlider( this, "Slider1" );
    Slider1->setOrientation( TQSlider::Horizontal );
    Layout5->addWidget( Slider1 );

    textView = new TQTextView( this, "textView" );
    textView->setMaximumSize( TQSize( 32767, 50 ) );
    Layout5->addWidget( textView );
    Layout6->addLayout( Layout5 );
    PreviewWidgetBaseLayout->addLayout( Layout6 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PreviewWidgetBaseLayout->addItem( Spacer2 );
    languageChange();
    resize( TQSize(378, 236).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PreviewWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Preview Window" ) );
    ButtonGroup1->setTitle( tr2i18n( "ButtonGroup" ) );
    RadioButton1->setText( tr2i18n( "RadioButton1" ) );
    RadioButton2->setText( tr2i18n( "RadioButton2" ) );
    RadioButton3->setText( tr2i18n( "RadioButton3" ) );
    ButtonGroup2->setTitle( tr2i18n( "ButtonGroup2" ) );
    CheckBox1->setText( tr2i18n( "CheckBox1" ) );
    CheckBox2->setText( tr2i18n( "CheckBox2" ) );
    LineEdit1->setText( tr2i18n( "LineEdit" ) );
    ComboBox1->clear();
    ComboBox1->insertItem( tr2i18n( "ComboBox" ) );
    PushButton1->setText( tr2i18n( "PushButton" ) );
    textView->setText( tr2i18n( "<p>\n"
"<a href=\"http://www.trolltech.com\"> http://www.trolltech.com </a>\n"
"</p>\n"
"<p>\n"
"<a href=\"http://www.kde.org\"> http://www.kde.org </a>\n"
"</p>" ) );
}

void PreviewWidgetBase::init()
{
}

void PreviewWidgetBase::destroy()
{
}

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

TQMetaObject *PreviewWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PreviewWidgetBase( "PreviewWidgetBase", &PreviewWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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