leocad/common/lc_findreplacewidget.h

37 lines
680 B
C
Raw Normal View History

2021-01-31 00:37:17 +01:00
#pragma once
2021-01-31 21:05:15 +01:00
struct lcFindReplaceParams
{
PieceInfo* FindInfo = nullptr;
QString FindString;
bool MatchColor = false;
bool ReplaceInfo = false;
bool ReplaceColor = false;
int ColorIndex = 0;
PieceInfo* ReplacePieceInfo = nullptr;
int ReplaceColorIndex = 0;
};
2021-01-31 00:37:17 +01:00
class lcFindReplaceWidget : public QWidget
{
Q_OBJECT
public:
lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool Replace);
2021-01-31 21:05:15 +01:00
lcFindReplaceParams* GetFindReplaceParams()
{
return &mFindReplaceParams;
}
protected slots:
void FindTextEdited(const QString& Text);
void FindIndexChanged(int Index);
protected:
QComboBox* mFindPartComboBox = nullptr;
lcFindReplaceParams mFindReplaceParams;
2021-01-31 00:37:17 +01:00
};