2013-02-09 04:05:03 +00:00
|
|
|
/*
|
2014-01-19 01:09:44 +00:00
|
|
|
* This file Copyright (C) 2013-2014 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
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QTR_FREESPACE_LABEL_H
|
|
|
|
#define QTR_FREESPACE_LABEL_H
|
|
|
|
|
2013-09-08 18:39:37 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2013-02-09 04:05:03 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QTimer>
|
2013-07-27 21:58:14 +00:00
|
|
|
#include <QLabel>
|
2013-02-09 04:05:03 +00:00
|
|
|
|
|
|
|
class Session;
|
|
|
|
|
2014-12-12 23:21:04 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
struct tr_variant;
|
|
|
|
}
|
|
|
|
|
2013-02-09 04:05:03 +00:00
|
|
|
class FreespaceLabel: public QLabel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
FreespaceLabel (Session&, const QString& path, QWidget *parent=0);
|
|
|
|
virtual ~FreespaceLabel () {}
|
2013-02-09 04:42:07 +00:00
|
|
|
void setPath (const QString& folder);
|
2013-02-09 04:05:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
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;
|
|
|
|
|
|
|
|
private slots:
|
2014-12-12 23:21:04 +00:00
|
|
|
void onSessionExecuted (int64_t tag, const QString& result, tr_variant * arguments);
|
2013-02-09 04:05:03 +00:00
|
|
|
void onTimer ();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTR_FREESPACE_LABEL_H
|
|
|
|
|