mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-24 15:05:35 -04:00
resotred string filter system
This commit is contained in:
parent
b5b2c430c5
commit
59b1d44e5b
2 changed files with 7 additions and 15 deletions
|
@ -145,7 +145,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||||
changeBox(RsMessageModel::BOX_INBOX);
|
changeBox(RsMessageModel::BOX_INBOX);
|
||||||
|
|
||||||
mMessageProxyModel->setFilterRole(RsMessageModel::FilterRole);
|
mMessageProxyModel->setFilterRole(RsMessageModel::FilterRole);
|
||||||
mMessageProxyModel->setFilterRegExp(QRegExp(QString(RsMessageModel::FilterString))) ;
|
//mMessageProxyModel->setFilterRegExp(QRegExp(QString(RsMessageModel::FilterString))) ;
|
||||||
|
|
||||||
ui.messageTreeWidget->setSortingEnabled(true);
|
ui.messageTreeWidget->setSortingEnabled(true);
|
||||||
|
|
||||||
|
@ -1564,24 +1564,17 @@ void MessagesDialog::buttonStyle()
|
||||||
|
|
||||||
void MessagesDialog::filterChanged(const QString& text)
|
void MessagesDialog::filterChanged(const QString& text)
|
||||||
{
|
{
|
||||||
#ifdef TODO
|
QStringList items = text.split(' ',QString::SkipEmptyParts);
|
||||||
ui.messageTreeWidget->filterItems(ui.filterLineEdit->currentFilter(), text);
|
mMessageModel->setFilter(ui.filterLineEdit->currentFilter(),items);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesDialog::filterColumnChanged(int column)
|
void MessagesDialog::filterColumnChanged(int column)
|
||||||
{
|
{
|
||||||
if (inProcessSettings) {
|
if (inProcessSettings)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (column == COLUMN_CONTENT) {
|
QStringList items = ui.filterLineEdit->text().split(' ',QString::SkipEmptyParts);
|
||||||
// need content ... refill
|
mMessageModel->setFilter(column,items);
|
||||||
//insertMessages();
|
|
||||||
}
|
|
||||||
#ifdef TODO
|
|
||||||
ui.messageTreeWidget->filterItems(column, ui.filterLineEdit->text());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// save index
|
// save index
|
||||||
Settings->setValueToGroup("MessageDialog", "filterColumn", column);
|
Settings->setValueToGroup("MessageDialog", "filterColumn", column);
|
||||||
|
|
|
@ -95,11 +95,10 @@ public:
|
||||||
|
|
||||||
void setCurrentBox(BoxName bn) ;
|
void setCurrentBox(BoxName bn) ;
|
||||||
void setQuickViewFilter(QuickViewFilter fn) ;
|
void setQuickViewFilter(QuickViewFilter fn) ;
|
||||||
|
void setFilter(int column, const QStringList& strings) ;
|
||||||
|
|
||||||
const RsMessageId& currentMessageId() const;
|
const RsMessageId& currentMessageId() const;
|
||||||
|
|
||||||
void setFilter(int column, const QStringList& strings) ;
|
|
||||||
|
|
||||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
|
bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue