blob: 19f16c7b52802f7a381fc2bc48e51dcc37b9cbe2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
* SPDX-FileCopyrightText: 2012 Peter Penz <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "placesitemsignalhandler.h"
#include "placesitem.h"
PlacesItemSignalHandler::PlacesItemSignalHandler(PlacesItem* item,
QObject* parent) :
QObject(parent),
m_item(item)
{
}
PlacesItemSignalHandler::~PlacesItemSignalHandler()
{
}
void PlacesItemSignalHandler::onAccessibilityChanged()
{
if (m_item) {
m_item->onAccessibilityChanged();
}
}
void PlacesItemSignalHandler::onTearDownRequested(const QString& udi)
{
Q_UNUSED(udi)
if (m_item) {
Solid::StorageAccess *tmp = m_item->device().as<Solid::StorageAccess>();
if (tmp) {
Q_EMIT tearDownExternallyRequested(tmp->filePath());
}
}
}
void PlacesItemSignalHandler::onTrashEmptinessChanged(bool isTrashEmpty)
{
if (m_item) {
m_item->setIcon(isTrashEmpty ? QStringLiteral("user-trash") : QStringLiteral("user-trash-full"));
}
}
|