mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 11:02:30 -04:00
improved network statistics for GXS net service. Added number of available messages for unsubscribed forums in GUI. Should be done as well for channels.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7760 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d4dad8328f
commit
93f77a0e2c
15 changed files with 186 additions and 113 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <QMenu>
|
||||
#include <QToolButton>
|
||||
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "GroupTreeWidget.h"
|
||||
#include "ui_GroupTreeWidget.h"
|
||||
|
||||
|
@ -353,18 +354,22 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
|
|||
item->setIcon(COLUMN_NAME, itemInfo.icon);
|
||||
|
||||
/* Set popularity */
|
||||
QString tooltip = PopularityDefs::tooltip(itemInfo.popularity);
|
||||
QString tooltip = PopularityDefs::tooltip(itemInfo.popularity);
|
||||
|
||||
item->setIcon(COLUMN_POPULARITY, PopularityDefs::icon(itemInfo.popularity));
|
||||
item->setData(COLUMN_DATA, ROLE_POPULARITY, -itemInfo.popularity); // negative for correct sorting
|
||||
|
||||
/* Set tooltip */
|
||||
if (itemInfo.privatekey) {
|
||||
tooltip += "\n" + tr("Private Key Available");
|
||||
}
|
||||
}
|
||||
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
||||
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
|
||||
|
||||
item->setToolTip(COLUMN_NAME, tooltip);
|
||||
item->setToolTip(COLUMN_POPULARITY, tooltip);
|
||||
|
||||
item->setData(COLUMN_DATA, ROLE_SUBSCRIBE_FLAGS, itemInfo.subscribeFlags);
|
||||
item->setData(COLUMN_DATA, ROLE_SUBSCRIBE_FLAGS, itemInfo.subscribeFlags);
|
||||
|
||||
/* Set color */
|
||||
QBrush brush;
|
||||
|
|
|
@ -48,7 +48,8 @@ public:
|
|||
{
|
||||
popularity = 0;
|
||||
privatekey = false;
|
||||
subscribeFlags = 0;
|
||||
subscribeFlags = 0;
|
||||
max_visible_posts =0;
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -59,7 +60,8 @@ public:
|
|||
QDateTime lastpost;
|
||||
QIcon icon;
|
||||
bool privatekey;
|
||||
int subscribeFlags;
|
||||
quint32 subscribeFlags;
|
||||
quint32 max_visible_posts ;
|
||||
};
|
||||
|
||||
class GroupTreeWidget : public QWidget
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue