calamares/src/modules/partition/gui/EraseDiskPage.h

58 lines
1.5 KiB
C
Raw Normal View History

2014-09-04 19:37:30 +02:00
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
2014-09-04 19:37:30 +02:00
*
* 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 ERASEDISKPAGE_H
#define ERASEDISKPAGE_H
#include <QMutex>
2014-09-04 19:37:30 +02:00
#include <QWidget>
class PartitionCoreModule;
class QListView;
class Device;
2014-09-04 19:37:30 +02:00
class EraseDiskPage : public QWidget
{
Q_OBJECT
public:
explicit EraseDiskPage( QWidget* parent = nullptr );
void init( PartitionCoreModule* core );
2014-09-17 14:03:02 +02:00
bool isNextEnabled() const;
2014-09-04 19:37:30 +02:00
signals:
void nextStatusChanged( bool );
private:
void setNextEnabled( bool enabled );
void doAutopartition( Device* dev );
void updatePreviews();
qint64 swapSuggestion( const qint64 availableSpaceB ) const;
2014-09-04 19:37:30 +02:00
QListView* m_drivesView;
PartitionCoreModule* m_core;
QWidget* m_previewFrame;
2014-09-04 19:37:30 +02:00
QMutex m_previewsMutex;
2014-09-04 19:37:30 +02:00
bool m_nextEnabled;
};
#endif // ERASEDISKPAGE_H