File indexing completed on 2024-04-28 05:46:31
0001 /* 0002 SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de> 0003 SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu> 0004 SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net> 0005 0006 SPDX-License-Identifier: GPL-3.0-or-later 0007 */ 0008 0009 #if !defined(DEVICEPROPSWIDGET_H) 0010 0011 #define DEVICEPROPSWIDGET_H 0012 0013 #include "ui_devicepropswidgetbase.h" 0014 0015 class PartTableWidget; 0016 0017 /** Central widget in the DevicePropsDialog. 0018 @author Volker Lanz <vl@fidra.de> 0019 */ 0020 class DevicePropsWidget : public QWidget, public Ui::DevicePropsWidgetBase 0021 { 0022 public: 0023 explicit DevicePropsWidget(QWidget* parent); 0024 0025 public: 0026 PartTableWidget& partTableWidget() { 0027 Q_ASSERT(m_PartTableWidget); 0028 return *m_PartTableWidget; 0029 } 0030 0031 QLabel& capacity() { 0032 Q_ASSERT(m_LabelCapacity); 0033 return *m_LabelCapacity; 0034 } 0035 QLabel& primariesMax() { 0036 Q_ASSERT(m_LabelPrimariesMax); 0037 return *m_LabelPrimariesMax; 0038 } 0039 QLabel& logicalSectorSize() { 0040 Q_ASSERT(m_LabelLogicalSectorSize); 0041 return *m_LabelLogicalSectorSize; 0042 } 0043 QLabel& physicalSectorSize() { 0044 Q_ASSERT(m_LabelPhysicalSectorSize); 0045 return *m_LabelPhysicalSectorSize; 0046 } 0047 QLabel& totalSectors() { 0048 Q_ASSERT(m_LabelTotalSectors); 0049 return *m_LabelTotalSectors; 0050 } 0051 QLabel& type() { 0052 Q_ASSERT(m_LabelType); 0053 return *m_LabelType; 0054 } 0055 0056 QRadioButton& radioCylinderBased() { 0057 Q_ASSERT(m_RadioCylinderBased); 0058 return *m_RadioCylinderBased; 0059 } 0060 const QRadioButton& radioCylinderBased() const { 0061 Q_ASSERT(m_RadioCylinderBased); 0062 return *m_RadioCylinderBased; 0063 } 0064 0065 QRadioButton& radioSectorBased() { 0066 Q_ASSERT(m_RadioSectorBased); 0067 return *m_RadioSectorBased; 0068 } 0069 const QRadioButton& radioSectorBased() const { 0070 Q_ASSERT(m_RadioSectorBased); 0071 return *m_RadioSectorBased; 0072 } 0073 0074 QSpacerItem& spacerType() { 0075 Q_ASSERT(m_SpacerType); 0076 return *m_SpacerType; 0077 } 0078 0079 QLabel& smartStatusText() { 0080 Q_ASSERT(m_LabelSmartStatusText); 0081 return *m_LabelSmartStatusText; 0082 } 0083 QLabel& smartStatusIcon() { 0084 Q_ASSERT(m_LabelSmartStatusIcon); 0085 return *m_LabelSmartStatusIcon; 0086 } 0087 QPushButton& buttonSmartMore() { 0088 Q_ASSERT(m_ButtonSmartMore); 0089 return *m_ButtonSmartMore; 0090 } 0091 0092 void hideTypeRadioButtons(); 0093 }; 0094 0095 #endif