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

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

#include "panel.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

    songListCB = new TQComboBox( false, this, "songListCB" );
    layout8->addWidget( songListCB );

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

    timeIcon = new TQLabel( this, "timeIcon" );
    layout6->addWidget( timeIcon );

    timeSlider = new TQSlider( this, "timeSlider" );
    timeSlider->setEnabled( false );
    timeSlider->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 100, 0, timeSlider->sizePolicy().hasHeightForWidth() ) );
    timeSlider->setTracking( false );
    timeSlider->setOrientation( TQSlider::Horizontal );
    layout6->addWidget( timeSlider );
    spacer7 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout6->addItem( spacer7 );

    volumeIcon = new TQLabel( this, "volumeIcon" );
    layout6->addWidget( volumeIcon );

    volumeSlider = new TQSlider( this, "volumeSlider" );
    volumeSlider->setMaxValue( 100 );
    volumeSlider->setOrientation( TQSlider::Horizontal );
    layout6->addWidget( volumeSlider );
    layout8->addLayout( layout6 );

    layout7 = new TQGridLayout( 0, 1, 1, 0, 1, "layout7"); 

    ejectPB = new TQPushButton( this, "ejectPB" );
    ejectPB->setFlat( true );

    layout7->addWidget( ejectPB, 1, 1 );

    backdrop = new TQFrame( this, "backdrop" );
    backdrop->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 1, 0, backdrop->sizePolicy().hasHeightForWidth() ) );
    backdrop->setMinimumSize( TQSize( 270, 80 ) );
    backdrop->setPaletteForegroundColor( TQColor( 255, 255, 255 ) );
    backdrop->setPaletteBackgroundColor( TQColor( 0, 0, 0 ) );
    TQFont backdrop_font(  backdrop->font() );
    backdrop_font.setPointSize( 9 );
    backdrop->setFont( backdrop_font ); 
    backdrop->setFrameShape( TQFrame::NoFrame );
    backdrop->setFrameShadow( TQFrame::Sunken );
    backdrop->setLineWidth( 0 );
    backdropLayout = new TQVBoxLayout( backdrop, 2, 6, "backdropLayout"); 

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

    frameleds = new TQFrame( backdrop, "frameleds" );
    frameleds->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, frameleds->sizePolicy().hasHeightForWidth() ) );
    frameleds->setMinimumSize( TQSize( 100, 35 ) );
    frameleds->setFrameShape( TQFrame::NoFrame );
    frameleds->setFrameShadow( TQFrame::Raised );

    layout5->addMultiCellWidget( frameleds, 0, 1, 0, 1 );

    statuslabel = new TQLabel( backdrop, "statuslabel" );

    layout5->addWidget( statuslabel, 0, 2 );

    volumelabel = new TQLabel( backdrop, "volumelabel" );

    layout5->addWidget( volumelabel, 1, 2 );

    totaltimelabel = new TQLabel( backdrop, "totaltimelabel" );

    layout5->addWidget( totaltimelabel, 0, 3 );

    tracklabel = new TQLabel( backdrop, "tracklabel" );

    layout5->addWidget( tracklabel, 1, 3 );

    symbols = new TQWidget( backdrop, "symbols" );
    symbols->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, symbols->sizePolicy().hasHeightForWidth() ) );
    symbols->setMinimumSize( TQSize( 30, 0 ) );

    layout5->addMultiCellWidget( symbols, 0, 1, 4, 4 );

    artistlabel = new TQLabel( backdrop, "artistlabel" );

    layout5->addMultiCellWidget( artistlabel, 2, 2, 0, 4 );

    titlelabel = new TQLabel( backdrop, "titlelabel" );

    layout5->addMultiCellWidget( titlelabel, 3, 3, 0, 4 );
    backdropLayout->addLayout( layout5 );

    layout7->addMultiCellWidget( backdrop, 0, 2, 2, 3 );

    shufflePB = new TQPushButton( this, "shufflePB" );
    shufflePB->setToggleButton( true );
    shufflePB->setFlat( true );

    layout7->addWidget( shufflePB, 3, 0 );

    infoPB = new TQPushButton( this, "infoPB" );
    infoPB->setFlat( true );

    layout7->addWidget( infoPB, 3, 3 );

    playPB = new TQPushButton( this, "playPB" );
    playPB->setFlat( true );

    layout7->addMultiCellWidget( playPB, 0, 0, 0, 1 );

    stopPB = new TQPushButton( this, "stopPB" );
    stopPB->setFlat( true );

    layout7->addWidget( stopPB, 1, 0 );

    cddbPB = new TQPushButton( this, "cddbPB" );
    cddbPB->setFlat( true );

    layout7->addWidget( cddbPB, 3, 2 );

    repeatPB = new TQPushButton( this, "repeatPB" );
    repeatPB->setToggleButton( true );
    repeatPB->setFlat( true );

    layout7->addWidget( repeatPB, 3, 1 );

    nextPB = new TQPushButton( this, "nextPB" );
    nextPB->setFlat( true );

    layout7->addWidget( nextPB, 2, 1 );

    prevPB = new TQPushButton( this, "prevPB" );
    prevPB->setFlat( true );

    layout7->addWidget( prevPB, 2, 0 );
    layout8->addLayout( layout7 );
    kscdPanelDlgLayout->addLayout( layout8 );
    languageChange();
    resize( TQSize(516, 198).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( playPB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( playClicked() ) );
    connect( nextPB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextClicked() ) );
    connect( prevPB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevClicked() ) );
    connect( stopPB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( stopClicked() ) );
    connect( ejectPB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( ejectClicked() ) );

    // tab order
    setTabOrder( songListCB, timeSlider );
    setTabOrder( timeSlider, volumeSlider );
    setTabOrder( volumeSlider, playPB );
    setTabOrder( playPB, stopPB );
    setTabOrder( stopPB, ejectPB );
    setTabOrder( ejectPB, prevPB );
    setTabOrder( prevPB, nextPB );
    setTabOrder( nextPB, shufflePB );
    setTabOrder( shufflePB, repeatPB );
    setTabOrder( repeatPB, cddbPB );
    setTabOrder( cddbPB, infoPB );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void kscdPanelDlg::languageChange()
{
    setCaption( tr2i18n( "KsCD" ) );
    timeIcon->setText( TQString::null );
    TQToolTip::add( timeIcon, tr2i18n( "Track progress" ) );
    TQToolTip::add( timeSlider, tr2i18n( "Track progress" ) );
    volumeIcon->setText( TQString::null );
    TQToolTip::add( volumeIcon, tr2i18n( "Volume control" ) );
    TQToolTip::add( volumeSlider, tr2i18n( "Volume control" ) );
    ejectPB->setText( tr2i18n( "E&ject" ) );
    statuslabel->setText( tr2i18n( "Status" ) );
    volumelabel->setText( tr2i18n( "Vol: --" ) );
    tracklabel->setText( tr2i18n( "--/--" ) );
    symbols->setProperty( "text", tr2i18n( "Vol: --" ) );
    artistlabel->setText( tr2i18n( "Artist" ) );
    titlelabel->setText( tr2i18n( "Title" ) );
    shufflePB->setText( tr2i18n( "R&andom" ) );
    infoPB->setText( tr2i18n( "E&xtras" ) );
    playPB->setText( tr2i18n( "Pla&y" ) );
    stopPB->setText( tr2i18n( "Stop" ) );
    cddbPB->setText( tr2i18n( "&CDDB" ) );
    repeatPB->setText( tr2i18n( "Loop" ) );
    nextPB->setText( tr2i18n( "&Next" ) );
    prevPB->setText( tr2i18n( "Pre&vious" ) );
}

