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

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

#include "pathmapperdialogs.h"

#include <ntqvariant.h>
#include <kled.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    groupBox6 = new TQGroupBox( this, "groupBox6" );
    groupBox6->setColumnLayout(0, TQt::Vertical );
    groupBox6->layout()->setSpacing( 6 );
    groupBox6->layout()->setMargin( 11 );
    groupBox6Layout = new TQGridLayout( groupBox6->layout() );
    groupBox6Layout->setAlignment( TQt::AlignTop );

    lblDebuggerLocalBasedir = new TQLabel( groupBox6, "lblDebuggerLocalBasedir" );
    lblDebuggerLocalBasedir->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblDebuggerLocalBasedir->sizePolicy().hasHeightForWidth() ) );

    groupBox6Layout->addWidget( lblDebuggerLocalBasedir, 0, 0 );

    lblDebuggerServerBasedir = new TQLabel( groupBox6, "lblDebuggerServerBasedir" );
    lblDebuggerServerBasedir->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblDebuggerServerBasedir->sizePolicy().hasHeightForWidth() ) );

    groupBox6Layout->addWidget( lblDebuggerServerBasedir, 1, 0 );

    lineLocalPath = new TQLineEdit( groupBox6, "lineLocalPath" );

    groupBox6Layout->addWidget( lineLocalPath, 0, 1 );

    lineServerPath = new TQLineEdit( groupBox6, "lineServerPath" );

    groupBox6Layout->addWidget( lineServerPath, 1, 1 );

    PathMapperDialogSLayout->addWidget( groupBox6, 0, 0 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );

    PathMapperDialogSLayout->addLayout( Layout1, 4, 0 );

    groupBox7 = new TQGroupBox( this, "groupBox7" );
    groupBox7->setColumnLayout(0, TQt::Vertical );
    groupBox7->layout()->setSpacing( 6 );
    groupBox7->layout()->setMargin( 11 );
    groupBox7Layout = new TQHBoxLayout( groupBox7->layout() );
    groupBox7Layout->setAlignment( TQt::AlignTop );

    listHistory = new TQListView( groupBox7, "listHistory" );
    listHistory->addColumn( tr2i18n( "Local Directory" ) );
    listHistory->addColumn( tr2i18n( "Server Directory" ) );
    listHistory->setFrameShape( TQListView::StyledPanel );
    listHistory->setResizePolicy( TQScrollView::Manual );
    listHistory->setAllColumnsShowFocus( true );
    listHistory->setResizeMode( TQListView::AllColumns );
    groupBox7Layout->addWidget( listHistory );

    PathMapperDialogSLayout->addWidget( groupBox7, 2, 0 );

    groupBox8 = new TQGroupBox( this, "groupBox8" );
    groupBox8->setColumnLayout(0, TQt::Vertical );
    groupBox8->layout()->setSpacing( 6 );
    groupBox8->layout()->setMargin( 11 );
    groupBox8Layout = new TQGridLayout( groupBox8->layout() );
    groupBox8Layout->setAlignment( TQt::AlignTop );

    lblTranslates = new TQLabel( groupBox8, "lblTranslates" );
    lblTranslates->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblTranslates->sizePolicy().hasHeightForWidth() ) );

    groupBox8Layout->addWidget( lblTranslates, 1, 0 );

    lblOriginal = new TQLabel( groupBox8, "lblOriginal" );
    lblOriginal->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, lblOriginal->sizePolicy().hasHeightForWidth() ) );

    groupBox8Layout->addWidget( lblOriginal, 0, 0 );

    ledTranslationExists = new KLed( groupBox8, "ledTranslationExists" );
    ledTranslationExists->setMinimumSize( TQSize( 22, 22 ) );
    ledTranslationExists->setMaximumSize( TQSize( 22, 22 ) );
    ledTranslationExists->setState( KLed::On );
    ledTranslationExists->setShape( KLed::Circular );
    ledTranslationExists->setLook( KLed::Raised );

    groupBox8Layout->addWidget( ledTranslationExists, 1, 2 );

    lineTranslated = new TQLineEdit( groupBox8, "lineTranslated" );
    lineTranslated->setEnabled( false );
    lineTranslated->setPaletteForegroundColor( TQColor( 0, 0, 0 ) );

    groupBox8Layout->addWidget( lineTranslated, 1, 1 );

    linePath = new TQLineEdit( groupBox8, "linePath" );
    linePath->setEnabled( false );
    linePath->setPaletteForegroundColor( TQColor( 0, 0, 0 ) );

    groupBox8Layout->addMultiCellWidget( linePath, 0, 0, 1, 2 );

    PathMapperDialogSLayout->addWidget( groupBox8, 1, 0 );
    languageChange();
    resize( TQSize(590, 519).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PathMapperDialogS::languageChange()
{
    setCaption( tr2i18n( "Directory Mapping" ) );
    groupBox6->setTitle( tr2i18n( "Directory Mapping" ) );
    lblDebuggerLocalBasedir->setText( tr2i18n( "Local basedir:" ) );
    lblDebuggerServerBasedir->setText( tr2i18n( "Server basedir:" ) );
    TQWhatsThis::add( lineLocalPath, tr2i18n( "This is where the local part of path is specified. If a file is located on the computer running Quanta at \"/home/user/htdocs/project/file.php\" and that file is located on the server as \"/var/www/project/file.php\", local basedir should be \"/home/user/htdocs/\" and server basedir should be \"/var/www/\".\n"
"The quanta will know that files starting with \"/home/user/project/\" on the local computer, will start with \"/var/www/\" on the remote computer." ) );
    TQWhatsThis::add( lineServerPath, tr2i18n( "This is where the server part of path is specified. If a file is located on the computer running Quanta at \"/home/user/htdocs/project/file.php\" and that file is located on the server as \"/var/www/project/file.php\", local basedir should be \"/home/user/htdocs/\" and server basedir should be \"/var/www/\".\n"
"The quanta will know that files starting with \"/home/user/project/\" on the local computer, will start with \"/var/www/\" on the remote computer." ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    groupBox7->setTitle( tr2i18n( "Previous Mappings" ) );
    listHistory->header()->setLabel( 0, tr2i18n( "Local Directory" ) );
    listHistory->header()->setLabel( 1, tr2i18n( "Server Directory" ) );
    TQWhatsThis::add( listHistory, tr2i18n( "This is a list of previously used mappings. Click on one to use it" ) );
    groupBox8->setTitle( tr2i18n( "Sample" ) );
    lblTranslates->setText( tr2i18n( "Translates to:" ) );
    lblOriginal->setText( tr2i18n( "Original path:" ) );
    TQToolTip::add( ledTranslationExists, tr2i18n( "Indicates whether the translated path exists on disk or not" ) );
    TQWhatsThis::add( ledTranslationExists, tr2i18n( "This indicator tells you whether the translated path exists on local disk or not." ) );
    TQWhatsThis::add( lineTranslated, tr2i18n( "This field shows what the \"original path\" above will look like after translation." ) );
    TQWhatsThis::add( linePath, tr2i18n( "This field shows the path currently needing to be translated." ) );
}

void PathMapperDialogS::slotHistoryclicked()
{
    tqWarning( "PathMapperDialogS::slotHistoryclicked(): Not implemented yet" );
}

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

TQMetaObject *PathMapperDialogS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PathMapperDialogS( "PathMapperDialogS", &PathMapperDialogS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PathMapperDialogS::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 = {"slotHistoryclicked", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotHistoryclicked()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PathMapperDialogS", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PathMapperDialogS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool PathMapperDialogS::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotHistoryclicked(); break;
    case 1: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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