2018-12-25 20:54:48 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* gui/statusbar/hashingstatus.h *
|
|
|
|
* *
|
|
|
|
* Copyright (c) 2008 Retroshare Team <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
|
|
|
|
2009-07-07 11:23:25 +00:00
|
|
|
#ifndef HASHINGSTATUS_H
|
|
|
|
#define HASHINGSTATUS_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2020-01-30 23:02:23 +01:00
|
|
|
#include "retroshare/rsevents.h"
|
2009-07-07 11:23:25 +00:00
|
|
|
|
2010-10-09 18:35:34 +00:00
|
|
|
class QLabel;
|
2015-01-07 11:47:10 +00:00
|
|
|
class ElidedLabel;
|
2009-07-07 11:23:25 +00:00
|
|
|
|
|
|
|
class HashingStatus : public QWidget
|
|
|
|
{
|
2010-10-09 18:35:34 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2009-07-07 11:23:25 +00:00
|
|
|
public:
|
|
|
|
HashingStatus(QWidget *parent = 0);
|
2010-11-30 20:33:09 +00:00
|
|
|
~HashingStatus();
|
2009-07-07 11:23:25 +00:00
|
|
|
|
2014-05-29 16:15:26 +00:00
|
|
|
void setCompactMode(bool compact) {_compactMode = compact; }
|
2017-09-10 22:07:36 +02:00
|
|
|
void mousePressEvent(QMouseEvent *);
|
2014-05-29 16:15:26 +00:00
|
|
|
|
2009-07-07 11:23:25 +00:00
|
|
|
private:
|
2020-01-30 23:02:23 +01:00
|
|
|
void updateHashingInfo(const QString& s);
|
|
|
|
void handleEvent(std::shared_ptr<const RsEvent> event);
|
|
|
|
|
2015-01-07 11:47:10 +00:00
|
|
|
ElidedLabel *statusHashing;
|
|
|
|
QLabel *hashloader;
|
2017-09-10 22:07:36 +02:00
|
|
|
QString mLastText ;
|
2010-10-29 12:50:33 +00:00
|
|
|
QMovie *movie;
|
2014-05-29 16:15:26 +00:00
|
|
|
bool _compactMode;
|
2020-01-30 23:02:23 +01:00
|
|
|
RsEventsHandlerId_t mEventHandlerId;
|
2009-07-07 11:23:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|