PeriDyno 1.2.1
Loading...
Searching...
No Matches
dyno::mDrawLabel Class Reference

#include <QComponent.h>

Inheritance diagram for dyno::mDrawLabel:
Collaboration diagram for dyno::mDrawLabel:

Classes

struct  Coord0_1
 
struct  EndPoint
 
struct  MyCoord
 

Public Types

enum  Dir { x = 0 , y = 1 }
 
enum  Interpolation { Linear = 0 , Bezier = 1 }
 
enum  BorderMode { Open = 0 , Close = 1 }
 

Public Slots

void setCurveClose ()
 
void setLinearResample (int s)
 
void setSpacingToDrawLabel (double value, int id)
 

Public Member Functions

 mDrawLabel ()
 
 ~mDrawLabel ()
 
virtual void updateDataToField ()
 
void updateLabelShape (bool squard)
 

Public Attributes

bool useBezier = false
 
bool useSort = true
 
bool lockSize = false
 
bool curveClose = false
 
bool LineResample = false
 
double spacing = 10
 

Protected Member Functions

void copyFromField (std::vector< Canvas::Coord2D > coord01, std::vector< MyCoord > &thisArray)
 
void copyFromField (std::vector< Canvas::OriginalCoord > coord01, std::vector< MyCoord > &thisArray)
 
void initializeLine (Dir mode)
 
void setLabelSize (int minX, int minY, int maxX, int maxY)
 
void reSort (std::vector< MyCoord > &vector1)
 
MyCoord ZeroOneToCoord (Coord0_1 &value, int x0, int x1, int y0, int y1)
 
void deletePoint ()
 
virtual int addPointtoEnd ()
 
void insertHandlePoint (int fp, MyCoord pCoord)
 
void buildBezierPoint ()
 
int insertCurvePoint (MyCoord pCoord)
 
void buildCoordToResortMap ()
 
void keyReleaseEvent (QKeyEvent *event)
 
void insertElementToHandlePointSet (int i)
 
void buildHandlePointSet ()
 
Coord0_1 CoordTo0_1Value (MyCoord &coord)
 
void leaveEvent (QEvent *event)
 
void remapArrayToHeight (std::vector< MyCoord > &Array, int h)
 
void updateFloatCoordArray (std::vector< MyCoord > CoordArray, std::vector< Coord0_1 > &myfloatCoord)
 
