mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added the hashingstatus sources not enabled yet, for replacement which is written in MainWindow.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1329 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
50a5aee3a3
commit
902c475b9d
78
retroshare-gui/src/gui/statusbar/hashingstatus.cpp
Normal file
78
retroshare-gui/src/gui/statusbar/hashingstatus.cpp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/****************************************************************
|
||||||
|
* RetroShare is distributed under the following license:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008 RetroShare Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
****************************************************************/
|
||||||
|
#include "hashingstatus.h"
|
||||||
|
|
||||||
|
#include <QtGui>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include <QLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QPixmap>
|
||||||
|
|
||||||
|
#include "rsiface/rsiface.h"
|
||||||
|
#include "rsiface/rspeers.h"
|
||||||
|
#include "rsiface/notifyqt.h"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
HashingStatus::HashingStatus(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
QHBoxLayout *hbox = new QHBoxLayout();
|
||||||
|
hbox->setMargin(0);
|
||||||
|
hbox->setSpacing(6);
|
||||||
|
|
||||||
|
//iconLabel = new QLabel( this );
|
||||||
|
//iconLabel->setPixmap(QPixmap::QPixmap(":/images/user/identitygray16.png"));
|
||||||
|
// iconLabel doesn't change over time, so we didn't need a minimum size
|
||||||
|
//hbox->addWidget(iconLabel);
|
||||||
|
|
||||||
|
statusHashing = new QLabel( tr(""), this );
|
||||||
|
//statusHashing->setMinimumSize( statusHashing->frameSize().width() + 0, 0 );
|
||||||
|
hbox->addWidget(statusHashing);
|
||||||
|
|
||||||
|
QSpacerItem *horizontalSpacer = new QSpacerItem(1000, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
hbox->addItem(horizontalSpacer);
|
||||||
|
|
||||||
|
setLayout( hbox );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
HashingStatus::~HashingStatus()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void HashingStatus::updateHashingInfo(const QString& s)
|
||||||
|
{
|
||||||
|
if(s == "")
|
||||||
|
statusHashing->hide() ;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
statusHashing->setText("Hashing file " + s) ;
|
||||||
|
statusHashing->show() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
46
retroshare-gui/src/gui/statusbar/hashingstatus.h
Normal file
46
retroshare-gui/src/gui/statusbar/hashingstatus.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/****************************************************************
|
||||||
|
* RetroShare is distributed under the following license:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008 RetroShare Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
****************************************************************/
|
||||||
|
#ifndef HASHINGSTATUS_H
|
||||||
|
#define HASHINGSTATUS_H
|
||||||
|
#include "gui/MainWindow.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
|
||||||
|
class HashingStatus : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
HashingStatus(QWidget *parent = 0);
|
||||||
|
|
||||||
|
~HashingStatus();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void updateHashingInfo(const QString&) ;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
class QLabel *iconLabel, *statusHashing;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user