Added missing tooltips.

This commit is contained in:
Leonardo Zide 2024-01-15 10:18:50 -08:00
parent c75c645675
commit cba4dfb468
3 changed files with 9 additions and 3 deletions

View file

@ -22,9 +22,11 @@ lcFindReplaceWidget::lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool R
Layout->addWidget(new QLabel(tr("Find:")), 0, 0); Layout->addWidget(new QLabel(tr("Find:")), 0, 0);
lcColorPicker* FindColorPicker = new lcColorPicker(this, true); lcColorPicker* FindColorPicker = new lcColorPicker(this, true);
FindColorPicker->setToolTip(tr("Search Color"));
Layout->addWidget(FindColorPicker, 0, 1); Layout->addWidget(FindColorPicker, 0, 1);
mFindPartComboBox = new QComboBox(this); mFindPartComboBox = new QComboBox(this);
mFindPartComboBox->setToolTip(tr("Search Part"));
mFindPartComboBox->setEditable(true); mFindPartComboBox->setEditable(true);
mFindPartComboBox->setInsertPolicy(QComboBox::NoInsert); mFindPartComboBox->setInsertPolicy(QComboBox::NoInsert);
Layout->addWidget(mFindPartComboBox, 0, 2); Layout->addWidget(mFindPartComboBox, 0, 2);
@ -51,9 +53,11 @@ lcFindReplaceWidget::lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool R
Layout->addWidget(new QLabel(tr("Replace:")), 1, 0); Layout->addWidget(new QLabel(tr("Replace:")), 1, 0);
ReplaceColorPicker = new lcColorPicker(this, true); ReplaceColorPicker = new lcColorPicker(this, true);
ReplaceColorPicker->setToolTip(tr("Replacement Color"));
Layout->addWidget(ReplaceColorPicker, 1, 1); Layout->addWidget(ReplaceColorPicker, 1, 1);
mReplacePartComboBox = new QComboBox(this); mReplacePartComboBox = new QComboBox(this);
mReplacePartComboBox->setToolTip(tr("Replacement Part"));
Layout->addWidget(mReplacePartComboBox, 1, 2); Layout->addWidget(mReplacePartComboBox, 1, 2);
QToolButton* ReplaceNextButton = new QToolButton(this); QToolButton* ReplaceNextButton = new QToolButton(this);
@ -80,10 +84,12 @@ lcFindReplaceWidget::lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool R
QToolButton* CloseButton = new QToolButton(this); QToolButton* CloseButton = new QToolButton(this);
CloseButton->setAutoRaise(true); CloseButton->setAutoRaise(true);
CloseButton->setDefaultAction(gMainWindow->mActions[LC_EDIT_CANCEL]);
CloseButton->setIcon(QIcon(":/stylesheet/close.png")); CloseButton->setIcon(QIcon(":/stylesheet/close.png"));
CloseButton->setToolTip(tr("Close"));
Layout->addWidget(CloseButton, 0, 5); Layout->addWidget(CloseButton, 0, 5);
connect(CloseButton, &QToolButton::clicked, this, &QObject::deleteLater);
lcPartsList PartsList; lcPartsList PartsList;
Model->GetPartsList(gDefaultColor, false, true, PartsList); Model->GetPartsList(gDefaultColor, false, true, PartsList);

View file

@ -17,7 +17,7 @@
#include "lc_findreplacewidget.h" #include "lc_findreplacewidget.h"
lcFindReplaceParams lcView::mFindReplaceParams; lcFindReplaceParams lcView::mFindReplaceParams;
lcFindReplaceWidget* lcView::mFindWidget; QPointer<lcFindReplaceWidget> lcView::mFindWidget;
lcView* lcView::mLastFocusedView; lcView* lcView::mLastFocusedView;
std::vector<lcView*> lcView::mViews; std::vector<lcView*> lcView::mViews;

View file

@ -351,7 +351,7 @@ protected:
lcVertexBuffer mGridBuffer; lcVertexBuffer mGridBuffer;
int mGridSettings[7]; int mGridSettings[7];
static lcFindReplaceWidget* mFindWidget; static QPointer<lcFindReplaceWidget> mFindWidget;
static lcFindReplaceParams mFindReplaceParams; static lcFindReplaceParams mFindReplaceParams;
static lcView* mLastFocusedView; static lcView* mLastFocusedView;