resotred string filter system

This commit is contained in:
csoler 2019-03-12 14:27:06 +01:00
parent b5b2c430c5
commit 59b1d44e5b
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 7 additions and 15 deletions

View File

@ -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);

View File

@ -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;