mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 15:09:33 -05:00
forget to commit this, for the Search Filter DHT IPs
This commit is contained in:
parent
13e77fb7e5
commit
783465bc89
@ -36,6 +36,14 @@
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
||||
#define DTW_COL_BUCKET 0
|
||||
#define DTW_COL_IPADDR 1
|
||||
#define DTW_COL_PEERID 2
|
||||
#define DTW_COL_FLAGS 3
|
||||
#define DTW_COL_FOUND 4
|
||||
#define DTW_COL_SEND 5
|
||||
#define DTW_COL_RECV 6
|
||||
|
||||
DhtWindow::DhtWindow(QWidget *parent)
|
||||
: RsAutoUpdatePage(1000,parent)
|
||||
{
|
||||
@ -43,6 +51,10 @@ DhtWindow::DhtWindow(QWidget *parent)
|
||||
|
||||
connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
|
||||
connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int)));
|
||||
|
||||
/* add filter actions */
|
||||
ui.filterLineEdit->addFilter(QIcon(), tr("IP"), DTW_COL_IPADDR, tr("Search IP"));
|
||||
ui.filterLineEdit->setCurrentFilter(DTW_COL_IPADDR);
|
||||
}
|
||||
|
||||
DhtWindow::~DhtWindow()
|
||||
@ -577,14 +589,6 @@ void DhtWindow::updateRelays()
|
||||
/****************************/
|
||||
|
||||
|
||||
#define DTW_COL_BUCKET 0
|
||||
#define DTW_COL_IPADDR 1
|
||||
#define DTW_COL_PEERID 2
|
||||
#define DTW_COL_FLAGS 3
|
||||
#define DTW_COL_FOUND 4
|
||||
#define DTW_COL_SEND 5
|
||||
#define DTW_COL_RECV 6
|
||||
|
||||
class DhtTreeWidgetItem : public QTreeWidgetItem
|
||||
{
|
||||
public:
|
||||
@ -666,6 +670,10 @@ void DhtWindow::updateDhtPeers()
|
||||
dht_item -> setData(DTW_COL_RECV, Qt::DisplayRole, lastrecvstr);
|
||||
|
||||
ui.dhtTreeWidget->addTopLevelItem(dht_item);
|
||||
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -467,6 +467,12 @@
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QTreeWidget" name="dhtTreeWidget">
|
||||
<property name="defaultDropAction">
|
||||
<enum>Qt::CopyAction</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user