gio-qt
0.0.16
Toggle main menu visibility
Loading...
Searching...
No Matches
dgiodrive.h
1
// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2
//
3
// SPDX-License-Identifier: LGPL-3.0-or-later
4
5
#ifndef DGIODRIVE_H
6
#define DGIODRIVE_H
7
8
#include <QObject>
9
#include <QSharedData>
10
11
#define DGIODRIVE_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
12
13
namespace
Gio {
14
class
Drive;
15
}
16
17
class
DGioDrivePrivate;
18
class
DGioDrive :
public
QObject,
public
QSharedData {
19
Q_OBJECT
20
public
:
21
explicit
DGioDrive(Gio::Drive *gmmDrivePtr, QObject *parent =
nullptr
);
22
~DGioDrive();
23
24
QString
name
()
const
;
25
QString
identifier
(
const
QString & kind = DGIODRIVE_IDENTIFIER_KIND_UNIX_DEVICE)
const
;
26
bool
hasVolumes()
const
;
27
bool
canStart()
const
;
28
bool
canStop()
const
;
29
bool
canEject()
const
;
30
bool
isMediaRemovable
()
const
;
31
bool
isRemovable
()
const
;
32
33
private
:
34
QScopedPointer<DGioDrivePrivate> d_ptr;
35
Q_DECLARE_PRIVATE(DGioDrive)
36
};
37
38
39
#endif
// DGIODRIVE_H
DGioDrive::name
QString name() const
Gets the name of drive.
Definition
dgiodrive.cpp:63
DGioDrive::identifier
QString identifier(const QString &kind=DGIODRIVE_IDENTIFIER_KIND_UNIX_DEVICE) const
Gets the identifier of the given kind for drive.
Definition
dgiodrive.cpp:81
DGioDrive::isRemovable
bool isRemovable() const
Checks if the drive and/or its media is considered removable by the user.
Definition
dgiodrive.cpp:139
DGioDrive::isMediaRemovable
bool isMediaRemovable() const
Checks if the drive supports removable media.
Definition
dgiodrive.cpp:123
include
dgiodrive.h
Generated by
1.17.0