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

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

sync with github

File size: 1.9 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
4 *   Copyright 2014, Aurélien Gâteau <agateau@kde.org>
5 *
6 *   Calamares is free software: you can redistribute it and/or modify
7 *   it under the terms of the GNU General Public License as published by
8 *   the Free Software Foundation, either version 3 of the License, or
9 *   (at your option) any later version.
10 *
11 *   Calamares is distributed in the hope that it will be useful,
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 *   GNU General Public License for more details.
15 *
16 *   You should have received a copy of the GNU General Public License
17 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef REPLACEWIDGET_H
21#define REPLACEWIDGET_H
22
23#include "utils/CalamaresUtilsGui.h"
24
25#include <QWidget>
26#include <QScopedPointer>
27
28class Ui_ReplaceWidget;
29class QComboBox;
30class PartitionCoreModule;
31class Partition;
32
33class ReplaceWidget : public QWidget
34{
35    Q_OBJECT
36public:
37    explicit ReplaceWidget( PartitionCoreModule* core,
38                            QComboBox* devicesComboBox,
39                            QWidget* parent = nullptr );
40    virtual ~ReplaceWidget();
41
42    bool isNextEnabled() const;
43
44    void reset();
45
46    void applyChanges();
47
48signals:
49    void nextStatusChanged( bool );
50
51private slots:
52    void onPartitionSelected();
53
54private:
55    QScopedPointer< Ui_ReplaceWidget > m_ui;
56    void setNextEnabled( bool enabled );
57
58    void updateStatus( CalamaresUtils::ImageType imageType, const QString& text );
59
60    PartitionCoreModule* m_core;
61
62    bool m_nextEnabled;
63
64    bool m_isEfi;
65
66    void updateFromCurrentDevice( QComboBox* devicesComboBox );
67    void onPartitionViewActivated();
68    void onPartitionModelReset();
69};
70
71#endif // REPLACEWIDGET_H
Note: See TracBrowser for help on using the repository browser.