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

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

#include "wizardbase.h"

#include <ntqvariant.h>
#include <tqwidgetstack.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqwidgetstack.h>
#include <ntqwidget.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqtextedit.h>
#include <ntqprogressbar.h>
#include <ntqcheckbox.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "wizardbase.ui.h"

/*
 *  Constructs a WizardBase 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.
 */
WizardBase::WizardBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "WizardBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 530, 0 ) );
    WizardBaseLayout = new TQVBoxLayout( this, 11, 6, "WizardBaseLayout"); 
    WizardBaseLayout->setResizeMode( TQLayout::Fixed );

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

    splash = new TQLabel( this, "splash" );
    splash->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, splash->sizePolicy().hasHeightForWidth() ) );
    splash->setFrameShape( TQLabel::Box );
    splash->setFrameShadow( TQLabel::Sunken );
    splash->setScaledContents( false );
    layout8->addWidget( splash );

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

    titleLabel = new TQLabel( this, "titleLabel" );
    titleLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, titleLabel->sizePolicy().hasHeightForWidth() ) );
    titleLabel->setAlignment( int( TQLabel::AlignVCenter ) );
    layout7->addWidget( titleLabel );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );
    layout7->addWidget( line1 );

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

    WStackPage = new TQWidget( mainStack, "WStackPage" );
    WStackPageLayout = new TQVBoxLayout( WStackPage, 0, 0, "WStackPageLayout"); 

    installStack = new TQWidgetStack( WStackPage, "installStack" );

    Introduction = new TQWidget( installStack, "Introduction" );
    IntroductionLayout = new TQVBoxLayout( Introduction, 11, 6, "IntroductionLayout"); 

    textLabel2 = new TQLabel( Introduction, "textLabel2" );
    textLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    IntroductionLayout->addWidget( textLabel2 );

    layout12 = new TQHBoxLayout( 0, 0, 6, "layout12"); 
    spacer3 = new TQSpacerItem( 30, 10, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout12->addItem( spacer3 );

    appIcon = new TQLabel( Introduction, "appIcon" );
    appIcon->setScaledContents( false );
    layout12->addWidget( appIcon );

    appNameLabel = new TQLabel( Introduction, "appNameLabel" );
    appNameLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, appNameLabel->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( appNameLabel );
    IntroductionLayout->addLayout( layout12 );
    spacer4 = new TQSpacerItem( 10, 30, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    IntroductionLayout->addItem( spacer4 );

    textLabel4 = new TQLabel( Introduction, "textLabel4" );
    IntroductionLayout->addWidget( textLabel4 );
    spacer5 = new TQSpacerItem( 21, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    IntroductionLayout->addItem( spacer5 );
    installStack->addWidget( Introduction, 0 );

    Components = new TQWidget( installStack, "Components" );
    ComponentsLayout = new TQVBoxLayout( Components, 11, 6, "ComponentsLayout"); 

    textLabel5 = new TQLabel( Components, "textLabel5" );
    textLabel5->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    ComponentsLayout->addWidget( textLabel5 );

    componentList = new TQListView( Components, "componentList" );
    componentList->addColumn( tr2i18n( "Component name" ) );
    ComponentsLayout->addWidget( componentList );

    componentInfo = new TQTextEdit( Components, "componentInfo" );
    componentInfo->setTextFormat( TQTextEdit::RichText );
    componentInfo->setWordWrap( TQTextEdit::WidgetWidth );
    componentInfo->setReadOnly( true );
    ComponentsLayout->addWidget( componentInfo );
    installStack->addWidget( Components, 1 );

    WStackPage_2 = new TQWidget( installStack, "WStackPage_2" );
    WStackPageLayout_2 = new TQVBoxLayout( WStackPage_2, 11, 6, "WStackPageLayout_2"); 

    pleaseWaitLabel = new TQLabel( WStackPage_2, "pleaseWaitLabel" );
    pleaseWaitLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    WStackPageLayout_2->addWidget( pleaseWaitLabel );
    spacer14_2 = new TQSpacerItem( 16, 30, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    WStackPageLayout_2->addItem( spacer14_2 );

    progressLabel1 = new TQLabel( WStackPage_2, "progressLabel1" );
    WStackPageLayout_2->addWidget( progressLabel1 );

    progressLabel2 = new TQLabel( WStackPage_2, "progressLabel2" );
    progressLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, progressLabel2->sizePolicy().hasHeightForWidth() ) );
    progressLabel2->setTextFormat( TQLabel::RichText );
    progressLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );
    WStackPageLayout_2->addWidget( progressLabel2 );

    progressBar = new TQProgressBar( WStackPage_2, "progressBar" );
    progressBar->setProgress( 0 );
    WStackPageLayout_2->addWidget( progressBar );

    timeRemaining = new TQLabel( WStackPage_2, "timeRemaining" );
    timeRemaining->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    WStackPageLayout_2->addWidget( timeRemaining );
    spacer15 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WStackPageLayout_2->addItem( spacer15 );

    logFrame = new TQFrame( WStackPage_2, "logFrame" );
    logFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, logFrame->sizePolicy().hasHeightForWidth() ) );
    logFrame->setFrameShape( TQFrame::NoFrame );
    logFrame->setFrameShadow( TQFrame::Plain );
    logFrameLayout = new TQHBoxLayout( logFrame, 0, 0, "logFrameLayout"); 
    logSpacer_2 = new TQSpacerItem( 224, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    logFrameLayout->addItem( logSpacer_2 );

    logButton = new TQPushButton( logFrame, "logButton" );
    logFrameLayout->addWidget( logButton );
    WStackPageLayout_2->addWidget( logFrame );
    installStack->addWidget( WStackPage_2, 2 );

    WStackPage_3 = new TQWidget( installStack, "WStackPage_3" );
    WStackPageLayout_3 = new TQVBoxLayout( WStackPage_3, 11, 6, "WStackPageLayout_3"); 

    textLabel1 = new TQLabel( WStackPage_3, "textLabel1" );
    textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    WStackPageLayout_3->addWidget( textLabel1 );
    spacer8 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    WStackPageLayout_3->addItem( spacer8 );

    layout7_2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout7_2"); 
    spacer16 = new TQSpacerItem( 30, 50, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout7_2->addMultiCell( spacer16, 0, 2, 0, 0 );

    uninstallBox = new TQCheckBox( WStackPage_3, "uninstallBox" );
    uninstallBox->setChecked( true );

    layout7_2->addWidget( uninstallBox, 2, 1 );

    shortcutBox = new TQCheckBox( WStackPage_3, "shortcutBox" );
    shortcutBox->setChecked( true );

    layout7_2->addWidget( shortcutBox, 1, 1 );
    WStackPageLayout_3->addLayout( layout7_2 );
    spacer9 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WStackPageLayout_3->addItem( spacer9 );
    installStack->addWidget( WStackPage_3, 3 );
    WStackPageLayout->addWidget( installStack );
    mainStack->addWidget( WStackPage, 0 );

    WStackPage_4 = new TQWidget( mainStack, "WStackPage_4" );
    WStackPageLayout_4 = new TQVBoxLayout( WStackPage_4, 0, 0, "WStackPageLayout_4"); 

    uninstallStack = new TQWidgetStack( WStackPage_4, "uninstallStack" );

    WStackPage_5 = new TQWidget( uninstallStack, "WStackPage_5" );
    WStackPageLayout_5 = new TQVBoxLayout( WStackPage_5, 11, 6, "WStackPageLayout_5"); 

    textLabel1_3 = new TQLabel( WStackPage_5, "textLabel1_3" );
    WStackPageLayout_5->addWidget( textLabel1_3 );

    appList = new TQListView( WStackPage_5, "appList" );
    appList->addColumn( tr2i18n( "Application Name" ) );
    WStackPageLayout_5->addWidget( appList );
    uninstallStack->addWidget( WStackPage_5, 0 );

    WStackPage_6 = new TQWidget( uninstallStack, "WStackPage_6" );
    WStackPageLayout_6 = new TQVBoxLayout( WStackPage_6, 11, 6, "WStackPageLayout_6"); 

    textLabel2_3 = new TQLabel( WStackPage_6, "textLabel2_3" );
    textLabel2_3->setTextFormat( TQLabel::RichText );
    WStackPageLayout_6->addWidget( textLabel2_3 );

    fileList = new TQListBox( WStackPage_6, "fileList" );
    WStackPageLayout_6->addWidget( fileList );
    uninstallStack->addWidget( WStackPage_6, 1 );

    WStackPage_7 = new TQWidget( uninstallStack, "WStackPage_7" );
    WStackPageLayout_7 = new TQVBoxLayout( WStackPage_7, 11, 6, "WStackPageLayout_7"); 
    spacer14 = new TQSpacerItem( 16, 30, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    WStackPageLayout_7->addItem( spacer14 );

    pleaseWaitLabel2 = new TQLabel( WStackPage_7, "pleaseWaitLabel2" );
    WStackPageLayout_7->addWidget( pleaseWaitLabel2 );
    spacer15_2 = new TQSpacerItem( 41, 156, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WStackPageLayout_7->addItem( spacer15_2 );

    logFrame_2 = new TQFrame( WStackPage_7, "logFrame_2" );
    logFrame_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, logFrame_2->sizePolicy().hasHeightForWidth() ) );
    logFrame_2->setFrameShape( TQFrame::NoFrame );
    logFrame_2->setFrameShadow( TQFrame::Plain );
    logFrame_2Layout = new TQHBoxLayout( logFrame_2, 0, 0, "logFrame_2Layout"); 
    logSpacer_2_2 = new TQSpacerItem( 224, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    logFrame_2Layout->addItem( logSpacer_2_2 );

    logButton2 = new TQPushButton( logFrame_2, "logButton2" );
    logFrame_2Layout->addWidget( logButton2 );
    WStackPageLayout_7->addWidget( logFrame_2 );
    uninstallStack->addWidget( WStackPage_7, 2 );
    WStackPageLayout_4->addWidget( uninstallStack );
    mainStack->addWidget( WStackPage_4, 1 );
    layout7->addWidget( mainStack );
    layout8->addLayout( layout7 );
    WizardBaseLayout->addLayout( layout8 );

    line2 = new TQFrame( this, "line2" );
    line2->setFrameShape( TQFrame::HLine );
    line2->setFrameShadow( TQFrame::Sunken );
    line2->setFrameShape( TQFrame::HLine );
    WizardBaseLayout->addWidget( line2 );

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 
    spacer1 = new TQSpacerItem( 61, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );

    previousButton = new TQPushButton( this, "previousButton" );
    previousButton->setEnabled( false );
    layout2->addWidget( previousButton );

    nextButton = new TQPushButton( this, "nextButton" );
    nextButton->setDefault( true );
    layout2->addWidget( nextButton );

    cancelButton = new TQPushButton( this, "cancelButton" );
    layout2->addWidget( cancelButton );
    WizardBaseLayout->addLayout( layout2 );
    languageChange();
    resize( TQSize(587, 384).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( nextButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPressed() ) );
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( cancelPressed() ) );
    connect( componentList, TQ_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQ_SLOT( componentSelected(TQListViewItem*) ) );
    connect( logButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( logPressed() ) );
    connect( logButton2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( logPressed() ) );
    connect( previousButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( previousPressed() ) );

    // tab order
    setTabOrder( componentList, componentInfo );
    setTabOrder( componentInfo, logButton );
    setTabOrder( logButton, previousButton );
    setTabOrder( previousButton, nextButton );
    setTabOrder( nextButton, cancelButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void WizardBase::languageChange()
{
    setCaption( tr2i18n( "[AppName] installation" ) );
    titleLabel->setText( tr2i18n( "<b>[AppName] installation</b>" ) );
    textLabel2->setText( tr2i18n( "<p>This wizard will guide you through the installation of:" ) );
    appNameLabel->setText( tr2i18n( "<b>[AppName]</b>" ) );
    textLabel4->setText( tr2i18n( "Please click \"Next\" to continue" ) );
    textLabel5->setText( tr2i18n( "Select the components to install" ) );
    componentList->header()->setLabel( 0, tr2i18n( "Component name" ) );
    componentInfo->setText( tr2i18n( "<i>Select a component from the list above to see a brief description of it.</i>" ) );
    pleaseWaitLabel->setText( tr2i18n( "Please wait while the software is compiled and installed" ) );
    progressLabel1->setText( tr2i18n( "Progress Label 1" ) );
    progressLabel2->setText( tr2i18n( "Progress Label 2" ) );
    timeRemaining->setText( tr2i18n( "Estimated time remaining: <b>Calculating...</b>" ) );
    logButton->setText( tr2i18n( "View log file..." ) );
    textLabel1->setText( tr2i18n( "<p>The installation is complete.</p>" ) );
    uninstallBox->setText( tr2i18n( "Place a shortcut to the uninstaller on the desktop" ) );
    shortcutBox->setText( tr2i18n( "Place a shortcut to [AppName] on the desktop" ) );
    textLabel1_3->setText( tr2i18n( "Please select from the list below the applications you wish to uninstall." ) );
    appList->header()->setLabel( 0, tr2i18n( "Application Name" ) );
    textLabel2_3->setText( tr2i18n( "The following files will be removed.<br>\n"
"Please check this list, and click <b>next</b> to continue." ) );
    pleaseWaitLabel2->setText( tr2i18n( "Please wait while the selected packages are removed..." ) );
    logButton2->setText( tr2i18n( "View log file..." ) );
    previousButton->setText( tr2i18n( "< Previous" ) );
    nextButton->setText( tr2i18n( "Next >" ) );
    cancelButton->setText( tr2i18n( "Cancel" ) );
}

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

TQMetaObject *WizardBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_WizardBase( "WizardBase", &WizardBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* WizardBase::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 TQUParameter param_slot_0[] = {
	{ "n", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"setAppName", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"nextPressed", 0, 0 };
    static const TQUMethod slot_2 = {"previousPressed", 0, 0 };
    static const TQUMethod slot_3 = {"cancelPressed", 0, 0 };
    static const TQUMethod slot_4 = {"browsePressed", 0, 0 };
    static const TQUMethod slot_5 = {"runPressed", 0, 0 };
    static const TQUMethod slot_6 = {"logPressed", 0, 0 };
    static const TQUParameter param_slot_7[] = {
	{ "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_7 = {"componentSelected", 1, param_slot_7 };
    static const TQUMethod slot_8 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "setAppName(TQString)", &slot_0, TQMetaData::Public },
	{ "nextPressed()", &slot_1, TQMetaData::Public },
	{ "previousPressed()", &slot_2, TQMetaData::Public },
	{ "cancelPressed()", &slot_3, TQMetaData::Public },
	{ "browsePressed()", &slot_4, TQMetaData::Public },
	{ "runPressed()", &slot_5, TQMetaData::Public },
	{ "logPressed()", &slot_6, TQMetaData::Public },
	{ "componentSelected(TQListViewItem*)", &slot_7, TQMetaData::Public },
	{ "languageChange()", &slot_8, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"WizardBase", parentObject,
	slot_tbl, 9,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_WizardBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool WizardBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setAppName((TQString)static_QUType_TQString.get(_o+1)); break;
    case 1: nextPressed(); break;
    case 2: previousPressed(); break;
    case 3: cancelPressed(); break;
    case 4: browsePressed(); break;
    case 5: runPressed(); break;
    case 6: logPressed(); break;
    case 7: componentSelected((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 8: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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