From b0b2eccc23eeefdfc43c9fc033a66e08b55a8ec2 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 15 Apr 2016 15:35:45 +0200 Subject: [PATCH] Add "Encrypt" checkBox to partition widget. Also replace occurrences of NULL with nullptr. --- src/gui/sizedialogwidget.h | 25 ++++++---- src/gui/sizedialogwidgetbase.ui | 83 +++++++++++++++++++-------------- 2 files changed, 64 insertions(+), 44 deletions(-) diff --git a/src/gui/sizedialogwidget.h b/src/gui/sizedialogwidget.h index b4380e6..0382131 100644 --- a/src/gui/sizedialogwidget.h +++ b/src/gui/sizedialogwidget.h @@ -81,6 +81,11 @@ public: return *m_ComboFileSystem; } + QCheckBox& checkBoxEncrypt() { + Q_ASSERT(m_CheckBoxEncrypt); + return *m_CheckBoxEncrypt; + } + QLabel& textLabel() { Q_ASSERT(m_LabelTextLabel); return *m_LabelTextLabel; @@ -100,27 +105,29 @@ public: void hideRole() { delete m_LabelRole; - m_LabelRole = NULL; + m_LabelRole = nullptr; delete m_RadioPrimary; - m_RadioPrimary = NULL; + m_RadioPrimary = nullptr; delete m_RadioExtended; - m_RadioExtended = NULL; + m_RadioExtended = nullptr; delete m_RadioLogical; - m_RadioLogical = NULL; + m_RadioLogical = nullptr; } void hideFileSystem() { delete m_LabelFileSystem; - m_LabelFileSystem = NULL; + m_LabelFileSystem = nullptr; delete m_ComboFileSystem; - m_ComboFileSystem = NULL; + m_ComboFileSystem = nullptr; + delete m_CheckBoxEncrypt; + m_CheckBoxEncrypt = nullptr; } void hideLabel() { delete m_LabelTextLabel; - m_LabelTextLabel = NULL; + m_LabelTextLabel = nullptr; delete m_EditLabel; - m_EditLabel = NULL; + m_EditLabel = nullptr; delete m_LabelTextNoSetLabel; - m_LabelTextNoSetLabel = NULL; + m_LabelTextNoSetLabel = nullptr; } }; diff --git a/src/gui/sizedialogwidgetbase.ui b/src/gui/sizedialogwidgetbase.ui index f958856..8fc4f09 100644 --- a/src/gui/sizedialogwidgetbase.ui +++ b/src/gui/sizedialogwidgetbase.ui @@ -6,27 +6,11 @@ 0 0 - 478 - 347 + 653 + 655 - - - - - 400 - 60 - - - - - 16777215 - 60 - - - - @@ -43,6 +27,22 @@ + + + + + 400 + 60 + + + + + 16777215 + 60 + + + + @@ -106,10 +106,7 @@ - - - - + Label: @@ -122,7 +119,7 @@ - + @@ -139,7 +136,7 @@ - + @@ -155,14 +152,14 @@ - + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - + @@ -178,14 +175,14 @@ - + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - + @@ -204,7 +201,7 @@ - + @@ -220,7 +217,7 @@ - + @@ -239,7 +236,7 @@ - + 0.000000000000000 @@ -249,7 +246,7 @@ - + @@ -268,7 +265,7 @@ - + 0.000000000000000 @@ -278,7 +275,7 @@ - + Qt::Vertical @@ -294,6 +291,23 @@ + + + + + + + + + Set up encryption for this filesystem with LUKS. You will be asked to provide a passphrase. + + + Encrypt with LUKS + + + + + @@ -313,7 +327,6 @@ m_RadioPrimary m_RadioExtended m_RadioLogical - m_ComboFileSystem m_EditLabel m_SpinFreeBefore m_SpinCapacity