summaryrefslogtreecommitdiffstats
path: root/src/k3bwriterselectionwidget.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-03 02:15:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-03 02:15:56 +0000
commit50b48aec6ddd451a6d1709c0942477b503457663 (patch)
treea9ece53ec06fd0a2819de7a2a6de997193566626 /src/k3bwriterselectionwidget.h
downloadk3b-50b48aec6ddd451a6d1709c0942477b503457663.tar.gz
k3b-50b48aec6ddd451a6d1709c0942477b503457663.zip
Added abandoned KDE3 version of K3B
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1084400 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k3bwriterselectionwidget.h')
-rw-r--r--src/k3bwriterselectionwidget.h146
1 files changed, 146 insertions, 0 deletions
diff --git a/src/k3bwriterselectionwidget.h b/src/k3bwriterselectionwidget.h
new file mode 100644
index 0000000..8174637
--- /dev/null
+++ b/src/k3bwriterselectionwidget.h
@@ -0,0 +1,146 @@
+/*
+ *
+ * $Id: k3bwriterselectionwidget.h 690635 2007-07-21 16:47:29Z trueg $
+ * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
+ *
+ * This file is part of the K3b project.
+ * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
+ *
+ * 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.
+ * See the file "COPYING" for the exact licensing terms.
+ */
+
+
+#ifndef K3BWRITERSELECTIONWIDGET_H
+#define K3BWRITERSELECTIONWIDGET_H
+
+#include <qwidget.h>
+
+class KComboBox;
+class KConfigBase;
+class QLabel;
+class K3bMediaSelectionComboBox;
+namespace K3bDevice {
+ class Device;
+ class DeviceManager;
+}
+
+
+/**
+ *@author Sebastian Trueg
+ */
+class K3bWriterSelectionWidget : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ /**
+ * Creates a writerselectionwidget
+ */
+ K3bWriterSelectionWidget( QWidget* parent = 0, const char* name = 0 );
+ ~K3bWriterSelectionWidget();
+
+ int writerSpeed() const;
+ K3bDevice::Device* writerDevice() const;
+
+ QValueList<K3bDevice::Device*> allDevices() const;
+
+ /**
+ * returns K3b::WritingApp
+ */
+ int writingApp() const;
+
+ int wantedMediumType() const;
+ int wantedMediumState() const;
+
+ void loadDefaults();
+ void loadConfig( KConfigBase* );
+ void saveConfig( KConfigBase* );
+
+ public slots:
+ void setWriterDevice( K3bDevice::Device* );
+ void setSpeed( int );
+ void setWritingApp( int );
+
+ /**
+ * K3b::WritingApp or'ed together
+ *
+ * Defaults to cdrecord and cdrdao for CD and growisofs for DVD
+ */
+ void setSupportedWritingApps( int );
+
+ /**
+ * A simple hack to disable the speed selection for DVD formatting
+ */
+ void setForceAutoSpeed( bool );
+
+ /**
+ * Set the wanted medium type. Defaults to writable CD.
+ *
+ * \param type a bitwise combination of the K3bDevice::MediaType enum
+ */
+ void setWantedMediumType( int type );
+
+ /**
+ * Set the wanted medium state. Defaults to empty media.
+ *
+ * \param state a bitwise combination of the K3bDevice::State enum
+ */
+ void setWantedMediumState( int state );
+
+ /**
+ * This is a hack to allow the copy dialogs to use the same device for reading
+ * and writing without having the user to choose the same medium.
+ *
+ * \param overrideString A string which will be shown in place of the medium string.
+ * For example: "Burn to the same device". Set it to 0 in order
+ * to disable the feature.
+ */
+ void setOverrideDevice( K3bDevice::Device* dev, const QString& overrideString = QString::null, const QString& tooltip = QString::null );
+
+ /**
+ * Compare K3bMediaSelectionComboBox::setIgnoreDevice
+ */
+ void setIgnoreDevice( K3bDevice::Device* dev );
+
+ signals:
+ void writerChanged();
+ void writerChanged( K3bDevice::Device* );
+ void writingAppChanged( int app );
+
+ /**
+ * \see K3bMediaSelectionComboBox
+ */
+ void newMedia();
+ void newMedium( K3bDevice::Device* dev );
+
+ private slots:
+ void slotRefreshWriterSpeeds();
+ void slotRefreshWritingApps();
+ void slotWritingAppSelected( int id );
+ void slotConfigChanged( KConfigBase* c );
+ void slotSpeedChanged( int index );
+ void slotWriterChanged();
+ void slotNewBurnMedium( K3bDevice::Device* dev );
+ void slotManualSpeed();
+
+ private:
+ void clearSpeedCombo();
+ void insertSpeedItem( int );
+ int selectedWritingApp() const;
+
+ class MediaSelectionComboBox;
+
+ KComboBox* m_comboSpeed;
+ MediaSelectionComboBox* m_comboMedium;
+ KComboBox* m_comboWritingApp;
+ QLabel* m_writingAppLabel;
+
+ class Private;
+ Private* d;
+};
+
+#endif