void keyPressEvent (QKeyEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 

Static Protected Member Functions

static bool sortx (MyCoord a, MyCoord b)
 
static bool sorty (MyCoord a, MyCoord b)
 

Protected Attributes

int w = 380
 
int h = 100
 
int selectDistance = 10
 
int HandleAngleThreshold = 20
 
int radius = 4
 
float mIniHandleLength = 15
 
Dir mMode = x
 
Interpolation InterpMode = Linear
 
int maxX = 0
 
int maxY = 0
 
int minX = 0
 
int minY = 0
 
bool mGeneratorXmin = 1
 
bool mGeneratorXmax = 1
 
bool mGeneratorYmin = 1
 
bool mGeneratorYmax = 1
 
int mMinIndex = 0
 
int mMaxIndex = 0
 
bool mAltKey = false
 
bool mCtrlKey = false
 
bool mShiftKey = false
 
int mHoverPoint = -1
 
int mSelectHandlePoint = -1
 
int mSelectPointID = -1
 
bool mIsSelect = false
 
bool mIsHandleSelect = false
 
int mHandleParent = -1
 
int mSelectPointInResort = -1
 
bool mIsHover = false
 
int mConnectHandlePoint = -1
 
float mConnectLength
 
bool mForceUpdate = false
 
bool mInsertBezierOpenPoint = false
 
bool mHandleConnection = true
 
bool mInsertAtBegin = false
 
MyCoord mInitPosition
 
MyCoord mDtPosition
 
MyCoord mInitHandlePos
 
MyCoord mPressCoord
 
std::vector< MyCoordmCoordArray
 
std::vector< MyCoordmReSortCoordArray
 
std::vector< MyCoordmHandlePoints
 
std::vector< Coord0_1mFloatCoord
 
std::vector< Coord0_1mHandleFloatCoord
 
std::vector< MyCoordmCurvePoint
 
std::vector< int > mMultiSelectID
 
std::map< int, float > mCurvePointMapLength
 
std::map< float, EndPointmLengthMapEndPoint
 
std::map< int, int > mMapOriginalIDtoResortID
 
std::map< int, int > mMapResortIDtoOriginalID
 
QPainterPath mPath
 

Detailed Description

Definition at line 153 of file QComponent.h.

Member Enumeration Documentation

◆ BorderMode

Enumerator
Open 
Close 

Definition at line 241 of file QComponent.h.

◆ Dir

Enumerator

Definition at line 230 of file QComponent.h.

◆ Interpolation

Enumerator
Linear 
Bezier 

Definition at line 235 of file QComponent.h.

Constructor & Destructor Documentation

◆ mDrawLabel()

dyno::mDrawLabel::mDrawLabel ( )
inline

Definition at line 250 of file QComponent.h.

◆ ~mDrawLabel()

dyno::mDrawLabel::~mDrawLabel ( )
inline

Definition at line 252 of file QComponent.h.

Member Function Documentation

◆ addPointtoEnd()

virtual int dyno::mDrawLabel::addPointtoEnd ( )
inlineprotectedvirtual

Reimplemented in dyno::QCurveLabel, and dyno::QDrawLabel.

Definition at line 440 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildBezierPoint()

void dyno::mDrawLabel::buildBezierPoint ( )
inlineprotected

Definition at line 536 of file QComponent.h.

Here is the caller graph for this function:

◆ buildCoordToResortMap()

void dyno::mDrawLabel::buildCoordToResortMap ( )
inlineprotected

Definition at line 665 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildHandlePointSet()

void dyno::mDrawLabel::buildHandlePointSet ( )
inlineprotected

Definition at line 755 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CoordTo0_1Value()

Coord0_1 dyno::mDrawLabel::CoordTo0_1Value ( MyCoord & coord)
inlineprotected

Definition at line 763 of file QComponent.h.

Here is the caller graph for this function:

◆ copyFromField() [1/2]

void dyno::mDrawLabel::copyFromField ( std::vector< Canvas::Coord2D > coord01,
std::vector< MyCoord > & thisArray )
inlineprotected

Definition at line 323 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyFromField() [2/2]

void dyno::mDrawLabel::copyFromField ( std::vector< Canvas::OriginalCoord > coord01,
std::vector< MyCoord > & thisArray )
inlineprotected

Definition at line 335 of file QComponent.h.

Here is the call graph for this function:

◆ deletePoint()

void dyno::mDrawLabel::deletePoint ( )
inlineprotected

Definition at line 397 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeLine()

void dyno::mDrawLabel::initializeLine ( Dir mode)
inlineprotected

Definition at line 348 of file QComponent.h.

Here is the caller graph for this function:

◆ insertCurvePoint()

int dyno::mDrawLabel::insertCurvePoint ( MyCoord pCoord)
inlineprotected

Definition at line 566 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertElementToHandlePointSet()

void dyno::mDrawLabel::insertElementToHandlePointSet ( int i)
inlineprotected

Definition at line 708 of file QComponent.h.

Here is the caller graph for this function:

◆ insertHandlePoint()

void dyno::mDrawLabel::insertHandlePoint ( int fp,
MyCoord pCoord )
inlineprotected

Definition at line 505 of file QComponent.h.

Here is the caller graph for this function:

◆ keyPressEvent()

void dyno::mDrawLabel::keyPressEvent ( QKeyEvent * event)
inlineprotected

Definition at line 811 of file QComponent.h.

◆ keyReleaseEvent()

void dyno::mDrawLabel::keyReleaseEvent ( QKeyEvent * event)
inlineprotected

Definition at line 685 of file QComponent.h.

◆ leaveEvent()

void dyno::mDrawLabel::leaveEvent ( QEvent * event)
inlineprotected

Definition at line 781 of file QComponent.h.

◆ mouseReleaseEvent()

void dyno::mDrawLabel::mouseReleaseEvent ( QMouseEvent * event)
inlineprotected

Definition at line 833 of file QComponent.h.

Here is the call graph for this function:

◆ remapArrayToHeight()

void dyno::mDrawLabel::remapArrayToHeight ( std::vector< MyCoord > & Array,
int h )
inlineprotected

Definition at line 788 of file QComponent.h.

Here is the caller graph for this function:

◆ reSort()

void dyno::mDrawLabel::reSort ( std::vector< MyCoord > & vector1)
inlineprotected

Definition at line 372 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCurveClose

void dyno::mDrawLabel::setCurveClose ( )
inlineslot

Definition at line 297 of file QComponent.h.

Here is the caller graph for this function:

◆ setLabelSize()

void dyno::mDrawLabel::setLabelSize ( int minX,
int minY,
int maxX,
int maxY )
inlineprotected

Definition at line 366 of file QComponent.h.

Here is the caller graph for this function:

◆ setLinearResample

void dyno::mDrawLabel::setLinearResample ( int s)
inlineslot

Definition at line 305 of file QComponent.h.

◆ setSpacingToDrawLabel

void dyno::mDrawLabel::setSpacingToDrawLabel ( double value,
int id )
inlineslot

Definition at line 312 of file QComponent.h.

◆ sortx()

static bool dyno::mDrawLabel::sortx ( MyCoord a,
MyCoord b )
inlinestaticprotected

Definition at line 654 of file QComponent.h.

Here is the caller graph for this function:

◆ sorty()

static bool dyno::mDrawLabel::sorty ( MyCoord a,
MyCoord b )
inlinestaticprotected

Definition at line 659 of file QComponent.h.

Here is the caller graph for this function:

◆ updateDataToField()

virtual void dyno::mDrawLabel::updateDataToField ( )
inlinevirtual

Reimplemented in dyno::QCurveLabel, and dyno::QDrawLabel.

Definition at line 271 of file QComponent.h.

Here is the caller graph for this function:

◆ updateFloatCoordArray()

void dyno::mDrawLabel::updateFloatCoordArray ( std::vector< MyCoord > CoordArray,
std::vector< Coord0_1 > & myfloatCoord )
inlineprotected

Definition at line 802 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateLabelShape()

void dyno::mDrawLabel::updateLabelShape ( bool squard)
inline

Definition at line 273 of file QComponent.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZeroOneToCoord()

MyCoord dyno::mDrawLabel::ZeroOneToCoord ( Coord0_1 & value,
int x0,
int x1,
int y0,
int y1 )
inlineprotected

Definition at line 388 of file QComponent.h.

Here is the caller graph for this function:

Member Data Documentation

◆ curveClose

bool dyno::mDrawLabel::curveClose = false

Definition at line 856 of file QComponent.h.

◆ h

int dyno::mDrawLabel::h = 100
protected

Definition at line 865 of file QComponent.h.

◆ HandleAngleThreshold

int dyno::mDrawLabel::HandleAngleThreshold = 20
protected

Definition at line 868 of file QComponent.h.

◆ InterpMode

Interpolation dyno::mDrawLabel::InterpMode = Linear
protected

Definition at line 873 of file QComponent.h.

◆ LineResample

bool dyno::mDrawLabel::LineResample = false

Definition at line 857 of file QComponent.h.

◆ lockSize

bool dyno::mDrawLabel::lockSize = false

Definition at line 855 of file QComponent.h.

◆ mAltKey

bool dyno::mDrawLabel::mAltKey = false
protected

Definition at line 891 of file QComponent.h.

◆ maxX

int dyno::mDrawLabel::maxX = 0
protected

Definition at line 876 of file QComponent.h.

◆ maxY

int dyno::mDrawLabel::maxY = 0
protected

Definition at line 877 of file QComponent.h.

◆ mConnectHandlePoint

int dyno::mDrawLabel::mConnectHandlePoint = -1
protected

Definition at line 904 of file QComponent.h.

◆ mConnectLength

float dyno::mDrawLabel::mConnectLength
protected

Definition at line 905 of file QComponent.h.

◆ mCoordArray

std::vector<MyCoord> dyno::mDrawLabel::mCoordArray
protected

Definition at line 919 of file QComponent.h.

◆ mCtrlKey

bool dyno::mDrawLabel::mCtrlKey = false
protected

Definition at line 892 of file QComponent.h.

◆ mCurvePoint

std::vector<MyCoord> dyno::mDrawLabel::mCurvePoint
protected

Definition at line 924 of file QComponent.h.

◆ mCurvePointMapLength

std::map<int, float> dyno::mDrawLabel::mCurvePointMapLength
protected

Definition at line 928 of file QComponent.h.

◆ mDtPosition

MyCoord dyno::mDrawLabel::mDtPosition
protected

Definition at line 913 of file QComponent.h.

◆ mFloatCoord

std::vector<Coord0_1> dyno::mDrawLabel::mFloatCoord
protected

Definition at line 922 of file QComponent.h.

◆ mForceUpdate

bool dyno::mDrawLabel::mForceUpdate = false
protected

Definition at line 906 of file QComponent.h.

◆ mGeneratorXmax

bool dyno::mDrawLabel::mGeneratorXmax = 1
protected

Definition at line 882 of file QComponent.h.

◆ mGeneratorXmin

bool dyno::mDrawLabel::mGeneratorXmin = 1
protected

Definition at line 881 of file QComponent.h.

◆ mGeneratorYmax

bool dyno::mDrawLabel::mGeneratorYmax = 1
protected

Definition at line 884 of file QComponent.h.

◆ mGeneratorYmin

bool dyno::mDrawLabel::mGeneratorYmin = 1
protected

Definition at line 883 of file QComponent.h.

◆ mHandleConnection

bool dyno::mDrawLabel::mHandleConnection = true
protected

Definition at line 908 of file QComponent.h.

◆ mHandleFloatCoord

std::vector<Coord0_1> dyno::mDrawLabel::mHandleFloatCoord
protected

Definition at line 923 of file QComponent.h.

◆ mHandleParent

int dyno::mDrawLabel::mHandleParent = -1
protected

Definition at line 901 of file QComponent.h.

◆ mHandlePoints

std::vector<MyCoord> dyno::mDrawLabel::mHandlePoints
protected

Definition at line 921 of file QComponent.h.

◆ mHoverPoint

int dyno::mDrawLabel::mHoverPoint = -1
protected

Definition at line 896 of file QComponent.h.

◆ mIniHandleLength

float dyno::mDrawLabel::mIniHandleLength = 15
protected

Definition at line 870 of file QComponent.h.

◆ mInitHandlePos

MyCoord dyno::mDrawLabel::mInitHandlePos
protected

Definition at line 914 of file QComponent.h.

◆ mInitPosition

MyCoord dyno::mDrawLabel::mInitPosition
protected

Definition at line 912 of file QComponent.h.

◆ mInsertAtBegin

bool dyno::mDrawLabel::mInsertAtBegin = false
protected

Definition at line 909 of file QComponent.h.

◆ mInsertBezierOpenPoint

bool dyno::mDrawLabel::mInsertBezierOpenPoint = false
protected

Definition at line 907 of file QComponent.h.

◆ minX

int dyno::mDrawLabel::minX = 0
protected

Definition at line 878 of file QComponent.h.

◆ minY

int dyno::mDrawLabel::minY = 0
protected

Definition at line 879 of file QComponent.h.

◆ mIsHandleSelect

bool dyno::mDrawLabel::mIsHandleSelect = false
protected

Definition at line 900 of file QComponent.h.

◆ mIsHover

bool dyno::mDrawLabel::mIsHover = false
protected

Definition at line 903 of file QComponent.h.

◆ mIsSelect

bool dyno::mDrawLabel::mIsSelect = false
protected

Definition at line 899 of file QComponent.h.

◆ mLengthMapEndPoint

std::map<float, EndPoint> dyno::mDrawLabel::mLengthMapEndPoint
protected

Definition at line 929 of file QComponent.h.

◆ mMapOriginalIDtoResortID

std::map<int, int> dyno::mDrawLabel::mMapOriginalIDtoResortID
protected

Definition at line 930 of file QComponent.h.

◆ mMapResortIDtoOriginalID

std::map<int, int> dyno::mDrawLabel::mMapResortIDtoOriginalID
protected

Definition at line 931 of file QComponent.h.

◆ mMaxIndex

int dyno::mDrawLabel::mMaxIndex = 0
protected

Definition at line 888 of file QComponent.h.

◆ mMinIndex

int dyno::mDrawLabel::mMinIndex = 0
protected

Definition at line 887 of file QComponent.h.

◆ mMode

Dir dyno::mDrawLabel::mMode = x
protected

Definition at line 872 of file QComponent.h.

◆ mMultiSelectID

std::vector<int> dyno::mDrawLabel::mMultiSelectID
protected

Definition at line 925 of file QComponent.h.

◆ mPath

QPainterPath dyno::mDrawLabel::mPath
protected

Definition at line 934 of file QComponent.h.

◆ mPressCoord

MyCoord dyno::mDrawLabel::mPressCoord
protected

Definition at line 915 of file QComponent.h.

◆ mReSortCoordArray

std::vector<MyCoord> dyno::mDrawLabel::mReSortCoordArray
protected

Definition at line 920 of file QComponent.h.

◆ mSelectHandlePoint

int dyno::mDrawLabel::mSelectHandlePoint = -1
protected

Definition at line 897 of file QComponent.h.

◆ mSelectPointID

int dyno::mDrawLabel::mSelectPointID = -1
protected

Definition at line 898 of file QComponent.h.

◆ mSelectPointInResort

int dyno::mDrawLabel::mSelectPointInResort = -1
protected

Definition at line 902 of file QComponent.h.

◆ mShiftKey

bool dyno::mDrawLabel::mShiftKey = false
protected

Definition at line 893 of file QComponent.h.

◆ radius

int dyno::mDrawLabel::radius = 4
protected

Definition at line 869 of file QComponent.h.

◆ selectDistance

int dyno::mDrawLabel::selectDistance = 10
protected

Definition at line 867 of file QComponent.h.

◆ spacing

double dyno::mDrawLabel::spacing = 10

Definition at line 859 of file QComponent.h.

◆ useBezier

bool dyno::mDrawLabel::useBezier = false

Definition at line 852 of file QComponent.h.

◆ useSort

bool dyno::mDrawLabel::useSort = true

Definition at line 854 of file QComponent.h.

◆ w

int dyno::mDrawLabel::w = 380
protected

Definition at line 864 of file QComponent.h.


The documentation for this class was generated from the following file: