-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
417 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "disbandvgpopover.h" | ||
#include "ui_disbandvgpopover.h" | ||
|
||
#include "DriveObjects/volumegroup.h" | ||
#include <tcontentsizer.h> | ||
|
||
struct DisbandVgPopoverPrivate { | ||
VolumeGroup* vg; | ||
}; | ||
|
||
DisbandVgPopover::DisbandVgPopover(VolumeGroup* vg, QWidget* parent) : | ||
QWidget(parent), | ||
ui(new Ui::DisbandVgPopover) { | ||
ui->setupUi(this); | ||
d = new DisbandVgPopoverPrivate(); | ||
d->vg = vg; | ||
|
||
new tContentSizer(ui->disbandConfirmWidget); | ||
ui->disbandButton->setProperty("type", "destructive"); | ||
} | ||
|
||
DisbandVgPopover::~DisbandVgPopover() { | ||
delete d; | ||
delete ui; | ||
} | ||
|
||
void DisbandVgPopover::on_disbandButton_clicked() { | ||
d->vg->deleteVg(false, {}); | ||
emit deleted(); | ||
emit done(); | ||
} | ||
|
||
void DisbandVgPopover::on_titleLabel_backButtonClicked() { | ||
emit done(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef DISBANDVGPOPOVER_H | ||
#define DISBANDVGPOPOVER_H | ||
|
||
#include <QWidget> | ||
|
||
namespace Ui { | ||
class DisbandVgPopover; | ||
} | ||
|
||
class VolumeGroup; | ||
struct DisbandVgPopoverPrivate; | ||
class DisbandVgPopover : public QWidget { | ||
Q_OBJECT | ||
|
||
public: | ||
explicit DisbandVgPopover(VolumeGroup* vg, QWidget* parent = nullptr); | ||
~DisbandVgPopover(); | ||
|
||
signals: | ||
void done(); | ||
void deleted(); | ||
|
||
private slots: | ||
void on_disbandButton_clicked(); | ||
|
||
void on_titleLabel_backButtonClicked(); | ||
|
||
private: | ||
Ui::DisbandVgPopover* ui; | ||
DisbandVgPopoverPrivate* d; | ||
}; | ||
|
||
#endif // DISBANDVGPOPOVER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>DisbandVgPopover</class> | ||
<widget class="QWidget" name="DisbandVgPopover"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>692</width> | ||
<height>523</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="spacing"> | ||
<number>0</number> | ||
</property> | ||
<property name="leftMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>0</number> | ||
</property> | ||
<item> | ||
<widget class="tTitleLabel" name="titleLabel"> | ||
<property name="text"> | ||
<string>Disband Volume Group</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item alignment="Qt::AlignHCenter"> | ||
<widget class="QWidget" name="disbandConfirmWidget" native="true"> | ||
<layout class="QVBoxLayout" name="verticalLayout_4"> | ||
<item> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="font"> | ||
<font> | ||
<bold>true</bold> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>THIS IS IT</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string>There's no going back after this. Once the Volume Group is disbanded, all the logical volumes contained within, and all the data in the logical volumes will be gone forever.</string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="disbandButton"> | ||
<property name="text"> | ||
<string>Disband Volume Group</string> | ||
</property> | ||
<property name="icon"> | ||
<iconset theme="edit-delete"> | ||
<normaloff>.</normaloff>.</iconset> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>tTitleLabel</class> | ||
<extends>QLabel</extends> | ||
<header location="global">ttitlelabel.h</header> | ||
<slots> | ||
<signal>backButtonClicked()</signal> | ||
</slots> | ||
</customwidget> | ||
</customwidgets> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.