添加了轨道和位置点
This commit is contained in:
@@ -11,6 +11,26 @@
|
||||
class PosPair{
|
||||
|
||||
public:
|
||||
/**
|
||||
* 设定的轨道开始坐标x
|
||||
*/
|
||||
static const int stop_begin_x = 100;
|
||||
|
||||
/**
|
||||
* 设定的轨道开始坐标y
|
||||
*/
|
||||
static const int stop_begin_y = 80;
|
||||
|
||||
/**
|
||||
* 轨道的宽度
|
||||
*/
|
||||
static const int stop_rail_width = 300;
|
||||
|
||||
/**
|
||||
* 轨道的高度
|
||||
*/
|
||||
static const int stop_rail_height = 200;
|
||||
|
||||
/*
|
||||
* 站点位置的x坐标
|
||||
*/
|
||||
@@ -48,25 +68,6 @@ public:
|
||||
int GetBusPosY() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* 设定的轨道开始坐标x
|
||||
*/
|
||||
const int stop_begin_x = 100;
|
||||
|
||||
/**
|
||||
* 设定的轨道开始坐标y
|
||||
*/
|
||||
const int stop_begin_y = 80;
|
||||
|
||||
/**
|
||||
* 轨道的宽度
|
||||
*/
|
||||
const int stop_rail_width = 300;
|
||||
|
||||
/**
|
||||
* 轨道的高度
|
||||
*/
|
||||
const int stop_rail_height = 200;
|
||||
|
||||
/**
|
||||
* 公交车到站点的距离
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
* 生成站点画面
|
||||
* @param node_number
|
||||
*/
|
||||
void SetStopScene(int node_number);
|
||||
void SetStopScene(int node_number, int node_distance);
|
||||
|
||||
/**
|
||||
* 重设公交车的位置
|
||||
@@ -59,6 +59,16 @@ private:
|
||||
*/
|
||||
QGraphicsSimpleTextItem *name_items;
|
||||
|
||||
/**
|
||||
* 轨道对象
|
||||
*/
|
||||
QGraphicsPathItem *rail_path;
|
||||
|
||||
/**
|
||||
* 位置点对象数组
|
||||
*/
|
||||
QGraphicsEllipseItem *pos_spots;
|
||||
|
||||
/**
|
||||
* 每个站点的所在位置
|
||||
*/
|
||||
@@ -74,6 +84,11 @@ private:
|
||||
*/
|
||||
int stop_node_number;
|
||||
|
||||
/**
|
||||
* 站点之间的距离
|
||||
*/
|
||||
int stop_node_distance;
|
||||
|
||||
/**
|
||||
* 一个矩形的边框
|
||||
* 使无论中间存在多少站点,这个scene都能在view的中心
|
||||
|
Reference in New Issue
Block a user