1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 18:18:10 +00:00
transmission/qt/freespace-label.h

49 lines
851 B
C++

/*
* This file Copyright (C) 2013-2014 Mnemosyne LLC
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
*
* $Id$
*/
#ifndef QTR_FREESPACE_LABEL_H
#define QTR_FREESPACE_LABEL_H
#include <stdint.h>
#include <QString>
#include <QTimer>
#include <QLabel>
class Session;
extern "C"
{
struct tr_variant;
}
class FreespaceLabel: public QLabel
{
Q_OBJECT
public:
FreespaceLabel (QWidget * parent = 0);
virtual ~FreespaceLabel () {}
void setSession (Session& session);
void setPath (const QString& folder);
private:
Session * mySession;
int64_t myTag;
QString myPath;
QTimer myTimer;
private slots:
void onSessionExecuted (int64_t tag, const QString& result, tr_variant * arguments);
void onTimer ();
};
#endif // QTR_FREESPACE_LABEL_H