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

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

#include "openprojectlayout.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a OpenProjectLayout 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.
 */
OpenProjectLayout::OpenProjectLayout( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "OpenProjectLayout" );
    OpenProjectLayoutLayout = new TQVBoxLayout( this, 11, 6, "OpenProjectLayoutLayout"); 

    buttonGroup5 = new TQButtonGroup( this, "buttonGroup5" );
    buttonGroup5->setColumnLayout(0, TQt::Vertical );
    buttonGroup5->layout()->setSpacing( 6 );
    buttonGroup5->layout()->setMargin( 11 );
    buttonGroup5Layout = new TQHBoxLayout( buttonGroup5->layout() );
    buttonGroup5Layout->setAlignment( TQt::AlignTop );

    m_pProjPathRequester = new KURLRequester( buttonGroup5, "m_pProjPathRequester" );
    buttonGroup5Layout->addWidget( m_pProjPathRequester );
    OpenProjectLayoutLayout->addWidget( buttonGroup5 );

    buttonGroup6 = new TQButtonGroup( this, "buttonGroup6" );
    buttonGroup6->setColumnLayout(0, TQt::Vertical );
    buttonGroup6->layout()->setSpacing( 6 );
    buttonGroup6->layout()->setMargin( 11 );
    buttonGroup6Layout = new TQVBoxLayout( buttonGroup6->layout() );
    buttonGroup6Layout->setAlignment( TQt::AlignTop );

    m_pRecentList = new TQListBox( buttonGroup6, "m_pRecentList" );
    buttonGroup6Layout->addWidget( m_pRecentList );

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 
    spacer4 = new TQSpacerItem( 281, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer4 );

    m_pRemoveButton = new TQPushButton( buttonGroup6, "m_pRemoveButton" );
    layout9->addWidget( m_pRemoveButton );
    buttonGroup6Layout->addLayout( layout9 );
    OpenProjectLayoutLayout->addWidget( buttonGroup6 );

    layout9_2 = new TQHBoxLayout( 0, 0, 6, "layout9_2"); 
    spacer6 = new TQSpacerItem( 201, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9_2->addItem( spacer6 );

    m_pOpenButton = new TQPushButton( this, "m_pOpenButton" );
    m_pOpenButton->setDefault( true );
    layout9_2->addWidget( m_pOpenButton );

    m_pCancelButton = new TQPushButton( this, "m_pCancelButton" );
    layout9_2->addWidget( m_pCancelButton );
    OpenProjectLayoutLayout->addLayout( layout9_2 );
    languageChange();
    resize( TQSize(417, 384).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_pOpenButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( m_pCancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( m_pRemoveButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotRemoveRecent() ) );
    connect( m_pRecentList, TQ_SIGNAL( highlighted(TQListBoxItem*) ), this, TQ_SLOT( slotSelectRecent(TQListBoxItem*) ) );
    connect( m_pRecentList, TQ_SIGNAL( doubleClicked(TQListBoxItem*) ), this, TQ_SLOT( slotOpenRecent(TQListBoxItem*) ) );
    connect( m_pProjPathRequester, TQ_SIGNAL( urlSelected(const TQString&) ), this, TQ_SLOT( slotProjectSelected(const TQString&) ) );
    connect( m_pRecentList, TQ_SIGNAL( returnPressed(TQListBoxItem*) ), this, TQ_SLOT( slotOpenRecent(TQListBoxItem*) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void OpenProjectLayout::languageChange()
{
    setCaption( tr2i18n( "Open Project" ) );
    buttonGroup5->setTitle( tr2i18n( "Project Path" ) );
    buttonGroup6->setTitle( tr2i18n( "Recent Projects" ) );
    m_pRemoveButton->setText( tr2i18n( "Remove" ) );
    m_pOpenButton->setText( tr2i18n( "&Open" ) );
    m_pCancelButton->setText( tr2i18n( "C&ancel" ) );
}

void OpenProjectLayout::slotRemoveRecent()
{
    tqWarning( "OpenProjectLayout::slotRemoveRecent(): Not implemented yet" );
}

void OpenProjectLayout::slotSelectRecent(TQListBoxItem*)
{
    tqWarning( "OpenProjectLayout::slotSelectRecent(TQListBoxItem*): Not implemented yet" );
}

void OpenProjectLayout::slotOpenRecent(TQListBoxItem*)
{
    tqWarning( "OpenProjectLayout::slotOpenRecent(TQListBoxItem*): Not implemented yet" );
}

void OpenProjectLayout::slotProjectSelected(const TQString&)
{
    tqWarning( "OpenProjectLayout::slotProjectSelected(const TQString&): Not implemented yet" );
}

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

TQMetaObject *OpenProjectLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_OpenProjectLayout( "OpenProjectLayout", &OpenProjectLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* OpenProjectLayout::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 TQUMethod slot_1 = {"slotRemoveRecent", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_ptr, "TQListBoxItem", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"slotSelectRecent", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_ptr, "TQListBoxItem", TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"slotOpenRecent", 1, param_slot_3 };
    static const TQUParameter param_slot_4[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"slotProjectSelected", 1, param_slot_4 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotRemoveRecent()", &slot_1, TQMetaData::Protected },
	{ "slotSelectRecent(TQListBoxItem*)", &slot_2, TQMetaData::Protected },
	{ "slotOpenRecent(TQListBoxItem*)", &slot_3, TQMetaData::Protected },
	{ "slotProjectSelected(const TQString&)", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"OpenProjectLayout", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_OpenProjectLayout.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool OpenProjectLayout::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: slotRemoveRecent(); break;
    case 2: slotSelectRecent((TQListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 3: slotOpenRecent((TQListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 4: slotProjectSelected((const TQString&)static_QUType_TQString.get(_o+1)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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