Compare commits

...

7 commits

Author SHA1 Message Date
Roman Telezhynskyi a7d61cb87c Fix command. 2024-01-19 11:01:21 +02:00
Roman Telezhynskyi e48d4d5464 Fix typo in the gist. 2024-01-19 10:56:34 +02:00
Roman Telezhynskyi 66b68bac59 ERROR: Unable to deduce type config install: 0abab496338183c36661e635c2aeab8d\settings.yml. 2024-01-19 10:42:32 +02:00
Roman Telezhynskyi 8b6ee824ae Better control over known measurement image size in description. 2024-01-19 10:34:43 +02:00
Roman Telezhynskyi 717225ce03 Fix issue with translation of tool groups. 2024-01-18 18:16:03 +02:00
Roman Telezhynskyi 27e07d16f2 Fix translation variables in Formula Wizard. 2024-01-18 17:12:38 +02:00
Roman Telezhynskyi f34a0b331b Clone settings.yml manually. 2024-01-18 16:43:09 +02:00
12 changed files with 177 additions and 50 deletions

View file

@ -31,6 +31,7 @@
#include "../vformat/knownmeasurements/vknownmeasurement.h" #include "../vformat/knownmeasurements/vknownmeasurement.h"
#include "../vformat/knownmeasurements/vknownmeasurements.h" #include "../vformat/knownmeasurements/vknownmeasurements.h"
#include "../vformat/knownmeasurements/vknownmeasurementsdatabase.h" #include "../vformat/knownmeasurements/vknownmeasurementsdatabase.h"
#include "../vmisc/def.h"
#include "ui_dialogmdatabase.h" #include "ui_dialogmdatabase.h"
#include <QKeyEvent> #include <QKeyEvent>
@ -105,11 +106,21 @@ auto DialogMDataBase::ImgTag(const VPatternImage &image) -> QString
{ {
if (!image.IsValid()) if (!image.IsValid())
{ {
return QStringLiteral("<img src=\"wrong.png\" align=\"center\"/>"); // In case of error return QStringLiteral(R"(<img src="wrong.png" align="center" />)"); // In case of error
} }
return QStringLiteral("<img src=\"data:%1;base64,%2\" align=\"center\"/>") QString size;
.arg(image.ContentType(), QString(image.ContentData()));
if (!VFuzzyComparePossibleNulls(image.GetSizeScale(), 100.0))
{
QSizeF const imaheSize = image.Size();
size = QStringLiteral(R"(width="%1" height="%2")")
.arg(imaheSize.width() * image.GetSizeScale() / 100)
.arg(imaheSize.height() * image.GetSizeScale() / 100);
}
return QStringLiteral(R"(<img src="data:%1;base64,%2" align="center" %3% />)")
.arg(image.ContentType(), QString(image.ContentData()), size);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View file

@ -50,6 +50,7 @@
#include <QCloseEvent> #include <QCloseEvent>
#include <QCompleter> #include <QCompleter>
#include <QDesktopServices> #include <QDesktopServices>
#include <QDoubleSpinBox>
#include <QEvent> #include <QEvent>
#include <QFileInfo> #include <QFileInfo>
#include <QImageReader> #include <QImageReader>
@ -1213,6 +1214,10 @@ void TKMMainWindow::ShowImageData()
disconnect(ui->lineEditImageTitle, &QLineEdit::editingFinished, this, &TKMMainWindow::SaveImageTitle); disconnect(ui->lineEditImageTitle, &QLineEdit::editingFinished, this, &TKMMainWindow::SaveImageTitle);
ui->lineEditImageTitle->setText(image.Title()); ui->lineEditImageTitle->setText(image.Title());
connect(ui->lineEditImageTitle, &QLineEdit::editingFinished, this, &TKMMainWindow::SaveImageTitle); connect(ui->lineEditImageTitle, &QLineEdit::editingFinished, this, &TKMMainWindow::SaveImageTitle);
ui->doubleSpinBoxImageSize->blockSignals(true);
ui->doubleSpinBoxImageSize->setValue(image.GetSizeScale());
ui->doubleSpinBoxImageSize->blockSignals(false);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1466,6 +1471,31 @@ void TKMMainWindow::SaveImageTitle()
ShowMData(); ShowMData();
} }
//---------------------------------------------------------------------------------------------------------------------
void TKMMainWindow::SaveImageSizeScale()
{
auto *item = ui->listWidget->currentItem();
int row = ui->listWidget->currentRow();
if (item == nullptr)
{
return;
}
m_m->SetImageSizeScale(item->data(Qt::UserRole).toUuid(), ui->doubleSpinBoxImageSize->value());
MeasurementsWereSaved(false);
m_known = VKnownMeasurements();
RefreshImages();
ui->listWidget->blockSignals(true);
ui->listWidget->setCurrentRow(row);
ui->listWidget->blockSignals(false);
ShowMData();
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1707,6 +1737,8 @@ void TKMMainWindow::InitWindow()
connect(ui->listWidget, &QListWidget::itemSelectionChanged, this, &TKMMainWindow::ShowImageData); connect(ui->listWidget, &QListWidget::itemSelectionChanged, this, &TKMMainWindow::ShowImageData);
connect(ui->lineEditImageTitle, &QLineEdit::editingFinished, this, &TKMMainWindow::SaveImageTitle); connect(ui->lineEditImageTitle, &QLineEdit::editingFinished, this, &TKMMainWindow::SaveImageTitle);
connect(ui->doubleSpinBoxImageSize, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this,
&TKMMainWindow::SaveImageSizeScale);
// Tab info // Tab info
ui->plainTextEditKMDescription->setEnabled(true); ui->plainTextEditKMDescription->setEnabled(true);
@ -2403,6 +2435,7 @@ void TKMMainWindow::ImageFields(bool enabled)
ui->lineEditImageTitle->setEnabled(enabled); ui->lineEditImageTitle->setEnabled(enabled);
ui->toolButtonRemoveImage->setEnabled(enabled); ui->toolButtonRemoveImage->setEnabled(enabled);
ui->toolButtonSaveImage->setEnabled(enabled); ui->toolButtonSaveImage->setEnabled(enabled);
ui->doubleSpinBoxImageSize->setEnabled(enabled);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View file

@ -115,6 +115,7 @@ private slots:
void SaveMDiagram(); void SaveMDiagram();
void SaveImageTitle(); void SaveImageTitle();
void SaveImageSizeScale();
void AskDefaultSettings(); void AskDefaultSettings();

View file

@ -365,8 +365,7 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-top"> <iconset theme="go-top"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -382,8 +381,7 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-up"> <iconset theme="go-up"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -399,8 +397,7 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-down"> <iconset theme="go-down"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -416,8 +413,7 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-bottom"> <iconset theme="go-bottom"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -446,8 +442,7 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="list-remove"> <iconset theme="list-remove"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -788,8 +783,7 @@
<string notr="true">...</string> <string notr="true">...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="document-save-as"> <iconset theme="document-save-as"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -812,6 +806,35 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Size:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxImageSize">
<property name="enabled">
<bool>false</bool>
</property>
<property name="suffix">
<string notr="true">%</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="value">
<double>100.000000000000000</double>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
@ -820,8 +843,7 @@
</widget> </widget>
<widget class="QWidget" name="tabInformation"> <widget class="QWidget" name="tabInformation">
<attribute name="icon"> <attribute name="icon">
<iconset theme="documentinfo"> <iconset theme="documentinfo"/>
<normaloff>.</normaloff>.</iconset>
</attribute> </attribute>
<attribute name="title"> <attribute name="title">
<string>Information</string> <string>Information</string>
@ -1035,8 +1057,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="document-save"> <iconset theme="document-save"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Save</string> <string>&amp;Save</string>
@ -1050,8 +1071,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="document-save-as"> <iconset theme="document-save-as"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Save &amp;As …</string> <string>Save &amp;As …</string>
@ -1062,8 +1082,7 @@
</action> </action>
<action name="actionQuit"> <action name="actionQuit">
<property name="icon"> <property name="icon">
<iconset theme="application-exit"> <iconset theme="application-exit"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Quit</string> <string>&amp;Quit</string>
@ -1082,8 +1101,7 @@
</action> </action>
<action name="actionAboutTape"> <action name="actionAboutTape">
<property name="icon"> <property name="icon">
<iconset theme="help-about"> <iconset theme="help-about"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;About Tape</string> <string>&amp;About Tape</string>
@ -1094,8 +1112,7 @@
</action> </action>
<action name="actionNew"> <action name="actionNew">
<property name="icon"> <property name="icon">
<iconset theme="document-new"> <iconset theme="document-new"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;New</string> <string>&amp;New</string>
@ -1132,8 +1149,7 @@
</action> </action>
<action name="actionOpen"> <action name="actionOpen">
<property name="icon"> <property name="icon">
<iconset theme="document-open"> <iconset theme="document-open"/>
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Open</string> <string>&amp;Open</string>

View file

@ -20,6 +20,7 @@
<xs:attribute type="contentType" name="contentType" use="optional"/> <xs:attribute type="contentType" name="contentType" use="optional"/>
<xs:attribute type="uuid" name="uid" use="required"/> <xs:attribute type="uuid" name="uid" use="required"/>
<xs:attribute type="xs:string" name="title" use="optional"/> <xs:attribute type="xs:string" name="title" use="optional"/>
<xs:attribute type="imageScale" name="size" use="optional"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
@ -78,4 +79,10 @@
<xs:pattern value="|\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}"/> <xs:pattern value="|\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="imageScale">
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0.1"/>
<xs:maxInclusive value="100.0"/>
</xs:restriction>
</xs:simpleType>
</xs:schema> </xs:schema>

View file

@ -227,3 +227,15 @@ void VPatternImage::SetTitle(const QString &newTitle)
{ {
m_title = newTitle; m_title = newTitle;
} }
//---------------------------------------------------------------------------------------------------------------------
auto VPatternImage::GetSizeScale() const -> qreal
{
return m_sizeScale;
}
//---------------------------------------------------------------------------------------------------------------------
void VPatternImage::SetSizeScale(qreal newSizeScale)
{
m_sizeScale = qBound(0.1, newSizeScale, 100.0);
}

View file

@ -64,11 +64,15 @@ public:
auto Title() const -> QString; auto Title() const -> QString;
void SetTitle(const QString &newTitle); void SetTitle(const QString &newTitle);
qreal GetSizeScale() const;
void SetSizeScale(qreal newSizeScale);
private: private:
QString m_contentType{}; QString m_contentType{};
QByteArray m_contentData{}; QByteArray m_contentData{};
mutable QString m_errorString{}; mutable QString m_errorString{};
QString m_title{}; QString m_title{};
qreal m_sizeScale{100};
}; };
#endif // VPATTERNIMAGE_H #endif // VPATTERNIMAGE_H

