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

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

#include "codegenerationwizardbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

static const char* const image0_data[] = { 
"16 15 38 1",
". c None",
"b c #004062",
"# c #00406a",
"e c #00446a",
"a c #08446a",
"J c #185d8b",
"I c #206194",
"H c #296994",
"F c #29699c",
"G c #296d9c",
"D c #31719c",
"E c #3175a4",
"C c #3979a4",
"B c #397da4",
"A c #4181ac",
"y c #4185ac",
"z c #4a89ac",
"x c #528db4",
"v c #5291b4",
"w c #5291bd",
"t c #5a99bd",
"u c #5a9dbd",
"s c #62a5c5",
"r c #6aa5c5",
"o c #6aaec5",
"p c #73aecd",
"q c #7bb6cd",
"l c #7bbacd",
"k c #7bbad5",
"m c #83bad5",
"h c #83c2d5",
"i c #8bc2de",
"f c #94cee6",
"n c #9ccade",
"j c #a4d2e6",
"g c #acdaee",
"d c #acdeee",
"c c #b4deee",
".....#a.........",
"....bcde........",
"....acfca.......",
"....bghide......",
"....ajklmca.....",
"....bnopopde....",
"....aqrsrsrca...",
"....brtututub...",
"....atvvwvvva...",
"....bxyzyzye....",
"....aAABABa.....",
"....bCDEDe......",
"....aFGHa.......",
"....bIJe........",
".....#a........."};

static const char* const image1_data[] = { 
"16 15 38 1",
". c None",
"e c #004062",
"a c #00406a",
"b c #00446a",
"# c #08446a",
"I c #185d8b",
"J c #206194",
"F c #296994",
"H c #29699c",
"G c #296d9c",
"C c #31719c",
"D c #3175a4",
"E c #3979a4",
"A c #397da4",
"B c #4181ac",
"x c #4185ac",
"y c #4a89ac",
"z c #528db4",
"v c #5291b4",
"w c #5291bd",
"u c #5a99bd",
"t c #5a9dbd",
"r c #62a5c5",
"q c #6aa5c5",
"o c #6aaec5",
"n c #73aecd",
"s c #7bb6cd",
"k c #7bbacd",
"j c #7bbad5",
"l c #83bad5",
"h c #83c2d5",
"g c #8bc2de",
"f c #94cee6",
"p c #9ccade",
"m c #a4d2e6",
"i c #acdaee",
"c c #acdeee",
"d c #b4deee",
"........#a......",
".......bcde.....",
"......#dfd#.....",
".....bcghie.....",
"....#djklm#.....",
"...bcnonnpe.....",
"..#dqrqrqs#.....",
"..etututuqe.....",
"..#vwvvvwu#.....",
"...bxyxyxze.....",
"....#ABABB#.....",
".....bCDCEe.....",
"......#FGH#.....",
".......bIJe.....",
"........#a......"};


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

    select = new TQWidget( this, "select" );
    selectLayout = new TQVBoxLayout( select, 0, 10, "selectLayout"); 

    TextLabel1 = new TQLabel( select, "TextLabel1" );
    selectLayout->addWidget( TextLabel1 );

    Frame4 = new TQFrame( select, "Frame4" );
    Frame4->setFrameShape( TQFrame::Box );
    Frame4->setFrameShadow( TQFrame::Plain );
    Frame4->setMargin( 10 );
    Frame4Layout = new TQGridLayout( Frame4, 1, 1, 20, 10, "Frame4Layout"); 

    m_addButton = new TQPushButton( Frame4, "m_addButton" );
    m_addButton->setPixmap( image0 );

    Frame4Layout->addWidget( m_addButton, 1, 1 );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Frame4Layout->addItem( Spacer1, 0, 1 );

    m_selectedList = new TQListView( Frame4, "m_selectedList" );
    m_selectedList->addColumn( tr2i18n( "Classes Selected" ) );
    m_selectedList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 0, m_selectedList->sizePolicy().hasHeightForWidth() ) );
    m_selectedList->setSelectionMode( TQListView::Extended );

    Frame4Layout->addMultiCellWidget( m_selectedList, 0, 4, 2, 2 );

    m_removeButton = new TQPushButton( Frame4, "m_removeButton" );
    m_removeButton->setPixmap( image1 );

    Frame4Layout->addWidget( m_removeButton, 3, 1 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    Frame4Layout->addItem( Spacer3, 2, 1 );

    m_availableList = new TQListView( Frame4, "m_availableList" );
    m_availableList->addColumn( tr2i18n( "Classes Available" ) );
    m_availableList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 0, m_availableList->sizePolicy().hasHeightForWidth() ) );
    m_availableList->setSelectionMode( TQListView::Extended );

    Frame4Layout->addMultiCellWidget( m_availableList, 0, 4, 0, 0 );
    Spacer1_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Frame4Layout->addItem( Spacer1_2, 4, 1 );
    selectLayout->addWidget( Frame4 );
    addPage( select, TQString("") );

    status = new TQWidget( this, "status" );
    statusLayout = new TQVBoxLayout( status, 0, 10, "statusLayout"); 

    m_label = new TQLabel( status, "m_label" );
    statusLayout->addWidget( m_label );

    GroupBox2 = new TQGroupBox( status, "GroupBox2" );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 10 );
    GroupBox2->layout()->setMargin( 20 );
    GroupBox2Layout = new TQVBoxLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    m_statusList = new TQListView( GroupBox2, "m_statusList" );
    m_statusList->addColumn( tr2i18n( "Class" ) );
    m_statusList->addColumn( tr2i18n( "Generation Status" ) );
    GroupBox2Layout->addWidget( m_statusList );
    statusLayout->addWidget( GroupBox2 );
    addPage( status, TQString("") );
    languageChange();
    resize( TQSize(396, 386).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_addButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( selectClass() ) );
    connect( m_removeButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deselectClass() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CodeGenerationWizardBase::languageChange()
{
    setCaption( tr2i18n( "Code Generation Wizard" ) );
    TextLabel1->setText( tr2i18n( "Place all the classes you want to generate code\n"
"for in the right hand side list" ) );
    m_addButton->setText( TQString::null );
    TQToolTip::add( m_addButton, tr2i18n( "Add class for code generation" ) );
    m_selectedList->header()->setLabel( 0, tr2i18n( "Classes Selected" ) );
    m_removeButton->setText( TQString::null );
    TQToolTip::add( m_removeButton, tr2i18n( "Remove class from Code Generation" ) );
    m_availableList->header()->setLabel( 0, tr2i18n( "Classes Available" ) );
    setTitle( select, tr2i18n( "Select Classes" ) );
    m_label->setText( tr2i18n( "Press the Generation button to start the code generation" ) );
    GroupBox2->setTitle( tr2i18n( "Generation Status" ) );
    m_statusList->header()->setLabel( 0, tr2i18n( "Class" ) );
    m_statusList->header()->setLabel( 1, tr2i18n( "Generation Status" ) );
    setTitle( status, tr2i18n( "Code Generation Status" ) );
}

void CodeGenerationWizardBase::selectClass()
{
    tqWarning( "CodeGenerationWizardBase::selectClass(): Not implemented yet" );
}

void CodeGenerationWizardBase::deselectClass()
{
    tqWarning( "CodeGenerationWizardBase::deselectClass(): Not implemented yet" );
}

void CodeGenerationWizardBase::classGenerated(UMLClassifier*)
{
    tqWarning( "CodeGenerationWizardBase::classGenerated(UMLClassifier*): Not implemented yet" );
}

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

TQMetaObject *CodeGenerationWizardBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CodeGenerationWizardBase( "CodeGenerationWizardBase", &CodeGenerationWizardBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CodeGenerationWizardBase::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 = {"selectClass", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_ptr, "UMLClassifier", TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"classGenerated", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQUMethod slot_3 = {"deselectClass", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "selectClass()", &slot_0, TQMetaData::Public },
	{ "classGenerated(UMLClassifier*)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected },
	{ "deselectClass()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CodeGenerationWizardBase", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CodeGenerationWizardBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CodeGenerationWizardBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: selectClass(); break;
    case 1: classGenerated((UMLClassifier*)static_QUType_ptr.get(_o+1)); break;
    case 2: languageChange(); break;
    case 3: deselectClass(); break;
    default:
	return KWizard::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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