-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
30 lines (23 loc) · 826 Bytes
/
Copy pathmainwindow.cpp
File metadata and controls
30 lines (23 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
// Set window attributes
this->setWindowTitle(tr("EFI Entry Manager"));
this->resize(800, 600);
// Create tab widget
m_tabWidget = new QTabWidget(this);
// Create a class for each page and keep a ref to update
m_entryView = new QEFIEntryView(this);
m_partitionView = new QEFIPartitionView(this);
// Add tabs
m_tabWidget->addTab(m_entryView, tr("Boot Entries"));
m_tabWidget->addTab(m_partitionView, tr("EFI Partitions"));
this->setCentralWidget(m_tabWidget);
}
MainWindow::~MainWindow()
{
if (m_entryView != nullptr) m_entryView->deleteLater();
if (m_partitionView != nullptr) m_partitionView->deleteLater();
if (m_tabWidget != nullptr) m_tabWidget->deleteLater();
}