messageviewer
adblockcreatefilterdialog.cpp
Go to the documentation of this file.
71 void AdBlockCreateFilterDialog::setPattern(AdBlockBlockableItemsWidget::TypeElement type, const QString &pattern)
83 for (int i = AdBlockBlockableItemsWidget::None+1; i < AdBlockBlockableItemsWidget::MaxTypeElement; ++i) {
84 QListWidgetItem *item = new QListWidgetItem(AdBlockBlockableItemsWidget::elementTypeToI18n(static_cast<AdBlockBlockableItemsWidget::TypeElement>(i)), mUi->applyListElement);
113 const QString collapseValue = mUi->collapseBlocked->itemData(mUi->collapseBlocked->currentIndex()).toString();
117 pattern += (collapseValue.isEmpty() ? QLatin1String("$") : QLatin1String(",")) + AdBlockBlockableItemsWidget::elementType(mCurrentType);
127 pattern += QLatin1Char(',') + AdBlockBlockableItemsWidget::elementType(static_cast<AdBlockBlockableItemsWidget::TypeElement>(item->data(ElementValue).toInt()));
bool isValid() const
Qt::CheckState checkState() const
QString filter() const
Definition: adblockcreatefilterdialog.cpp:98
TypeElement
Definition: adblockblockableitemswidget.h:33
Qt::ItemFlags flags() const
static QString elementTypeToI18n(AdBlockBlockableItemsWidget::TypeElement type)
Definition: adblockblockableitemswidget.cpp:86
int toInt(bool *ok) const
void setFlags(QFlags< Qt::ItemFlag > flags)
bool isEmpty() const
~AdBlockCreateFilterDialog()
Definition: adblockcreatefilterdialog.cpp:49
virtual QVariant data(int role) const
void setCheckState(Qt::CheckState state)
virtual void setData(int role, const QVariant &value)
char * toString(const T &value)
void setPattern(AdBlockBlockableItemsWidget::TypeElement type, const QString &pattern)
Definition: adblockcreatefilterdialog.cpp:71
Definition: adblockblockableitemswidget.h:45
AdBlockCreateFilterDialog(QWidget *parent=0)
Definition: adblockcreatefilterdialog.cpp:24
static QString elementType(AdBlockBlockableItemsWidget::TypeElement type)
Definition: adblockblockableitemswidget.cpp:124
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.