use a qdoublespinbox instead of a qspinbox for sectors so values higher than
2^31 fit svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1104299
This commit is contained in:
parent
c384fdaf21
commit
a892c765cb
11
TODO
11
TODO
|
@ -20,16 +20,7 @@ Plans and ideas for 1.1:
|
||||||
* offer a) no alignment of partition boundaries at all or b) legacy cylinder
|
* offer a) no alignment of partition boundaries at all or b) legacy cylinder
|
||||||
alignment or c) sector based alignment (the name is misleading, though)
|
alignment or c) sector based alignment (the name is misleading, though)
|
||||||
|
|
||||||
* the size dialog base is a mess with its confusing free before/after stuff.
|
* offer to skip aligning the partition when creating it in that details widget?
|
||||||
redesign to use first and last sector and nothing else and calc the rest from
|
|
||||||
there.
|
|
||||||
|
|
||||||
* once the above redesign is done, allow the user to adjust first and last
|
|
||||||
sector directly. maybe offer a details dialog widget. maybe also offer to
|
|
||||||
skip aligning the partition when creating it in that details widget?
|
|
||||||
|
|
||||||
* write a KFormattedSpinBox widget to allow qint64 instead of int and to show
|
|
||||||
sector numbers nicely
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
|
|
@ -131,12 +131,12 @@ void SizeDialogBase::setupConnections()
|
||||||
connect(&dialogWidget().spinFreeAfter(), SIGNAL(valueChanged(int)), SLOT(onFreeSpaceAfterChanged(int)));
|
connect(&dialogWidget().spinFreeAfter(), SIGNAL(valueChanged(int)), SLOT(onFreeSpaceAfterChanged(int)));
|
||||||
connect(&dialogWidget().spinCapacity(), SIGNAL(valueChanged(int)), SLOT(onCapacityChanged(int)));
|
connect(&dialogWidget().spinCapacity(), SIGNAL(valueChanged(int)), SLOT(onCapacityChanged(int)));
|
||||||
|
|
||||||
connect(&dialogWidget().spinFirstSector(), SIGNAL(valueChanged(int)), SLOT(onSpinFirstSectorChanged(int)));
|
connect(&dialogWidget().spinFirstSector(), SIGNAL(valueChanged(double)), SLOT(onSpinFirstSectorChanged(double)));
|
||||||
connect(&dialogWidget().spinLastSector(), SIGNAL(valueChanged(int)), SLOT(onSpinLastSectorChanged(int)));
|
connect(&dialogWidget().spinLastSector(), SIGNAL(valueChanged(double)), SLOT(onSpinLastSectorChanged(double)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SizeDialogBase::onSpinFirstSectorChanged(int newFirst)
|
void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
|
||||||
{
|
{
|
||||||
if (newFirst >= minimumFirstSector())
|
if (newFirst >= minimumFirstSector())
|
||||||
{
|
{
|
||||||
|
@ -145,7 +145,7 @@ void SizeDialogBase::onSpinFirstSectorChanged(int newFirst)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SizeDialogBase::onSpinLastSectorChanged(int newLast)
|
void SizeDialogBase::onSpinLastSectorChanged(double newLast)
|
||||||
{
|
{
|
||||||
if (newLast <= maximumLastSector())
|
if (newLast <= maximumLastSector())
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,8 +74,8 @@ class SizeDialogBase : public KDialog
|
||||||
void onFreeSpaceBeforeChanged(int newBefore);
|
void onFreeSpaceBeforeChanged(int newBefore);
|
||||||
void onFreeSpaceAfterChanged(int newAfter);
|
void onFreeSpaceAfterChanged(int newAfter);
|
||||||
|
|
||||||
void onSpinFirstSectorChanged(int newFirst);
|
void onSpinFirstSectorChanged(double newFirst);
|
||||||
void onSpinLastSectorChanged(int newLast);
|
void onSpinLastSectorChanged(double newLast);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SizeDialogWidget* m_SizeDialogWidget;
|
SizeDialogWidget* m_SizeDialogWidget;
|
||||||
|
|
|
@ -43,8 +43,8 @@ class SizeDialogWidget : public QWidget, public Ui::SizeDialogWidgetBase
|
||||||
QSpinBox& spinFreeAfter() { Q_ASSERT(m_SpinFreeAfter); return *m_SpinFreeAfter; }
|
QSpinBox& spinFreeAfter() { Q_ASSERT(m_SpinFreeAfter); return *m_SpinFreeAfter; }
|
||||||
QSpinBox& spinCapacity() { Q_ASSERT(m_SpinCapacity); return *m_SpinCapacity; }
|
QSpinBox& spinCapacity() { Q_ASSERT(m_SpinCapacity); return *m_SpinCapacity; }
|
||||||
|
|
||||||
QSpinBox& spinFirstSector() { Q_ASSERT(m_SpinFirstSector); return *m_SpinFirstSector; }
|
QDoubleSpinBox& spinFirstSector() { Q_ASSERT(m_SpinFirstSector); return *m_SpinFirstSector; }
|
||||||
QSpinBox& spinLastSector() { Q_ASSERT(m_SpinLastSector); return *m_SpinLastSector; }
|
QDoubleSpinBox& spinLastSector() { Q_ASSERT(m_SpinLastSector); return *m_SpinLastSector; }
|
||||||
|
|
||||||
QLabel& labelMinSize() { Q_ASSERT(m_LabelMinSize); return *m_LabelMinSize; }
|
QLabel& labelMinSize() { Q_ASSERT(m_LabelMinSize); return *m_LabelMinSize; }
|
||||||
QLabel& labelMaxSize() { Q_ASSERT(m_LabelMaxSize); return *m_LabelMaxSize; }
|
QLabel& labelMaxSize() { Q_ASSERT(m_LabelMaxSize); return *m_LabelMaxSize; }
|
||||||
|
|
|
@ -328,7 +328,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="1" colspan="2">
|
<item row="11" column="1" colspan="2">
|
||||||
<widget class="QSpinBox" name="m_SpinFirstSector">
|
<widget class="QDoubleSpinBox" name="m_SpinFirstSector">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>3</horstretch>
|
<horstretch>3</horstretch>
|
||||||
|
@ -338,6 +338,9 @@
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="12" column="0">
|
||||||
|
@ -360,7 +363,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1" colspan="2">
|
<item row="12" column="1" colspan="2">
|
||||||
<widget class="QSpinBox" name="m_SpinLastSector">
|
<widget class="QDoubleSpinBox" name="m_SpinLastSector">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>3</horstretch>
|
<horstretch>3</horstretch>
|
||||||
|
@ -370,6 +373,9 @@
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0" colspan="3">
|
<item row="13" column="0" colspan="3">
|
||||||
|
|
Loading…
Reference in New Issue