blob: 3e232f4db228af3d2cdfa9ef040e887f7d3a68f2 (
plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#include <QtGui>
#include "partman.h"
#include "config.h"
#include "../listdelegate.h"
#include "../listitem.h"
wpPartMan::wpPartMan(QWidget *parent) : QWizardPage(parent)
{
setupUi(this);
backend = Backend::instance();
}
void wpPartMan::initializePage()
{
clearPage();
}
void wpPartMan::clearPage()
{
setComplete(false);
delete terminal;
delete gridLayout;
delete label;
setupUi(this);
connect(terminal, SIGNAL(finished()), this, SLOT(terminalFinished()));
QStringList args;
args << "/bin/bash" << BACKEND_PATH << "-e" << "run_partmgr" << backend->cfg("partman_program") << backend->cfg("partman_disk");
terminal->setArgs(args);
terminal->startShellProgram();
terminal->setFocus(Qt::OtherFocusReason);
}
void wpPartMan::terminalFinished()
{
terminal->releaseKeyboard();
terminal->clearFocus();
setComplete(true);
}
void wpPartMan::setComplete(bool c)
{
complete = c;
emit completeChanged();
}
bool wpPartMan::isComplete() const
{
return complete;
}
bool wpPartMan::validatePage()
{
return complete;
}
|