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

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

#include "firstrunwizard.h"

#include <ntqvariant.h>
#include <kactivelabel.h>
#include <dbsetup.h>
#include <ntqpushbutton.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "dbsetup.h"
#include "firstrunwizard.ui.h"

/*
 *  Constructs a FirstRunWizard 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.
 */
FirstRunWizard::FirstRunWizard( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : KWizard( parent, name, modal, fl )
{
    if ( !name )
	setName( "FirstRunWizard" );

    WizardPage = new TQWidget( this, "WizardPage" );
    WizardPageLayout = new TQGridLayout( WizardPage, 1, 1, 11, 6, "WizardPageLayout"); 

    text1 = new KActiveLabel( WizardPage, "text1" );

    WizardPageLayout->addMultiCellWidget( text1, 0, 1, 0, 0 );

    picture1 = new TQLabel( WizardPage, "picture1" );
    picture1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, picture1->sizePolicy().hasHeightForWidth() ) );
    picture1->setFrameShape( TQLabel::Box );
    picture1->setScaledContents( false );

    WizardPageLayout->addWidget( picture1, 0, 2 );

    text1_2 = new KActiveLabel( WizardPage, "text1_2" );

    WizardPageLayout->addMultiCellWidget( text1_2, 2, 2, 0, 2 );
    spacer1 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    WizardPageLayout->addItem( spacer1, 1, 1 );
    addPage( WizardPage, TQString("") );

    WizardPage_2 = new TQWidget( this, "WizardPage_2" );
    WizardPageLayout_2 = new TQHBoxLayout( WizardPage_2, 11, 6, "WizardPageLayout_2"); 

    text3 = new KActiveLabel( WizardPage_2, "text3" );
    text3->setLineWidth( 1 );
    WizardPageLayout_2->addWidget( text3 );
    addPage( WizardPage_2, TQString("") );

    WizardPage_3 = new TQWidget( this, "WizardPage_3" );
    WizardPage_3Layout = new TQGridLayout( WizardPage_3, 1, 1, 11, 6, "WizardPage_3Layout"); 
    spacer15 = new TQSpacerItem( 20, 257, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WizardPage_3Layout->addMultiCell( spacer15, 1, 2, 0, 0 );
    spacer14 = new TQSpacerItem( 20, 194, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WizardPage_3Layout->addItem( spacer14, 2, 1 );

    dbActiveLabel = new KActiveLabel( WizardPage_3, "dbActiveLabel" );

    WizardPage_3Layout->addWidget( dbActiveLabel, 0, 0 );

    dbSetup7 = new DbSetup( WizardPage_3, "dbSetup7" );

    WizardPage_3Layout->addMultiCellWidget( dbSetup7, 0, 1, 1, 1 );
    addPage( WizardPage_3, TQString("") );

    WizardPage_4 = new TQWidget( this, "WizardPage_4" );
    WizardPage_4Layout = new TQHBoxLayout( WizardPage_4, 11, 6, "WizardPage_4Layout"); 

    text4 = new KActiveLabel( WizardPage_4, "text4" );
    text4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, text4->sizePolicy().hasHeightForWidth() ) );
    text4->setMaximumSize( TQSize( 32767, 32767 ) );
    WizardPage_4Layout->addWidget( text4 );
    spacer3 = new TQSpacerItem( 21, 294, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WizardPage_4Layout->addItem( spacer3 );

    picture4 = new TQLabel( WizardPage_4, "picture4" );
    picture4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, picture4->sizePolicy().hasHeightForWidth() ) );
    picture4->setFrameShape( TQLabel::Box );
    picture4->setScaledContents( false );
    WizardPage_4Layout->addWidget( picture4 );
    addPage( WizardPage_4, TQString("") );
    languageChange();
    resize( TQSize(824, 410).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FirstRunWizard::languageChange()
{
    setCaption( tr2i18n( "First-Run Wizard" ) );
    text1->setText( tr2i18n( "<h1>Welcome to Amarok!</h1>\n"
"<p>There are many media-players around these days, this is true. Amarok however provides an aural experience so pleasurable it always has you coming back for more. What is missing from most players is an interface that does not get in your way. Amarok tries to be a little different, and at the same time intuitive. It provides a simple drag-and-drop interface that makes playlist handling simple and fun. By using Amarok we truly hope you will:</p>\n"
"<p align=\"center\"><i><b>\"Rediscover your music!\"</b></i> </p>" ) );
    text1_2->setText( tr2i18n( "<h2>First-run Wizard</h2>\n"
"<p>This wizard will help you setup Amarok in three easy steps. Click <i>Next</i> to begin, or if you do not like wizards, click <i>Skip</i>.</p>" ) );
    setTitle( WizardPage, TQString::null );
    text3->setText( tr2i18n( "<p>Please select the folders on the right where your music files are stored.</p>\n"
"<p>Doing so is highly recommended, and will enhance the features available to you.</p>\n"
"<p>If you wish, Amarok is able to monitor these folders for new files and can automatically add them to the collection.</p>" ) );
    setTitle( WizardPage_2, tr2i18n( "Locate your Music" ) );
    dbActiveLabel->setText( tr2i18n( "Amarok uses a database to store information about your music. If you are not sure which to use, press Next.\n"
"<p><b>MySQL</b> or <b>Postgresql</b> are faster than <b>sqlite</b>, but require additional setup.</p>\n"
"<ul>\n"
"<li><a href=\"https://community.kde.org/Amarok/Archives/Amarok_1.4/User_Guide/MySQL_HowTo\">Instructions for configuring MySQL</a>.</li>\n"
"<li><a href=\"https://community.kde.org/Amarok/Archives/Amarok_1.4/User_Guide/PostgreSQLHowTo\">Instructions for configuring Postgresql</a>.</li>\n"
"</ul>" ) );
    setTitle( WizardPage_3, tr2i18n( "Database Setup" ) );
    text4->setText( tr2i18n( "<h1>Congratulations!</h1>\n"
"<p>Amarok is ready for use! When you click finish Amarok will appear and begin scanning the folders in your collection.</p>\n"
"<p>Amarok's playlist-window will show your <b>Collection</b> on the left and the <b>Playlist</b> on the right. Drag and drop music from the Collection to the Playlist and press <b>Play</b>.</p>\n"
"<p>If you want more help or a tutorial, please check out the <a href=\"help:/amarok\">Amarok handbook</a>. We hope you enjoy using Amarok.</p>\n"
"<p align=\"right\">The Amarok developers</p>" ) );
    setTitle( WizardPage_4, TQString::null );
}

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

TQMetaObject *FirstRunWizard::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FirstRunWizard( "FirstRunWizard", &FirstRunWizard::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* FirstRunWizard::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 TQUParameter param_slot_0[] = {
	{ "s", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"openLink", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQUMethod slot_2 = {"invokeHandbook", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "openLink(const TQString&)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected },
	{ "invokeHandbook()", &slot_2, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"FirstRunWizard", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_FirstRunWizard.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool FirstRunWizard::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: openLink((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 1: languageChange(); break;
    case 2: invokeHandbook(); break;
    default:
	return KWizard::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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