//
// C++ Implementation: burndatadvdconfigwidget
//
// Description: 
//
//
// Author: James Thorniley <james@uncommonlygood.co.uk>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "burndatadvdconfigwidget.h"
#include "burnsidebarplugin.h"

#include <k3bdvddoc.h>
#include <k3bglobals.h>
#include <klocale.h>
#include <kstddirs.h>
#include <k3bcore.h>
#include <k3bexternalbinmanager.h>
#include <k3bisooptions.h>
#include <ktempdir.h>

BurnDataDVDConfigWidget::BurnDataDVDConfigWidget(BurnSidebarPlugin *plugin, QWidget *parent, const char *name)
 : BurnDataCDConfigWidget(plugin, parent, name, "DVDISO")
{

  m_dataCDLabel->setTextFormat( Qt::RichText );

  m_dataCDLabel->setText( i18n( "Data DVD" ) );

}

BurnDataDVDConfigWidget::~BurnDataDVDConfigWidget()
{
}


K3bDoc *BurnDataDVDConfigWidget::k3bDoc()
{
  K3bDataDoc *dataDoc = new K3bDvdDoc( this );
  dataDoc->newDocument();
  dataDoc->setWritingMode( K3b::WRITING_MODE_AUTO );
  dataDoc->setOnTheFly( true );
  dataDoc->setSpeed(0);
  dataDoc->setRemoveImages(true);
  dataDoc->setWritingApp( K3b::DEFAULT );
  KTempDir tempDir = KTempDir( "konqburn" );
  dataDoc->setTempDir( tempDir.name() );
  dataDoc->setOnlyCreateImages(false);
  dataDoc->setMultiSessionMode( K3bDataDoc::NONE );
  
  dataDoc->setIsoOptions( *m_isoOptions );

  KFileItem *item;
  KFileItemList items = m_plugin->dirLister()->itemsForDir( locateLocal( "data", "kio_burn/data" ) );
  for( item = items.first(); item; item = items.next() )
  {
    dataDoc->addUrl( item->url() );
  }
  return dataDoc;
}

#include "burndatadvdconfigwidget.moc"
