auto_bus/include/PosPair.h

60 lines
1.1 KiB
C
Raw Normal View History

//
// Created by ricardo on 2022/6/28.
//
#ifndef AUTO_BUS_GUI_POSPAIR_H
#define AUTO_BUS_GUI_POSPAIR_H
/**
*
*/
class PosPair{
public:
/*
* x坐标
*/
int pos_x;
/**
* y坐标
*/
int pos_y;
PosPair();
/**
*
* @param stop_number
* @return
*/
int GetStopSpaceLength(int stop_number) const;
/**
*
* @param length
*/
void AddLength(int length);
/**
* x坐标
* @return
*/
int GetBusPosX() const;
/**
* y坐标
* @return
*/
int GetBusPosY() const;
private:
const int stop_begin_x = 100;
const int stop_begin_y = 80;
const int stop_rail_width = 300;
const int stop_rail_height = 200;
const int stop_bus_distance = 30;
int distance = 0;
};
#endif //AUTO_BUS_GUI_POSPAIR_H