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

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

#include "ratingdisplaywidget.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a RatingDisplayWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
RatingDisplayWidget::RatingDisplayWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "RatingDisplayWidget" );
    setPaletteBackgroundColor( TQColor( 250, 248, 241 ) );
    RatingDisplayWidgetLayout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "RatingDisplayWidgetLayout"); 

    layout4 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "layout4"); 
    spacer2_2 = new TQSpacerItem( 21, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    layout4->addItem( spacer2_2 );

    icon = new TQLabel( this, "icon" );
    icon->setMinimumSize( TQSize( 76, 0 ) );
    icon->setAlignment( int( TQLabel::AlignCenter ) );
    layout4->addWidget( icon );
    spacer2 = new TQSpacerItem( 21, 80, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout4->addItem( spacer2 );
    RatingDisplayWidgetLayout->addLayout( layout4 );

    layout5 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "layout5"); 

    raterName = new TQLabel( this, "raterName" );
    raterName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, raterName->sizePolicy().hasHeightForWidth() ) );
    TQFont raterName_font(  raterName->font() );
    raterName_font.setBold( true );
    raterName->setFont( raterName_font ); 
    layout5->addWidget( raterName );

    criteriaListView = new TDEListView( this, "criteriaListView" );
    criteriaListView->addColumn( tr2i18n( "Criteria" ) );
    criteriaListView->addColumn( tr2i18n( "Stars" ) );
    criteriaListView->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 1, criteriaListView->sizePolicy().hasHeightForWidth() ) );
    criteriaListView->setProperty( "selectionMode", "NoSelection" );
    layout5->addWidget( criteriaListView );

    comment = new TQLabel( this, "comment" );
    comment->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, comment->sizePolicy().hasHeightForWidth() ) );
    comment->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );
    layout5->addWidget( comment );

    layout4_2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout4_2"); 
    spacer = new TQSpacerItem( 150, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4_2->addItem( spacer );

    buttonRemove = new KPushButton( this, "buttonRemove" );
    layout4_2->addWidget( buttonRemove );

    buttonEdit = new KPushButton( this, "buttonEdit" );
    layout4_2->addWidget( buttonEdit );
    layout5->addLayout( layout4_2 );
    RatingDisplayWidgetLayout->addLayout( layout5 );
    languageChange();
    resize( TQSize(533, 211).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void RatingDisplayWidget::languageChange()
{
    icon->setText( TQString::null );
    raterName->setText( tr2i18n( "Rater" ) );
    criteriaListView->header()->setLabel( 0, tr2i18n( "Criteria" ) );
    criteriaListView->header()->setLabel( 1, tr2i18n( "Stars" ) );
    comment->setText( tr2i18n( "Comments" ) );
    buttonRemove->setText( tr2i18n( "Remove" ) );
    buttonEdit->setText( tr2i18n( "Edit..." ) );
}

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

TQMetaObject *RatingDisplayWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_RatingDisplayWidget( "RatingDisplayWidget", &RatingDisplayWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* RatingDisplayWidget::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(
	"RatingDisplayWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_RatingDisplayWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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