Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CPanelLogicsDrawingArea.cpp File Reference
#include "CPanelLogicsDrawingArea.hpp"
#include "core/strings.hpp"
#include "diamar/Application.hpp"
#include "diamar/CDataAppEditDiamar.hpp"
#include "logic/components/CLogicsBackground.hpp"
#include "logic/components/CLogicsComponentChannel.hpp"
#include "logic/components/CLogicsComponentLibrary.hpp"
#include "math/CGeometry.hpp"
#include "math/utils.hpp"
#include "ui/graphics/AbstractRcpDrawGooCanvas.hpp"
#include "ui/gui/CDialog.hpp"
#include "ui/gui/CEditNum.hpp"
#include "ui/gui/CEventCanvasButton.hpp"
#include "ui/gui/CEventCanvasKey.hpp"
#include "ui/gui/CFrameBin.hpp"
#include "ui/gui/CLayoutGrid.hpp"
#include "ui/gui/CLayoutVertical.hpp"
#include "ui/gui/CScrolledWindow.hpp"
#include "ui/gui/IListenerButtonPress.hpp"
#include "ui/gui/IListenerCanvasItemClick.hpp"
#include "ui/gui/IListenerCanvasItemEnter.hpp"
#include "ui/gui/IListenerCanvasItemLeave.hpp"
#include "ui/gui/IListenerCanvasItemMove.hpp"
#include "ui/gui/IListenerKeyPress.hpp"
#include "ui/gui/resources.h"
#include "ui/panels/editor/channels/PanelChannelsEditorFactory.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditBlockParams.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditConstantState.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditLibraryParams.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditOrderOfExecution.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditPropertiesLabel.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditPropertiesLibraryIOBlock.hpp"
#include "ui/panels/editor/logic/CPanelLogicsEditSelectedChannel.hpp"
#include "ui/panels/editor/logic/PanelLogicsEditBroadCastChannel.hpp"
#include "ui/panels/editor/main/CPanelLogicsEditor.hpp"
#include "ui/shapes/CDrawLogicsElements.hpp"
#include "utils/stringUtils.hpp"
#include <map>
#include <memory>
#include <tuple>
#include <vector>
Include dependency graph for CPanelLogicsDrawingArea.cpp:

Classes

class  PrepareLogicComponent::CPrvListenerCanvasComponentClick
 
class  PrepareLogicComponent::CPrvListenerCanvasComponentMove
 
class  PrepareLogicComponent::CPrvDrawLogicsComponent
 
class  PrepareLogicText::CPrvDrawLogicsText
 
class  PrepareLogicRectangle::CPrvDrawLogicsRectangle
 
class  PrepareLogicConnectionPoint::CPrvListenerCanvasConnectionPointClick
 
class  PrepareLogicConnectionPoint::CPrvListenerCanvasConnectionPointEnter
 
class  PrepareLogicConnectionPoint::CPrvListenerCanvasConnectionPointLeave
 
class  PrepareLogicConnectionPoint::CPrvDrawLogicsConnectionPoint
 
class  PrepareLogicBackground::CPrvListenerBackgroundItemClick
 
class  PrepareLogicBackground::CPrvDrawBackground
 
class  PrepareLogicConnection::CPrvListenerCanvasConnectionClick
 
class  PrepareLogicConnection::CPrvDrawLogicsConnection
 
class  CanvasListeners::CPrvListenerCanvasButtonPress
 
class  CanvasListeners::CPrvListenerCanvasKeyPress
 

Namespaces

namespace  PrepareLogicComponent
 
namespace  PrepareLogicText
 
namespace  PrepareLogicRectangle
 
namespace  PrepareLogicConnectionPoint
 
namespace  PrepareLogicBackground
 
namespace  PrepareLogicConnection
 
namespace  CanvasListeners
 

Functions

static void prvAssertValidateLCR (const SPrvLogicComponentRefs &sLCR)
 
static void prvEraseRcpDrawGooCanvas (IGraphics *graphics, const std::shared_ptr< CLogicsDrawingAreaModel > &logicDrawingAreaModel, AbstractCanvasItem::TId id)
 
static void prvElementRightClick (AbstractCanvasItem::TId itemId, const SPrvLogicComponentRefs &sLCR, const iv::math::geometry::Point2d &clickedPoint)
 
static void prvElementDoubleClick (AbstractCanvasItem::TId itemId, const SPrvLogicComponentRefs &sLCR)
 
static void prvComponentOrConnectionLeftClick (const CEventCanvasButton *evtCanvasButton, AbstractCanvasItem::TId itemId, SPrvLogicComponentRefs &sLCR)
 
static bool prvEditSelectedChannelComponent (const std::shared_ptr< CLogicsComponentChannel > &logicsComponentChannel, std::optional< iv::types::unitId > defaultUnitId, const std::weak_ptr< CLogicsDrawingAreaModel > &logicDrawingAreaModel, CDialog *dlgFather)
 
static bool prvEditSelectedLibraryIOParamComponent (const std::shared_ptr< CLogicsComponentLibraryInOutBlock > &logicsComponentLibraryIoBlock, CDialog *dlgFather)
 
static void prvComponentMove (const CEventCanvasButton *evtCanvasButton, AbstractCanvasItem::TId itemId, const SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicComponent::prvAddListenersLogicsComponent (const std::shared_ptr< AbstractLogicsElement > &newLE, AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicComponent::prvAddRcpDrawLogicsComponent (AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicComponent::prvPrepareToDrawLogicsComponent (const std::shared_ptr< AbstractLogicsElement > &lE, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicText::prvAddListenersLogicsText (const std::shared_ptr< AbstractLogicsElement > &newLE, AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicText::prvAddRcpDrawLogicsText (AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicText::prvPrepareToDrawLogicsText (const std::shared_ptr< AbstractLogicsElement > &lE, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicRectangle::prvAddListenersLogicsRectangle (const std::shared_ptr< AbstractLogicsElement > &newLE, AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicRectangle::prvAddRcpDrawLogicsRectangle (AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicRectangle::prvPrepareToDrawLogicsRectangle (const std::shared_ptr< AbstractLogicsElement > &lE, SPrvLogicComponentRefs &sLCR)
 
static CLogicsAllowed::TMapDBBlockParamNStr PrepareLogicConnectionPoint::buildOthersComponentParamDesc (const CLogicsConnectionPoint &linkedCP)
 
static void PrepareLogicConnectionPoint::prvAddLogicsConnection (AbstractCanvasItem::TId itemId, const SPrvLogicComponentRefs &sLCR)
 
static std::optional< iv::types::errorMessagePrepareLogicConnectionPoint::prvCanAddOthersComponent (const std::shared_ptr< CLogicsComponent > &addingComponent, AbstractCanvasItem::TId linkedConnectionPointId, const SPrvLogicComponentRefs &sLCR, bool displayPanelConfiguration)
 
static AbstractCanvasItem::TId PrepareLogicConnectionPoint::prvAddOthersComponent (const iv::types::logic::ComponentType &componentType, AbstractCanvasItem::TId linkedConnectionPointId, SPrvLogicComponentRefs &sLCR, bool displayPanelConfiguration)
 
static void PrepareLogicConnectionPoint::prvSetLabel (AbstractCanvasItem::TId newLcId, const SPrvLogicComponentRefs &sLCR, std::optional< std::string > newLabelName=std::nullopt)
 
static void PrepareLogicConnectionPoint::prvSetLibraryIOBlock (AbstractCanvasItem::TId newLcId, const SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicConnectionPoint::prvAddListenersLogicsConnectionPoint (const std::shared_ptr< AbstractLogicsElement > &newCP, AbstractCanvasItem::TId newCPId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicConnectionPoint::prvAddRcpDrawLogicsConnectionPoint (AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicConnectionPoint::prvPrepareToDrawLogicsConnectionPoint (const std::shared_ptr< AbstractLogicsElement > &lE, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicBackground::prvAddListenersLogicsBackground (const std::shared_ptr< AbstractLogicsElement > &newLE, AbstractCanvasItem::TId newLEId, const SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicBackground::prvAddRcpDrawLogicsBackground (AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicBackground::prvPrepareToDrawBackgroundItem (const std::shared_ptr< AbstractLogicsElement > &lE, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicConnection::prvAddListenersLogicsConnection (const std::shared_ptr< AbstractLogicsElement > &newLE, AbstractCanvasItem::TId newLEId, const SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicConnection::prvAddRcpDrawLogicsConnection (AbstractCanvasItem::TId newLEId, SPrvLogicComponentRefs &sLCR)
 
static void PrepareLogicConnection::prvPrepareToDrawLogicsConnection (const std::shared_ptr< AbstractLogicsElement > &lE, SPrvLogicComponentRefs &sLCR)
 
static void prvAddNewLogicsConnectionPoints (const std::shared_ptr< AbstractLogicsElement > &newLE, const CLogicsAllowed::TMapDBBlockParamNStr &mapBlockParamsDesc, SPrvLogicComponentRefs &sLCR)
 

Function Documentation

◆ prvAddNewLogicsConnectionPoints()

static void prvAddNewLogicsConnectionPoints ( const std::shared_ptr< AbstractLogicsElement > & newLE,
const CLogicsAllowed::TMapDBBlockParamNStr & mapBlockParamsDesc,
SPrvLogicComponentRefs & sLCR )
static

◆ prvAssertValidateLCR()

static void prvAssertValidateLCR ( const SPrvLogicComponentRefs & sLCR)
static

◆ prvComponentMove()

static void prvComponentMove ( const CEventCanvasButton * evtCanvasButton,
AbstractCanvasItem::TId itemId,
const SPrvLogicComponentRefs & sLCR )
static

◆ prvComponentOrConnectionLeftClick()

static void prvComponentOrConnectionLeftClick ( const CEventCanvasButton * evtCanvasButton,
AbstractCanvasItem::TId itemId,
SPrvLogicComponentRefs & sLCR )
static

◆ prvEditSelectedChannelComponent()

static bool prvEditSelectedChannelComponent ( const std::shared_ptr< CLogicsComponentChannel > & logicsComponentChannel,
std::optional< iv::types::unitId > defaultUnitId,
const std::weak_ptr< CLogicsDrawingAreaModel > & logicDrawingAreaModel,
CDialog * dlgFather )
static

◆ prvEditSelectedLibraryIOParamComponent()

static bool prvEditSelectedLibraryIOParamComponent ( const std::shared_ptr< CLogicsComponentLibraryInOutBlock > & logicsComponentLibraryIoBlock,
CDialog * dlgFather )
static

◆ prvElementDoubleClick()

static void prvElementDoubleClick ( AbstractCanvasItem::TId itemId,
const SPrvLogicComponentRefs & sLCR )
static

Runs action associated to double click on an element in the canvas.

◆ prvElementRightClick()

static void prvElementRightClick ( AbstractCanvasItem::TId itemId,
const SPrvLogicComponentRefs & sLCR,
const iv::math::geometry::Point2d & clickedPoint )
static

Shows context menu for different elements in the canvas.

◆ prvEraseRcpDrawGooCanvas()

static void prvEraseRcpDrawGooCanvas ( IGraphics * graphics,
const std::shared_ptr< CLogicsDrawingAreaModel > & logicDrawingAreaModel,
AbstractCanvasItem::TId id )
static