View file

@ -29,6 +29,7 @@
#include "../ifc/ifcdef.h" #include "../ifc/ifcdef.h"
#include "../ifc/xml/vknownmeasurementsconverter.h" #include "../ifc/xml/vknownmeasurementsconverter.h"
#include "../ifc/xml/vpatternimage.h" #include "../ifc/xml/vpatternimage.h"
#include "../vmisc/def.h"
#include "../vmisc/literals.h" #include "../vmisc/literals.h"
#include "../vmisc/projectversion.h" #include "../vmisc/projectversion.h"
#include "vknownmeasurement.h" #include "vknownmeasurement.h"
@ -63,6 +64,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrName, ("name"_L1))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrContentType, ("contentType"_L1)) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrContentType, ("contentType"_L1)) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrUId, ("uid"_L1)) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrUId, ("uid"_L1)) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrTitle, ("title"_L1)) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrTitle, ("title"_L1)) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrSize, ("size"_L1)) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrReadOnly, ("read-only"_L1)) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrReadOnly, ("read-only"_L1)) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrDescription, ("description"_L1)) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrDescription, ("description"_L1)) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrFullName, ("full_name"_L1)) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, attrFullName, ("full_name"_L1)) // NOLINT
@ -487,6 +489,21 @@ void VKnownMeasurementsDocument::SetImageTitle(const QUuid &id, const QString &t
} }
} }
//---------------------------------------------------------------------------------------------------------------------
void VKnownMeasurementsDocument::SetImageSizeScale(const QUuid &id, qreal scale)
{
QDomElement node = FindImage(id);
if (not node.isNull())
{
SetAttributeOrRemoveIf<qreal>(node, *attrSize, scale,
[](qreal scale) noexcept { return VFuzzyComparePossibleNulls(scale, 100.0); });
}
else
{
qWarning() << tr("Can't find image by id '%1'").arg(id.toString());
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VKnownMeasurementsDocument::SetImageId(const QUuid &id, const QUuid &newId) void VKnownMeasurementsDocument::SetImageId(const QUuid &id, const QUuid &newId)
{ {
@ -588,7 +605,7 @@ auto VKnownMeasurementsDocument::FindImage(const QUuid &id) const -> QDomElement
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VKnownMeasurementsDocument::ReadImages(VKnownMeasurements &known) const void VKnownMeasurementsDocument::ReadImages(VKnownMeasurements &known) const
{ {
QDomNodeList list = elementsByTagName(*tagImage); QDomNodeList const list = elementsByTagName(*tagImage);
for (int i = 0; i < list.size(); ++i) for (int i = 0; i < list.size(); ++i)
{ {
@ -601,6 +618,7 @@ void VKnownMeasurementsDocument::ReadImages(VKnownMeasurements &known) const
VPatternImage image; VPatternImage image;
image.SetContentData(domElement.text().toLatin1(), domElement.attribute(*attrContentType)); image.SetContentData(domElement.text().toLatin1(), domElement.attribute(*attrContentType));
image.SetTitle(domElement.attribute(*attrTitle)); image.SetTitle(domElement.attribute(*attrTitle));
image.SetSizeScale(GetParametrDouble(domElement, *attrSize, QStringLiteral("100.0")));
known.AddImage(QUuid(domElement.attribute(*attrUId)), image); known.AddImage(QUuid(domElement.attribute(*attrUId)), image);
} }

View file

@ -84,6 +84,7 @@ public:
void SetImageContent(const QUuid &id, const VPatternImage &image); void SetImageContent(const QUuid &id, const VPatternImage &image);
void SetImageTitle(const QUuid &id, const QString &text); void SetImageTitle(const QUuid &id, const QString &text);
void SetImageSizeScale(const QUuid &id, qreal scale);
void SetImageId(const QUuid &id, const QUuid &newId); void SetImageId(const QUuid &id, const QUuid &newId);
private: private:

View file

@ -629,6 +629,8 @@ template <class T> void DialogEditWrongFormula::ShowVariable(const QList<T> &var
ui->tableWidget->setColumnHidden(ColumnFullName, true); ui->tableWidget->setColumnHidden(ColumnFullName, true);
ui->labelDescription->setText(QString()); ui->labelDescription->setText(QString());
const VTranslateVars *trVars = VAbstractApplication::VApp()->TrVars();
for (const auto &var : vars) for (const auto &var : vars)
{ {
if (ui->checkBoxHideEmpty->isEnabled() && ui->checkBoxHideEmpty->isChecked() && var->IsNotUsed()) if (ui->checkBoxHideEmpty->isEnabled() && ui->checkBoxHideEmpty->isChecked() && var->IsNotUsed())
@ -639,7 +641,7 @@ template <class T> void DialogEditWrongFormula::ShowVariable(const QList<T> &var
if (!var->Filter(m_toolId)) if (!var->Filter(m_toolId))
{ // If we create this variable don't show { // If we create this variable don't show
ui->tableWidget->setRowCount(ui->tableWidget->rowCount() + 1); ui->tableWidget->setRowCount(ui->tableWidget->rowCount() + 1);
auto *item = new QTableWidgetItem(var->GetName()); auto *item = new QTableWidgetItem(trVars->VarToUser(var->GetName()));
QFont font = item->font(); QFont font = item->font();
font.setBold(true); font.setBold(true);
item->setFont(font); item->setFont(font);
@ -734,7 +736,7 @@ void DialogEditWrongFormula::ShowFunctions()
{ {
ui->tableWidget->setRowCount(ui->tableWidget->rowCount() + 1); ui->tableWidget->setRowCount(ui->tableWidget->rowCount() + 1);
QString name = (!settings->IsTranslateFormula() QString const name = (!settings->IsTranslateFormula()
? i.value().getMsourceText() ? i.value().getMsourceText()
: i.value().translate(VAbstractApplication::VApp()->Settings()->GetLocale())); : i.value().translate(VAbstractApplication::VApp()->Settings()->GetLocale()));
@ -747,7 +749,7 @@ void DialogEditWrongFormula::ShowFunctions()
if (functionsDescriptions.contains(i.key())) if (functionsDescriptions.contains(i.key()))
{ {
QString description = QString const description =
(!settings->IsTranslateFormula() ? functionsDescriptions.value(i.key()).getMsourceText() (!settings->IsTranslateFormula() ? functionsDescriptions.value(i.key()).getMsourceText()
: functionsDescriptions.value(i.key()).translate( : functionsDescriptions.value(i.key()).translate(
VAbstractApplication::VApp()->Settings()->GetLocale())); VAbstractApplication::VApp()->Settings()->GetLocale()));

View file

@ -28,19 +28,41 @@
#include "vtoolbuttonpopup.h" #include "vtoolbuttonpopup.h"
#include <QAction> #include <QAction>
#include <QEvent>
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VToolButtonPopup::VToolButtonPopup(QWidget *parent) VToolButtonPopup::VToolButtonPopup(QWidget *parent)
: QToolButton(parent) : QToolButton(parent)
{ {
setPopupMode(QToolButton::MenuButtonPopup); setPopupMode(QToolButton::MenuButtonPopup);
QObject::connect(this, &QToolButton::triggered, this, QObject::connect(this, &QToolButton::triggered, this, [this](QAction *action) { setDefaultAction(action); });
[this](QAction *action) }
//---------------------------------------------------------------------------------------------------------------------
void VToolButtonPopup::SetToolGroupTooltip(const QString &toolGroupTooltip)
{
m_toolGroupTooltip = toolGroupTooltip;
CorrectToolTip();
}
//---------------------------------------------------------------------------------------------------------------------
auto VToolButtonPopup::event(QEvent *event) -> bool
{
if (event->type() == QEvent::ToolTipChange && !handlingToolTipChange)
{
handlingToolTipChange = true;
CorrectToolTip();
handlingToolTipChange = false;
}
return QToolButton::event(event);
}
//---------------------------------------------------------------------------------------------------------------------
void VToolButtonPopup::CorrectToolTip()
{ {
setDefaultAction(action);
if (!m_toolGroupTooltip.isEmpty()) if (!m_toolGroupTooltip.isEmpty())
{ {
setToolTip(m_toolGroupTooltip); setToolTip(QStringLiteral("<b><i>%1</i></b>:<br/>%2").arg(m_toolGroupTooltip, toolTip()));
} }
});
} }

View file

@ -45,10 +45,16 @@ public:
auto GetToolGroupTooltip() const -> QString; auto GetToolGroupTooltip() const -> QString;
void SetToolGroupTooltip(const QString &toolGroupTooltip); void SetToolGroupTooltip(const QString &toolGroupTooltip);
protected:
auto event(QEvent *event) -> bool override;
private: private:
Q_DISABLE_COPY_MOVE(VToolButtonPopup) // NOLINT Q_DISABLE_COPY_MOVE(VToolButtonPopup) // NOLINT
QString m_toolGroupTooltip{}; QString m_toolGroupTooltip{};
bool handlingToolTipChange{false};
void CorrectToolTip();
}; };
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -57,10 +63,4 @@ inline auto VToolButtonPopup::GetToolGroupTooltip() const -> QString
return m_toolGroupTooltip; return m_toolGroupTooltip;
} }
//---------------------------------------------------------------------------------------------------------------------
inline void VToolButtonPopup::SetToolGroupTooltip(const QString &toolGroupTooltip)
{
m_toolGroupTooltip = toolGroupTooltip;
}
#endif // VTOOLBUTTONPOPUP_H #endif // VTOOLBUTTONPOPUP_H