mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-03 04:15:37 -04:00
Add ChoicePage to partition module + OS detection with os-prober.
This commit is contained in:
parent
73246b47c6
commit
a98a4bb614
5 changed files with 409 additions and 7 deletions
65
src/modules/partition/gui/ChoicePage.h
Normal file
65
src/modules/partition/gui/ChoicePage.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CHOICEPAGE_H
|
||||
#define CHOICEPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QBoxLayout;
|
||||
class QLabel;
|
||||
|
||||
class PartitionCoreModule;
|
||||
|
||||
class ChoicePage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Choice
|
||||
{
|
||||
NoChoice,
|
||||
Alongside,
|
||||
Erase,
|
||||
Manual
|
||||
};
|
||||
|
||||
explicit ChoicePage( QWidget* parent = nullptr );
|
||||
virtual ~ChoicePage();
|
||||
|
||||
void init( PartitionCoreModule* core, const QStringList& osproberLines );
|
||||
|
||||
bool isNextEnabled();
|
||||
|
||||
Choice currentChoice();
|
||||
|
||||
signals:
|
||||
void nextStatusChanged( bool enabled );
|
||||
|
||||
private:
|
||||
void setNextEnabled( bool enabled );
|
||||
|
||||
bool m_nextEnabled;
|
||||
PartitionCoreModule* m_core;
|
||||
QBoxLayout* m_itemsLayout;
|
||||
QLabel* m_messageLabel;
|
||||
|
||||
QStringList m_cleanOsproberLines;
|
||||
Choice m_choice;
|
||||
};
|
||||
|
||||
#endif // CHOICEPAGE_H
|
Loading…
Add table
Add a link
Reference in a new issue