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

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

#include "configwidget.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlistbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    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 );

    m_files = new TQListBox( GroupBox1, "m_files" );

    GroupBox1Layout->addMultiCellWidget( m_files, 0, 1, 0, 0 );

    Layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout2"); 

    m_down = new TQPushButton( GroupBox1, "m_down" );
    m_down->setEnabled( false );

    Layout2->addWidget( m_down, 2, 1 );

    m_up = new TQPushButton( GroupBox1, "m_up" );
    m_up->setEnabled( false );

    Layout2->addWidget( m_up, 2, 0 );

    m_add = new TQPushButton( GroupBox1, "m_add" );

    Layout2->addMultiCellWidget( m_add, 0, 0, 0, 1 );

    m_remove = new TQPushButton( GroupBox1, "m_remove" );
    m_remove->setEnabled( false );

    Layout2->addMultiCellWidget( m_remove, 1, 1, 0, 1 );

    GroupBox1Layout->addLayout( Layout2, 0, 1 );
    Spacer2 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox1Layout->addItem( Spacer2, 1, 1 );
    ConfigWidgetLayout->addWidget( GroupBox1 );

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new TQGridLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    m_single = new TQRadioButton( ButtonGroup1, "m_single" );

    ButtonGroup1Layout->addMultiCellWidget( m_single, 0, 0, 0, 1 );
    Spacer4 = new TQSpacerItem( 20, 21, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    ButtonGroup1Layout->addItem( Spacer4, 2, 0 );

    m_multiple = new TQRadioButton( ButtonGroup1, "m_multiple" );

    ButtonGroup1Layout->addMultiCellWidget( m_multiple, 1, 1, 0, 1 );

    Layout4 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout4"); 

    m_delayLabel = new TQLabel( ButtonGroup1, "m_delayLabel" );
    m_delayLabel->setEnabled( false );

    Layout4->addWidget( m_delayLabel, 0, 0 );

    m_delay = new TQSpinBox( ButtonGroup1, "m_delay" );
    m_delay->setEnabled( false );

    Layout4->addWidget( m_delay, 0, 1 );

    m_random = new TQCheckBox( ButtonGroup1, "m_random" );
    m_random->setEnabled( false );

    Layout4->addMultiCellWidget( m_random, 1, 1, 0, 2 );

    m_secondsLabel = new TQLabel( ButtonGroup1, "m_secondsLabel" );
    m_secondsLabel->setEnabled( false );

    Layout4->addWidget( m_secondsLabel, 0, 2 );

    ButtonGroup1Layout->addLayout( Layout4, 2, 1 );
    Spacer16 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    ButtonGroup1Layout->addItem( Spacer16, 2, 2 );
    ConfigWidgetLayout->addWidget( ButtonGroup1 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    m_ok = new TQPushButton( this, "m_ok" );
    m_ok->setAutoDefault( true );
    m_ok->setDefault( true );
    Layout1->addWidget( m_ok );

    m_cancel = new TQPushButton( this, "m_cancel" );
    m_cancel->setAutoDefault( true );
    Layout1->addWidget( m_cancel );
    ConfigWidgetLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(463, 376).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigWidget::languageChange()
{
    setCaption( tr2i18n( "Media Screen Saver" ) );
    GroupBox1->setTitle( tr2i18n( "Files" ) );
    m_down->setText( tr2i18n( "&Down" ) );
    m_up->setText( tr2i18n( "&Up" ) );
    m_add->setText( tr2i18n( "&Add..." ) );
    m_remove->setText( tr2i18n( "&Remove" ) );
    ButtonGroup1->setTitle( tr2i18n( "Settings" ) );
    m_single->setText( tr2i18n( "Only show one randomly chosen medium" ) );
    m_multiple->setText( tr2i18n( "Switch to another medium after a delay" ) );
    m_delayLabel->setText( tr2i18n( "Delay:" ) );
    m_random->setText( tr2i18n( "Choose next medium randomly" ) );
    m_secondsLabel->setText( tr2i18n( "seconds" ) );
    m_ok->setText( tr2i18n( "&OK" ) );
    m_cancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *ConfigWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigWidget( "ConfigWidget", &ConfigWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConfigWidget::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(
	"ConfigWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConfigWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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