2023-02-16 13:51:55 +08:00
|
|
|
// Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
|
|
|
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
2022-09-06 11:36:55 +08:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
2017-09-18 14:33:44 +08:00
|
|
|
|
2016-08-01 14:26:15 +08:00
|
|
|
#ifndef POPUPCONTROLWIDGET_H
|
|
|
|
#define POPUPCONTROLWIDGET_H
|
|
|
|
|
2023-05-29 15:39:25 +08:00
|
|
|
#include "trashhelper.h"
|
|
|
|
|
2016-08-01 14:26:15 +08:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class PopupControlWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit PopupControlWidget(QWidget *parent = 0);
|
|
|
|
|
2016-08-01 15:20:44 +08:00
|
|
|
bool empty() const;
|
2016-09-20 14:42:22 +08:00
|
|
|
int trashItems() const;
|
2016-08-08 16:28:37 +08:00
|
|
|
QSize sizeHint() const;
|
2020-06-13 19:19:30 +08:00
|
|
|
// static const QString trashDir();
|
2016-08-01 15:20:44 +08:00
|
|
|
|
2016-08-08 19:19:11 +08:00
|
|
|
public slots:
|
|
|
|
void openTrashFloder();
|
|
|
|
void clearTrashFloder();
|
|
|
|
|
2016-08-01 15:20:44 +08:00
|
|
|
signals:
|
|
|
|
void emptyChanged(const bool empty) const;
|
|
|
|
|
2016-08-12 15:41:06 +08:00
|
|
|
private:
|
|
|
|
int trashItemCount() const;
|
|
|
|
|
2016-08-01 14:26:15 +08:00
|
|
|
private slots:
|
2016-08-01 15:20:44 +08:00
|
|
|
void trashStatusChanged();
|
2016-08-01 14:26:15 +08:00
|
|
|
|
|
|
|
private:
|
2016-08-01 15:20:44 +08:00
|
|
|
bool m_empty;
|
2016-09-20 14:42:22 +08:00
|
|
|
int m_trashItemsCount;
|
2016-08-01 15:20:44 +08:00
|
|
|
|
2023-05-29 15:39:25 +08:00
|
|
|
TrashHelper *m_trashHelper;
|
2016-08-01 14:26:15 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // POPUPCONTROLWIDGET_H
|