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

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

#include "imagelistdialog.h"

#include <ntqvariant.h>
#include <kdebug.h>
#include <kimageviewer/viewer.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <kurl.h>
#include <tdefiledialog.h>
#include <tdeio/netaccess.h>
#include <tdelistview.h>
#include <tdemessagebox.h>
#include <tqstring.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "imagelistitem.h"
#include "imagelistdialog.ui.h"

/*
 *  Constructs a ImageListDialog which is a child of 'parent', with the
 *  name 'name'.' 
 */
ImageListDialog::ImageListDialog( TQWidget* parent,  const char* name )
    : KDialog( parent, name )
{
    if ( !name )
	setName( "ImageListDialog" );
    setAcceptDrops( true );
    ImageListDialogLayout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "ImageListDialogLayout"); 

    m_pListView = new TDEListView( this, "m_pListView" );
    m_pListView->addColumn( tr2i18n( "URL" ) );
    m_pListView->addColumn( tr2i18n( "Size" ) );
    m_pListView->addColumn( tr2i18n( "Dimensions" ) );
    m_pListView->setMinimumSize( TQSize( 400, 0 ) );
    m_pListView->setAcceptDrops( true );
    m_pListView->setAllColumnsShowFocus( true );
    m_pListView->setShowSortIndicator( true );
    m_pListView->setFullWidth( true );
    ImageListDialogLayout->addWidget( m_pListView );

    Layout4 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "Layout4"); 

    Layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout2"); 

    m_pPrevious = new KPushButton( this, "m_pPrevious" );
    m_pPrevious->setAutoDefault( false );
    Layout2->addWidget( m_pPrevious );

    m_pNext = new KPushButton( this, "m_pNext" );
    m_pNext->setAutoDefault( false );
    Layout2->addWidget( m_pNext );
    Layout4->addLayout( Layout2 );

    m_pShuffle = new KPushButton( this, "m_pShuffle" );
    m_pShuffle->setAutoDefault( false );
    Layout4->addWidget( m_pShuffle );
    Spacer3 = new TQSpacerItem( 16, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    Layout4->addItem( Spacer3 );

    m_pSlideshow = new KPushButton( this, "m_pSlideshow" );
    m_pSlideshow->setToggleButton( true );
    m_pSlideshow->setAutoDefault( false );
    Layout4->addWidget( m_pSlideshow );

    m_pInterval = new KIntNumInput( this, "m_pInterval" );
    m_pInterval->setValue( 5000 );
    Layout4->addWidget( m_pInterval );
    Spacer4 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    Layout4->addItem( Spacer4 );

    m_pCloseAll = new KPushButton( this, "m_pCloseAll" );
    m_pCloseAll->setAutoDefault( false );
    Layout4->addWidget( m_pCloseAll );

    Layout4_2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout4_2"); 

    m_pSave = new KPushButton( this, "m_pSave" );
    m_pSave->setAutoDefault( false );
    Layout4_2->addWidget( m_pSave );

    m_pLoad = new KPushButton( this, "m_pLoad" );
    m_pLoad->setAutoDefault( false );
    Layout4_2->addWidget( m_pLoad );
    Layout4->addLayout( Layout4_2 );
    ImageListDialogLayout->addLayout( Layout4 );
    languageChange();
    resize( TQSize(724, 409).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_pListView, TQ_SIGNAL( aboutToMove() ), this, TQ_SLOT( noSort() ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ImageListDialog::languageChange()
{
    setCaption( tr2i18n( "Image List" ) );
    m_pListView->header()->setLabel( 0, tr2i18n( "URL" ) );
    m_pListView->header()->setLabel( 1, tr2i18n( "Size" ) );
    m_pListView->header()->setLabel( 2, tr2i18n( "Dimensions" ) );
    m_pPrevious->setText( tr2i18n( "&Previous" ) );
    m_pNext->setText( tr2i18n( "&Next" ) );
    m_pShuffle->setText( tr2i18n( "Shu&ffle" ) );
    m_pSlideshow->setText( tr2i18n( "Start &Slideshow" ) );
    m_pInterval->setLabel( tr2i18n( "Slideshow interval:" ) );
    m_pInterval->setSuffix( tr2i18n( " ms" ) );
    TQWhatsThis::add( m_pInterval, tr2i18n( "This is the interval the program will wait before showing the next image in the slideshow." ) );
    m_pCloseAll->setText( tr2i18n( "&Close All" ) );
    m_pSave->setText( tr2i18n( "Sa&ve List..." ) );
    m_pLoad->setText( tr2i18n( "&Load List..." ) );
}

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

TQMetaObject *ImageListDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ImageListDialog( "ImageListDialog", &ImageListDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ImageListDialog::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 = KDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"noSort", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQUMethod slot_2 = {"init", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "noSort()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected },
	{ "init()", &slot_2, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ImageListDialog", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ImageListDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ImageListDialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: noSort(); break;
    case 1: languageChange(); break;
    case 2: init(); break;
    default:
	return KDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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