PeriDyno 1.0.0
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 changeLabelSize ()
 
void setLinearResample (int s)
 
void SetValueToDrawLabel (double value, int id)
 
void setSpacingToDrawLabel (double value, int id)
 

Public Member Functions

 mDrawLabel ()
 
 ~mDrawLabel ()
 
virtual void updateDataToField ()
 
Dir setMode (int s)
 
void updateLabelShape ()
 

Public Attributes

bool useBezier = false
 
bool isSquard = 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
 
double NmaxX = 0
 
double NmaxY = 0
 
double NminX = 0
 
double mNewMinY = 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 465 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 561 of file QComponent.h.

Here is the caller graph for this function:

◆ buildCoordToResortMap()

void dyno::mDrawLabel::buildCoordToResortMap ( )
inlineprotected

Definition at line 693 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 783 of file QComponent.h.

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

◆ changeLabelSize

void dyno::mDrawLabel::changeLabelSize ( )
inlineslot

Definition at line 303 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 791 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 348 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 360 of file QComponent.h.

Here is the call graph for this function:

◆ deletePoint()

void dyno::mDrawLabel::deletePoint ( )
inlineprotected

Definition at line 422 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 373 of file QComponent.h.

Here is the caller graph for this function:

◆ insertCurvePoint()

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

Definition at line 591 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 736 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 530 of file QComponent.h.

Here is the caller graph for this function:

◆ keyPressEvent()

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

Definition at line 839 of file QComponent.h.

◆ keyReleaseEvent()

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

Definition at line 713 of file QComponent.h.

◆ leaveEvent()

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

Definition at line 809 of file QComponent.h.

◆ mouseReleaseEvent()

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

Definition at line 861 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 816 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 397 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 391 of file QComponent.h.

Here is the caller graph for this function:

◆ setLinearResample

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

Definition at line 313 of file QComponent.h.

◆ setMode()

Dir dyno::mDrawLabel::setMode ( int s)
inline

Definition at line 272 of file QComponent.h.

Here is the caller graph for this function:

◆ setSpacingToDrawLabel

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

Definition at line 337 of file QComponent.h.

◆ SetValueToDrawLabel

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

Definition at line 320 of file QComponent.h.

◆ sortx()

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

Definition at line 682 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 687 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 830 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 ( )
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 413 of file QComponent.h.

Here is the caller graph for this function:

Member Data Documentation

◆ curveClose

bool dyno::mDrawLabel::curveClose = false

Definition at line 884 of file QComponent.h.

◆ h

int dyno::mDrawLabel::h = 100
protected

Definition at line 893 of file QComponent.h.

◆ HandleAngleThreshold

int dyno::mDrawLabel::HandleAngleThreshold = 20
protected

Definition at line 896 of file QComponent.h.

◆ InterpMode

Interpolation dyno::mDrawLabel::InterpMode = Linear
protected

Definition at line 901 of file QComponent.h.

◆ isSquard

bool dyno::mDrawLabel::isSquard = false

Definition at line 881 of file QComponent.h.

◆ LineResample

bool dyno::mDrawLabel::LineResample = false

Definition at line 885 of file QComponent.h.

◆ lockSize

bool dyno::mDrawLabel::lockSize = false

Definition at line 883 of file QComponent.h.

◆ mAltKey

bool dyno::mDrawLabel::mAltKey = false
protected

Definition at line 922 of file QComponent.h.

◆ maxX

int dyno::mDrawLabel::maxX = 0
protected

Definition at line 904 of file QComponent.h.

◆ maxY

int dyno::mDrawLabel::maxY = 0
protected

Definition at line 905 of file QComponent.h.

◆ mConnectHandlePoint

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

Definition at line 935 of file QComponent.h.

◆ mConnectLength

float dyno::mDrawLabel::mConnectLength
protected

Definition at line 936 of file QComponent.h.

◆ mCoordArray

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

Definition at line 950 of file QComponent.h.

◆ mCtrlKey

bool dyno::mDrawLabel::mCtrlKey = false
protected

Definition at line 923 of file QComponent.h.

◆ mCurvePoint

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

Definition at line 955 of file QComponent.h.

◆ mCurvePointMapLength

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

Definition at line 959 of file QComponent.h.

◆ mDtPosition

MyCoord dyno::mDrawLabel::mDtPosition
protected

Definition at line 944 of file QComponent.h.

◆ mFloatCoord

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

Definition at line 953 of file QComponent.h.

◆ mForceUpdate

bool dyno::mDrawLabel::mForceUpdate = false
protected

Definition at line 937 of file QComponent.h.

◆ mGeneratorXmax

bool dyno::mDrawLabel::mGeneratorXmax = 1
protected

Definition at line 913 of file QComponent.h.

◆ mGeneratorXmin

bool dyno::mDrawLabel::mGeneratorXmin = 1
protected

Definition at line 912 of file QComponent.h.

