2013-02-09 04:05:03 +00:00
|
|
|
/*
|
2015-06-10 21:27:11 +00:00
|
|
|
* This file Copyright (C) 2013-2015 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
|
|
|
*
|
2014-01-19 01:29:38 +00:00
|
|
|
* $Id$
|
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:41:36 +00:00
|
|
|
#include <cstdint>
|
2013-09-08 18:39:37 +00:00
|
|
|
|
2015-06-12 22:12:12 +00:00
|
|
|
#include <QLabel>
|
2013-02-09 04:05:03 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QTimer>
|
|
|
|
|
|
|
|
class Session;
|
|
|
|
|
2014-12-12 23:21:04 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
struct tr_variant;
|
|
|
|
}
|
|
|
|
|
2015-06-10 21:27:11 +00:00
|
|
|
class FreeSpaceLabel: public QLabel
|
2013-02-09 04:05:03 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2015-06-12 22:12:12 +00:00
|
|
|
FreeSpaceLabel (QWidget * parent = nullptr);
|
2015-06-10 21:27:11 +00:00
|
|
|
virtual ~FreeSpaceLabel () {}
|
2014-12-26 18:41:47 +00:00
|
|
|
|
|
|
|
void setSession (Session& session);
|
2013-02-09 04:42:07 +00:00
|
|
|
void setPath (const QString& folder);
|
2013-02-09 04:05:03 +00:00
|
|
|
|
2015-06-12 22:12:12 +00:00
|
|
|
private slots:
|
|
|
|
void onSessionExecuted (int64_t tag, const QString& result, tr_variant * arguments);
|
|
|
|
void onTimer ();
|
|
|
|
|
2013-02-09 04:05:03 +00:00
|
|
|
private:
|
2014-12-26 18:41:47 +00:00
|
|
|
Session * mySession;
|
2013-08-29 00:37:37 +00:00
|
|
|
int64_t myTag;
|
2013-02-09 04:05:03 +00:00
|
|
|
QString myPath;
|
|
|
|
QTimer myTimer;
|
|
|
|
};
|
|
|
|
|