void kscdPanelDlg::playClicked()
{
    tqWarning( "kscdPanelDlg::playClicked(): Not implemented yet" );
}

void kscdPanelDlg::stopClicked()
{
    tqWarning( "kscdPanelDlg::stopClicked(): Not implemented yet" );
}

void kscdPanelDlg::prevClicked()
{
    tqWarning( "kscdPanelDlg::prevClicked(): Not implemented yet" );
}

void kscdPanelDlg::ejectClicked()
{
    tqWarning( "kscdPanelDlg::ejectClicked(): Not implemented yet" );
}

bool kscdPanelDlg::nextClicked()
{
    tqWarning( "kscdPanelDlg::nextClicked(): Not implemented yet" );
    return false;
}

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

TQMetaObject *kscdPanelDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_kscdPanelDlg( "kscdPanelDlg", &kscdPanelDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* kscdPanelDlg::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 = {"playClicked", 0, 0 };
    static const TQUMethod slot_1 = {"stopClicked", 0, 0 };
    static const TQUMethod slot_2 = {"prevClicked", 0, 0 };
    static const TQUMethod slot_3 = {"ejectClicked", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::Out }
    };
    static const TQUMethod slot_4 = {"nextClicked", 1, param_slot_4 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "playClicked()", &slot_0, TQMetaData::Public },
	{ "stopClicked()", &slot_1, TQMetaData::Public },
	{ "prevClicked()", &slot_2, TQMetaData::Public },
	{ "ejectClicked()", &slot_3, TQMetaData::Public },
	{ "nextClicked()", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"kscdPanelDlg", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_kscdPanelDlg.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool kscdPanelDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: playClicked(); break;
    case 1: stopClicked(); break;
    case 2: prevClicked(); break;
    case 3: ejectClicked(); break;
    case 4: static_QUType_bool.set(_o,nextClicked()); break;
    case 5: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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