gio-qt
0.0.16
Toggle main menu visibility
Loading...
Searching...
No Matches
dgiomount.h
1
// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2
//
3
// SPDX-License-Identifier: LGPL-3.0-or-later
4
5
#ifndef DGIOMOUNT_H
6
#define DGIOMOUNT_H
7
8
#include <QObject>
9
#include <QSharedData>
10
11
namespace
Gio {
12
class
Mount;
13
}
14
15
class
DGioFile
;
16
class
DGioVolume
;
17
class
DGioMountPrivate;
18
class
DGioMount :
public
QObject,
public
QSharedData
19
{
20
Q_OBJECT
21
public
:
22
explicit
DGioMount(Gio::Mount *gmmMountPtr, QObject *parent =
nullptr
);
23
~DGioMount();
24
25
static
DGioMount *
createFromPath
(QString path, QObject *parent =
nullptr
);
26
27
QString name()
const
;
28
QString uuid()
const
;
29
QString mountClass()
const
;
30
bool
isShadowed
()
const
;
31
bool
canUnmount()
const
;
32
bool
canEject()
const
;
33
QString sortKey()
const
;
34
QStringList themedIconNames()
const
;
35
QStringList themedSymbolicIconNames()
const
;
36
37
void
unmount(
bool
forceUnmount =
false
);
38
void
eject(
bool
forceEject =
false
);
39
40
QExplicitlySharedDataPointer<DGioFile> getRootFile();
41
QExplicitlySharedDataPointer<DGioFile> getDefaultLocationFile();
42
QExplicitlySharedDataPointer<DGioVolume> getVolume();
43
44
private
:
45
QScopedPointer<DGioMountPrivate> d_ptr;
46
47
Q_DECLARE_PRIVATE(DGioMount)
48
};
49
50
#endif
// DGIOMOUNT_H
DGioFile
Definition
dgiofile.h:31
DGioMount::createFromPath
static DGioMount * createFromPath(QString path, QObject *parent=nullptr)
Create a DGioMount instance by a given path.
Definition
dgiomount.cpp:85
DGioMount::isShadowed
bool isShadowed() const
Determines if mount is shadowed.
Definition
dgiomount.cpp:142
DGioVolume
Definition
dgiovolume.h:27
include
dgiomount.h
Generated by
1.17.0