mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
added back dhtstatus label to StatusBar
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3702 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ddf97c8ed2
commit
5809e25a60
6 changed files with 36 additions and 26 deletions
|
@ -290,6 +290,7 @@ HEADERS += rshare.h \
|
||||||
gui/help/browser/helptextbrowser.h \
|
gui/help/browser/helptextbrowser.h \
|
||||||
gui/statusbar/peerstatus.h \
|
gui/statusbar/peerstatus.h \
|
||||||
gui/statusbar/natstatus.h \
|
gui/statusbar/natstatus.h \
|
||||||
|
gui/statusbar/dhtstatus.h \
|
||||||
gui/statusbar/ratesstatus.h \
|
gui/statusbar/ratesstatus.h \
|
||||||
gui/statusbar/hashingstatus.h \
|
gui/statusbar/hashingstatus.h \
|
||||||
gui/advsearch/advancedsearchdialog.h \
|
gui/advsearch/advancedsearchdialog.h \
|
||||||
|
@ -506,6 +507,7 @@ SOURCES += main.cpp \
|
||||||
gui/settings/AddFileAssociationDialog.cpp \
|
gui/settings/AddFileAssociationDialog.cpp \
|
||||||
gui/statusbar/peerstatus.cpp \
|
gui/statusbar/peerstatus.cpp \
|
||||||
gui/statusbar/natstatus.cpp \
|
gui/statusbar/natstatus.cpp \
|
||||||
|
gui/statusbar/dhtstatus.cpp \
|
||||||
gui/statusbar/ratesstatus.cpp \
|
gui/statusbar/ratesstatus.cpp \
|
||||||
gui/statusbar/hashingstatus.cpp \
|
gui/statusbar/hashingstatus.cpp \
|
||||||
gui/toaster/ChatToaster.cpp \
|
gui/toaster/ChatToaster.cpp \
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#include "statusbar/peerstatus.h"
|
#include "statusbar/peerstatus.h"
|
||||||
#include "statusbar/natstatus.h"
|
#include "statusbar/natstatus.h"
|
||||||
#include "statusbar/ratesstatus.h"
|
#include "statusbar/ratesstatus.h"
|
||||||
|
#include "statusbar/dhtstatus.h"
|
||||||
#include "statusbar/hashingstatus.h"
|
#include "statusbar/hashingstatus.h"
|
||||||
#include <retroshare/rsstatus.h>
|
#include <retroshare/rsstatus.h>
|
||||||
|
|
||||||
|
@ -266,6 +267,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||||
|
|
||||||
natstatus = new NATStatus();
|
natstatus = new NATStatus();
|
||||||
statusBar()->addWidget(natstatus);
|
statusBar()->addWidget(natstatus);
|
||||||
|
|
||||||
|
dhtstatus = new DHTStatus();
|
||||||
|
statusBar()->addWidget(dhtstatus);
|
||||||
|
|
||||||
hashingstatus = new HashingStatus();
|
hashingstatus = new HashingStatus();
|
||||||
statusBar()->addPermanentWidget(hashingstatus);
|
statusBar()->addPermanentWidget(hashingstatus);
|
||||||
|
@ -306,6 +310,7 @@ MainWindow::~MainWindow()
|
||||||
delete _messengerwindowAct;
|
delete _messengerwindowAct;
|
||||||
delete peerstatus;
|
delete peerstatus;
|
||||||
delete natstatus;
|
delete natstatus;
|
||||||
|
delete dhtstatus;
|
||||||
delete ratesstatus;
|
delete ratesstatus;
|
||||||
MessengerWindow::releaseInstance();
|
MessengerWindow::releaseInstance();
|
||||||
#ifdef UNFINISHED
|
#ifdef UNFINISHED
|
||||||
|
@ -502,6 +507,9 @@ void MainWindow::updateStatus()
|
||||||
|
|
||||||
if (natstatus)
|
if (natstatus)
|
||||||
natstatus->getNATStatus();
|
natstatus->getNATStatus();
|
||||||
|
|
||||||
|
if (dhtstatus)
|
||||||
|
dhtstatus->getDHTStatus();
|
||||||
|
|
||||||
if (nOnlineCount == 0)
|
if (nOnlineCount == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,7 @@ class Idle;
|
||||||
class PeerStatus;
|
class PeerStatus;
|
||||||
class NATStatus;
|
class NATStatus;
|
||||||
class RatesStatus;
|
class RatesStatus;
|
||||||
|
class DHTStatus;
|
||||||
class HashingStatus;
|
class HashingStatus;
|
||||||
class ForumsDialog;
|
class ForumsDialog;
|
||||||
class PeersDialog;
|
class PeersDialog;
|
||||||
|
@ -234,6 +235,7 @@ private:
|
||||||
|
|
||||||
PeerStatus *peerstatus;
|
PeerStatus *peerstatus;
|
||||||
NATStatus *natstatus;
|
NATStatus *natstatus;
|
||||||
|
DHTStatus *dhtstatus;
|
||||||
RatesStatus *ratesstatus;
|
RatesStatus *ratesstatus;
|
||||||
HashingStatus *hashingstatus;
|
HashingStatus *hashingstatus;
|
||||||
QComboBox *statusComboBox;
|
QComboBox *statusComboBox;
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<file>images/connect_established.png</file>
|
<file>images/connect_established.png</file>
|
||||||
<file>images/connect_creating.png</file>
|
<file>images/connect_creating.png</file>
|
||||||
<file>images/connect_no.png</file>
|
<file>images/connect_no.png</file>
|
||||||
|
<file>images/dht16.png</file>
|
||||||
<file>images/edit-clear-history.png</file>
|
<file>images/edit-clear-history.png</file>
|
||||||
<file>images/edit_16.png</file>
|
<file>images/edit_16.png</file>
|
||||||
<file>images/feedback_arrow.png</file>
|
<file>images/feedback_arrow.png</file>
|
||||||
|
|
|
@ -20,17 +20,13 @@
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
#include "dhtstatus.h"
|
#include "dhtstatus.h"
|
||||||
|
|
||||||
#include <QtGui>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QPainter>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
#include "rsiface/rsiface.h"
|
#include "retroshare/rsiface.h"
|
||||||
#include "rsiface/rspeers.h"
|
#include "retroshare/rspeers.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
@ -46,20 +42,25 @@ DHTStatus::DHTStatus(QWidget *parent)
|
||||||
//statusDHT->setMinimumSize( statusPeers->frameSize().width() + 0, 0 );
|
//statusDHT->setMinimumSize( statusPeers->frameSize().width() + 0, 0 );
|
||||||
hbox->addWidget(statusDHT);
|
hbox->addWidget(statusDHT);
|
||||||
|
|
||||||
iconLabel = new QLabel( this );
|
dhtstatusLabel = new QLabel( this );
|
||||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/grayled.png"));
|
dhtstatusLabel->setPixmap(QPixmap(":/images/grayled.png"));
|
||||||
// iconLabel doesn't change over time, so we didn't need a minimum size
|
hbox->addWidget(dhtstatusLabel);
|
||||||
hbox->addWidget(iconLabel);
|
|
||||||
|
spaceLabel = new QLabel( " | ", this );
|
||||||
|
hbox->addWidget(spaceLabel);
|
||||||
|
|
||||||
|
dhtnetworkLabel = new QLabel( this );
|
||||||
|
dhtnetworkLabel->setPixmap(QPixmap(":/images/dht16.png"));
|
||||||
|
hbox->addWidget(dhtnetworkLabel);
|
||||||
|
|
||||||
|
dhtnetworksizeLabel = new QLabel( "0 (0) ",this );
|
||||||
|
hbox->addWidget(dhtnetworksizeLabel);
|
||||||
|
|
||||||
setLayout( hbox );
|
setLayout( hbox );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
DHTStatus::~DHTStatus()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DHTStatus::getDHTStatus()
|
void DHTStatus::getDHTStatus()
|
||||||
|
@ -73,13 +74,13 @@ void DHTStatus::getDHTStatus()
|
||||||
|
|
||||||
if (config.netDhtOk)
|
if (config.netDhtOk)
|
||||||
{
|
{
|
||||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/greenled.png"));
|
dhtstatusLabel->setPixmap(QPixmap(":/images/greenled.png"));
|
||||||
iconLabel->setToolTip(tr("DHT OK"));
|
dhtstatusLabel->setToolTip(tr("DHT On"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/redled.png"));
|
dhtstatusLabel->setPixmap(QPixmap(":/images/redled.png"));
|
||||||
iconLabel->setToolTip(tr("DHT DOWN"));
|
dhtstatusLabel->setToolTip(tr("DHT Off"));
|
||||||
}
|
}
|
||||||
|
|
||||||
rsiface->unlockData(); /* UnLock Interface */
|
rsiface->unlockData(); /* UnLock Interface */
|
||||||
|
|
|
@ -20,25 +20,21 @@
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
#ifndef DHTSTATUS_H
|
#ifndef DHTSTATUS_H
|
||||||
#define DHTSTATUS_H
|
#define DHTSTATUS_H
|
||||||
#include "gui/MainWindow.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
class QLabel;
|
||||||
|
|
||||||
class DHTStatus : public QWidget
|
class DHTStatus : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DHTStatus(QWidget *parent = 0);
|
DHTStatus(QWidget *parent = 0);
|
||||||
|
|
||||||
~DHTStatus();
|
void getDHTStatus( );
|
||||||
|
|
||||||
void getDHTStatus( );
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class QLabel *iconLabel, *statusDHT;
|
QLabel *dhtstatusLabel, *statusDHT, *dhtnetworkLabel, *dhtnetworksizeLabel, *spaceLabel;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue