2022-01-20 18:27:56 +00:00
|
|
|
// This file Copyright © 2013-2022 Mnemosyne LLC.
|
|
|
|
// It may be used under GPLv2 (SPDX: GPL-2.0), GPLv3 (SPDX: GPL-3.0),
|
|
|
|
// or any future license endorsed by Mnemosyne LLC.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2013-02-09 04:05:03 +00:00
|
|
|
|
2016-03-29 16:37:21 +00:00
|
|
|
#pragma once
|
2013-02-09 04:05:03 +00:00
|
|
|
|
2015-06-12 22:12:12 +00:00
|
|
|
#include <QLabel>
|
2013-02-09 04:05:03 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QTimer>
|
|
|
|
|
2021-12-14 08:43:27 +00:00
|
|
|
#include <libtransmission/tr-macros.h>
|
2020-08-11 18:11:55 +00:00
|
|
|
|
2013-02-09 04:05:03 +00:00
|
|
|
class Session;
|
|
|
|
|
2014-12-12 23:21:04 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
2021-08-15 09:41:48 +00:00
|
|
|
struct tr_variant;
|
2014-12-12 23:21:04 +00:00
|
|
|
}
|
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
class FreeSpaceLabel : public QLabel
|
2013-02-09 04:05:03 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-08-11 18:11:55 +00:00
|
|
|
TR_DISABLE_COPY_MOVE(FreeSpaceLabel)
|
2013-02-09 04:05:03 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
public:
|
2020-11-05 22:46:21 +00:00
|
|
|
explicit FreeSpaceLabel(QWidget* parent = nullptr);
|
2014-12-26 18:41:47 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
void setSession(Session& session);
|
2017-04-20 16:02:19 +00:00
|
|
|
void setPath(QString const& folder);
|
2015-06-12 22:12:12 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
private slots:
|
|
|
|
void onTimer();
|
|
|
|
|
|
|
|
private:
|
2020-05-27 21:53:12 +00:00
|
|
|
Session* session_ = {};
|
|
|
|
QString path_;
|
|
|
|
QTimer timer_;
|
2013-02-09 04:05:03 +00:00
|
|
|
};
|