Skip to content

Commit

Permalink
[CORRECTIVE] Updated action button tooltips.
Browse files Browse the repository at this point in the history
  • Loading branch information
teuhom committed Aug 28, 2024
1 parent e21cdd1 commit e86a292
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
44 changes: 20 additions & 24 deletions mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,33 +301,30 @@ void MainWindow::setupActions()
// the action to create a new hierarchical component
actNew_ = new QAction(QIcon(":/icons/common/graphics/file-new.png"), QString(), this);
actNew_->setShortcut(QKeySequence::New);
QString tooltipNew = tr("New (Shortcut: %1)").arg(actNew_->shortcut().toString(QKeySequence::NativeText));
QString tooltipNew = tr("New (%1)").arg(actNew_->shortcut().toString(QKeySequence::NativeText));
actNew_->setToolTip(tooltipNew);
actNew_->setStatusTip(tooltipNew);
connect(actNew_, SIGNAL(triggered()), this, SLOT(createNew()));

actSave_ = new QAction(QIcon(":/icons/common/graphics/file-save.png"), QString(), this);
actSave_->setShortcut(QKeySequence::Save);
QString tooltipSave = tr("Save (Shortcut: %1)").arg(actSave_->shortcut().toString(QKeySequence::NativeText));
QString tooltipSave = tr("Save (%1)").arg(actSave_->shortcut().toString(QKeySequence::NativeText));
actSave_->setToolTip(tooltipSave);
actSave_->setStatusTip(tooltipSave);
actSave_->setEnabled(false);
connect(actSave_, SIGNAL(triggered()), designTabs_, SLOT(saveCurrentDocument()));
connect(designTabs_, SIGNAL(documentModifiedChanged(bool)),
actSave_, SLOT(setEnabled(bool)), Qt::UniqueConnection);

actSaveAs_ = new QAction(QIcon(":/icons/common/graphics/file-save-as.png"), QString(), this);
actSaveAs_->setShortcut(QKeySequence::SaveAs);
QString tooltipSaveAs = tr("Save As (Shortcut: %1)").arg(actSaveAs_->shortcut().toString(QKeySequence::NativeText));
QString tooltipSaveAs = tr("Save As");
actSaveAs_->setToolTip(tooltipSaveAs);
actSaveAs_->setStatusTip(tooltipSaveAs);
actSaveAs_->setEnabled(false);
connect(actSaveAs_, SIGNAL(triggered()), designTabs_, SLOT(saveCurrentDocumentAs()));

actSaveAll_ = new QAction(QIcon(":/icons/common/graphics/file-save_all.png"),
QString(), this);
QString("Save all"), this);
actSaveAll_->setShortcut(QKeySequence("Ctrl+Shift+S"));
QString tooltipSaveAll = tr("Save All (Shortcut: %1)").arg(actSaveAll_->shortcut().toString(QKeySequence::NativeText));
QString tooltipSaveAll = tr("Save All (%1)").arg(actSaveAll_->shortcut().toString(QKeySequence::NativeText));
actSaveAll_->setToolTip(tooltipSaveAll);
actSaveAll_->setStatusTip(tooltipSaveAll);
connect(actSaveAll_, SIGNAL(triggered()), this, SLOT(saveAll()));
Expand All @@ -344,7 +341,7 @@ void MainWindow::setupActions()

actPrint_ = new QAction(QIcon(":/icons/common/graphics/file-print.png"), QString(), this);
actPrint_->setShortcut(QKeySequence::Print);
QString tooltipPrint = tr("Print (Shortcut: %1)").arg(actPrint_->shortcut().toString(QKeySequence::NativeText));
QString tooltipPrint = tr("Print (%1)").arg(actPrint_->shortcut().toString(QKeySequence::NativeText));
actPrint_->setToolTip(tooltipPrint);
actPrint_->setStatusTip(tooltipPrint);
actPrint_->setEnabled(false);
Expand All @@ -356,15 +353,14 @@ void MainWindow::setupActions()

