home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bmixeddoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  2.2 KB  |  96 lines

  1. /* 
  2.  *
  3.  * $Id: k3bmixeddoc.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef K3B_MIXED_DOC_H
  17. #define K3B_MIXED_DOC_H
  18.  
  19. #include <k3bdoc.h>
  20. #include <k3bdatadoc.h>
  21. #include <k3baudiodoc.h>
  22.  
  23. #include <k3btoc.h>
  24. #include "k3b_export.h"
  25. class QDomDocument;
  26. class QDomElement;
  27. class K3bBurnJob;
  28. //class K3bView;
  29. class QWidget;
  30. class KConfig;
  31.  
  32.  
  33. class LIBK3B_EXPORT K3bMixedDoc : public K3bDoc
  34. {
  35.   Q_OBJECT
  36.  
  37.  public: 
  38.   K3bMixedDoc( QObject* parent = 0 );
  39.   ~K3bMixedDoc();
  40.  
  41.   QString name() const;
  42.  
  43.   bool newDocument();
  44.  
  45.   void setModified( bool m = true );
  46.   bool isModified() const;
  47.  
  48.   KIO::filesize_t size() const;
  49.   K3b::Msf length() const;
  50.  
  51.   int numOfTracks() const;
  52.  
  53.   K3bBurnJob* newBurnJob( K3bJobHandler*, QObject* parent = 0 );
  54.  
  55.   K3bAudioDoc* audioDoc() const { return m_audioDoc; }
  56.   K3bDataDoc* dataDoc() const { return m_dataDoc; }
  57.  
  58.   enum MixedType { DATA_FIRST_TRACK,
  59.            DATA_LAST_TRACK,
  60.            DATA_SECOND_SESSION };
  61.  
  62.   int mixedType() const { return m_mixedType; }
  63.   int type() const { return MIXED; }
  64.  
  65.   void setURL( const KURL& url );
  66.  
  67.   /**
  68.    * Represent the structure of the doc as CD Table of Contents.
  69.    * Be aware that the length of the data track is just an estimate
  70.    * and needs to be corrected if not specified here.
  71.    *
  72.    * @param dataMode mode of the data track (MODE1 or XA_FORM1)
  73.    * @param dataTrackLength exact length of the dataTrack
  74.    */
  75.  
  76.   K3bDevice::Toc toToc( int dataMode, const K3b::Msf& dataTrackLength = 0 ) const;
  77.  
  78.  public slots:
  79.   void setMixedType( MixedType t ) { m_mixedType = t; }
  80.   void addUrls( const KURL::List& urls );
  81.  
  82.  protected:
  83.   bool loadDocumentData( QDomElement* );
  84.   bool saveDocumentData( QDomElement* );
  85.   QString typeString() const { return "mixed"; }
  86.   
  87.  private:
  88.   K3bDataDoc* m_dataDoc;
  89.   K3bAudioDoc* m_audioDoc;
  90.  
  91.   int m_mixedType;
  92. };
  93.  
  94.  
  95. #endif
  96.