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