/****************************************************************************
** Form implementation generated from reading ui file 'PlaylistEditDialog.ui'
**
** Created: Wed Oct 2 11:16:07 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "PlaylistEditDialogData.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

static const char* const image0_data[] = { 
"24 24 20 1",
". c None",
"r c #101410",
"q c #202020",
"d c #202420",
"g c #282828",
"m c #282c28",
"k c #303030",
"e c #303430",
"o c #383c38",
"n c #414141",
"b c #414541",
"h c #515551",
"p c #595d59",
"i c #616561",
"j c #717571",
"a c #797979",
"c c #868286",
"# c #9e9e9e",
"l c #a6a2a6",
"f c #b6b2b6",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"..........#ab#..........",
"..........acde..........",
".........afeggh.........",
"........#fhgggdi........",
"........#jgggggk#.......",
".......almgggggdh.......",
"......alngggggggdi......",
"......ahgggggggggo#.....",
".....ipgggggggggggh.....",
".....kdddddddddddqr.....",
".....#iiiiiiiiiiiia.....",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................"};

static const char* const image1_data[] = { 
"24 24 15 1",
". c None",
"k c #101410",
"m c #181818",
"l c #181c18",
"g c #202420",
"i c #282828",
"j c #282c28",
"h c #303430",
"f c #383c38",
"b c #515551",
"e c #595959",
"d c #616561",
"c c #696d69",
"a c #797979",
"# c #9e9e9e",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
".......####.####a#......",
".....bccccdedeefegh.....",
".....biiiiiiiiiiiij.....",
".....#giiiiiiiiiika.....",
"......dgiiiiiiiild......",
".......biiiiiiigj.......",
".......#giiiiiika.......",
"........agiiiimd........",
".........diiigj.........",
"..........jiig#.........",
"..........#hka..........",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................"};


/* 
 *  Constructs a PlaylistEditDialogData which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
PlaylistEditDialogData::PlaylistEditDialogData( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    QPixmap image1( ( const char** ) image1_data );
    if ( !name )
	setName( "PlaylistEditDialogData" );
    resize( 307, 283 ); 
    setCaption( trUtf8( "Playlist editor" ) );
    PlaylistEditDialogDataLayout = new QGridLayout( this, 1, 1, 6, 6, "PlaylistEditDialogDataLayout"); 

    Layout25 = new QVBoxLayout( 0, 0, 6, "Layout25"); 

    playListBox = new QListBox( this, "playListBox" );
    playListBox->setFrameShape( QListBox::Panel );
    playListBox->setFrameShadow( QListBox::Sunken );
    Layout25->addWidget( playListBox );

    Layout21 = new QHBoxLayout( 0, 0, 6, "Layout21"); 

    prevButton = new QPushButton( this, "prevButton" );
    prevButton->setText( trUtf8( "Play Previous" ) );
    Layout21->addWidget( prevButton );

    nextButton = new QPushButton( this, "nextButton" );
    nextButton->setText( trUtf8( "Play Next" ) );
    Layout21->addWidget( nextButton );
    Layout25->addLayout( Layout21 );

    PlaylistEditDialogDataLayout->addMultiCellLayout( Layout25, 0, 9, 0, 0 );

    moveUpButton = new QPushButton( this, "moveUpButton" );
    moveUpButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, moveUpButton->sizePolicy().hasHeightForWidth() ) );
    moveUpButton->setText( trUtf8( "" ) );
    moveUpButton->setPixmap( image0 );

    PlaylistEditDialogDataLayout->addWidget( moveUpButton, 1, 1 );

    listPosLabel = new QLabel( this, "listPosLabel" );
    listPosLabel->setText( trUtf8( "#" ) );

    PlaylistEditDialogDataLayout->addWidget( listPosLabel, 0, 1 );

    fadeoutLabel = new QLabel( this, "fadeoutLabel" );
    fadeoutLabel->setText( trUtf8( "Fadeout:" ) );

    PlaylistEditDialogDataLayout->addWidget( fadeoutLabel, 7, 1 );

    subtuneLabel = new QLabel( this, "subtuneLabel" );
    subtuneLabel->setText( trUtf8( "Subtune:" ) );

    PlaylistEditDialogDataLayout->addWidget( subtuneLabel, 3, 1 );

    playtimeLabel = new QLabel( this, "playtimeLabel" );
    playtimeLabel->setText( trUtf8( "Playtime:" ) );

    PlaylistEditDialogDataLayout->addWidget( playtimeLabel, 5, 1 );

    moveDownButton = new QPushButton( this, "moveDownButton" );
    moveDownButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, moveDownButton->sizePolicy().hasHeightForWidth() ) );
    moveDownButton->setText( trUtf8( "" ) );
    moveDownButton->setPixmap( image1 );

    PlaylistEditDialogDataLayout->addWidget( moveDownButton, 2, 1 );

    fadeoutSpinBox = new QSpinBox( this, "fadeoutSpinBox" );
    fadeoutSpinBox->setButtonSymbols( QSpinBox::PlusMinus );
    fadeoutSpinBox->setMaxValue( 60 );

    PlaylistEditDialogDataLayout->addWidget( fadeoutSpinBox, 8, 1 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    PlaylistEditDialogDataLayout->addItem( spacer, 9, 1 );

    playtimeSpinBox = new QSpinBox( this, "playtimeSpinBox" );
    playtimeSpinBox->setButtonSymbols( QSpinBox::PlusMinus );
    playtimeSpinBox->setMaxValue( 86400 );
    playtimeSpinBox->setValue( 0 );

    PlaylistEditDialogDataLayout->addWidget( playtimeSpinBox, 6, 1 );

    subtuneSpinBox = new QSpinBox( this, "subtuneSpinBox" );
    subtuneSpinBox->setButtonSymbols( QSpinBox::PlusMinus );
    subtuneSpinBox->setMaxValue( 256 );
    subtuneSpinBox->setMinValue( 1 );
    subtuneSpinBox->setValue( 1 );

    PlaylistEditDialogDataLayout->addWidget( subtuneSpinBox, 4, 1 );

    // signals and slots connections
    connect( moveDownButton, SIGNAL( clicked() ), this, SLOT( moveDownButtonClicked() ) );
    connect( moveUpButton, SIGNAL( clicked() ), this, SLOT( moveUpButtonClicked() ) );
    connect( subtuneSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( subtuneValueChanged(int) ) );
    connect( playtimeSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( playtimeValueChanged(int) ) );
    connect( fadeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( fadeoutValueChanged(int) ) );
    connect( playListBox, SIGNAL( highlighted(int) ), this, SLOT( playlistItemHighlighted(int) ) );
    connect( playListBox, SIGNAL( rightButtonClicked(QListBoxItem*,const QPoint&) ), this, SLOT( clearListMenu(QListBoxItem*,const QPoint&) ) );
    connect( playListBox, SIGNAL( rightButtonPressed(QListBoxItem*,const QPoint&) ), this, SLOT( popUpListMenu(QListBoxItem*,const QPoint&) ) );
    connect( playListBox, SIGNAL( selected(int) ), this, SLOT( playlistItemSelected(int) ) );
    connect( nextButton, SIGNAL( clicked() ), this, SLOT( nextButtonClicked() ) );
    connect( prevButton, SIGNAL( clicked() ), this, SLOT( prevButtonClicked() ) );

    // tab order
    setTabOrder( playListBox, moveUpButton );
    setTabOrder( moveUpButton, moveDownButton );
    setTabOrder( moveDownButton, subtuneSpinBox );
    setTabOrder( subtuneSpinBox, playtimeSpinBox );
    setTabOrder( playtimeSpinBox, fadeoutSpinBox );
}

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

void PlaylistEditDialogData::clearListMenu(QListBoxItem*, const QPoint&)
{
    qWarning( "PlaylistEditDialogData::clearListMenu(QListBoxItem*, const QPoint&): Not implemented yet!" );
}

void PlaylistEditDialogData::fadeoutValueChanged(int)
{
    qWarning( "PlaylistEditDialogData::fadeoutValueChanged(int): Not implemented yet!" );
}

void PlaylistEditDialogData::moveDownButtonClicked()
{
    qWarning( "PlaylistEditDialogData::moveDownButtonClicked(): Not implemented yet!" );
}

void PlaylistEditDialogData::moveUpButtonClicked()
{
    qWarning( "PlaylistEditDialogData::moveUpButtonClicked(): Not implemented yet!" );
}

void PlaylistEditDialogData::nextButtonClicked()
{
    qWarning( "PlaylistEditDialogData::nextButtonClicked(): Not implemented yet!" );
}

void PlaylistEditDialogData::playlistItemHighlighted(int)
{
    qWarning( "PlaylistEditDialogData::playlistItemHighlighted(int): Not implemented yet!" );
}

void PlaylistEditDialogData::playlistItemSelected(int)
{
    qWarning( "PlaylistEditDialogData::playlistItemSelected(int): Not implemented yet!" );
}

void PlaylistEditDialogData::playtimeValueChanged(int)
{
    qWarning( "PlaylistEditDialogData::playtimeValueChanged(int): Not implemented yet!" );
}

void PlaylistEditDialogData::popUpListMenu(QListBoxItem*, const QPoint&)
{
    qWarning( "PlaylistEditDialogData::popUpListMenu(QListBoxItem*, const QPoint&): Not implemented yet!" );
}

void PlaylistEditDialogData::prevButtonClicked()
{
    qWarning( "PlaylistEditDialogData::prevButtonClicked(): Not implemented yet!" );
}

void PlaylistEditDialogData::subtuneValueChanged(int)
{
    qWarning( "PlaylistEditDialogData::subtuneValueChanged(int): Not implemented yet!" );
}

