parent
							
								
									94fba56dab
								
							
						
					
					
						commit
						d2f391558a
					
				@ -0,0 +1,41 @@
 | 
			
		||||
#include "exprevaluator.h"
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
ExprEvaluator::ExprEvaluator()
 | 
			
		||||
{
 | 
			
		||||
    m_operations["=="] = [](QVariant left, QVariant right) { return left == right; };
 | 
			
		||||
    m_operations["!="] = [](QVariant left, QVariant right) { return left != right; };
 | 
			
		||||
    m_operations["<"] = [](QVariant left, QVariant right) { return left < right; };
 | 
			
		||||
    m_operations["<="] = [](QVariant left, QVariant right) { return left <= right; };
 | 
			
		||||
    m_operations[">"] = [](QVariant left, QVariant right) { return left > right; };
 | 
			
		||||
    m_operations[">="] = [](QVariant left, QVariant right) { return left >= right; };
 | 
			
		||||
    m_operations["%"] = [](QVariant left, QVariant right) { return left.toString().contains(right.toString()); };
 | 
			
		||||
 | 
			
		||||
    m_operations["||"] = [](QVariant left, QVariant right) { return left.toBool() || right.toBool(); };
 | 
			
		||||
    m_operations["&&"] = [](QVariant left, QVariant right) { return left.toBool() && right.toBool(); };
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
const QMap<QString, std::function<bool(QVariant, QVariant)> > ExprEvaluator::m_operations = {
 | 
			
		||||
    { "==", [](QVariant left, QVariant right) { return left == right; }},
 | 
			
		||||
    { "!=", [](QVariant left, QVariant right) { return left != right; }},
 | 
			
		||||
    { "<",  [](QVariant left, QVariant right) { return left < right; }},
 | 
			
		||||
    { "<=", [](QVariant left, QVariant right) { return left <= right; }},
 | 
			
		||||
    { ">",  [](QVariant left, QVariant right) { return left > right; }},
 | 
			
		||||
    { ">=", [](QVariant left, QVariant right) { return left >= right; }},
 | 
			
		||||
    { "%", [](QVariant left, QVariant right) { return left.toString().contains(right.toString()); }},
 | 
			
		||||
 | 
			
		||||
    { "||", [](QVariant left, QVariant right) { return left.toBool() || right.toBool(); }},
 | 
			
		||||
    { "&&", [](QVariant left, QVariant right) { return left.toBool() && right.toBool(); }}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
ExprEvaluator::ExprEvaluator()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bool ExprEvaluator::evaluate(const QObject *data, const QString &expression)
 | 
			
		||||
{
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,26 @@
 | 
			
		||||
#ifndef EXPREVALUATOR_H
 | 
			
		||||
#define EXPREVALUATOR_H
 | 
			
		||||
 | 
			
		||||
#include <QMap>
 | 
			
		||||
#include <QString>
 | 
			
		||||
#include <QVariant>
 | 
			
		||||
#include <functional>
 | 
			
		||||
 | 
			
		||||
class ExprEvaluator
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    ExprEvaluator();
 | 
			
		||||
 | 
			
		||||
    bool evaluate(const QObject *data, const QString &expression);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
    QMap<QString, std::function<bool(QVariant, QVariant)> > m_operations;
 | 
			
		||||
#else
 | 
			
		||||
    static const QMap<QString, std::function<bool(QVariant, QVariant)> > m_operations;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    bool m_caseSensitive;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // EXPREVALUATOR_H
 | 
			
		||||
@ -0,0 +1,208 @@
 | 
			
		||||
#include "filterui.h"
 | 
			
		||||
#include "ui_filterui.h"
 | 
			
		||||
 | 
			
		||||
#include <QComboBox>
 | 
			
		||||
#include <QMetaProperty>
 | 
			
		||||
#include <QTableWidgetItem>
 | 
			
		||||
#include <QSpinBox>
 | 
			
		||||
#include <QDoubleSpinBox>
 | 
			
		||||
#include <QDateEdit>
 | 
			
		||||
#include <QDateTimeEdit>
 | 
			
		||||
#include <QLineEdit>
 | 
			
		||||
#include <QToolButton>
 | 
			
		||||
 | 
			
		||||
FilterUi::FilterUi(QWidget *parent, QObject *entity) :
 | 
			
		||||
    QWidget(parent),
 | 
			
		||||
    ui(new Ui::FilterUi)
 | 
			
		||||
{
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
    m_entity = entity;
 | 
			
		||||
 | 
			
		||||
    if (entity == NULL)
 | 
			
		||||
    {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    m_entity->setParent(this);
 | 
			
		||||
    addRow(false);
 | 
			
		||||
 | 
			
		||||
    m_contextMenu = new QMenu(this);
 | 
			
		||||
    m_contextMenu->addAction(ui->actionAdd_condition_AND);
 | 
			
		||||
    m_contextMenu->addAction(ui->actionAdd_condition_OR);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
FilterUi::~FilterUi()
 | 
			
		||||
{
 | 
			
		||||
    delete ui;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FilterUi::on_actionAdd_condition_AND_triggered()
 | 
			
		||||
{
 | 
			
		||||
    addRow(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FilterUi::on_actionAdd_condition_OR_triggered()
 | 
			
		||||
{
 | 
			
		||||
    addRow(true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FilterUi::addRow(bool isOr)
 | 
			
		||||
{
 | 
			
		||||
    if (m_entity == NULL)
 | 
			
		||||
    {
 | 
			
		||||
        Q_ASSERT(false);
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int row = ui->tableWidget->rowCount();
 | 
			
		||||
    ui->tableWidget->setRowCount(row + 1);
 | 
			
		||||
    QComboBox *properties = new QComboBox(this);
 | 
			
		||||
 | 
			
		||||
    for (int i = 1; i < m_entity->metaObject()->propertyCount(); i++)
 | 
			
		||||
    {
 | 
			
		||||
        properties->addItem(tr(m_entity->metaObject()->property(i).name()), m_entity->metaObject()->property(i).name());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    QComboBox *oper = new QComboBox(this);
 | 
			
		||||
    oper->addItems(QStringList() << "==" << "%" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
    ui->tableWidget->setCellWidget(row, 2, oper);
 | 
			
		||||
 | 
			
		||||
    void (QComboBox::*indexChanged)(int) = &QComboBox::currentIndexChanged;
 | 
			
		||||
    connect(properties, indexChanged, [this, oper, row](int index){
 | 
			
		||||
        this->propertyChanged(row, oper, index);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    ui->tableWidget->setCellWidget(row, 1, properties);
 | 
			
		||||
 | 
			
		||||
    if (row > 0)
 | 
			
		||||
    {
 | 
			
		||||
        QComboBox *rowOper = new QComboBox(this);
 | 
			
		||||
        rowOper->addItems(QStringList() << tr("OR") << tr("AND"));
 | 
			
		||||
        rowOper->setCurrentIndex(isOr ? 0 : 1);
 | 
			
		||||
        ui->tableWidget->setCellWidget(row, 0, rowOper);
 | 
			
		||||
 | 
			
		||||
        QToolButton *tb = new QToolButton(this);
 | 
			
		||||
        tb->setText("-");
 | 
			
		||||
        connect(tb, &QToolButton::clicked, [this, tb](){
 | 
			
		||||
            int row = ui->tableWidget->rowAt(tb->y());
 | 
			
		||||
            ui->tableWidget->removeRow(row);
 | 
			
		||||
        });
 | 
			
		||||
        ui->tableWidget->setCellWidget(row, 4, tb);
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
        ui->tableWidget->setColumnWidth(1, 150);
 | 
			
		||||
        ui->tableWidget->setColumnWidth(2, 50);
 | 
			
		||||
        ui->tableWidget->setColumnWidth(3, 300);
 | 
			
		||||
        ui->tableWidget->setColumnWidth(4, 50);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    propertyChanged(row, oper, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString FilterUi::buildExpression() const
 | 
			
		||||
{
 | 
			
		||||
    QString expr;
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < ui->tableWidget->rowCount(); i++)
 | 
			
		||||
    {
 | 
			
		||||
        if (i == 0)
 | 
			
		||||
        {
 | 
			
		||||
            expr = qobject_cast<QComboBox*>(ui->tableWidget->cellWidget(i, 1))->currentData(Qt::UserRole).toString();
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            expr += " " + QString(qobject_cast<QComboBox*>(ui->tableWidget->cellWidget(i, 0))->currentIndex() == 0 ? "||" : "&&");
 | 
			
		||||
            expr += " " + qobject_cast<QComboBox*>(ui->tableWidget->cellWidget(i, 1))->currentData(Qt::UserRole).toString();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        expr += " " + qobject_cast<QComboBox*>(ui->tableWidget->cellWidget(i, 2))->currentText();
 | 
			
		||||
 | 
			
		||||
        QWidget *cellWidget = ui->tableWidget->cellWidget(i, 3);
 | 
			
		||||
 | 
			
		||||
        if (cellWidget != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            expr += " " + cellWidget->property(cellWidget->metaObject()->userProperty().name()).toString();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return expr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void FilterUi::on_tableWidget_customContextMenuRequested(const QPoint &pos)
 | 
			
		||||
{
 | 
			
		||||
    m_contextMenu->popup(ui->tableWidget->viewport()->mapToGlobal(pos));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FilterUi::on_actionRemove_condition_triggered()
 | 
			
		||||
{
 | 
			
		||||
    QObject *action = sender();
 | 
			
		||||
    ui->tableWidget->removeRow(action->property("row").toInt());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FilterUi::on_btnGo_toggled(bool checked)
 | 
			
		||||
{
 | 
			
		||||
    if (checked)
 | 
			
		||||
    {
 | 
			
		||||
        emit applyFilter(buildExpression());
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
        emit restoreData();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FilterUi::propertyChanged(int row, QComboBox *oper, int index)
 | 
			
		||||
{
 | 
			
		||||
    QWidget *cellWidget = ui->tableWidget->cellWidget(row, 3);
 | 
			
		||||
    ui->tableWidget->removeCellWidget(row, 3);
 | 
			
		||||
 | 
			
		||||
    if (cellWidget != NULL)
 | 
			
		||||
    {
 | 
			
		||||
        delete cellWidget;
 | 
			
		||||
        cellWidget = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    oper->clear();
 | 
			
		||||
 | 
			
		||||
    switch (this->m_entity->metaObject()->property(index + 1).type()) {
 | 
			
		||||
    case QVariant::Bool:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "!=");
 | 
			
		||||
        cellWidget = new QComboBox(this);
 | 
			
		||||
        qobject_cast<QComboBox*>(cellWidget)->addItem("true", 1);
 | 
			
		||||
        qobject_cast<QComboBox*>(cellWidget)->addItem("false", 0);
 | 
			
		||||
        break;
 | 
			
		||||
    case QVariant::String:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "%" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
        cellWidget = new QLineEdit(this);
 | 
			
		||||
        break;
 | 
			
		||||
    case QVariant::Int:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
        cellWidget = new QSpinBox(this);
 | 
			
		||||
        break;
 | 
			
		||||
    case QVariant::Double:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
        cellWidget = new QDoubleSpinBox(this);
 | 
			
		||||
        break;
 | 
			
		||||
    case QVariant::Date:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
        cellWidget = new QDateEdit(this);
 | 
			
		||||
        qobject_cast<QDateEdit*>(cellWidget)->setCalendarPopup(true);
 | 
			
		||||
        break;
 | 
			
		||||
    case QVariant::DateTime:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
        cellWidget = new QDateTimeEdit(this);
 | 
			
		||||
        qobject_cast<QDateTimeEdit*>(cellWidget)->setCalendarPopup(true);
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        oper->addItems(QStringList() << "==" << "!=" << "<" << "<=" << ">" << ">=");
 | 
			
		||||
        cellWidget = new QLineEdit(this);
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (cellWidget != NULL)
 | 
			
		||||
    {
 | 
			
		||||
        ui->tableWidget->setCellWidget(row, 3, cellWidget);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,43 @@
 | 
			
		||||
#ifndef FILTERUI_H
 | 
			
		||||
#define FILTERUI_H
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include <QMenu>
 | 
			
		||||
#include <QComboBox>
 | 
			
		||||
 | 
			
		||||
#include "core_global.h"
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
class FilterUi;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class CORESHARED_EXPORT FilterUi : public QWidget
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit FilterUi(QWidget *parent = 0, QObject *entity = NULL);
 | 
			
		||||
    ~FilterUi();
 | 
			
		||||
 | 
			
		||||
private slots:
 | 
			
		||||
    void on_actionAdd_condition_AND_triggered();
 | 
			
		||||
    void on_actionAdd_condition_OR_triggered();
 | 
			
		||||
    void on_tableWidget_customContextMenuRequested(const QPoint &pos);
 | 
			
		||||
    void on_actionRemove_condition_triggered();
 | 
			
		||||
    void on_btnGo_toggled(bool checked);
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
    void applyFilter(const QString &filter);
 | 
			
		||||
    void restoreData();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    Ui::FilterUi *ui;
 | 
			
		||||
    void addRow(bool isOr);
 | 
			
		||||
    QObject *m_entity;
 | 
			
		||||
    QMenu *m_contextMenu;
 | 
			
		||||
 | 
			
		||||
    QString buildExpression() const;
 | 
			
		||||
    void propertyChanged(int row, QComboBox *oper, int index);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // FILTERUI_H
 | 
			
		||||
@ -0,0 +1,160 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>FilterUi</class>
 | 
			
		||||
 <widget class="QWidget" name="FilterUi">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>667</width>
 | 
			
		||||
    <height>177</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
   <property name="spacing">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="leftMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="topMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="rightMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="bottomMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QWidget" name="filterWidget" native="true">
 | 
			
		||||
     <property name="maximumSize">
 | 
			
		||||
      <size>
 | 
			
		||||
       <width>16777215</width>
 | 
			
		||||
       <height>150</height>
 | 
			
		||||
      </size>
 | 
			
		||||
     </property>
 | 
			
		||||
     <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
			
		||||
      <property name="spacing">
 | 
			
		||||
       <number>6</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="topMargin">
 | 
			
		||||
       <number>0</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="bottomMargin">
 | 
			
		||||
       <number>0</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QWidget" name="widget_2" native="true">
 | 
			
		||||
        <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
         <property name="spacing">
 | 
			
		||||
          <number>5</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="leftMargin">
 | 
			
		||||
          <number>0</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="topMargin">
 | 
			
		||||
          <number>0</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="rightMargin">
 | 
			
		||||
          <number>0</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="bottomMargin">
 | 
			
		||||
          <number>0</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QLabel" name="label">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Load filter:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QComboBox" name="comboLoad"/>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QPushButton" name="btnGo">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Go</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="checkable">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QPushButton" name="btnSave">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Save</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <spacer name="horizontalSpacer_2">
 | 
			
		||||
           <property name="orientation">
 | 
			
		||||
            <enum>Qt::Horizontal</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="sizeHint" stdset="0">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>40</width>
 | 
			
		||||
             <height>20</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
          </spacer>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QTableWidget" name="tableWidget">
 | 
			
		||||
        <property name="contextMenuPolicy">
 | 
			
		||||
         <enum>Qt::CustomContextMenu</enum>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="editTriggers">
 | 
			
		||||
         <set>QAbstractItemView::NoEditTriggers</set>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="rowCount">
 | 
			
		||||
         <number>0</number>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="columnCount">
 | 
			
		||||
         <number>5</number>
 | 
			
		||||
        </property>
 | 
			
		||||
        <attribute name="horizontalHeaderVisible">
 | 
			
		||||
         <bool>false</bool>
 | 
			
		||||
        </attribute>
 | 
			
		||||
        <attribute name="verticalHeaderVisible">
 | 
			
		||||
         <bool>false</bool>
 | 
			
		||||
        </attribute>
 | 
			
		||||
        <column/>
 | 
			
		||||
        <column/>
 | 
			
		||||
        <column/>
 | 
			
		||||
        <column/>
 | 
			
		||||
        <column/>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
  <action name="actionAdd_condition_AND">
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>Add condition "AND"</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="actionAdd_condition_OR">
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>Add condition "OR"</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="actionRemove_condition">
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>Remove condition</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@ -0,0 +1 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient gradientUnits="userSpaceOnUse" id="a" x1="390.983" x2="109.017" y1="87.969" y2="87.969"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="b" x1="360.005" x2="139.997" y1="295" y2="295"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient></defs><g><path d="M391 110c0-24-20-44-44-44h-194c-24 0-44 20-44 44h282z" fill="url(#a)" stroke="#434242" stroke-width="10"/><path d="M390 130h-280v294c0 20 16 36 36 36h208c20 0 36-16 36-36v-294z" fill="#434242" stroke="#434242" stroke-width="10"/><path d="M307 63c0-10-8-18-18-18h-78c-10 0-18 8-18 18h114z" fill="#434242"/><path d="M150 170h10c6 0 10 4 10 10v230c0 6-4 10-10 10h-10c-6 0-10-4-10-10v-230c0-6 4-10 10-10zm60 0h10c6 0 10 4 10 10v230c0 6-4 10-10 10h-10c-6 0-10-4-10-10v-230c0-6 4-10 10-10zm70 0h10c6 0 10 4 10 10v230c0 6-4 10-10 10h-10c-6 0-10-4-10-10v-230c0-6 4-10 10-10zm60 0h10c6 0 10 4 10 10v230c0 6-4 10-10 10h-10c-6 0-10-4-10-10v-230c0-6 4-10 10-10z" fill="url(#b)"/></g></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
@ -0,0 +1,13 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"><![CDATA[
 | 
			
		||||
    .str2 {stroke:#434242;stroke-width:5}
 | 
			
		||||
    .str0 {stroke:#434242;stroke-width:10;stroke-linecap:round;stroke-linejoin:round}
 | 
			
		||||
    .str1 {stroke:#434242;stroke-width:15;stroke-linejoin:round}
 | 
			
		||||
    .fil2 {fill:#434242}
 | 
			
		||||
    .fil1 {fill:#FEFEFE}
 | 
			
		||||
    .fil5 {fill:#0075D8}
 | 
			
		||||
    .fil6 {fill:#008BFF}
 | 
			
		||||
    .fil7 {fill:#289CFF}
 | 
			
		||||
    .fil3 {fill:#979798}
 | 
			
		||||
    .fil4 {fill:#CDCDCE}
 | 
			
		||||
    .fil0 {fill:#FFFFFF}
 | 
			
		||||
   ]]></style></defs><g id="Layer_x0020_1"><path class="fil0 str0" d="M190 30h140c11 0 20 9 20 20v400c0 11-9 20-20 20h-280c-11 0-20-9-20-20v-260l160-160z"/><path class="fil1 str0" d="M160 190h-130l160-160v130c0 17-14 30-30 30z"/><path class="fil2 str1" d="M400 88l64 63c6 6 6 16 0 22l-202 201-127 43 42-128 202-201c6-6 15-6 21 0z"/><rect class="fil3" height="219.999" transform="matrix(-2.121 -2.121 .064 -.064 424.911 211.53)" width="39.999"/><polygon class="fil4" points="177,289 262,374 135,417"/><rect class="fil5" height="229.998" transform="matrix(.707 .707 -.707 .707 396.628 183.246)" width="39.997"/><rect class="fil6" height="230.001" transform="matrix(.707 .707 -.707 .707 368.344 154.959)" width="39.999"/><rect class="fil7" height="230.001" transform="matrix(.707 .707 -.707 .707 340.059 126.675)" width="40.001"/><path class="fil2 str2" d="M135 417l66-23c-3-10-9-19-17-27-7-8-17-13-27-17l-22 67z"/></g></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.5 KiB  | 
@ -0,0 +1,6 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 5000 5000" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"><![CDATA[
 | 
			
		||||
    .str1 {stroke:#434242;stroke-width:100}
 | 
			
		||||
    .str0 {stroke:#434242;stroke-width:100;stroke-linejoin:round}
 | 
			
		||||
    .fil0 {fill:url(#id0)}
 | 
			
		||||
    .fil1 {fill:url(#id1)}
 | 
			
		||||
   ]]></style><linearGradient gradientUnits="userSpaceOnUse" id="id0" x1="4299.96" x2="700" y1="2700" y2="2700"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="id1" x1="2499.98" x2="2499.98" y1="300.01" y2="1099.98"><stop offset="0" stop-color="#FCFCFD"/><stop offset="1" stop-color="#fff"/></linearGradient></defs><g id="Layer_x0020_1"><path class="fil0 str0" d="M2200 4500l600 200v-2100c0-100 50-150 100-200l1400-1400v-300h-3600v311l1400 1389c50 50 100 100 100 204v1896z"/><ellipse class="fil1 str1" cx="2500" cy="700" rx="1800" ry="400"/></g></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
@ -0,0 +1,6 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"><![CDATA[
 | 
			
		||||
    .str1 {stroke:#434242;stroke-width:10}
 | 
			
		||||
    .str0 {stroke:#434242;stroke-width:15}
 | 
			
		||||
    .fil1 {fill:#FFFFFF}
 | 
			
		||||
    .fil0 {fill:url(#id0)}
 | 
			
		||||
   ]]></style><radialGradient cx="48%" fx="48%" fy="50%" id="id0"><stop offset="0" stop-color="#0af"/><stop offset="1" stop-color="#008BFF"/></radialGradient></defs><g id="Layer_x0020_1"><path class="fil0 str0" d="M30 250c0 122 98 220 220 220s220-98 220-220-98-220-220-220-220 98-220 220z"/><path class="fil1 str1" d="M293 120v88h87c5 0 10 4 10 10v64c0 6-5 11-10 11h-87v87c0 5-5 10-11 10h-64c-6 0-10-5-10-10v-87h-88c-5 0-10-5-10-11v-64c0-6 5-10 10-10h88v-88c0-5 4-10 10-10h64c6 0 11 5 11 10z"/></g></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 912 B  | 
@ -0,0 +1,10 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"><![CDATA[
 | 
			
		||||
    .str1 {stroke:#434242;stroke-width:10}
 | 
			
		||||
    .str0 {stroke:#434242;stroke-width:15}
 | 
			
		||||
    .fil0 {fill:#434242}
 | 
			
		||||
    .fil3 {fill:#008BFF}
 | 
			
		||||
    .fil2 {fill:url(#id0)}
 | 
			
		||||
    .fil5 {fill:url(#id1)}
 | 
			
		||||
    .fil4 {fill:url(#id2)}
 | 
			
		||||
    .fil1 {fill:url(#id3)}
 | 
			
		||||
   ]]></style><linearGradient gradientUnits="userSpaceOnUse" id="id0" x1="254.998" x2="254.998" y1="155.079" y2="325.077"><stop offset="0" stop-color="#008BFF"/><stop offset="1" stop-color="#0af"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="id1" x1="249.999" x2="249.999" y1="373.399" y2="426.599"><stop offset="0" stop-color="#FCFCFD"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="id2" x1="249.998" x2="249.998" y1="60.8" y2="129.202"/><linearGradient gradientUnits="userSpaceOnUse" id="id3" x1="249.999" x2="249.999" y1="182.68" y2="357.478"/></defs><g id="Layer_x0020_1"><path class="fil0" d="M70 135h360c5 0 10 5 10 10v240h-380v-240c0-5 5-10 10-10z"/><path class="fil1 str0" d="M55 155h390c8 0 15 7 15 15v205c0 6-5 10-10 10h-50c-15 0-20-30-40-30h-220c-20 0-25 30-40 30h-50c-5 0-10-4-10-10v-205c0-8 7-15 15-15z"/><path class="fil2 str1" d="M100 155h310v155c0 8-7 15-15 15h-280c-8 0-15-7-15-15v-155z"/><path class="fil3" d="M60 185h20v20h-20v-20zm0 40h20v10h-20v-10zm0 30h20v10h-20v-10z"/><path class="fil4 str1" d="M120 140h260v-80c0-5-5-10-10-10h-240c-6 0-10 4-10 10v80z"/><path class="fil5 str1" d="M355 365h-210c-3 0-6 1-8 4l-36 50c-2 3-2 7 0 11 1 3 5 5 8 5h282c3 0 7-2 8-5 2-4 2-8 0-11l-36-50c-2-3-5-4-8-4z"/></g></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.8 KiB  | 
@ -0,0 +1,6 @@
 | 
			
		||||
<?xml version="1.0" ?><svg clip-rule="evenodd" fill-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"><![CDATA[
 | 
			
		||||
    .str1 {stroke:#434242;stroke-width:10}
 | 
			
		||||
    .str0 {stroke:#434242;stroke-width:15}
 | 
			
		||||
    .fil1 {fill:#FFFFFF}
 | 
			
		||||
    .fil0 {fill:url(#id0)}
 | 
			
		||||
   ]]></style><radialGradient cx="48%" fx="48%" fy="50%" id="id0"><stop offset="0" stop-color="#0af"/><stop offset="1" stop-color="#008BFF"/></radialGradient></defs><g id="Layer_x0020_1"><path class="fil0 str0" d="M30 250c0 122 98 220 220 220s220-98 220-220-98-220-220-220-220 98-220 220z"/><path class="fil1 str1" d="M380 208c5 0 10 4 10 10v64c0 6-5 11-10 11h-260c-5 0-10-5-10-11v-64c0-6 5-10 10-10h260z"/></g></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 825 B  | 
					Loading…
					
					
				
		Reference in New Issue