File indexing completed on 2024-04-14 04:43:18
0001 /* AUDEX CDDA EXTRACTOR 0002 * SPDX-FileCopyrightText: Copyright (C) 2007 Marco Nelles 0003 * <https://userbase.kde.org/Audex> 0004 * 0005 * SPDX-License-Identifier: GPL-3.0-or-later 0006 */ 0007 0008 #include "devicewidget.h" 0009 0010 deviceWidget::deviceWidget(QWidget *parent) 0011 : deviceWidgetUI(parent) 0012 { 0013 Q_UNUSED(parent); 0014 } 0015 0016 deviceWidget::~deviceWidget() 0017 { 0018 } 0019 0020 void deviceWidget::setDeviceInfo(const QString &vendor, 0021 const QString &model, 0022 const QString &revision, 0023 const bool canReadMCN, 0024 const bool canReadISRC, 0025 const bool c2ErrorCorrection) 0026 { 0027 label_Vendor->setText(vendor); 0028 label_Model->setText(model); 0029 label_Revision->setText(revision); 0030 0031 label_Vendor->setEnabled(true); 0032 label_Model->setEnabled(true); 0033 label_Revision->setEnabled(true); 0034 0035 checkBox_canReadMCN->setChecked(canReadMCN); 0036 checkBox_canReadISRC->setChecked(canReadISRC); 0037 checkBox_c2ErrorCorrection->setChecked(c2ErrorCorrection); 0038 0039 checkBox_canReadMCN->setEnabled(true); 0040 checkBox_canReadISRC->setEnabled(true); 0041 checkBox_c2ErrorCorrection->setEnabled(true); 0042 checkBox_canReadMCN->setAttribute(Qt::WA_TransparentForMouseEvents); 0043 checkBox_canReadMCN->setFocusPolicy(Qt::NoFocus); 0044 checkBox_canReadISRC->setAttribute(Qt::WA_TransparentForMouseEvents); 0045 checkBox_canReadISRC->setFocusPolicy(Qt::NoFocus); 0046 checkBox_c2ErrorCorrection->setAttribute(Qt::WA_TransparentForMouseEvents); 0047 checkBox_c2ErrorCorrection->setFocusPolicy(Qt::NoFocus); 0048 } 0049 0050 void deviceWidget::clearDeviceInfo() 0051 { 0052 label_Vendor->setText(i18n("(No disc detected)")); 0053 label_Model->setText(i18n("(No disc detected)")); 0054 label_Revision->setText(i18n("(No disc detected)")); 0055 label_Vendor->setEnabled(false); 0056 label_Model->setEnabled(false); 0057 label_Revision->setEnabled(false); 0058 checkBox_canReadMCN->setChecked(false); 0059 checkBox_canReadISRC->setChecked(false); 0060 checkBox_c2ErrorCorrection->setChecked(false); 0061 checkBox_canReadMCN->setEnabled(false); 0062 checkBox_canReadISRC->setEnabled(false); 0063 checkBox_c2ErrorCorrection->setEnabled(false); 0064 }