Merged in rsskga/valentina-develop/feature (pull request #150)
Resolved issue #581. Filter lists by keyword in function wizard. --HG-- branch : develop
This commit is contained in:
commit
7e3ebe7ca2
|
@ -159,3 +159,6 @@ $RECYCLE.BIN/
|
|||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# Understand IDE file
|
||||
*.udb
|
|
@ -1,4 +1,5 @@
|
|||
# Version 0.5.0
|
||||
- [#581] User can now filter input lists by keyword in function wizard.
|
||||
- [#24] User can now add labels with different information on the detail
|
||||
- [#505] New installer script based on Inno Setup 5.
|
||||
- Size of preferences dialog in both Valentina and Tape app is now preserved between sessions
|
||||
|
|
|
@ -95,6 +95,19 @@ DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const qui
|
|||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogEditWrongFormula::FormulaChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogEditWrongFormula::DeployFormulaTextEdit);
|
||||
|
||||
// clear text filter every time when new radio button selected
|
||||
auto clearFilterFormulaInputs = [=] () { ui->filterFormulaInputs->clear(); };
|
||||
|
||||
connect(ui->radioButtonStandardTable, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonIncrements, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonLengthLine, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonLengthSpline, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonAngleLine, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonRadiusesArcs, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonAnglesCurves, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonCLength, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
connect(ui->radioButtonFunctions, &QRadioButton::clicked, this, clearFilterFormulaInputs);
|
||||
|
||||
//Disable Qt::WaitCursor
|
||||
#ifndef QT_NO_CURSOR
|
||||
if (QApplication::overrideCursor() != nullptr)
|
||||
|
@ -529,3 +542,18 @@ void DialogEditWrongFormula::ShowFunctions()
|
|||
ui->tableWidget->selectRow(0);
|
||||
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
}
|
||||
|
||||
void DialogEditWrongFormula::on_filterFormulaInputs_textEdited(const QString &filter)
|
||||
{
|
||||
ui->tableWidget->blockSignals(true);
|
||||
|
||||
// hide all rows
|
||||
for (auto i = 0; i < ui->tableWidget->rowCount(); i++)
|
||||
ui->tableWidget->hideRow(i);
|
||||
|
||||
// show rows with matched filter
|
||||
for (auto item : ui->tableWidget->findItems(filter, Qt::MatchContains))
|
||||
ui->tableWidget->showRow(item->row());
|
||||
|
||||
ui->tableWidget->blockSignals(false);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,8 @@ protected:
|
|||
virtual void CheckState() Q_DECL_OVERRIDE;
|
||||
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
|
||||
virtual void showEvent( QShowEvent *event ) Q_DECL_OVERRIDE;
|
||||
private slots:
|
||||
void on_filterFormulaInputs_textEdited(const QString &filter);
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogEditWrongFormula)
|
||||
Ui::DialogEditWrongFormula *ui;
|
||||
|
|
|
@ -355,6 +355,13 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterFormulaInputs">
|
||||
<property name="placeholderText">
|
||||
<string>Filter list by keyword</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
||||
<property name="text">
|
||||
|
|
Loading…
Reference in New Issue
Block a user