2020-09-16 00:35:12 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
|
|
|
SPDX-FileCopyrightText: 2017 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
2016-07-02 16:16:55 +01:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#if !defined(LISTPHYSICALVOLUMES_H)
|
2016-07-02 16:16:55 +01:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#define LISTPHYSICALVOLUMES_H
|
2016-07-02 16:16:55 +01:00
|
|
|
|
|
|
|
#include "ui_listphysicalvolumesbase.h"
|
|
|
|
|
2016-09-11 00:19:58 +01:00
|
|
|
#include <core/partition.h>
|
|
|
|
|
2017-08-31 10:34:58 +01:00
|
|
|
#include <QVector>
|
2017-06-05 00:28:22 +01:00
|
|
|
|
2016-07-02 16:16:55 +01:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class Device;
|
|
|
|
class QPoint;
|
|
|
|
class KActionCollection;
|
|
|
|
|
2016-09-18 01:55:14 +01:00
|
|
|
class ListPhysicalVolumeWidgetItem : public QListWidgetItem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ListPhysicalVolumeWidgetItem(const Partition& p, bool checked);
|
|
|
|
const Partition* partition() const { return m_Partition; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
const Partition* m_Partition;
|
|
|
|
};
|
|
|
|
|
2016-07-02 16:16:55 +01:00
|
|
|
class ListPhysicalVolumes : public QWidget, public Ui::ListPhysicalVolumesBase
|
|
|
|
{
|
|
|
|
Q_DISABLE_COPY(ListPhysicalVolumes)
|
|
|
|
|
|
|
|
public:
|
2019-12-09 16:33:04 +00:00
|
|
|
explicit ListPhysicalVolumes(QWidget* parent = nullptr);
|
2016-07-02 16:16:55 +01:00
|
|
|
|
2016-09-11 00:19:58 +01:00
|
|
|
void addPartition(const Partition& p, bool checked);
|
2016-07-03 18:15:50 +01:00
|
|
|
|
2017-08-31 10:34:58 +01:00
|
|
|
QVector<const Partition *> checkedItems();
|
2016-07-02 16:16:55 +01:00
|
|
|
|
|
|
|
QListWidget& listPhysicalVolumes() {
|
|
|
|
Q_ASSERT(m_ListPhysicalVolumes);
|
|
|
|
return *m_ListPhysicalVolumes;
|
|
|
|
}
|
|
|
|
const QListWidget& listPhysicalVolumes() const {
|
|
|
|
Q_ASSERT(m_ListPhysicalVolumes);
|
|
|
|
return *m_ListPhysicalVolumes;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|