/***************************************************************************
                          RippAudioDialog.h  -  description
                             -------------------
    begin                : Mon Feb 4 2002
    copyright            : (C) 2002 by Alex Podolsky
    email                : alexpod@users.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef RIPPAUDIODIALOG_H
#define RIPPAUDIODIALOG_H

#include <qwidget.h>
#include <qevent.h>
#include <qdatetime.h>



#include "RippAudioDialogBase.h"
#include "CdboDialogBase.h"

#include "dialogParts/DriveInfoPnl.h"
#include "dialogParts/DialogCntPnl.h"

class KConfig;
class KProcess;
class CdboAudioActionFactory;

/**
  *@author
  */

class RippAudioDialog : public RippAudioDialogBase, public CdboDialogBase  {
   Q_OBJECT
public:
	RippAudioDialog(QWidget *parent=0, const char *name=0);
	~RippAudioDialog();
	
	//implementing pure virtuals
	virtual void blockBtns(bool) const;
	virtual QString getActionType() const;
	
	 virtual void output(int type, QString message) const;
	virtual void status(QString message) const { dialogCntPnl->status(message); }
	inline virtual void setProcessType(int type) const { dialogCntPnl->setProcessType(type); }
	inline virtual void setTotalProcesses(int type) const { dialogCntPnl->setTotalProcesses(type); }
	
	inline virtual QString getScsiDevice() const { return srcDevicePnl->getScsiDevice(); }
	inline virtual QString getSpeed() const { return 0; }

public slots:
	void readOptions();

protected slots:
	void taskFailedToStart();
	void taskDone(bool success);
	//void tmpChecked(bool);
	void startBtnSlot();
	
 	void cancelSlot();
	void quitSlot();
	void settingsSlot();
	void detectDestSlot();
	void scanSlot();
	
	virtual void isoBrowseSlot();

	virtual void closeEvent(QCloseEvent *e);
	virtual void keyPressEvent(QKeyEvent *e);
	void kcmshellDone(KProcess *proc);

private:
	//bool checkTmpSize;
	//int minTmpSize;
	QString tempDir;
	KConfig *config;

	bool stillRipping;
	
	CdboAudioActionFactory *factory;
	
	//methods
	void saveOptions();
	void initBtns();
	bool confermExit();
};
#endif
