/*! \brief Creates a ToolAction and sends it. * */ void TrackEditorTool::sendToolAction() { TrackEditorToolAction *action = new TrackEditorToolAction(toolId_, currentPrototypes_, currentRoadSystemPrototype_); emit toolAction(action); delete action; }
/*! */ void MapTool::deleteMap() { MapToolAction *action = new MapToolAction(MapTool::TMA_DELETE); emit toolAction(action); delete action; }
/*! \brief Gets called when the radius has been changed. * * Sends a ToolAction with the current ToolId and Radius. */ void CrossfallEditorTool::setRadius() { CrossfallEditorToolAction *action = new CrossfallEditorToolAction(ODD::TCF_SELECT, radiusEdit_->value()); emit toolAction(action); delete action; }
/*! \brief Gets called when this widget (tab) has been activated. * * Sends a ToolAction with the current ToolId and Radius. */ void CrossfallEditorTool::activateEditor() { CrossfallEditorToolAction *action = new CrossfallEditorToolAction(toolId_, radiusEdit_->value()); emit toolAction(action); delete action; }
/*! \brief Gets called when a tool button has been selected. * */ void JunctionEditorTool::cuttingCircle(bool active) { JunctionEditorToolAction *action = new JunctionEditorToolAction(ODD::TJE_CIRCLE, thresholdEdit_->value(), active); emit toolAction(action); delete action; }
/*! */ void MapTool::loadMap() { MapToolAction *action = new MapToolAction(MapTool::TMA_LOAD); emit toolAction(action); delete action; }
/*! \brief. */ void MapTool::setOpacity(const QString &opacity) { MapToolAction *action = new MapToolAction(opacity); emit toolAction(action); delete action; }
/*! Resends a toolAction with the last EditorId and ToolId. */ void ToolManager::resendCurrentTool() { if (lastToolAction_) { emit(toolAction(lastToolAction_)); } }
void ToolManager::toolActionSlot(ToolAction *action) { if (action->getEditorId() != ODD::ENO_EDITOR && action->getToolId() != ODD::TNO_TOOL) { lastToolAction_ = new ToolAction(action->getEditorId(), action->getToolId()); } emit(toolAction(action)); }
/*! \brief Gets called when this widget (tab) has been activated. * */ void JunctionEditorTool::activateEditor() { // Send // // JunctionEditorToolAction *action = new JunctionEditorToolAction(ODD::TJE_THRESHOLD, thresholdEdit_->value()); emit toolAction(action); delete action; }
/*! \brief Gets called when a tool has been selected. */ void JunctionEditorTool::setThreshold() { // Set a tool // // JunctionEditorToolAction *action = new JunctionEditorToolAction(ODD::TJE_THRESHOLD, thresholdEdit_->value()); emit toolAction(action); delete action; }
/*! \brief Gets called when a tool has been selected. * * Sends a ToolAction with the current ToolId and Radius. */ void CrossfallEditorTool::handleToolClick(int id) { toolId_ = (ODD::ToolId)id; // Set a tool // // CrossfallEditorToolAction *action = new CrossfallEditorToolAction(toolId_, radiusEdit_->value()); emit toolAction(action); delete action; }
/*! \brief Gets called when a tool button has been selected. * */ void JunctionEditorTool::handleToolClick(int id) { toolId_ = (ODD::ToolId)id; // Set a tool // // JunctionEditorToolAction *action = new JunctionEditorToolAction(toolId_, thresholdEdit_->value()); emit toolAction(action); delete action; }
/*! */ void MapTool::lockMap(bool lock) { /* opacityComboBox_->setEnabled(!lock && active_); loadMapAction_->setEnabled(!lock && active_); deleteMapAction_->setEnabled(!lock && active_);*/ // widthLineEdit_->setEnabled(!lock && active_); // heightLineEdit_->setEnabled(!lock && active_); // x and y? MapToolAction *action = new MapToolAction(MapTool::TMA_LOCK); action->setToggled(lock); emit toolAction(action); delete action; }