leocad/common/lc_findreplacewidget.h

37 lines
700 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;
2021-02-01 02:32:38 +01:00
int FindColorIndex = 0;
2021-01-31 21:05:15 +01:00
bool ReplaceInfo = false;
bool ReplaceColor = false;
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:
2021-02-01 02:32:38 +01:00
void FindColorIndexChanged(int ColorIndex);
2021-01-31 21:05:15 +01:00
void FindTextEdited(const QString& Text);
2021-02-01 02:32:38 +01:00
void FindActivated(int Index);
2021-01-31 21:05:15 +01:00
protected:
QComboBox* mFindPartComboBox = nullptr;
lcFindReplaceParams mFindReplaceParams;
2021-01-31 00:37:17 +01:00
};