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

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

#include "projectuploads.h"

#include <ntqvariant.h>
#include <uploadtreeview.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <kprogress.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "../treeviews/uploadtreeview.h"

/*
 *  Constructs a ProjectUploadS 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.
 */
ProjectUploadS::ProjectUploadS( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "ProjectUploadS" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMaximumSize( TQSize( 32767, 32767 ) );
    setSizeGripEnabled( false );
    ProjectUploadSLayout = new TQGridLayout( this, 1, 1, 11, 6, "ProjectUploadSLayout"); 

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout2->addWidget( textLabel2 );

    comboProfile = new KComboBox( false, this, "comboProfile" );
    comboProfile->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, comboProfile->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( comboProfile );
    spacer4_2 = new TQSpacerItem( 40, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    layout2->addItem( spacer4_2 );

    buttonNewProfile = new KPushButton( this, "buttonNewProfile" );
    layout2->addWidget( buttonNewProfile );

    buttonEditProfile = new KPushButton( this, "buttonEditProfile" );
    layout2->addWidget( buttonEditProfile );

    buttonRemoveProfile = new KPushButton( this, "buttonRemoveProfile" );
    layout2->addWidget( buttonRemoveProfile );

    ProjectUploadSLayout->addMultiCellLayout( layout2, 0, 0, 0, 2 );

    buttonUpload = new TQPushButton( this, "buttonUpload" );
    buttonUpload->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, buttonUpload->sizePolicy().hasHeightForWidth() ) );
    buttonUpload->setAutoDefault( true );
    buttonUpload->setDefault( true );

    ProjectUploadSLayout->addWidget( buttonUpload, 3, 1 );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, buttonCancel->sizePolicy().hasHeightForWidth() ) );
    buttonCancel->setAutoDefault( true );

    ProjectUploadSLayout->addWidget( buttonCancel, 3, 2 );
    spacer4 = new TQSpacerItem( 400, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    ProjectUploadSLayout->addItem( spacer4, 3, 0 );

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

    ProjectUploadSLayout->addMultiCellWidget( keepPasswords, 1, 1, 0, 1 );

    uploadFrame = new TQFrame( this, "uploadFrame" );
    uploadFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, uploadFrame->sizePolicy().hasHeightForWidth() ) );
    uploadFrame->setFrameShape( TQFrame::StyledPanel );
    uploadFrame->setFrameShadow( TQFrame::Raised );
    uploadFrameLayout = new TQGridLayout( uploadFrame, 1, 1, 11, 6, "uploadFrameLayout"); 

    buttonInvert = new TQPushButton( uploadFrame, "buttonInvert" );

    uploadFrameLayout->addWidget( buttonInvert, 4, 1 );

    buttonClear = new TQPushButton( uploadFrame, "buttonClear" );

    uploadFrameLayout->addWidget( buttonClear, 3, 1 );

    buttonCollapse = new TQPushButton( uploadFrame, "buttonCollapse" );

    uploadFrameLayout->addWidget( buttonCollapse, 6, 1 );

    buttonUpdate = new TQPushButton( uploadFrame, "buttonUpdate" );

    uploadFrameLayout->addWidget( buttonUpdate, 7, 1 );

    buttonModified = new TQPushButton( uploadFrame, "buttonModified" );

    uploadFrameLayout->addWidget( buttonModified, 2, 1 );

    buttonExpand = new TQPushButton( uploadFrame, "buttonExpand" );

    uploadFrameLayout->addWidget( buttonExpand, 5, 1 );

    list = new UploadTreeView( uploadFrame, "list" );
    list->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)1, 0, 0, list->sizePolicy().hasHeightForWidth() ) );

    uploadFrameLayout->addMultiCellWidget( list, 0, 7, 0, 0 );

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

    uploadFrameLayout->addWidget( textLabel1, 0, 1 );

    buttonAll = new TQPushButton( uploadFrame, "buttonAll" );
    buttonAll->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, buttonAll->sizePolicy().hasHeightForWidth() ) );

    uploadFrameLayout->addWidget( buttonAll, 1, 1 );

    markAsUploaded = new TQCheckBox( uploadFrame, "markAsUploaded" );

    uploadFrameLayout->addWidget( markAsUploaded, 8, 0 );

    totalProgress = new KProgress( uploadFrame, "totalProgress" );

    uploadFrameLayout->addMultiCellWidget( totalProgress, 12, 12, 0, 1 );

    currentProgress = new KProgress( uploadFrame, "currentProgress" );

    uploadFrameLayout->addMultiCellWidget( currentProgress, 10, 10, 0, 1 );

    labelCurFile = new TQLabel( uploadFrame, "labelCurFile" );
    labelCurFile->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, labelCurFile->sizePolicy().hasHeightForWidth() ) );
    labelCurFile->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    uploadFrameLayout->addMultiCellWidget( labelCurFile, 9, 9, 0, 1 );

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

    uploadFrameLayout->addMultiCellWidget( totalText, 11, 11, 0, 1 );

    ProjectUploadSLayout->addMultiCellWidget( uploadFrame, 2, 2, 0, 2 );
    languageChange();
    resize( TQSize(595, 584).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( buttonUpload, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startUpload() ) );
    connect( buttonNewProfile, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotNewProfile() ) );
    connect( buttonEditProfile, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotEditProfile() ) );
    connect( buttonRemoveProfile, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotRemoveProfile() ) );
    connect( comboProfile, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( slotNewProfileSelected(const TQString&) ) );
    connect( buttonAll, TQ_SIGNAL( clicked() ), this, TQ_SLOT( selectAll() ) );
    connect( buttonModified, TQ_SIGNAL( clicked() ), this, TQ_SLOT( selectModified() ) );
    connect( buttonInvert, TQ_SIGNAL( clicked() ), this, TQ_SLOT( invertSelection() ) );
    connect( buttonClear, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clearSelection() ) );
    connect( buttonExpand, TQ_SIGNAL( clicked() ), this, TQ_SLOT( expandAll() ) );
    connect( buttonCollapse, TQ_SIGNAL( clicked() ), this, TQ_SLOT( collapseAll() ) );
    connect( buttonUpdate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clearProjectModified() ) );

    // tab order
    setTabOrder( comboProfile, buttonNewProfile );
    setTabOrder( buttonNewProfile, buttonEditProfile );
    setTabOrder( buttonEditProfile, buttonRemoveProfile );
    setTabOrder( buttonRemoveProfile, buttonUpload );
    setTabOrder( buttonUpload, buttonCancel );

    // buddies
    textLabel2->setBuddy( comboProfile );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ProjectUploadS::languageChange()
{
    setCaption( tr2i18n( "Upload Project Files" ) );
    textLabel2->setText( tr2i18n( "Profile &name:" ) );
    buttonNewProfile->setText( tr2i18n( "New..." ) );
    buttonEditProfile->setText( tr2i18n( "Edit..." ) );
    buttonRemoveProfile->setText( tr2i18n( "Remove" ) );
    buttonUpload->setText( tr2i18n( "&Proceed" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    keepPasswords->setText( tr2i18n( "&Keep passwords in memory" ) );
    buttonInvert->setText( tr2i18n( "&Invert" ) );
    buttonClear->setText( tr2i18n( "&None" ) );
    buttonCollapse->setText( tr2i18n( "C&ollapse All" ) );
    buttonUpdate->setText( tr2i18n( "U&pdate All" ) );
    TQToolTip::add( buttonUpdate, tr2i18n( "This will cause all files to appear already uploaded" ) );
    buttonModified->setText( tr2i18n( "&Modified" ) );
    buttonExpand->setText( tr2i18n( "E&xpand All" ) );
    textLabel1->setText( tr2i18n( "Selection:" ) );
    buttonAll->setText( tr2i18n( "&All" ) );
    markAsUploaded->setText( tr2i18n( "Mark the selected files as uploaded instead of uploading them" ) );
    labelCurFile->setText( tr2i18n( "Current: [none]" ) );
    totalText->setText( tr2i18n( "Total:" ) );
}

void ProjectUploadS::clearSelection()
{
    tqWarning( "ProjectUploadS::clearSelection(): Not implemented yet" );
}

void ProjectUploadS::startUpload()
{
    tqWarning( "ProjectUploadS::startUpload(): Not implemented yet" );
}

void ProjectUploadS::selectAll()
{
    tqWarning( "ProjectUploadS::selectAll(): Not implemented yet" );
}

void ProjectUploadS::selectModified()
{
    tqWarning( "ProjectUploadS::selectModified(): Not implemented yet" );
}

void ProjectUploadS::invertSelection()
{
    tqWarning( "ProjectUploadS::invertSelection(): Not implemented yet" );
}

void ProjectUploadS::expandAll()
{
    tqWarning( "ProjectUploadS::expandAll(): Not implemented yet" );
}

void ProjectUploadS::collapseAll()
{
    tqWarning( "ProjectUploadS::collapseAll(): Not implemented yet" );
}

void ProjectUploadS::clearProjectModified()
{
    tqWarning( "ProjectUploadS::clearProjectModified(): Not implemented yet" );
}

void ProjectUploadS::slotNewProfile()
{
    tqWarning( "ProjectUploadS::slotNewProfile(): Not implemented yet" );
}

void ProjectUploadS::slotEditProfile()
{
    tqWarning( "ProjectUploadS::slotEditProfile(): Not implemented yet" );
}

void ProjectUploadS::slotRemoveProfile()
{
    tqWarning( "ProjectUploadS::slotRemoveProfile(): Not implemented yet" );
}

void ProjectUploadS::slotNewProfileSelected(const TQString&)
{
    tqWarning( "ProjectUploadS::slotNewProfileSelected(const TQString&): Not implemented yet" );
}

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

TQMetaObject *ProjectUploadS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ProjectUploadS( "ProjectUploadS", &ProjectUploadS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ProjectUploadS::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 = {"clearSelection", 0, 0 };
    static const TQUMethod slot_1 = {"startUpload", 0, 0 };
    static const TQUMethod slot_2 = {"selectAll", 0, 0 };
    static const TQUMethod slot_3 = {"selectModified", 0, 0 };
    static const TQUMethod slot_4 = {"invertSelection", 0, 0 };
    static const TQUMethod slot_5 = {"expandAll", 0, 0 };
    static const TQUMethod slot_6 = {"collapseAll", 0, 0 };
    static const TQUMethod slot_7 = {"clearProjectModified", 0, 0 };
    static const TQUMethod slot_8 = {"slotNewProfile", 0, 0 };
    static const TQUMethod slot_9 = {"slotEditProfile", 0, 0 };
    static const TQUMethod slot_10 = {"slotRemoveProfile", 0, 0 };
    static const TQUParameter param_slot_11[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_11 = {"slotNewProfileSelected", 1, param_slot_11 };
    static const TQUMethod slot_12 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "clearSelection()", &slot_0, TQMetaData::Public },
	{ "startUpload()", &slot_1, TQMetaData::Public },
	{ "selectAll()", &slot_2, TQMetaData::Public },
	{ "selectModified()", &slot_3, TQMetaData::Public },
	{ "invertSelection()", &slot_4, TQMetaData::Public },
	{ "expandAll()", &slot_5, TQMetaData::Public },
	{ "collapseAll()", &slot_6, TQMetaData::Public },
	{ "clearProjectModified()", &slot_7, TQMetaData::Public },
	{ "slotNewProfile()", &slot_8, TQMetaData::Public },
	{ "slotEditProfile()", &slot_9, TQMetaData::Public },
	{ "slotRemoveProfile()", &slot_10, TQMetaData::Public },
	{ "slotNewProfileSelected(const TQString&)", &slot_11, TQMetaData::Public },
	{ "languageChange()", &slot_12, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ProjectUploadS", parentObject,
	slot_tbl, 13,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ProjectUploadS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ProjectUploadS::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: clearSelection(); break;
    case 1: startUpload(); break;
    case 2: selectAll(); break;
    case 3: selectModified(); break;
    case 4: invertSelection(); break;
    case 5: expandAll(); break;
    case 6: collapseAll(); break;
    case 7: clearProjectModified(); break;
    case 8: slotNewProfile(); break;
    case 9: slotEditProfile(); break;
    case 10: slotRemoveProfile(); break;
    case 11: slotNewProfileSelected((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 12: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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