show physical sector size in GUI
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135558
This commit is contained in:
parent
fbe5cbe667
commit
c0f1b0123a
14
TODO
14
TODO
|
@ -9,10 +9,24 @@ Bugs to fix for 1.1:
|
|||
if the new one is not legal. i.e., we must constantly update the valid ranges
|
||||
of the spin boxes if any value changes.
|
||||
|
||||
* how does one remove an existing mount point?
|
||||
|
||||
===============================================================================
|
||||
|
||||
For releases after 1.1:
|
||||
|
||||
* can we use capacity (i.e. bytes/mib) instead of sector for alignment
|
||||
configuration? would we need to know the physical sector size for that? are
|
||||
we able to acquire that information?
|
||||
|
||||
* make Job::copyBlocks() work for cases where the logical sector sizes of
|
||||
source and target are not the same
|
||||
|
||||
* find an elegant solution for the brokenness in design that is
|
||||
Partition::sectorSize()... Either a Partition has a reference/pointer to the
|
||||
Device it's on or the method is removed completely. -- Maybe the
|
||||
PartitionTable should refernce the Device?
|
||||
|
||||
* the file system support dialog is a usability nightmare
|
||||
|
||||
* introduce new commands for online-actions, like change label online or, for
|
||||
|
|
|
@ -106,6 +106,7 @@ void DevicePropsDialog::setupDialog()
|
|||
dialogWidget().cylinderSize().setText(i18ncp("@label", "1 Sector", "%1 Sectors", device().cylinderSize()));
|
||||
dialogWidget().primariesMax().setText(maxPrimaries);
|
||||
dialogWidget().logicalSectorSize().setText(Capacity(device().logicalSectorSize()).toString(Capacity::Byte, Capacity::AppendUnit));
|
||||
dialogWidget().physicalSectorSize().setText(Capacity(device().physicalSectorSize()).toString(Capacity::Byte, Capacity::AppendUnit));
|
||||
dialogWidget().totalSectors().setText(KGlobal::locale()->formatNumber(device().totalSectors(), 0));
|
||||
dialogWidget().type().setText(type);
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ class DevicePropsWidget : public QWidget, public Ui::DevicePropsWidgetBase
|
|||
QLabel& cylinderSize() { Q_ASSERT(m_LabelCylinderSize); return *m_LabelCylinderSize; }
|
||||
QLabel& primariesMax() { Q_ASSERT(m_LabelPrimariesMax); return *m_LabelPrimariesMax; }
|
||||
QLabel& logicalSectorSize() { Q_ASSERT(m_LabelLogicalSectorSize); return *m_LabelLogicalSectorSize; }
|
||||
QLabel& physicalSectorSize() { Q_ASSERT(m_LabelPhysicalSectorSize); return *m_LabelPhysicalSectorSize; }
|
||||
QLabel& totalSectors() { Q_ASSERT(m_LabelTotalSectors); return *m_LabelTotalSectors; }
|
||||
QLabel& type() { Q_ASSERT(m_LabelType); return *m_LabelType; }
|
||||
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>450</width>
|
||||
<height>343</height>
|
||||
<height>361</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="PartTableWidget" name="m_PartTableWidget" native="true">
|
||||
|
@ -46,8 +49,8 @@
|
|||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<width>439</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -195,6 +198,23 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="m_LabelTextPhysicalSectorSize">
|
||||
<property name="text">
|
||||
<string>Physical sector size:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="m_LabelPhysicalSectorSize">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="m_LabelTextCylinderSize">
|
||||
<property name="text">
|
||||
<string>Cylinder size:</string>
|
||||
|
@ -204,21 +224,21 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QLabel" name="m_LabelCylinderSize">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="2">
|
||||
<item row="12" column="0" colspan="2">
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="m_LabelTextPrimariesMax">
|
||||
<property name="text">
|
||||
<string>Primaries/Max:</string>
|
||||
|
@ -228,21 +248,21 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<item row="13" column="1">
|
||||
<widget class="QLabel" name="m_LabelPrimariesMax">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="2">
|
||||
<item row="14" column="0" colspan="2">
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="m_LabelTextSmartStatus">
|
||||
<property name="text">
|
||||
<string>SMART status:</string>
|
||||
|
@ -252,7 +272,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<item row="15" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_LabelSmartStatusIcon">
|
||||
|
@ -289,7 +309,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="15" column="0" colspan="2">
|
||||
<item row="16" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -299,8 +319,8 @@
|
|||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>17</width>
|
||||
<height>17</height>
|
||||
<width>439</width>
|
||||
<height>14</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
|
|
@ -152,6 +152,7 @@ void InfoPane::showDevice(Qt::DockWidgetArea area, const Device& d)
|
|||
createLabels(i18nc("@label device", "Cylinders:"), KGlobal::locale()->formatNumber(d.cylinders(), 0), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Sectors:"), KGlobal::locale()->formatNumber(d.sectorsPerTrack(), 0), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Logical sector size:"), Capacity(d.logicalSectorSize()).toString(Capacity::Byte, Capacity::AppendUnit), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Physical sector size:"), Capacity(d.physicalSectorSize()).toString(Capacity::Byte, Capacity::AppendUnit), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Cylinder size:"), i18ncp("@label", "1 Sector", "%1 Sectors", d.cylinderSize()), cols(area), x, y);
|
||||
createLabels(i18nc("@label device", "Primaries/Max:"), maxPrimaries, cols(area), x, y);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue