Skip to content

Commit

Permalink
Volume group list
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Jul 23, 2023
1 parent 469e2f9 commit f7c5cb8
Show file tree
Hide file tree
Showing 26 changed files with 509 additions and 75 deletions.
6 changes: 5 additions & 1 deletion application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set(SOURCES
mainwindow.cpp mainwindow.ui
operations/creatediskimagepopover.cpp operations/creatediskimagepopover.ui

lvm/lvmpage.cpp lvm/lvmpage.ui

main.cpp

resources.qrc)
Expand All @@ -27,7 +29,9 @@ set(HEADERS
popovers/smartpopover.h
diskpane.h
mainwindow.h
operations/creatediskimagepopover.h)
operations/creatediskimagepopover.h
lvm/lvmpage.h
)

add_executable(thefrisbee ${SOURCES} ${HEADERS})

Expand Down
2 changes: 1 addition & 1 deletion application/diskpane.ui
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<x>0</x>
<y>0</y>
<width>609</width>
<height>366</height>
<height>360</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
Expand Down
28 changes: 28 additions & 0 deletions application/lvm/lvmpage.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "lvmpage.h"
#include "ui_lvmpage.h"

#include <volumegroupmodel.h>

struct LvmPagePrivate {
VolumeGroupModel* vgModel;
};

LvmPage::LvmPage(QWidget* parent) :
QWidget(parent),
ui(new Ui::LvmPage) {
ui->setupUi(this);

d = new LvmPagePrivate();
d->vgModel = new VolumeGroupModel(this);
d->vgModel->setShowAddButton(true);
ui->listView->setModel(d->vgModel);
}

LvmPage::~LvmPage() {
delete ui;
delete d;
}

void LvmPage::setTopPadding(int padding) {
ui->vgsPage->layout()->setContentsMargins(0, padding, 0, 0);
}
25 changes: 25 additions & 0 deletions application/lvm/lvmpage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#ifndef LVMPAGE_H
#define LVMPAGE_H

#include <QWidget>

namespace Ui {
class LvmPage;
}

struct LvmPagePrivate;
class LvmPage : public QWidget {
Q_OBJECT

public:
explicit LvmPage(QWidget* parent = nullptr);
~LvmPage();

void setTopPadding(int padding);

private:
Ui::LvmPage* ui;
LvmPagePrivate* d;
};

#endif // LVMPAGE_H
108 changes: 108 additions & 0 deletions application/lvm/lvmpage.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LvmPage</class>
<widget class="QWidget" name="LvmPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>705</width>
<height>585</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="QStackedWidget" name="stackedWidget">
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_2">
<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="QStackedWidget" name="stackedWidget_2">
<widget class="QWidget" name="vgsPage">
<layout class="QVBoxLayout" name="verticalLayout_3">
<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>Volume Groups</string>
</property>
</widget>
</item>
<item>
<widget class="QListView" name="listView">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_4"/>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2"/>
</widget>
</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>
1 change: 1 addition & 0 deletions application/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,5 @@ void MainWindow::resizeEvent(QResizeEvent* event) {

ui->leftWidget->setContentsMargins(0, ui->topWidget->sizeHint().height(), 0, 0);
ui->verticalLayout_3->setContentsMargins(0, ui->topWidget->sizeHint().height(), 0, 0);
ui->lvmPage->setTopPadding(ui->topWidget->sizeHint().height());
}
8 changes: 7 additions & 1 deletion application/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="lvmPage"/>
<widget class="LvmPage" name="lvmPage"/>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -272,6 +272,12 @@
<header location="global">twindowtabber.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LvmPage</class>
<extends>QWidget</extends>
<header>lvm/lvmpage.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="resources.qrc"/>
Expand Down
31 changes: 22 additions & 9 deletions application/translations/ar_SA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,60 +137,73 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>LvmPage</name>
<message>
<location filename="../lvm/lvmpage.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../lvm/lvmpage.ui" line="73"/>
<source>Volume Groups</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.ui" line="14"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="232"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="233"/>
<source>theFrisbee</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="148"/>
<location filename="../mainwindow.cpp" line="81"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="243"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="244"/>
<source>Disks</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="203"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="244"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="245"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="209"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="245"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="246"/>
<source>Image</source>
<translation type="unfinished">اصنع صورة</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="223"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="233"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="234"/>
<source>Exit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="226"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="235"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="236"/>
<source>Ctrl+Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="235"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="237"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="238"/>
<source>Attach Image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="244"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="238"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="239"/>
<source>Create Disk Image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="247"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="240"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="241"/>
<source>Ctrl+N</source>
<translation type="unfinished"></translation>
</message>
Expand Down
31 changes: 22 additions & 9 deletions application/translations/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,60 +137,73 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>LvmPage</name>
<message>
<location filename="../lvm/lvmpage.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../lvm/lvmpage.ui" line="73"/>
<source>Volume Groups</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.ui" line="14"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="232"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="233"/>
<source>theFrisbee</source>
<translation>theFrisbee</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="148"/>
<location filename="../mainwindow.cpp" line="81"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="243"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="244"/>
<source>Disks</source>
<translation>Diske</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="203"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="244"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="245"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="209"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="245"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="246"/>
<source>Image</source>
<translation type="unfinished">Snapshot</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="223"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="233"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="234"/>
<source>Exit</source>
<translation>Luk</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="226"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="235"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="236"/>
<source>Ctrl+Q</source>
<translation>Ctrl+Q</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="235"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="237"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="238"/>
<source>Attach Image</source>
<translation>Synkroniser med snapshot-fil</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="244"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="238"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="239"/>
<source>Create Disk Image</source>
<translation>Lav snapshot</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="247"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="240"/>
<location filename="../../../build-thefrisbee-Chroot_6-Debug/application/thefrisbee_autogen/include/ui_mainwindow.h" line="241"/>
<source>Ctrl+N</source>
<translation>Ctrl+N</translation>
</message>
Expand Down
Loading

0 comments on commit f7c5cb8

Please sign in to comment.