Gui: Prepare for clang-format (#16051)

* Gui: Prepare for clang-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
wwmayer
2024-09-02 17:48:55 +02:00
committed by GitHub
parent e98ffc3060
commit 977e13795a
31 changed files with 4133 additions and 3093 deletions

View File

@@ -22,12 +22,12 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QHeaderView>
# include <QInputDialog>
# include <QMenu>
# include <QMessageBox>
# include <QToolBar>
# include <QToolButton>
#include <QHeaderView>
#include <QInputDialog>
#include <QMenu>
#include <QMessageBox>
#include <QToolBar>
#include <QToolButton>
#endif
#include "DlgToolbarsImp.h"
@@ -85,14 +85,16 @@ DlgCustomToolbars::DlgCustomToolbars(DlgCustomToolbars::Type t, QWidget* parent)
int index = 1;
ui->workbenchBox->addItem(QApplication::windowIcon(), tr("Global"));
ui->workbenchBox->setItemData(0, QVariant(QString::fromLatin1("Global")), Qt::UserRole);
for (const auto & workbench : workbenches) {
for (const auto& workbench : workbenches) {
QPixmap px = Application::Instance->workbenchIcon(workbench);
QString mt = Application::Instance->workbenchMenuText(workbench);
if (mt != QLatin1String("<none>")) {
if (px.isNull())
if (px.isNull()) {
ui->workbenchBox->addItem(mt);
else
}
else {
ui->workbenchBox->addItem(px, mt);
}
ui->workbenchBox->setItemData(index, QVariant(workbench), Qt::UserRole);
index++;
}
@@ -117,6 +119,7 @@ DlgCustomToolbars::~DlgCustomToolbars() = default;
void DlgCustomToolbars::setupConnections()
{
// clang-format off
connect(ui->workbenchBox, qOverload<int>(&QComboBox::activated),
this, &DlgCustomToolbars::onWorkbenchBoxActivated);
connect(ui->moveActionRightButton, &QPushButton::clicked,
@@ -133,37 +136,31 @@ void DlgCustomToolbars::setupConnections()
this, &DlgCustomToolbars::onRenameButtonClicked);
connect(ui->deleteButton, &QPushButton::clicked,
this, &DlgCustomToolbars::onDeleteButtonClicked);
// clang-format on
}
void DlgCustomToolbars::addCustomToolbar(const QString&)
{
}
{}
void DlgCustomToolbars::removeCustomToolbar(const QString&)
{
}
{}
void DlgCustomToolbars::renameCustomToolbar(const QString&, const QString&)
{
}
{}
void DlgCustomToolbars::addCustomCommand(const QString&, const QByteArray&)
{
}
{}
void DlgCustomToolbars::removeCustomCommand(const QString&, const QByteArray&)
{
}
{}
void DlgCustomToolbars::moveUpCustomCommand(const QString&, const QByteArray&)
{
}
{}
void DlgCustomToolbars::moveDownCustomCommand(const QString&, const QByteArray&)
{
}
{}
void DlgCustomToolbars::hideEvent(QHideEvent * event)
void DlgCustomToolbars::hideEvent(QHideEvent* event)
{
QVariant data = ui->workbenchBox->itemData(ui->workbenchBox->currentIndex(), Qt::UserRole);
QString workbench = data.toString();
@@ -173,8 +170,7 @@ void DlgCustomToolbars::hideEvent(QHideEvent * event)
}
void DlgCustomToolbars::onActivateCategoryBox()
{
}
{}
void DlgCustomToolbars::onWorkbenchBoxActivated(int index)
{
@@ -188,27 +184,30 @@ void DlgCustomToolbars::onWorkbenchBoxActivated(int index)
void DlgCustomToolbars::importCustomToolbars(const QByteArray& name)
{
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Workbench");
ParameterGrp::handle hGrp =
App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Workbench");
const char* subgroup = (type == Toolbar ? "Toolbar" : "Toolboxbar");
if (!hGrp->HasGroup(name.constData()))
if (!hGrp->HasGroup(name.constData())) {
return;
}
hGrp = hGrp->GetGroup(name.constData());
if (!hGrp->HasGroup(subgroup))
if (!hGrp->HasGroup(subgroup)) {
return;
}
hGrp = hGrp->GetGroup(subgroup);
std::string separator = "Separator";
std::vector<Base::Reference<ParameterGrp> > hGrps = hGrp->GetGroups();
std::vector<Base::Reference<ParameterGrp>> hGrps = hGrp->GetGroups();
CommandManager& rMgr = Application::Instance->commandManager();
for (const auto & hGrp : hGrps) {
for (const auto& hGrp : hGrps) {
// create a toplevel item
auto toplevel = new QTreeWidgetItem(ui->toolbarTreeWidget);
bool active = hGrp->GetBool("Active", true);
toplevel->setCheckState(0, (active ? Qt::Checked : Qt::Unchecked));
// get the elements of the subgroups
std::vector<std::pair<std::string,std::string> > items = hGrp->GetASCIIMap();
for (const auto & it2 : items) {
std::vector<std::pair<std::string, std::string>> items = hGrp->GetASCIIMap();
for (const auto& it2 : items) {
// since we have stored the separators to the user parameters as (key, pair) we had to
// make sure to use a unique key because otherwise we cannot store more than
// one.
@@ -230,14 +229,17 @@ void DlgCustomToolbars::importCustomToolbars(const QByteArray& name)
item->setText(0, Action::commandMenuText(pCmd));
item->setToolTip(0, Action::commandToolTip(pCmd));
item->setData(0, Qt::UserRole, QByteArray(it2.first.c_str()));
if (pCmd->getPixmap())
if (pCmd->getPixmap()) {
item->setIcon(0, BitmapFactory().iconFromTheme(pCmd->getPixmap()));
}
item->setSizeHint(0, QSize(32, 32));
}
else {
// If corresponding module is not yet loaded do not lose the entry
auto item = new QTreeWidgetItem(toplevel);
item->setText(0, tr("%1 module not loaded").arg(QString::fromStdString(it2.second)));
item->setText(
0,
tr("%1 module not loaded").arg(QString::fromStdString(it2.second)));
item->setData(0, Qt::UserRole, QByteArray(it2.first.c_str()));
item->setData(0, Qt::WhatsThisPropertyRole, QByteArray(it2.second.c_str()));
item->setSizeHint(0, QSize(32, 32));
@@ -249,15 +251,16 @@ void DlgCustomToolbars::importCustomToolbars(const QByteArray& name)
void DlgCustomToolbars::exportCustomToolbars(const QByteArray& workbench)
{
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Workbench");
ParameterGrp::handle hGrp =
App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Workbench");
const char* subgroup = (type == Toolbar ? "Toolbar" : "Toolboxbar");
hGrp = hGrp->GetGroup(workbench.constData())->GetGroup(subgroup);
hGrp->Clear();
CommandManager& rMgr = Application::Instance->commandManager();
for (int i=0; i<ui->toolbarTreeWidget->topLevelItemCount(); i++) {
for (int i = 0; i < ui->toolbarTreeWidget->topLevelItemCount(); i++) {
QTreeWidgetItem* toplevel = ui->toolbarTreeWidget->topLevelItem(i);
QString groupName = QString::fromLatin1("Custom_%1").arg(i+1);
QString groupName = QString::fromLatin1("Custom_%1").arg(i + 1);
QByteArray toolbarName = toplevel->text(0).toUtf8();
ParameterGrp::handle hToolGrp = hGrp->GetGroup(groupName.toLatin1());
hToolGrp->SetASCII("Name", toolbarName.constData());
@@ -267,7 +270,7 @@ void DlgCustomToolbars::exportCustomToolbars(const QByteArray& workbench)
// make sure to use a unique key because otherwise we cannot store more than
// one.
int suffixSeparator = 1;
for (int j=0; j<toplevel->childCount(); j++) {
for (int j = 0; j < toplevel->childCount(); j++) {
QTreeWidgetItem* child = toplevel->child(j);
QByteArray commandName = child->data(0, Qt::UserRole).toByteArray();
if (commandName == "Separator") {
@@ -295,10 +298,12 @@ void DlgCustomToolbars::onMoveActionRightButtonClicked()
QTreeWidgetItem* item = ui->commandTreeWidget->currentItem();
if (item) {
QTreeWidgetItem* current = ui->toolbarTreeWidget->currentItem();
if (!current)
if (!current) {
current = ui->toolbarTreeWidget->topLevelItem(0);
else if (current->parent())
}
else if (current->parent()) {
current = current->parent();
}
if (current && !current->parent()) {
auto copy = new QTreeWidgetItem(current);
copy->setText(0, item->text(1));
@@ -331,7 +336,7 @@ void DlgCustomToolbars::onMoveActionLeftButtonClicked()
QByteArray data = item->data(0, Qt::UserRole).toByteArray();
if (data == "Separator") {
int countSep = 1;
for (int i=0; i<index-1; i++) {
for (int i = 0; i < index - 1; i++) {
QByteArray d = parent->child(i)->data(0, Qt::UserRole).toByteArray();
if (d == "Separator") {
countSep++;
@@ -364,7 +369,7 @@ void DlgCustomToolbars::onMoveActionUpButtonClicked()
QByteArray data = item->data(0, Qt::UserRole).toByteArray();
if (data == "Separator") {
int countSep = 1;
for (int i=0; i<index; i++) {
for (int i = 0; i < index; i++) {
QByteArray d = parent->child(i)->data(0, Qt::UserRole).toByteArray();
if (d == "Separator") {
countSep++;
@@ -375,7 +380,7 @@ void DlgCustomToolbars::onMoveActionUpButtonClicked()
}
parent->takeChild(index);
parent->insertChild(index-1, item);
parent->insertChild(index - 1, item);
ui->toolbarTreeWidget->setCurrentItem(item);
moveUpCustomCommand(parent->text(0), data);
@@ -394,7 +399,7 @@ void DlgCustomToolbars::onMoveActionDownButtonClicked()
if (item && item->parent() && item->isSelected()) {
QTreeWidgetItem* parent = item->parent();
int index = parent->indexOfChild(item);
if (index < parent->childCount()-1) {
if (index < parent->childCount() - 1) {
// In case a separator should be moved we have to count the separators
// which come before this one.
// This is needed so that we can distinguish in moveDownCustomCommand
@@ -402,7 +407,7 @@ void DlgCustomToolbars::onMoveActionDownButtonClicked()
QByteArray data = item->data(0, Qt::UserRole).toByteArray();
if (data == "Separator") {
int countSep = 1;
for (int i=0; i<index; i++) {
for (int i = 0; i < index; i++) {
QByteArray d = parent->child(i)->data(0, Qt::UserRole).toByteArray();
if (d == "Separator") {
countSep++;
@@ -413,7 +418,7 @@ void DlgCustomToolbars::onMoveActionDownButtonClicked()
}
parent->takeChild(index);
parent->insertChild(index+1, item);
parent->insertChild(index + 1, item);
ui->toolbarTreeWidget->setCurrentItem(item);
moveDownCustomCommand(parent->text(0), data);
@@ -428,15 +433,24 @@ void DlgCustomToolbars::onMoveActionDownButtonClicked()
void DlgCustomToolbars::onNewButtonClicked()
{
bool ok;
QString text = QString::fromLatin1("Custom%1").arg(ui->toolbarTreeWidget->topLevelItemCount()+1);
text = QInputDialog::getText(this, tr("New toolbar"), tr("Toolbar name:"), QLineEdit::Normal, text, &ok, Qt::MSWindowsFixedSizeDialogHint);
QString text =
QString::fromLatin1("Custom%1").arg(ui->toolbarTreeWidget->topLevelItemCount() + 1);
text = QInputDialog::getText(this,
tr("New toolbar"),
tr("Toolbar name:"),
QLineEdit::Normal,
text,
&ok,
Qt::MSWindowsFixedSizeDialogHint);
if (ok) {
// Check for duplicated name
for (int i=0; i<ui->toolbarTreeWidget->topLevelItemCount(); i++) {
for (int i = 0; i < ui->toolbarTreeWidget->topLevelItemCount(); i++) {
QTreeWidgetItem* toplevel = ui->toolbarTreeWidget->topLevelItem(i);
QString groupName = toplevel->text(0);
if (groupName == text) {
QMessageBox::warning(this, tr("Duplicated name"), tr("The toolbar name '%1' is already used").arg(text));
QMessageBox::warning(this,
tr("Duplicated name"),
tr("The toolbar name '%1' is already used").arg(text));
return;
}
}
@@ -475,15 +489,22 @@ void DlgCustomToolbars::onRenameButtonClicked()
if (item && !item->parent() && item->isSelected()) {
bool ok;
QString old_text = item->text(0);
QString text = QInputDialog::getText(this, tr("Rename toolbar"), tr("Toolbar name:"),
QLineEdit::Normal, old_text, &ok, Qt::MSWindowsFixedSizeDialogHint);
QString text = QInputDialog::getText(this,
tr("Rename toolbar"),
tr("Toolbar name:"),
QLineEdit::Normal,
old_text,
&ok,
Qt::MSWindowsFixedSizeDialogHint);
if (ok && text != old_text) {
// Check for duplicated name
for (int i=0; i<ui->toolbarTreeWidget->topLevelItemCount(); i++) {
for (int i = 0; i < ui->toolbarTreeWidget->topLevelItemCount(); i++) {
QTreeWidgetItem* toplevel = ui->toolbarTreeWidget->topLevelItem(i);
QString groupName = toplevel->text(0);
if (groupName == text && toplevel != item) {
QMessageBox::warning(this, tr("Duplicated name"), tr("The toolbar name '%1' is already used").arg(text));
QMessageBox::warning(this,
tr("Duplicated name"),
tr("The toolbar name '%1' is already used").arg(text));
return;
}
}
@@ -502,32 +523,30 @@ void DlgCustomToolbars::onRenameButtonClicked()
}
void DlgCustomToolbars::onAddMacroAction(const QByteArray&)
{
}
{}
void DlgCustomToolbars::onRemoveMacroAction(const QByteArray&)
{
}
{}
void DlgCustomToolbars::onModifyMacroAction(const QByteArray& macro)
{
QVariant data = ui->categoryBox->itemData(ui->categoryBox->currentIndex(), Qt::UserRole);
QString group = data.toString();
if (group == QLatin1String("Macros"))
{
CommandManager & cCmdMgr = Application::Instance->commandManager();
if (group == QLatin1String("Macros")) {
CommandManager& cCmdMgr = Application::Instance->commandManager();
Command* pCmd = cCmdMgr.getCommandByName(macro);
// the right side
for (int i=0; i<ui->toolbarTreeWidget->topLevelItemCount(); i++) {
for (int i = 0; i < ui->toolbarTreeWidget->topLevelItemCount(); i++) {
QTreeWidgetItem* toplevel = ui->toolbarTreeWidget->topLevelItem(i);
for (int j=0; j<toplevel->childCount(); j++) {
for (int j = 0; j < toplevel->childCount(); j++) {
QTreeWidgetItem* item = toplevel->child(j);
QByteArray command = item->data(0, Qt::UserRole).toByteArray();
if (command == macro) {
item->setText(0, Action::commandMenuText(pCmd));
item->setToolTip(0, Action::commandToolTip(pCmd));
if (pCmd->getPixmap())
if (pCmd->getPixmap()) {
item->setIcon(0, BitmapFactory().iconFromTheme(pCmd->getPixmap()));
}
}
}
}
@@ -535,14 +554,14 @@ void DlgCustomToolbars::onModifyMacroAction(const QByteArray& macro)
}
}
void DlgCustomToolbars::changeEvent(QEvent *e)
void DlgCustomToolbars::changeEvent(QEvent* e)
{
if (e->type() == QEvent::LanguageChange) {
ui->retranslateUi(this);
int count = ui->categoryBox->count();
CommandManager & cCmdMgr = Application::Instance->commandManager();
for (int i=0; i<count; i++) {
CommandManager& cCmdMgr = Application::Instance->commandManager();
for (int i = 0; i < count; i++) {
QVariant data = ui->categoryBox->itemData(i, Qt::UserRole);
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands(data.toByteArray());
if (!aCmds.empty()) {
@@ -570,10 +589,9 @@ void DlgCustomToolbars::changeEvent(QEvent *e)
* The dialog will by default be modeless, unless you set 'modal' to
* true to construct a modal dialog.
*/
DlgCustomToolbarsImp::DlgCustomToolbarsImp( QWidget* parent )
DlgCustomToolbarsImp::DlgCustomToolbarsImp(QWidget* parent)
: DlgCustomToolbars(DlgCustomToolbars::Toolbar, parent)
{
}
{}
/** Destroys the object and frees any allocated resources */
DlgCustomToolbarsImp::~DlgCustomToolbarsImp() = default;
@@ -594,8 +612,9 @@ void DlgCustomToolbarsImp::removeCustomToolbar(const QString& name)
Workbench* w = WorkbenchManager::instance()->active();
if (w && w->name() == std::string((const char*)data.toByteArray())) {
QList<QToolBar*> bars = getMainWindow()->findChildren<QToolBar*>(name);
if (bars.size() != 1)
if (bars.size() != 1) {
return;
}
QToolBar* tb = bars.front();
getMainWindow()->removeToolBar(tb);
@@ -609,8 +628,9 @@ void DlgCustomToolbarsImp::renameCustomToolbar(const QString& old_name, const QS
Workbench* w = WorkbenchManager::instance()->active();
if (w && w->name() == std::string((const char*)data.toByteArray())) {
QList<QToolBar*> bars = getMainWindow()->findChildren<QToolBar*>(old_name);
if (bars.size() != 1)
if (bars.size() != 1) {
return;
}
QToolBar* tb = bars.front();
tb->setObjectName(new_name);
@@ -621,12 +641,12 @@ void DlgCustomToolbarsImp::renameCustomToolbar(const QString& old_name, const QS
QList<QAction*> DlgCustomToolbarsImp::getActionGroup(QAction* action)
{
QList<QAction*> group;
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QList<QWidget*> widgets = action->associatedWidgets();
#else
QList<QObject*> widgets = action->associatedObjects();
#endif
for (const auto & widget : widgets) {
for (const auto& widget : widgets) {
auto tb = qobject_cast<QToolButton*>(widget);
if (tb) {
QMenu* menu = tb->menu();
@@ -642,12 +662,12 @@ QList<QAction*> DlgCustomToolbarsImp::getActionGroup(QAction* action)
void DlgCustomToolbarsImp::setActionGroup(QAction* action, const QList<QAction*>& group)
{
// See also ActionGroup::addTo()
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QList<QWidget*> widgets = action->associatedWidgets();
#else
QList<QObject*> widgets = action->associatedObjects();
#endif
for (const auto & widget : widgets) {
for (const auto& widget : widgets) {
auto tb = qobject_cast<QToolButton*>(widget);
if (tb) {
QMenu* menu = tb->menu();
@@ -668,8 +688,9 @@ void DlgCustomToolbarsImp::addCustomCommand(const QString& name, const QByteArra
Workbench* w = WorkbenchManager::instance()->active();
if (w && w->name() == std::string((const char*)data.toByteArray())) {
QList<QToolBar*> bars = getMainWindow()->findChildren<QToolBar*>(name);
if (bars.size() != 1)
if (bars.size() != 1) {
return;
}
if (cmd == "Separator") {
QAction* action = bars.front()->addSeparator();
@@ -682,8 +703,9 @@ void DlgCustomToolbarsImp::addCustomCommand(const QString& name, const QByteArra
// See ToolBarManager::setup(ToolBarItem* , QToolBar* )
// We have to add the user data in order to identify the command in
// removeCustomCommand(), moveUpCustomCommand() or moveDownCustomCommand()
if (action && action->data().isNull())
if (action && action->data().isNull()) {
action->setData(cmd);
}
}
}
}
@@ -695,8 +717,9 @@ void DlgCustomToolbarsImp::removeCustomCommand(const QString& name, const QByteA
Workbench* w = WorkbenchManager::instance()->active();
if (w && w->name() == std::string((const char*)data.toByteArray())) {
QList<QToolBar*> bars = getMainWindow()->findChildren<QToolBar*>(name);
if (bars.size() != 1)
if (bars.size() != 1) {
return;
}
QByteArray cmd = userdata;
int numSep = 0, indexSep = 0;
@@ -705,12 +728,13 @@ void DlgCustomToolbarsImp::removeCustomCommand(const QString& name, const QByteA
cmd = "Separator";
}
QList<QAction*> actions = bars.front()->actions();
for (const auto & action : actions) {
for (const auto& action : actions) {
if (action->data().toByteArray() == cmd) {
// if we move a separator then make sure to pick up the right one
if (numSep > 0) {
if (++indexSep < numSep)
if (++indexSep < numSep) {
continue;
}
}
bars.front()->removeAction(action);
break;
@@ -725,8 +749,9 @@ void DlgCustomToolbarsImp::moveUpCustomCommand(const QString& name, const QByteA
Workbench* w = WorkbenchManager::instance()->active();
if (w && w->name() == std::string((const char*)data.toByteArray())) {
QList<QToolBar*> bars = getMainWindow()->findChildren<QToolBar*>(name);
if (bars.size() != 1)
if (bars.size() != 1) {
return;
}
QByteArray cmd = userdata;
int numSep = 0, indexSep = 0;
@@ -735,8 +760,8 @@ void DlgCustomToolbarsImp::moveUpCustomCommand(const QString& name, const QByteA
cmd = "Separator";
}
QList<QAction*> actions = bars.front()->actions();
QAction* before=nullptr;
for (const auto & action : actions) {
QAction* before = nullptr;
for (const auto& action : actions) {
if (action->data().toByteArray() == cmd) {
// if we move a separator then make sure to pick up the right one
if (numSep > 0) {
@@ -749,8 +774,9 @@ void DlgCustomToolbarsImp::moveUpCustomCommand(const QString& name, const QByteA
QList<QAction*> group = getActionGroup(action);
bars.front()->removeAction(action);
bars.front()->insertAction(before, action);
if (!group.isEmpty())
if (!group.isEmpty()) {
setActionGroup(action, group);
}
break;
}
}
@@ -766,8 +792,9 @@ void DlgCustomToolbarsImp::moveDownCustomCommand(const QString& name, const QByt
Workbench* w = WorkbenchManager::instance()->active();
if (w && w->name() == std::string((const char*)data.toByteArray())) {
QList<QToolBar*> bars = getMainWindow()->findChildren<QToolBar*>(name);
if (bars.size() != 1)
if (bars.size() != 1) {
return;
}
QByteArray cmd = userdata;
int numSep = 0, indexSep = 0;
@@ -780,28 +807,32 @@ void DlgCustomToolbarsImp::moveDownCustomCommand(const QString& name, const QByt
if ((*it)->data().toByteArray() == cmd) {
// if we move a separator then make sure to pick up the right one
if (numSep > 0) {
if (++indexSep < numSep)
if (++indexSep < numSep) {
continue;
}
}
QAction* act = *it;
if (*it == actions.back())
break; // we're already on the last element
if (*it == actions.back()) {
break; // we're already on the last element
}
++it;
// second last item
if (*it == actions.back()) {
QList<QAction*> group = getActionGroup(act);
bars.front()->removeAction(act);
bars.front()->addAction(act);
if (!group.isEmpty())
if (!group.isEmpty()) {
setActionGroup(act, group);
}
break;
}
++it;
QList<QAction*> group = getActionGroup(act);
bars.front()->removeAction(act);
bars.front()->insertAction(*it, act);
if (!group.isEmpty())
if (!group.isEmpty()) {
setActionGroup(act, group);
}
break;
}
}
@@ -819,7 +850,7 @@ void DlgCustomToolbarsImp::showEvent(QShowEvent* event)
}
}
void DlgCustomToolbarsImp::changeEvent(QEvent *e)
void DlgCustomToolbarsImp::changeEvent(QEvent* e)
{
DlgCustomToolbars::changeEvent(e);
}
@@ -834,19 +865,19 @@ void DlgCustomToolbarsImp::changeEvent(QEvent *e)
* The dialog will by default be modeless, unless you set 'modal' to
* true to construct a modal dialog.
*/
DlgCustomToolBoxbarsImp::DlgCustomToolBoxbarsImp( QWidget* parent )
DlgCustomToolBoxbarsImp::DlgCustomToolBoxbarsImp(QWidget* parent)
: DlgCustomToolbars(DlgCustomToolbars::Toolboxbar, parent)
{
setWindowTitle( tr( "Toolbox bars" ) );
setWindowTitle(tr("Toolbox bars"));
}
/** Destroys the object and frees any allocated resources */
DlgCustomToolBoxbarsImp::~DlgCustomToolBoxbarsImp() = default;
void DlgCustomToolBoxbarsImp::changeEvent(QEvent *e)
void DlgCustomToolBoxbarsImp::changeEvent(QEvent* e)
{
if (e->type() == QEvent::LanguageChange) {
setWindowTitle( tr( "Toolbox bars" ) );
setWindowTitle(tr("Toolbox bars"));
}
DlgCustomToolbars::changeEvent(e);
}