WHAT I HAVE TRIED:
- I found CADNavigationStyle.cpp in the Source code and tried modifying the button arrangement.
- Designated a toggle in the Command.cpp and Workspace.cpp
- Created a new Navigation style file that I would like activated when the toggle is selected
Code: Select all
DEF_STD_CMD_AC(StdPanTool)
StdPanTool::StdPanTool()
: Command("Std_PanTool")
{
sGroup = QT_TR_NOOP("View");
sMenuText = QT_TR_NOOP("Pan");
sToolTipText = QT_TR_NOOP("Panning tool");
sWhatsThis = "Std_PanTool";
sStatusTip = QT_TR_NOOP("Pan across canvas");
eType = 0;
}
Action* StdPanTool::createAction(void)
{
Action* pcAction = Command::createAction();
pcAction->setCheckable(true);
pcAction->setChecked(true);
return pcAction;
}
void StdPanTool::activated(int iMsg)
{
PanNavigationStyle::init();
bool StdPanTool::isActive()
{
static bool checked = false;
if (!checked) {
Action* act = this->getAction();
if (act) {
act->setChecked(getMainWindow()->statusBar()->isVisible());
checked = true;
}
}
return true;
}
What I would like to know is how I can activate a certain navigation style when the command toggle is selected.
I am compiling with Visual Studio 2019 and LibPack 12.1.4
Thank you.