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

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

#include "timed.h"

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

/*
 *  Constructs a TimedLogoutDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
TimedLogoutDlg::TimedLogoutDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "TimedLogoutDlg" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    TimedLogoutDlgLayout = new TQVBoxLayout( this, 0, 0, "TimedLogoutDlgLayout"); 

    frame3 = new TQFrame( this, "frame3" );
    frame3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, frame3->sizePolicy().hasHeightForWidth() ) );
    frame3->setFrameShape( TQFrame::StyledPanel );
    frame3->setFrameShadow( TQFrame::Raised );
    frame3->setLineWidth( 2 );
    frame3->setMargin( 0 );
    frame3->setMidLineWidth( 0 );
    frame3Layout = new TQHBoxLayout( frame3, 11, 6, "frame3Layout"); 

    layout10 = new TQVBoxLayout( 0, 0, 0, "layout10"); 

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

    layout6 = new TQVBoxLayout( 0, 0, 0, "layout6"); 
    spacer3_2 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    layout6->addItem( spacer3_2 );

    m_logo = new TQLabel( frame3, "m_logo" );
    m_logo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_logo->sizePolicy().hasHeightForWidth() ) );
    m_logo->setMinimumSize( TQSize( 48, 48 ) );
    m_logo->setScaledContents( true );
    layout6->addWidget( m_logo );
    spacer3 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    layout6->addItem( spacer3 );
    layout8->addLayout( layout6 );

    layout7 = new TQVBoxLayout( 0, 7, 6, "layout7"); 

    m_title = new TQLabel( frame3, "m_title" );
    m_title->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_title->sizePolicy().hasHeightForWidth() ) );
    TQFont m_title_font(  m_title->font() );
    m_title_font.setBold( true );
    m_title->setFont( m_title_font ); 
    m_title->setTextFormat( TQLabel::PlainText );
    m_title->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout7->addWidget( m_title );

    m_text = new TQLabel( frame3, "m_text" );
    m_text->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, m_text->sizePolicy().hasHeightForWidth() ) );
    m_text->setTextFormat( TQLabel::RichText );
    m_text->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    layout7->addWidget( m_text );
    spacer4 = new TQSpacerItem( 30, 0, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    layout7->addItem( spacer4 );
    layout8->addLayout( layout7 );
    layout10->addLayout( layout8 );

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 
    spacer2 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer2 );

    pushButton1 = new TQPushButton( frame3, "pushButton1" );
    pushButton1->setOn( false );
    layout9->addWidget( pushButton1 );
    spacer2_2 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer2_2 );

    pushButton2 = new TQPushButton( frame3, "pushButton2" );
    pushButton2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, pushButton2->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( pushButton2 );
    spacer2_2_2 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer2_2_2 );
    layout10->addLayout( layout9 );
    frame3Layout->addLayout( layout10 );
    TimedLogoutDlgLayout->addWidget( frame3 );
    languageChange();
    resize( TQSize(381, 131).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( pushButton2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TimedLogoutDlg::languageChange()
{
    setCaption( tr2i18n( "Confirmation" ) );
    m_title->setText( tr2i18n( "Would you like to shutdown your computer?" ) );
    m_text->setText( tr2i18n( "If you do not act, your computer will shutdown\n"
"after X automatically." ) );
    pushButton1->setText( tr2i18n( "Confirm" ) );
    pushButton2->setText( tr2i18n( "Cancel" ) );
}

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

TQMetaObject *TimedLogoutDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TimedLogoutDlg( "TimedLogoutDlg", &TimedLogoutDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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