actUndo_ = new QAction(QIcon(":/icons/common/graphics/edit-undo.png"), QString(), this);
actUndo_->setShortcut(QKeySequence::Undo);
QString tooltipUndo = tr("Undo (Shortcut: %1)").arg(actUndo_->shortcut().toString(QKeySequence::NativeText));
QString tooltipUndo = tr("Undo (%1)").arg(actUndo_->shortcut().toString(QKeySequence::NativeText));
actUndo_->setToolTip(tooltipUndo);
actUndo_->setStatusTip(tooltipUndo);
connect(actUndo_, SIGNAL(triggered()), this, SLOT(undo()));

actRedo_ = new QAction(QIcon(":/icons/common/graphics/edit-redo.png"),
QString(), this);
actRedo_ = new QAction(QIcon(":/icons/common/graphics/edit-redo.png"), QString(), this);
actRedo_->setShortcut(QKeySequence::Redo);
QString tooltipRedo = tr("Redo (Shortcut: %1)").arg(actRedo_->shortcut().toString(QKeySequence::NativeText));
QString tooltipRedo = tr("Redo (%1)").arg(actRedo_->shortcut().toString(QKeySequence::NativeText));
actRedo_->setToolTip(tooltipRedo);
actRedo_->setStatusTip(tooltipRedo);
connect(actRedo_, SIGNAL(triggered()), this, SLOT(redo()));
Expand Down Expand Up @@ -414,8 +410,8 @@ void MainWindow::setupActions()
actToolConnect_ = new QAction(QIcon(":/icons/common/graphics/tool-interconnection.png"),
QString(), this);
actToolConnect_->setCheckable(true);
actToolConnect_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Space));
QString tooltipToolConnect = tr("Interconnection Tool (Shortcut: %1)").arg(actToolConnect_->shortcut().toString(QKeySequence::NativeText));
actToolConnect_->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Space));
QString tooltipToolConnect = tr("Interconnection Tool (%1)").arg(actToolConnect_->shortcut().toString(QKeySequence::NativeText));
actToolConnect_->setToolTip(tooltipToolConnect);
actToolConnect_->setStatusTip(tooltipToolConnect);

Expand All @@ -425,23 +421,23 @@ void MainWindow::setupActions()

actToolDraft_ = new QAction(QIcon(":/icons/common/graphics/tool-drafting.png"), QString(), this);
actToolDraft_->setCheckable(true);
actToolDraft_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
QString tooltipToolDraft = tr("Drafting Tool (Shortcut: %1)").arg(actToolDraft_->shortcut().toString(QKeySequence::NativeText));
actToolDraft_->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_D));
QString tooltipToolDraft = tr("Drafting Tool (%1)").arg(actToolDraft_->shortcut().toString(QKeySequence::NativeText));
actToolDraft_->setToolTip(tooltipToolDraft);
actToolDraft_->setStatusTip(tooltipToolDraft);

actToolToggleOffPage_ = new QAction(QIcon(":/icons/common/graphics/tool-toggle_offpage.png"),
QString(), this);
actToolToggleOffPage_->setCheckable(true);
actToolToggleOffPage_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E));
QString tooltipToolToggleOffPage = tr("Toggle Off-Page Tool (Shortcut: %1)").arg(actToolToggleOffPage_->shortcut().toString(QKeySequence::NativeText));
actToolToggleOffPage_->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_E));
QString tooltipToolToggleOffPage = tr("Toggle Off-Page Tool (%1)").arg(actToolToggleOffPage_->shortcut().toString(QKeySequence::NativeText));
actToolToggleOffPage_->setToolTip(tooltipToolToggleOffPage);
actToolToggleOffPage_->setStatusTip(tooltipToolToggleOffPage);

