ui: GraphView can set active tokenId on node clicked

By now the graph displays the active node, without neighbours or anything, and clicking a node sets the active token id to the clicked nodes id.

fortune cookie message = Be prepared to accept an exciting opportunity in the future.
This commit is contained in:
Manuel Dobusch
2014-07-07 16:53:44 +02:00
parent e38914887d
commit 0f60a9a556
14 changed files with 215 additions and 62 deletions
+11 -2
View File
@@ -13,12 +13,13 @@ public:
Vector2();
Vector2(const T& x, const T& y);
Vector2(const VectorBase<T, 2>& vector);
Vector2(const Vector2<T>& vector);
virtual ~Vector2();
T getValue(const unsigned int index) const;
void setValue(const unsigned int index, const T& value);
T& operator[](const unsigned int index);
T operator[](const unsigned int index);
Property<T> x;
Property<T> y;
@@ -62,6 +63,14 @@ Vector2<T>::Vector2(const VectorBase<T, 2>& vector)
{
}
template<class T>
Vector2<T>::Vector2(const Vector2<T>& vector)
: VectorBase<T, 2>(vector)
, x(&VectorBase<T, 2>::m_values[m_xIndex])
, y(&VectorBase<T, 2>::m_values[m_yIndex])
{
}
template<class T>
Vector2<T>::~Vector2()
{
@@ -95,7 +104,7 @@ void Vector2<T>::setValue(const unsigned int index, const T& value)
}
template<class T>
T& Vector2<T>::operator[](const unsigned int index)
T Vector2<T>::operator[](const unsigned int index)
{
try
{
+11
View File
@@ -13,6 +13,7 @@ public:
Vector4();
Vector4(const T& x, const T& y, const T& z, const T& w);
Vector4(const VectorBase<T, 4>& vector);
Vector4(const Vector4<T>& vector);
virtual ~Vector4();
T getValue(const unsigned int index) const;
@@ -76,6 +77,16 @@ Vector4<T>::Vector4(const VectorBase<T, 4>& vector)
{
}
template<class T>
Vector4<T>::Vector4(const Vector4<T>& vector)
: VectorBase<T, 4>(vector)
, x(&VectorBase<T, 4>::m_values[m_xIndex])
, y(&VectorBase<T, 4>::m_values[m_yIndex])
, z(&VectorBase<T, 4>::m_values[m_zIndex])
, w(&VectorBase<T, 4>::m_values[m_wIndex])
{
}
template<class T>
Vector4<T>::~Vector4()
{
+2 -2
View File
@@ -54,7 +54,7 @@ public:
template<class U>
bool isSame(const VectorBase<U, N>& other) const;
T& operator[](const unsigned int index);
T operator[](const unsigned int index);
template<class U>
void operator=(VectorBase<U, N>& other);
@@ -326,7 +326,7 @@ bool VectorBase<T, N>::isSame(const VectorBase<U, N>& other) const
}
template<class T, unsigned int N>
T& VectorBase<T, N>::operator[](const unsigned int index)
T VectorBase<T, N>::operator[](const unsigned int index)
{
VECTOR_CHECK_INDEX(index);