2013-02-09 04:05:03 +00:00
|
|
|
/*
|
2016-04-19 20:41:59 +00:00
|
|
|
* This file Copyright (C) 2013-2016 Mnemosyne LLC
|
2013-02-09 04:05:03 +00:00
|
|
|
*
|
2014-01-21 03:10:30 +00:00
|
|
|
* It may be used under the GNU GPL versions 2 or 3
|
2014-01-19 01:09:44 +00:00
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
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>
|
|
|
|
|
2020-08-11 18:11:55 +00:00
|
|
|
#include "Macros.h"
|
|
|
|
|
2013-02-09 04:05:03 +00:00
|
|
|
class Session;
|
|
|
|
|
2014-12-12 23:21:04 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
2017-04-19 12:04:45 +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
|
|
|
};
|