actToolLabel_ = new QAction(QIcon(":/icons/common/graphics/balloon.png"), QString(), this);
actToolLabel_->setCheckable(true);
actToolLabel_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
QString tooltipToolLabel = tr("Sticky Note Tool (Shortcut: %1)").arg(actToolLabel_->shortcut().toString(QKeySequence::NativeText));
actToolLabel_->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q));
QString tooltipToolLabel = tr("Sticky Note Tool (%1)").arg(actToolLabel_->shortcut().toString(QKeySequence::NativeText));
actToolLabel_->setToolTip(tooltipToolLabel);
actToolLabel_->setStatusTip(tooltipToolLabel);

Expand Down Expand Up @@ -570,7 +566,7 @@ void MainWindow::setupActions()

actRefresh_ = new QAction(QIcon(":/icons/common/graphics/refresh.png"), QString(), this);
actRefresh_->setShortcut(QKeySequence("F5"));
QString tooltipRefresh = tr("Refresh (Shortcut: %1)").arg(actRefresh_->shortcut().toString(QKeySequence::NativeText));
QString tooltipRefresh = tr("Refresh (%1)").arg(actRefresh_->shortcut().toString(QKeySequence::NativeText));
actRefresh_->setToolTip(tooltipRefresh);
actRefresh_->setStatusTip(tooltipRefresh);
connect(actRefresh_, SIGNAL(triggered(bool)), designTabs_, SLOT(refreshCurrentDocument()));
Expand All @@ -579,7 +575,7 @@ void MainWindow::setupActions()
actProtect_->setCheckable(true);
actProtect_->setEnabled(false);
actProtect_->setShortcut(QKeySequence("Ctrl+L"));
QString tooltipProtect = tr("Unlocked (Shortcut: %1)").arg(actProtect_->shortcut().toString(QKeySequence::NativeText));
QString tooltipProtect = tr("Unlocked (%1)").arg(actProtect_->shortcut().toString(QKeySequence::NativeText));
actProtect_->setToolTip(tooltipProtect);
actProtect_->setStatusTip(tooltipProtect);
connect(actProtect_, SIGNAL(triggered(bool)), this, SLOT(changeProtection(bool)));
Expand All @@ -595,7 +591,7 @@ void MainWindow::setupActions()
// Initialize the action to open the help window.
actHelp_ = new QAction(QIcon(":/icons/common/graphics/system-help.png"), QString(), this);
actHelp_->setShortcut(QKeySequence::HelpContents);
QString tooltipHelp = tr("Help (Shortcut: %1)").arg(actHelp_->shortcut().toString(QKeySequence::NativeText));
QString tooltipHelp = tr("Help (%1)").arg(actHelp_->shortcut().toString(QKeySequence::NativeText));
actHelp_->setToolTip(tooltipHelp);
actHelp_->setStatusTip(tooltipHelp);
connect(actHelp_, SIGNAL(triggered()), dockHandler_, SLOT(showHelp()), Qt::UniqueConnection);
Expand Down
16 changes: 8 additions & 8 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
#ifndef VERSIONNO__H
#define VERSIONNO__H

#define VERSION_FULL 3.13.542.0
#define VERSION_FULL 3.13.552.0

#define VERSION_BASEYEAR 0
#define VERSION_DATE "2024-08-05"
#define VERSION_TIME "14:21:18"
#define VERSION_DATE "2024-08-28"
#define VERSION_TIME "10:23:02"

#define VERSION_MAJOR 3
#define VERSION_MINOR 13
#define VERSION_BUILDNO 542
#define VERSION_BUILDNO 552
#define VERSION_EXTEND 0

#define VERSION_FILE 3,13,542,0
#define VERSION_PRODUCT 3,13,542,0
#define VERSION_FILESTR "3,13,542,0"
#define VERSION_PRODUCTSTR "3,13,542,0"
#define VERSION_FILE 3,13,552,0
#define VERSION_PRODUCT 3,13,552,0
#define VERSION_FILESTR "3,13,552,0"
#define VERSION_PRODUCTSTR "3,13,552,0"

#endif

0 comments on commit e86a292

Please sign in to comment.