leocad/common/lc_findreplacewidget.h
2021-01-31 12:05:15 -08:00

36 lines
680 B
C++

#pragma once
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;
};
class lcFindReplaceWidget : public QWidget
{
Q_OBJECT
public:
lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool Replace);
lcFindReplaceParams* GetFindReplaceParams()
{
return &mFindReplaceParams;
}
protected slots:
void FindTextEdited(const QString& Text);
void FindIndexChanged(int Index);
protected:
QComboBox* mFindPartComboBox = nullptr;
lcFindReplaceParams mFindReplaceParams;
};