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

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

#include "sq_slideshow.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <tqpopupmenu.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "sq_config.h"
#include "sq_iconloader.h"
#include "sq_widgetstack.h"
#include "sq_slideshow.ui.h"

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

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 
    spacer1 = new TQSpacerItem( 220, 26, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );

    pushStart = new TQPushButton( this, "pushStart" );
    pushStart->setDefault( true );
    layout2->addWidget( pushStart );

    pushClose = new TQPushButton( this, "pushClose" );
    layout2->addWidget( pushClose );

    SQ_SlideShowLayout->addLayout( layout2, 1, 0 );

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

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

    groupBox1Layout->addWidget( textLabel1_2, 0, 0 );
    spacer2 = new TQSpacerItem( 175, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer2, 2, 2 );

    spinCycle = new KIntSpinBox( groupBox1, "spinCycle" );
    spinCycle->setMaxValue( 1000 );

    groupBox1Layout->addWidget( spinCycle, 3, 1 );

    spinDelay = new KIntSpinBox( groupBox1, "spinDelay" );
    spinDelay->setMaxValue( 100000 );
    spinDelay->setMinValue( 500 );
    spinDelay->setLineStep( 100 );

    groupBox1Layout->addWidget( spinDelay, 2, 1 );

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

    groupBox1Layout->addWidget( textLabel1, 2, 0 );

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

    groupBox1Layout->addWidget( textLabel1_4, 3, 0 );

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

    groupBox1Layout->addWidget( textLabel1_6, 1, 0 );

    checkRecurs = new TQCheckBox( groupBox1, "checkRecurs" );

    groupBox1Layout->addMultiCellWidget( checkRecurs, 1, 1, 1, 2 );

    textSize = new TQLabel( groupBox1, "textSize" );
    textSize->setEnabled( false );
    textSize->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( textSize, 8, 0 );

    textPos = new TQLabel( groupBox1, "textPos" );
    textPos->setEnabled( false );
    textPos->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( textPos, 6, 0 );

    checkSize = new TQCheckBox( groupBox1, "checkSize" );
    checkSize->setEnabled( false );

    groupBox1Layout->addMultiCellWidget( checkSize, 8, 8, 1, 2 );

    textName = new TQLabel( groupBox1, "textName" );
    textName->setEnabled( false );
    textName->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( textName, 7, 0 );

    checkPos = new TQCheckBox( groupBox1, "checkPos" );
    checkPos->setEnabled( false );

    groupBox1Layout->addMultiCellWidget( checkPos, 6, 6, 1, 2 );

    checkName = new TQCheckBox( groupBox1, "checkName" );
    checkName->setEnabled( false );

    groupBox1Layout->addMultiCellWidget( checkName, 7, 7, 1, 2 );

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

    groupBox1Layout->addWidget( textLabel1_3, 4, 0 );

    bcolor = new KColorButton( groupBox1, "bcolor" );

    groupBox1Layout->addWidget( bcolor, 4, 1 );
    spacer3_2 = new TQSpacerItem( 186, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer3_2, 4, 2 );

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

    groupBox1Layout->addWidget( textLabel1_5, 5, 0 );

    checkMessages = new TQCheckBox( groupBox1, "checkMessages" );

    groupBox1Layout->addMultiCellWidget( checkMessages, 5, 5, 1, 2 );
    spacer3_2_2 = new TQSpacerItem( 145, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer3_2_2, 9, 2 );

    tcolor = new KColorButton( groupBox1, "tcolor" );
    tcolor->setEnabled( false );

    groupBox1Layout->addWidget( tcolor, 9, 1 );

    textColor = new TQLabel( groupBox1, "textColor" );
    textColor->setEnabled( false );
    textColor->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( textColor, 9, 0 );

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

    kurl = new KURLRequester( groupBox1, "kurl" );
    layout3->addWidget( kurl );

    pushCurrent = new TQPushButton( groupBox1, "pushCurrent" );
    layout3->addWidget( pushCurrent );

    pushHistory = new TQPushButton( groupBox1, "pushHistory" );
    layout3->addWidget( pushHistory );

    groupBox1Layout->addMultiCellLayout( layout3, 0, 0, 1, 2 );

    SQ_SlideShowLayout->addWidget( groupBox1, 0, 0 );
    languageChange();
    resize( TQSize(425, 350).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushClose, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( pushStart, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( kurl, TQ_SIGNAL( urlSelected(const TQString&) ), this, TQ_SLOT( slotDirectory(const TQString&) ) );
    connect( checkMessages, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotMessages(bool) ) );

    // tab order
    setTabOrder( kurl, spinDelay );
    setTabOrder( spinDelay, spinCycle );
    setTabOrder( spinCycle, pushStart );
    setTabOrder( pushStart, pushClose );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SQ_SlideShow::languageChange()
{
    setCaption( tr2i18n( "Slideshow options" ) );
    pushStart->setText( tr2i18n( "Start" ) );
    pushClose->setText( tr2i18n( "Close" ) );
    groupBox1->setTitle( TQString::null );
    textLabel1_2->setText( tr2i18n( "Directory:" ) );
    spinCycle->setSpecialValueText( tr2i18n( "No" ) );
    spinDelay->setSuffix( tr2i18n( " ms" ) );
    textLabel1->setText( tr2i18n( "Delay:" ) );
    textLabel1_4->setText( tr2i18n( "Repeats:" ) );
    textLabel1_6->setText( tr2i18n( "Recursively" ) );
    checkRecurs->setText( TQString::null );
    textSize->setText( tr2i18n( "Show file size" ) );
    textPos->setText( tr2i18n( "Show current index" ) );
    checkSize->setText( TQString::null );
    textName->setText( tr2i18n( "Show file name" ) );
    checkPos->setText( TQString::null );
    checkName->setText( TQString::null );
    textLabel1_3->setText( tr2i18n( "Background color:" ) );
    bcolor->setText( TQString::null );
    textLabel1_5->setText( tr2i18n( "Onscreen messages" ) );
    checkMessages->setText( TQString::null );
    tcolor->setText( TQString::null );
    textColor->setText( tr2i18n( "Message text color:" ) );
    pushCurrent->setText( TQString::null );
    pushHistory->setText( TQString::null );
}

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

TQMetaObject *SQ_SlideShow::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SQ_SlideShow( "SQ_SlideShow", &SQ_SlideShow::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SQ_SlideShow::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 TQUParameter param_slot_1[] = {
	{ "dir", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"slotDirectory", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ "id", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"slotActivated", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"slotCurrent", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ "b", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"slotMessages", 1, param_slot_4 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotDirectory(const TQString&)", &slot_1, TQMetaData::Private },
	{ "slotActivated(int)", &slot_2, TQMetaData::Private },
	{ "slotCurrent()", &slot_3, TQMetaData::Private },
	{ "slotMessages(bool)", &slot_4, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SQ_SlideShow", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SQ_SlideShow.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool SQ_SlideShow::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: slotDirectory((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: slotActivated((int)static_QUType_int.get(_o+1)); break;
    case 3: slotCurrent(); break;
    case 4: slotMessages((bool)static_QUType_bool.get(_o+1)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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