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

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

#include "configwizard.h"

#include <ntqvariant.h>
#include <tdelocale.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
/*
 *  Constructs a ConfigWizard as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qwizard will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qwizard.
 */
ConfigWizard::ConfigWizard( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : KWizard( parent, name, modal, fl )
{
    if ( !name )
	setName( "ConfigWizard" );

    mOSPage = new TQWidget( this, "mOSPage" );
    mOSPageLayout = new TQVBoxLayout( mOSPage, 0, 0, "mOSPageLayout"); 

    TextLabel1_2 = new TQLabel( mOSPage, "TextLabel1_2" );
    mOSPageLayout->addWidget( TextLabel1_2 );

    mOSSpacer = new TQFrame( mOSPage, "mOSSpacer" );
    mOSSpacer->setFrameShadow( TQFrame::Plain );
    mOSSpacer->setFrameShape( TQFrame::NoFrame );
    mOSSpacer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, mOSSpacer->sizePolicy().hasHeightForWidth() ) );
    mOSPageLayout->addWidget( mOSSpacer );

    mOSBox = new TQButtonGroup( mOSPage, "mOSBox" );
    mOSBox->setColumnLayout(0, TQt::Vertical );
    mOSBox->layout()->setSpacing( 6 );
    mOSBox->layout()->setMargin( 11 );
    mOSBoxLayout = new TQVBoxLayout( mOSBox->layout() );
    mOSBoxLayout->setAlignment( TQt::AlignTop );

    RadioButton7 = new TQRadioButton( mOSBox, "RadioButton7" );
    mOSBoxLayout->addWidget( RadioButton7 );

    RadioButton8 = new TQRadioButton( mOSBox, "RadioButton8" );
    mOSBoxLayout->addWidget( RadioButton8 );
    mOSPageLayout->addWidget( mOSBox );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    mOSPageLayout->addItem( Spacer1 );
    addPage( mOSPage, TQString("") );

    mDistributionPage = new TQWidget( this, "mDistributionPage" );
    mDistributionPageLayout = new TQVBoxLayout( mDistributionPage, 0, 0, "mDistributionPageLayout"); 

    mDistributionBox = new TQButtonGroup( mDistributionPage, "mDistributionBox" );
    mDistributionBox->setColumnLayout(0, TQt::Vertical );
    mDistributionBox->layout()->setSpacing( 6 );
    mDistributionBox->layout()->setMargin( 11 );
    mDistributionBoxLayout = new TQVBoxLayout( mDistributionBox->layout() );
    mDistributionBoxLayout->setAlignment( TQt::AlignTop );

    mDistrib1 = new TQRadioButton( mDistributionBox, "mDistrib1" );
    mDistrib1->setChecked( true );
    mDistributionBoxLayout->addWidget( mDistrib1 );

    mDistrib2 = new TQRadioButton( mDistributionBox, "mDistrib2" );
    mDistributionBoxLayout->addWidget( mDistrib2 );

    mDistrib3 = new TQRadioButton( mDistributionBox, "mDistrib3" );
    mDistributionBoxLayout->addWidget( mDistrib3 );

    mDistrib4 = new TQRadioButton( mDistributionBox, "mDistrib4" );
    mDistributionBoxLayout->addWidget( mDistrib4 );

    mDistrib5 = new TQRadioButton( mDistributionBox, "mDistrib5" );
    mDistributionBoxLayout->addWidget( mDistrib5 );

    mDistrib6 = new TQRadioButton( mDistributionBox, "mDistrib6" );
    mDistributionBoxLayout->addWidget( mDistrib6 );

    mDistrib7 = new TQRadioButton( mDistributionBox, "mDistrib7" );
    mDistributionBoxLayout->addWidget( mDistrib7 );
    mDistributionPageLayout->addWidget( mDistributionBox );
    mDistribSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    mDistributionPageLayout->addItem( mDistribSpacer );
    addPage( mDistributionPage, TQString("") );

    mPathsPage = new TQWidget( this, "mPathsPage" );
    mPathsPageLayout = new TQVBoxLayout( mPathsPage, 0, 0, "mPathsPageLayout"); 

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

    mServicesLabel = new TQLabel( mPathsPage, "mServicesLabel" );
    mServicesLayout->addWidget( mServicesLabel );

    mServicesButtonLayout = new TQHBoxLayout( 0, 0, 0, "mServicesButtonLayout"); 

    mServicesPath = new KLineEdit( mPathsPage, "mServicesPath" );
    mServicesPath->setMinimumSize( TQSize( 100, 0 ) );
    mServicesPath->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, mServicesPath->sizePolicy().hasHeightForWidth() ) );
    mServicesPath->setFocusPolicy( KLineEdit::StrongFocus );
    mServicesButtonLayout->addWidget( mServicesPath );

    mBrowseServices = new TQPushButton( mPathsPage, "mBrowseServices" );
    mServicesButtonLayout->addWidget( mBrowseServices );
    mServicesLayout->addLayout( mServicesButtonLayout );
    mPathsPageLayout->addLayout( mServicesLayout );

    mSpacer = new TQFrame( mPathsPage, "mSpacer" );
    mSpacer->setFrameShadow( TQFrame::Plain );
    mSpacer->setFrameShape( TQFrame::NoFrame );
    mSpacer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, mSpacer->sizePolicy().hasHeightForWidth() ) );
    mSpacer->setMinimumSize( TQSize( 0, 10 ) );
    mPathsPageLayout->addWidget( mSpacer );

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

    mRunlevelLabel = new TQLabel( mPathsPage, "mRunlevelLabel" );
    mRunlevelLayout->addWidget( mRunlevelLabel );

    mRunlevelButtonLayout = new TQHBoxLayout( 0, 0, 0, "mRunlevelButtonLayout"); 

    mRunlevelPath = new KLineEdit( mPathsPage, "mRunlevelPath" );
    mRunlevelPath->setMinimumSize( TQSize( 100, 0 ) );
    mRunlevelPath->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, mRunlevelPath->sizePolicy().hasHeightForWidth() ) );
    mRunlevelPath->setFocusPolicy( KLineEdit::StrongFocus );
    mRunlevelButtonLayout->addWidget( mRunlevelPath );

    mBrowseRunlevel = new TQPushButton( mPathsPage, "mBrowseRunlevel" );
    mRunlevelButtonLayout->addWidget( mBrowseRunlevel );
    mRunlevelLayout->addLayout( mRunlevelButtonLayout );
    mPathsPageLayout->addLayout( mRunlevelLayout );
    mEmptySpace = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    mPathsPageLayout->addItem( mEmptySpace );
    addPage( mPathsPage, TQString("") );

    mFinishedPage = new TQWidget( this, "mFinishedPage" );
    mFinishedPageLayout = new TQVBoxLayout( mFinishedPage, 0, 0, "mFinishedPageLayout"); 

    TextLabel1 = new TQLabel( mFinishedPage, "TextLabel1" );
    TextLabel1->setTextFormat( TQLabel::RichText );
    TextLabel1->setAlignment( int( TQLabel::AlignTop | TQLabel::AlignLeft ) );
    mFinishedPageLayout->addWidget( TextLabel1 );
    addPage( mFinishedPage, TQString("") );
    languageChange();
    resize( TQSize(394, 291).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( mDistributionBox, TQ_SIGNAL( clicked(int) ), this, TQ_SLOT( chooseDistribution(int) ) );
    connect( mBrowseServices, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseServices() ) );
    connect( mBrowseRunlevel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseRunlevels() ) );

    // buddies
    mServicesLabel->setBuddy( mServicesPath );
    mRunlevelLabel->setBuddy( mRunlevelPath );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigWizard::languageChange()
{
    setCaption( tr2i18n( "Configuration Wizard" ) );
    TextLabel1_2->setText( tr2i18n( "<h3>What Operating System do you use?</h3>" ) );
    mOSBox->setTitle( tr2i18n( "Choose Your Operating System" ) );
    RadioButton7->setText( tr2i18n( "&Linux" ) );
    RadioButton8->setText( tr2i18n( "&Other" ) );
    setTitle( mOSPage, tr2i18n( "Operating System" ) );
    mDistributionBox->setTitle( tr2i18n( "Choose Your Distribution" ) );
    mDistrib1->setText( tr2i18n( "&Debian GNU/Linux" ) );
    mDistrib2->setText( tr2i18n( "&Red Hat Linux" ) );
    mDistrib3->setText( tr2i18n( "&SuSE Linux" ) );
    mDistrib4->setText( tr2i18n( "&Mandrake Linux" ) );
    mDistrib5->setText( tr2i18n( "&Corel Linux OS" ) );
    mDistrib6->setText( tr2i18n( "Conec&tiva Linux" ) );
    mDistrib7->setText( tr2i18n( "&Other" ) );
    setTitle( mDistributionPage, tr2i18n( "Distribution" ) );
    mServicesLabel->setText( tr2i18n( "&Service path:" ) );
    TQToolTip::add( mServicesPath, tr2i18n( "Enter the path to the folder containing the services" ) );
    mBrowseServices->setText( tr2i18n( "&Browse..." ) );
    TQToolTip::add( mBrowseServices, tr2i18n( "Select the folder containing the services" ) );
    mRunlevelLabel->setText( tr2i18n( "&Runlevel path:" ) );
    TQToolTip::add( mRunlevelPath, tr2i18n( "Enter the path to the folder containing the runlevel folders" ) );
    mBrowseRunlevel->setText( tr2i18n( "Br&owse..." ) );
    TQToolTip::add( mBrowseRunlevel, tr2i18n( "Select the folder containing the runlevel folders " ) );
    setTitle( mPathsPage, tr2i18n( "Paths" ) );
    TextLabel1->setText( tr2i18n( "<h1>Congratulations!</h1>\n"
"<p>\n"
"You have finished the initial configuration of SysV-Init Editor. <b>Press</b> the button labeled <b>Finish</b> to start editing your init-configuration.\n"
"</p>" ) );
    setTitle( mFinishedPage, tr2i18n( "Configuration Complete" ) );
}

void ConfigWizard::browseRunlevels()
{
    tqWarning( "ConfigWizard::browseRunlevels(): Not implemented yet" );
}

void ConfigWizard::chooseDistribution(int)
{
    tqWarning( "ConfigWizard::chooseDistribution(int): Not implemented yet" );
}

void ConfigWizard::browseServices()
{
    tqWarning( "ConfigWizard::browseServices(): Not implemented yet" );
}

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

TQMetaObject *ConfigWizard::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigWizard( "ConfigWizard", &ConfigWizard::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConfigWizard::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 = KWizard::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQUMethod slot_1 = {"browseRunlevels", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"chooseDistribution", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"browseServices", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "browseRunlevels()", &slot_1, TQMetaData::Protected },
	{ "chooseDistribution(int)", &slot_2, TQMetaData::Protected },
	{ "browseServices()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ConfigWizard", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConfigWizard.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ConfigWizard::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: browseRunlevels(); break;
    case 2: chooseDistribution((int)static_QUType_int.get(_o+1)); break;
    case 3: browseServices(); break;
    default:
	return KWizard::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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