mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 07:55:44 -04:00
forget to commit this, for the Search Filter DHT IPs
This commit is contained in:
parent
13e77fb7e5
commit
783465bc89
2 changed files with 22 additions and 8 deletions
|
@ -36,6 +36,14 @@
|
||||||
#include "retroshare/rsconfig.h"
|
#include "retroshare/rsconfig.h"
|
||||||
#include "retroshare/rspeers.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)
|
DhtWindow::DhtWindow(QWidget *parent)
|
||||||
: RsAutoUpdatePage(1000,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(textChanged(const QString &)), this, SLOT(filterItems(QString)));
|
||||||
connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int)));
|
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()
|
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
|
class DhtTreeWidgetItem : public QTreeWidgetItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -666,6 +670,10 @@ void DhtWindow::updateDhtPeers()
|
||||||
dht_item -> setData(DTW_COL_RECV, Qt::DisplayRole, lastrecvstr);
|
dht_item -> setData(DTW_COL_RECV, Qt::DisplayRole, lastrecvstr);
|
||||||
|
|
||||||
ui.dhtTreeWidget->addTopLevelItem(dht_item);
|
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">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QTreeWidget" name="dhtTreeWidget">
|
<widget class="QTreeWidget" name="dhtTreeWidget">
|
||||||
|
<property name="defaultDropAction">
|
||||||
|
<enum>Qt::CopyAction</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::MultiSelection</enum>
|
||||||
|
</property>
|
||||||
<property name="sortingEnabled">
|
<property name="sortingEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue