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

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

#include "tdefilereplaceviewwdg.h"

#include <ntqvariant.h>
#include <kled.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqsplitter.h>
#include <ntqwidgetstack.h>
#include <ntqlabel.h>
#include <ntqlcdnumber.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a TDEFileReplaceViewWdg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
TDEFileReplaceViewWdg::TDEFileReplaceViewWdg( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "TDEFileReplaceViewWdg" );
    TDEFileReplaceViewWdgLayout = new TQGridLayout( this, 1, 1, 0, 6, "TDEFileReplaceViewWdgLayout"); 

    splitter3 = new TQSplitter( this, "splitter3" );
    splitter3->setOrientation( TQSplitter::Vertical );

    m_stackResults = new TQWidgetStack( splitter3, "m_stackResults" );
    m_stackResults->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_stackResults->sizePolicy().hasHeightForWidth() ) );

    WStackPage = new TQWidget( m_stackResults, "WStackPage" );
    WStackPageLayout = new TQGridLayout( WStackPage, 1, 1, 0, 6, "WStackPageLayout"); 

    m_lvResults = new TDEListView( WStackPage, "m_lvResults" );
    m_lvResults->addColumn( tr2i18n( "Name" ) );
    m_lvResults->addColumn( tr2i18n( "Folder" ) );
    m_lvResults->addColumn( tr2i18n( "Old Size" ) );
    m_lvResults->addColumn( tr2i18n( "New Size" ) );
    m_lvResults->addColumn( tr2i18n( "Matches" ) );
    m_lvResults->addColumn( tr2i18n( "Owner User" ) );
    m_lvResults->addColumn( tr2i18n( "Owner Group" ) );
    m_lvResults->setProperty( "selectionMode", "Extended" );
    m_lvResults->setAllColumnsShowFocus( true );
    m_lvResults->setShowSortIndicator( true );
    m_lvResults->setRootIsDecorated( true );
    m_lvResults->setResizeMode( TDEListView::LastColumn );
    m_lvResults->setItemsMovable( false );
    m_lvResults->setAlternateBackground( TQColor( 238, 246, 255 ) );

    WStackPageLayout->addWidget( m_lvResults, 0, 0 );
    m_stackResults->addWidget( WStackPage, 0 );

    WStackPage_2 = new TQWidget( m_stackResults, "WStackPage_2" );
    WStackPageLayout_2 = new TQGridLayout( WStackPage_2, 1, 1, 0, 6, "WStackPageLayout_2"); 

    m_lvResults_2 = new TDEListView( WStackPage_2, "m_lvResults_2" );
    m_lvResults_2->addColumn( tr2i18n( "Name" ) );
    m_lvResults_2->addColumn( tr2i18n( "Folder" ) );
    m_lvResults_2->addColumn( tr2i18n( "Size" ) );
    m_lvResults_2->addColumn( tr2i18n( "Matches" ) );
    m_lvResults_2->addColumn( tr2i18n( "Owner User" ) );
    m_lvResults_2->addColumn( tr2i18n( "Owner Group" ) );
    m_lvResults_2->setProperty( "selectionMode", "Extended" );
    m_lvResults_2->setAllColumnsShowFocus( true );
    m_lvResults_2->setShowSortIndicator( true );
    m_lvResults_2->setRootIsDecorated( true );
    m_lvResults_2->setResizeMode( TDEListView::LastColumn );
    m_lvResults_2->setItemsMovable( false );
    m_lvResults_2->setAlternateBackground( TQColor( 238, 246, 255 ) );

    WStackPageLayout_2->addWidget( m_lvResults_2, 0, 0 );
    m_stackResults->addWidget( WStackPage_2, 1 );

    m_stackStrings = new TQWidgetStack( splitter3, "m_stackStrings" );
    m_stackStrings->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_stackStrings->sizePolicy().hasHeightForWidth() ) );

    WStackPage_3 = new TQWidget( m_stackStrings, "WStackPage_3" );
    WStackPageLayout_3 = new TQGridLayout( WStackPage_3, 1, 1, 0, 6, "WStackPageLayout_3"); 

    m_lvStrings = new TDEListView( WStackPage_3, "m_lvStrings" );
    m_lvStrings->addColumn( tr2i18n( "Search For" ) );
    m_lvStrings->addColumn( tr2i18n( "Replace With" ) );
    m_lvStrings->setAllColumnsShowFocus( true );
    m_lvStrings->setRootIsDecorated( false );
    m_lvStrings->setResizeMode( TDEListView::AllColumns );
    m_lvStrings->setItemsMovable( false );

    WStackPageLayout_3->addWidget( m_lvStrings, 0, 0 );
    m_stackStrings->addWidget( WStackPage_3, 0 );

    WStackPage_4 = new TQWidget( m_stackStrings, "WStackPage_4" );
    WStackPageLayout_4 = new TQGridLayout( WStackPage_4, 1, 1, 0, 6, "WStackPageLayout_4"); 

    m_lvStrings_2 = new TDEListView( WStackPage_4, "m_lvStrings_2" );
    m_lvStrings_2->addColumn( tr2i18n( "Search For" ) );
    m_lvStrings_2->setAllColumnsShowFocus( true );
    m_lvStrings_2->setRootIsDecorated( false );
    m_lvStrings_2->setResizeMode( TDEListView::AllColumns );
    m_lvStrings_2->setItemsMovable( false );

    WStackPageLayout_4->addWidget( m_lvStrings_2, 0, 0 );
    m_stackStrings->addWidget( WStackPage_4, 1 );

    TDEFileReplaceViewWdgLayout->addWidget( splitter3, 0, 0 );

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

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

    m_ledGo = new KLed( this, "m_ledGo" );
    m_ledGo->setMinimumSize( TQSize( 20, 20 ) );
    m_ledGo->setState( KLed::On );
    m_ledGo->setColor( TQColor( 170, 255, 0 ) );
    layout6->addWidget( m_ledGo );

    m_ledWait = new KLed( this, "m_ledWait" );
    m_ledWait->setMinimumSize( TQSize( 20, 20 ) );
    m_ledWait->setState( KLed::On );
    m_ledWait->setColor( TQColor( 255, 255, 0 ) );
    layout6->addWidget( m_ledWait );

    m_ledStop = new KLed( this, "m_ledStop" );
    m_ledStop->setMinimumSize( TQSize( 20, 20 ) );
    m_ledStop->setColor( TQColor( 255, 0, 0 ) );
    layout6->addWidget( m_ledStop );
    layout7->addLayout( layout6 );
    spacer1 = new TQSpacerItem( 354, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer1 );

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

    m_tlFoldersNumber = new TQLabel( this, "m_tlFoldersNumber" );
    layout1->addWidget( m_tlFoldersNumber );

    m_lcdFoldersNumber = new TQLCDNumber( this, "m_lcdFoldersNumber" );
    m_lcdFoldersNumber->setFrameShape( TQLCDNumber::LineEditPanel );
    m_lcdFoldersNumber->setFrameShadow( TQLCDNumber::Raised );
    m_lcdFoldersNumber->setNumDigits( 7 );
    m_lcdFoldersNumber->setMode( TQLCDNumber::Dec );
    m_lcdFoldersNumber->setSegmentStyle( TQLCDNumber::Flat );
    m_lcdFoldersNumber->setProperty( "intValue", 0 );
    layout1->addWidget( m_lcdFoldersNumber );

    m_tlFilesNumber = new TQLabel( this, "m_tlFilesNumber" );
    layout1->addWidget( m_tlFilesNumber );

    m_lcdFilesNumber = new TQLCDNumber( this, "m_lcdFilesNumber" );
    m_lcdFilesNumber->setFrameShape( TQLCDNumber::LineEditPanel );
    m_lcdFilesNumber->setFrameShadow( TQLCDNumber::Raised );
    m_lcdFilesNumber->setNumDigits( 7 );
    m_lcdFilesNumber->setMode( TQLCDNumber::Dec );
    m_lcdFilesNumber->setSegmentStyle( TQLCDNumber::Flat );
    m_lcdFilesNumber->setProperty( "intValue", 0 );
    layout1->addWidget( m_lcdFilesNumber );
    layout7->addLayout( layout1 );

    TDEFileReplaceViewWdgLayout->addLayout( layout7, 1, 0 );
    languageChange();
    resize( TQSize(635, 370).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TDEFileReplaceViewWdg::languageChange()
{
    m_lvResults->header()->setLabel( 0, tr2i18n( "Name" ) );
    m_lvResults->header()->setLabel( 1, tr2i18n( "Folder" ) );
    m_lvResults->header()->setLabel( 2, tr2i18n( "Old Size" ) );
    m_lvResults->header()->setLabel( 3, tr2i18n( "New Size" ) );
    m_lvResults->header()->setLabel( 4, tr2i18n( "Matches" ) );
    m_lvResults->header()->setLabel( 5, tr2i18n( "Owner User" ) );
    m_lvResults->header()->setLabel( 6, tr2i18n( "Owner Group" ) );
    m_lvResults_2->header()->setLabel( 0, tr2i18n( "Name" ) );
    m_lvResults_2->header()->setLabel( 1, tr2i18n( "Folder" ) );
    m_lvResults_2->header()->setLabel( 2, tr2i18n( "Size" ) );
    m_lvResults_2->header()->setLabel( 3, tr2i18n( "Matches" ) );
    m_lvResults_2->header()->setLabel( 4, tr2i18n( "Owner User" ) );
    m_lvResults_2->header()->setLabel( 5, tr2i18n( "Owner Group" ) );
    m_lvStrings->header()->setLabel( 0, tr2i18n( "Search For" ) );
    m_lvStrings->header()->setLabel( 1, tr2i18n( "Replace With" ) );
    m_lvStrings_2->header()->setLabel( 0, tr2i18n( "Search For" ) );
    TQToolTip::add( m_ledGo, tr2i18n( "Green means ready" ) );
    TQWhatsThis::add( m_ledGo, tr2i18n( "Ready" ) );
    TQToolTip::add( m_ledWait, tr2i18n( "Yellow means wait while sorting list" ) );
    TQWhatsThis::add( m_ledWait, tr2i18n( "Please wait while sorting list" ) );
    TQToolTip::add( m_ledStop, tr2i18n( "Red means scanning files" ) );
    m_tlFoldersNumber->setText( tr2i18n( "Scanned folders:" ) );
    m_tlFilesNumber->setText( tr2i18n( "Files:" ) );
}

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

TQMetaObject *TDEFileReplaceViewWdg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TDEFileReplaceViewWdg( "TDEFileReplaceViewWdg", &TDEFileReplaceViewWdg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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