mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 17:43:59 -05:00
added filtering for posts
This commit is contained in:
parent
1cb6369cb6
commit
730a3be2e4
4 changed files with 70 additions and 35 deletions
|
|
@ -209,6 +209,7 @@ void ChannelPostFilesDelegate::paint(QPainter * painter, const QStyleOptionViewI
|
|||
GxsChannelFilesStatusWidget w(file);
|
||||
|
||||
w.setFixedWidth(option.rect.width());
|
||||
w.setFixedHeight(option.rect.height());
|
||||
|
||||
QPixmap pixmap(w.size());
|
||||
pixmap.fill(QRgb(0x00ffffff)); // choose a fully transparent background
|
||||
|
|
@ -283,7 +284,8 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
|||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), ui->feedWidget, SLOT(setFilterText(QString)));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), ui->fileWidget, SLOT(setFilterText(QString)));
|
||||
#endif
|
||||
connect(ui->filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterChanged(int)));
|
||||
connect(ui->filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterChanged()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged()));
|
||||
|
||||
/* Initialize view button */
|
||||
//setViewMode(VIEW_MODE_FEEDS); see processSettings
|
||||
|
|
@ -743,12 +745,11 @@ void GxsChannelPostsWidgetWithModel::setViewMode(int viewMode)
|
|||
#endif
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::filterChanged(int filter)
|
||||
void GxsChannelPostsWidgetWithModel::filterChanged()
|
||||
{
|
||||
#ifdef TODO
|
||||
ui->feedWidget->setFilterType(filter);
|
||||
ui->fileWidget->setFilterType(filter);
|
||||
#endif
|
||||
QStringList ql = ui->filterLineEdit->text().split(' ',QString::SkipEmptyParts);
|
||||
uint32_t count;
|
||||
mChannelPostsModel->setFilter(ql,count);
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue