Пример #1
0
/*! \brief Creates a ToolAction and sends it.
*
*/
void
TrackEditorTool::sendToolAction()
{
    TrackEditorToolAction *action = new TrackEditorToolAction(toolId_, currentPrototypes_, currentRoadSystemPrototype_);
    emit toolAction(action);
    delete action;
}
Пример #2
0
/*!
*/
void
MapTool::deleteMap()
{
    MapToolAction *action = new MapToolAction(MapTool::TMA_DELETE);
    emit toolAction(action);
    delete action;
}
Пример #3
0
/*! \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;
}
Пример #4
0
/*! \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;
}
Пример #5
0
/*! \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;
}
Пример #6
0
/*!
*/
void
MapTool::loadMap()
{
    MapToolAction *action = new MapToolAction(MapTool::TMA_LOAD);
    emit toolAction(action);
    delete action;
}
Пример #7
0
/*! \brief.
*/
void
MapTool::setOpacity(const QString &opacity)
{
    MapToolAction *action = new MapToolAction(opacity);
    emit toolAction(action);
    delete action;
}
Пример #8
0
/*! Resends a toolAction with the last EditorId and ToolId.
*/
void
ToolManager::resendCurrentTool()
{
    if (lastToolAction_)
    {
        emit(toolAction(lastToolAction_));
    }
}
Пример #9
0
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));
}
Пример #10
0
/*! \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;
}
Пример #11
0
/*! \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;
}
Пример #12
0
/*! \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;
}
Пример #13
0
/*! \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;
}
Пример #14
0
/*!
*/
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;
}