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

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

#include "uploadprofiledlgs.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <kpassdlg.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    linePath = new TQLineEdit( this, "linePath" );

    UploadProfileDlgSLayout->addMultiCellWidget( linePath, 3, 3, 1, 10 );

    TextLabel4 = new TQLabel( this, "TextLabel4" );

    UploadProfileDlgSLayout->addWidget( TextLabel4, 1, 0 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );

    UploadProfileDlgSLayout->addWidget( TextLabel2, 2, 0 );

    TextLabel2_2 = new TQLabel( this, "TextLabel2_2" );

    UploadProfileDlgSLayout->addWidget( TextLabel2_2, 3, 0 );

    textLabel1 = new TQLabel( this, "textLabel1" );

    UploadProfileDlgSLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 1 );

    defaultProfile = new TQCheckBox( this, "defaultProfile" );

    UploadProfileDlgSLayout->addMultiCellWidget( defaultProfile, 4, 4, 0, 4 );

    lineUser = new TQLineEdit( this, "lineUser" );
    lineUser->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, lineUser->sizePolicy().hasHeightForWidth() ) );

    UploadProfileDlgSLayout->addMultiCellWidget( lineUser, 2, 2, 1, 2 );

    TextLabel3 = new TQLabel( this, "TextLabel3" );

    UploadProfileDlgSLayout->addWidget( TextLabel3, 2, 3 );

    cancelButton = new KPushButton( this, "cancelButton" );
    cancelButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, cancelButton->sizePolicy().hasHeightForWidth() ) );
    cancelButton->setMinimumSize( TQSize( 90, 0 ) );

    UploadProfileDlgSLayout->addMultiCellWidget( cancelButton, 5, 5, 9, 10 );

    okButton = new KPushButton( this, "okButton" );
    okButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, okButton->sizePolicy().hasHeightForWidth() ) );
    okButton->setMinimumSize( TQSize( 90, 0 ) );
    okButton->setAutoDefault( true );

    UploadProfileDlgSLayout->addMultiCellWidget( okButton, 5, 5, 7, 8 );
    spacer3 = new TQSpacerItem( 445, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    UploadProfileDlgSLayout->addMultiCell( spacer3, 5, 5, 0, 6 );

    lineHost = new TQLineEdit( this, "lineHost" );
    lineHost->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, lineHost->sizePolicy().hasHeightForWidth() ) );

    UploadProfileDlgSLayout->addMultiCellWidget( lineHost, 1, 1, 1, 3 );

    comboProtocol = new TQComboBox( false, this, "comboProtocol" );

    UploadProfileDlgSLayout->addMultiCellWidget( comboProtocol, 1, 1, 5, 7 );

    port = new TQLineEdit( this, "port" );
    port->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, port->sizePolicy().hasHeightForWidth() ) );

    UploadProfileDlgSLayout->addWidget( port, 1, 10 );

    TextLabel1_2 = new TQLabel( this, "TextLabel1_2" );

    UploadProfileDlgSLayout->addMultiCellWidget( TextLabel1_2, 1, 1, 8, 9 );

    keepPasswd = new TQCheckBox( this, "keepPasswd" );
    keepPasswd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, keepPasswd->sizePolicy().hasHeightForWidth() ) );
    keepPasswd->setChecked( false );

    UploadProfileDlgSLayout->addMultiCellWidget( keepPasswd, 2, 2, 6, 10 );

    linePasswd = new KPasswordEdit( this, "linePasswd" );
    linePasswd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, linePasswd->sizePolicy().hasHeightForWidth() ) );

    UploadProfileDlgSLayout->addMultiCellWidget( linePasswd, 2, 2, 4, 5 );

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    TextLabel1->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    UploadProfileDlgSLayout->addWidget( TextLabel1, 1, 4 );

    lineProfileName = new KLineEdit( this, "lineProfileName" );

    UploadProfileDlgSLayout->addMultiCellWidget( lineProfileName, 0, 0, 2, 10 );
    languageChange();
    resize( TQSize(710, 215).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( lineProfileName, lineHost );
    setTabOrder( lineHost, comboProtocol );
    setTabOrder( comboProtocol, port );
    setTabOrder( port, lineUser );
    setTabOrder( lineUser, linePasswd );
    setTabOrder( linePasswd, keepPasswd );
    setTabOrder( keepPasswd, linePath );
    setTabOrder( linePath, defaultProfile );
    setTabOrder( defaultProfile, okButton );
    setTabOrder( okButton, cancelButton );

    // buddies
    TextLabel4->setBuddy( lineHost );
    TextLabel2->setBuddy( lineUser );
    TextLabel2_2->setBuddy( linePath );
    textLabel1->setBuddy( lineProfileName );
    TextLabel3->setBuddy( linePasswd );
    TextLabel1_2->setBuddy( port );
    TextLabel1->setBuddy( comboProtocol );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void UploadProfileDlgS::languageChange()
{
    setCaption( tr2i18n( "Upload Profile" ) );
    TextLabel4->setText( tr2i18n( "&Host:" ) );
    TextLabel2->setText( tr2i18n( "&User:" ) );
    TextLabel2_2->setText( tr2i18n( "Pa&th:" ) );
    textLabel1->setText( tr2i18n( "Profile &name:" ) );
    defaultProfile->setText( tr2i18n( "Use as &default profile" ) );
    TextLabel3->setText( tr2i18n( "Pass&word:" ) );
    cancelButton->setText( tr2i18n( "&Cancel" ) );
    okButton->setText( tr2i18n( "&OK" ) );
    TextLabel1_2->setText( tr2i18n( "Po&rt:" ) );
    keepPasswd->setText( tr2i18n( "&Store password on disc" ) );
    TQToolTip::add( keepPasswd, tr2i18n( "Keep the password in a file. DANGEROUS! Read the \"What's This?\" text." ) );
    TQWhatsThis::add( keepPasswd, tr2i18n( "<qt>If you check this box, the password will be saved in the local Quanta configuration file, so every time you start Quanta and load this project, the password will be loaded and you don't have to enter it. Altough the local configuration file is readable only by you and the password\n"
"is obscured, saving the password in any file is a security risk. Use this option at your own risk.<br>\n"
"<i>Note:</i> due to the security concerns, the password is not present in the project file, and moving the project files to another computer or uploading the project to a server will not move/upload the password to the new place.</qt>" ) );
    TextLabel1->setText( tr2i18n( "&Protocol:" ) );
}

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

TQMetaObject *UploadProfileDlgS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_UploadProfileDlgS( "UploadProfileDlgS", &UploadProfileDlgS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* UploadProfileDlgS::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 TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"UploadProfileDlgS", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_UploadProfileDlgS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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