source: calamares/trunk/fuentes/src/modules/partition/gui/PartitionPage.h @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 14 months ago

sync with github

File size: 2.3 KB
RevLine 
[7538]1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014, Aurélien Gâteau <agateau@kde.org>
4 *
5 *   Calamares is free software: you can redistribute it and/or modify
6 *   it under the terms of the GNU General Public License as published by
7 *   the Free Software Foundation, either version 3 of the License, or
8 *   (at your option) any later version.
9 *
10 *   Calamares is distributed in the hope that it will be useful,
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *   GNU General Public License for more details.
14 *
15 *   You should have received a copy of the GNU General Public License
16 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef PARTITIONPAGE_H
20#define PARTITIONPAGE_H
21
22#include <QWidget>
23#include <QScopedPointer>
24#include <QMutex>
25
26class PartitionCoreModule;
27class Ui_PartitionPage;
28
29class Device;
30class DeviceModel;
31class Partition;
32
33/**
34 * The user interface for the module.
35 *
36 * Shows the information exposed by PartitionCoreModule and asks it to schedule
37 * jobs according to user actions.
38 */
39class PartitionPage : public QWidget
40{
41    Q_OBJECT
42public:
43    explicit PartitionPage( PartitionCoreModule* core, QWidget* parent = nullptr );
44    ~PartitionPage();
45
46    void onRevertClicked();
47
48private:
49    QScopedPointer< Ui_PartitionPage > m_ui;
50    PartitionCoreModule* m_core;
51    void updateButtons();
52    void onNewPartitionTableClicked();
53    void onCreateClicked();
54    void onEditClicked();
55    void onDeleteClicked();
56    void onPartitionViewActivated();
57    void onPartitionModelReset();
58
59    void updatePartitionToCreate( Device*, Partition* );
60    void editExistingPartition( Device*, Partition* );
61    void updateBootLoaderInstallPath();
62    void updateFromCurrentDevice();
63    void updateBootLoaderIndex();
64
65    /**
66     * @brief Check if a new partition can be created (as primary) on the device.
67     *
68     * Returns true if a new partition can be created on the device. Provides
69     * a warning popup and returns false if it cannot.
70     */
71    bool checkCanCreate( Device* );
72
73    QStringList getCurrentUsedMountpoints();
74
75    QMutex m_revertMutex;
76    int    m_lastSelectedBootLoaderIndex;
77    bool   m_isEfi;
78};
79
80#endif // PARTITIONPAGE_H
Note: See TracBrowser for help on using the repository browser.