◆ mGeneratorYmax

bool dyno::mDrawLabel::mGeneratorYmax = 1
protected

Definition at line 915 of file QComponent.h.

◆ mGeneratorYmin

bool dyno::mDrawLabel::mGeneratorYmin = 1
protected

Definition at line 914 of file QComponent.h.

◆ mHandleConnection

bool dyno::mDrawLabel::mHandleConnection = true
protected

Definition at line 939 of file QComponent.h.

◆ mHandleFloatCoord

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

Definition at line 954 of file QComponent.h.

◆ mHandleParent

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

Definition at line 932 of file QComponent.h.

◆ mHandlePoints

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

Definition at line 952 of file QComponent.h.

◆ mHoverPoint

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

Definition at line 927 of file QComponent.h.

◆ mIniHandleLength

float dyno::mDrawLabel::mIniHandleLength = 15
protected

Definition at line 898 of file QComponent.h.

◆ mInitHandlePos

MyCoord dyno::mDrawLabel::mInitHandlePos
protected

Definition at line 945 of file QComponent.h.

◆ mInitPosition

MyCoord dyno::mDrawLabel::mInitPosition
protected

Definition at line 943 of file QComponent.h.

◆ mInsertAtBegin

bool dyno::mDrawLabel::mInsertAtBegin = false
protected

Definition at line 940 of file QComponent.h.

◆ mInsertBezierOpenPoint

bool dyno::mDrawLabel::mInsertBezierOpenPoint = false
protected

Definition at line 938 of file QComponent.h.

◆ minX

int dyno::mDrawLabel::minX = 0
protected

Definition at line 906 of file QComponent.h.

◆ minY

int dyno::mDrawLabel::minY = 0
protected

Definition at line 907 of file QComponent.h.

◆ mIsHandleSelect

bool dyno::mDrawLabel::mIsHandleSelect = false
protected

Definition at line 931 of file QComponent.h.

◆ mIsHover

bool dyno::mDrawLabel::mIsHover = false
protected

Definition at line 934 of file QComponent.h.

◆ mIsSelect

bool dyno::mDrawLabel::mIsSelect = false
protected

Definition at line 930 of file QComponent.h.

◆ mLengthMapEndPoint

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

Definition at line 960 of file QComponent.h.

◆ mMapOriginalIDtoResortID

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

Definition at line 961 of file QComponent.h.

◆ mMapResortIDtoOriginalID

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

Definition at line 962 of file QComponent.h.

◆ mMaxIndex

int dyno::mDrawLabel::mMaxIndex = 0
protected

Definition at line 919 of file QComponent.h.

◆ mMinIndex

int dyno::mDrawLabel::mMinIndex = 0
protected

Definition at line 918 of file QComponent.h.

◆ mMode

Dir dyno::mDrawLabel::mMode = x
protected

Definition at line 900 of file QComponent.h.

◆ mMultiSelectID

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

Definition at line 956 of file QComponent.h.

◆ mNewMinY

double dyno::mDrawLabel::mNewMinY = 0
protected

Definition at line 911 of file QComponent.h.

◆ mPath

QPainterPath dyno::mDrawLabel::mPath
protected

Definition at line 965 of file QComponent.h.

◆ mPressCoord

MyCoord dyno::mDrawLabel::mPressCoord
protected

Definition at line 946 of file QComponent.h.

◆ mReSortCoordArray

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

Definition at line 951 of file QComponent.h.

◆ mSelectHandlePoint

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

Definition at line 928 of file QComponent.h.

◆ mSelectPointID

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

Definition at line 929 of file QComponent.h.

◆ mSelectPointInResort

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

Definition at line 933 of file QComponent.h.

◆ mShiftKey

bool dyno::mDrawLabel::mShiftKey = false
protected

Definition at line 924 of file QComponent.h.

◆ NmaxX

double dyno::mDrawLabel::NmaxX = 0
protected

Definition at line 908 of file QComponent.h.

◆ NmaxY

double dyno::mDrawLabel::NmaxY = 0
protected

Definition at line 909 of file QComponent.h.

◆ NminX

double dyno::mDrawLabel::NminX = 0
protected

Definition at line 910 of file QComponent.h.

◆ radius

int dyno::mDrawLabel::radius = 4
protected

Definition at line 897 of file QComponent.h.

◆ selectDistance

int dyno::mDrawLabel::selectDistance = 10
protected

Definition at line 895 of file QComponent.h.

◆ spacing

double dyno::mDrawLabel::spacing = 10

Definition at line 887 of file QComponent.h.

◆ useBezier

bool dyno::mDrawLabel::useBezier = false

Definition at line 880 of file QComponent.h.

◆ useSort

bool dyno::mDrawLabel::useSort = true

Definition at line 882 of file QComponent.h.

◆ w

int dyno::mDrawLabel::w = 380
protected

Definition at line 892 of file QComponent.h.


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