Resolved issue #180. Search field in tape app and dialog Increments.
--HG-- branch : develop
This commit is contained in:
parent
67c174951b
commit
1ca5b4dfa6
|
@ -28,6 +28,7 @@
|
||||||
- [#487] True dart point always goes to origin when the label is moved.
|
- [#487] True dart point always goes to origin when the label is moved.
|
||||||
- [#128] New Tool: Slash and Spread.
|
- [#128] New Tool: Slash and Spread.
|
||||||
- [#409] New feature: Export measurement file to Excel .csv.
|
- [#409] New feature: Export measurement file to Excel .csv.
|
||||||
|
- [#180] New feature: Search field in tape app and dialog Increments.
|
||||||
|
|
||||||
# Version 0.4.5
|
# Version 0.4.5
|
||||||
- [#435] Valentina doesn't change the cursor.
|
- [#435] Valentina doesn't change the cursor.
|
||||||
|
|
|
@ -12,8 +12,7 @@ SOURCES += \
|
||||||
$$PWD/dialogs/configpages/tapeconfigurationpage.cpp \
|
$$PWD/dialogs/configpages/tapeconfigurationpage.cpp \
|
||||||
$$PWD/dialogs/configpages/tapepathpage.cpp \
|
$$PWD/dialogs/configpages/tapepathpage.cpp \
|
||||||
$$PWD/dialogs/dialogexporttocsv.cpp \
|
$$PWD/dialogs/dialogexporttocsv.cpp \
|
||||||
$$PWD/vlitepattern.cpp \
|
$$PWD/vlitepattern.cpp
|
||||||
$$PWD/vtablesearch.cpp
|
|
||||||
|
|
||||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||||
|
|
||||||
|
@ -29,8 +28,7 @@ HEADERS += \
|
||||||
$$PWD/dialogs/configpages/tapeconfigurationpage.h \
|
$$PWD/dialogs/configpages/tapeconfigurationpage.h \
|
||||||
$$PWD/dialogs/configpages/tapepathpage.h \
|
$$PWD/dialogs/configpages/tapepathpage.h \
|
||||||
$$PWD/dialogs/dialogexporttocsv.h \
|
$$PWD/dialogs/dialogexporttocsv.h \
|
||||||
$$PWD/vlitepattern.h \
|
$$PWD/vlitepattern.h
|
||||||
$$PWD/vtablesearch.h
|
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
$$PWD/tmainwindow.ui \
|
$$PWD/tmainwindow.ui \
|
||||||
|
|
|
@ -58,14 +58,18 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
|
||||||
ui(new Ui::DialogIncrements),
|
ui(new Ui::DialogIncrements),
|
||||||
data(data),
|
data(data),
|
||||||
doc(doc),
|
doc(doc),
|
||||||
formulaBaseHeight(0)
|
formulaBaseHeight(0),
|
||||||
|
search()
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||||
ui->lineEditName->setClearButtonEnabled(true);
|
ui->lineEditName->setClearButtonEnabled(true);
|
||||||
|
ui->lineEditFind->setClearButtonEnabled(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
search = QSharedPointer<VTableSearch>(new VTableSearch(ui->tableWidgetIncrement));
|
||||||
|
|
||||||
formulaBaseHeight = ui->plainTextEditFormula->height();
|
formulaBaseHeight = ui->plainTextEditFormula->height();
|
||||||
|
|
||||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||||
|
@ -102,6 +106,9 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
|
||||||
connect(ui->lineEditName, &QLineEdit::editingFinished, this, &DialogIncrements::SaveIncrName);
|
connect(ui->lineEditName, &QLineEdit::editingFinished, this, &DialogIncrements::SaveIncrName);
|
||||||
connect(ui->plainTextEditDescription, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrDescription);
|
connect(ui->plainTextEditDescription, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrDescription);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrFormula);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrFormula);
|
||||||
|
connect(ui->lineEditFind, &QLineEdit::textEdited, this, &DialogIncrements::Find);
|
||||||
|
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, this, &DialogIncrements::FindPrevious);
|
||||||
|
connect(ui->toolButtonFindNext, &QToolButton::clicked, this, &DialogIncrements::FindNext);
|
||||||
|
|
||||||
if (ui->tableWidgetIncrement->rowCount() > 0)
|
if (ui->tableWidgetIncrement->rowCount() > 0)
|
||||||
{
|
{
|
||||||
|
@ -428,6 +435,8 @@ void DialogIncrements::FullUpdateFromFile()
|
||||||
FillLengthsCurves();
|
FillLengthsCurves();
|
||||||
FillRadiusesArcs();
|
FillRadiusesArcs();
|
||||||
FillAnglesCurves();
|
FillAnglesCurves();
|
||||||
|
|
||||||
|
search->RefreshList(ui->lineEditFind->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -775,6 +784,24 @@ void DialogIncrements::ShowIncrementDetails()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogIncrements::Find(const QString &term)
|
||||||
|
{
|
||||||
|
search->Find(term);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogIncrements::FindPrevious()
|
||||||
|
{
|
||||||
|
search->FindPrevious();
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogIncrements::FindNext()
|
||||||
|
{
|
||||||
|
search->FindNext();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogIncrements::~DialogIncrements()
|
DialogIncrements::~DialogIncrements()
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
#include "../vtools/dialogs/tools/dialogtool.h"
|
#include "../vtools/dialogs/tools/dialogtool.h"
|
||||||
#include "../xml/vpattern.h"
|
#include "../xml/vpattern.h"
|
||||||
|
#include "../vmisc/vtablesearch.h"
|
||||||
|
|
||||||
class VIndividualMeasurements;
|
class VIndividualMeasurements;
|
||||||
class QTableWidget;
|
class QTableWidget;
|
||||||
|
@ -72,6 +73,9 @@ private slots:
|
||||||
void DeployFormula();
|
void DeployFormula();
|
||||||
void Fx();
|
void Fx();
|
||||||
void FullUpdateFromFile();
|
void FullUpdateFromFile();
|
||||||
|
void Find(const QString &term);
|
||||||
|
void FindPrevious();
|
||||||
|
void FindNext();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(DialogIncrements)
|
Q_DISABLE_COPY(DialogIncrements)
|
||||||
|
@ -87,6 +91,8 @@ private:
|
||||||
|
|
||||||
int formulaBaseHeight;
|
int formulaBaseHeight;
|
||||||
|
|
||||||
|
QSharedPointer<VTableSearch> search;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void FillTable(const QMap<QString, T> &varTable, QTableWidget *table);
|
void FillTable(const QMap<QString, T> &varTable, QTableWidget *table);
|
||||||
|
|
||||||
|
|
|
@ -39,13 +39,56 @@
|
||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabIncrements">
|
<widget class="QWidget" name="tabIncrements">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Increments</string>
|
<string>Increments</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelFind">
|
||||||
|
<property name="text">
|
||||||
|
<string>Find:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEditFind">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Search</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toolButtonFindPrevious">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="go-previous" resource="../../../libs/vmisc/share/resources/theme.qrc">
|
||||||
|
<normaloff>:/icons/win.icon.theme/16x16/actions/go-previous.png</normaloff>:/icons/win.icon.theme/16x16/actions/go-previous.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toolButtonFindNext">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="go-next" resource="../../../libs/vmisc/share/resources/theme.qrc">
|
||||||
|
<normaloff>:/icons/win.icon.theme/16x16/actions/go-next.png</normaloff>:/icons/win.icon.theme/16x16/actions/go-next.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -230,8 +273,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="list-add">
|
<iconset theme="list-add">
|
||||||
<normaloff/>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -245,8 +287,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="list-remove">
|
<iconset theme="list-remove">
|
||||||
<normaloff/>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -620,6 +661,7 @@
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../libs/vmisc/share/resources/icon.qrc"/>
|
<include location="../../../libs/vmisc/share/resources/icon.qrc"/>
|
||||||
|
<include location="../../../libs/vmisc/share/resources/theme.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -10,7 +10,8 @@ SOURCES += \
|
||||||
$$PWD/vcommonsettings.cpp \
|
$$PWD/vcommonsettings.cpp \
|
||||||
$$PWD/vtapesettings.cpp \
|
$$PWD/vtapesettings.cpp \
|
||||||
$$PWD/commandoptions.cpp \
|
$$PWD/commandoptions.cpp \
|
||||||
$$PWD/qxtcsvmodel.cpp
|
$$PWD/qxtcsvmodel.cpp \
|
||||||
|
$$PWD/vtablesearch.cpp
|
||||||
|
|
||||||
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
win32-msvc*:SOURCES += $$PWD/stable.cpp
|
||||||
|
|
||||||
|
@ -29,7 +30,8 @@ HEADERS += \
|
||||||
$$PWD/vlockguard.h \
|
$$PWD/vlockguard.h \
|
||||||
$$PWD/vsysexits.h \
|
$$PWD/vsysexits.h \
|
||||||
$$PWD/commandoptions.h \
|
$$PWD/commandoptions.h \
|
||||||
$$PWD/qxtcsvmodel.h
|
$$PWD/qxtcsvmodel.h \
|
||||||
|
$$PWD/vtablesearch.h
|
||||||
|
|
||||||
# Qt's versions
|
# Qt's versions
|
||||||
# 5.0.0, 5.0.1, 5.0.2
|
# 5.0.0, 5.0.1, 5.0.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user