mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
34 lines
773 B
C
34 lines
773 B
C
![]() |
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||
|
//
|
||
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
#undef signals
|
||
|
#include <gio/gio.h>
|
||
|
#define signals Q_SIGNALS
|
||
|
|
||
|
class TrashHelper: public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit TrashHelper(QObject * parent);
|
||
|
~TrashHelper();
|
||
|
|
||
|
int trashItemCount();
|
||
|
bool emptyTrash();
|
||
|
|
||
|
Q_SIGNALS:
|
||
|
void trashAttributeChanged();
|
||
|
|
||
|
private:
|
||
|
GFile * m_trash;
|
||
|
GFileMonitor * m_trashMonitor;
|
||
|
|
||
|
void onTrashMonitorChanged(GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type);
|
||
|
static void slot_onTrashMonitorChanged(GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type, gpointer user_data);
|
||
|
};
|