2020-09-16 00:35:12 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
|
|
|
|
SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#if !defined(INSERTDIALOG_H)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#define INSERTDIALOG_H
|
2008-09-24 20:32:01 +01:00
|
|
|
|
|
|
|
#include "gui/sizedialogbase.h"
|
|
|
|
|
|
|
|
class Partition;
|
|
|
|
class Device;
|
|
|
|
|
2010-05-18 23:27:30 +01:00
|
|
|
/** Base class for dialogs to insert Partitions.
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2015-07-13 15:17:41 +01:00
|
|
|
Base class for dialogs that need to insert a Partition into some unallocated space on
|
|
|
|
a Device.
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2015-07-13 15:17:41 +01:00
|
|
|
@author Volker Lanz <vl@fidra.de>
|
2008-09-24 20:32:01 +01:00
|
|
|
*/
|
|
|
|
class InsertDialog : public SizeDialogBase
|
|
|
|
{
|
2015-07-13 15:17:41 +01:00
|
|
|
public:
|
|
|
|
InsertDialog(QWidget* parent, Device& device, Partition& insertedPartition, const Partition& destPartition);
|
|
|
|
~InsertDialog();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const Partition& destPartition() const {
|
|
|
|
return m_DestPartition;
|
|
|
|
}
|
2016-05-17 18:03:28 +01:00
|
|
|
bool canGrow() const override;
|
|
|
|
bool canShrink() const override {
|
2015-07-13 15:17:41 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
const Partition& m_DestPartition;
|
2008-09-24 20:32:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|