ui: implemented gui abstraction and dummy view
- added abstract class tree for gui elements. - implemented concrete gui classes that wrap the qt specific content. - implemented first DummyView which plays nice with the ViewManager. review id = 12
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#ifndef VECTOR_H
|
||||
#define VECTOR_H
|
||||
|
||||
struct Vec4i
|
||||
{
|
||||
Vec4i(int x, int y, int z, int w)
|
||||
: x(x)
|
||||
, y(y)
|
||||
, z(z)
|
||||
, w(w)
|
||||
{}
|
||||
|
||||
int x, y, z, w;
|
||||
};
|
||||
|
||||
#endif // VECTOR_H
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
template<class T>
|
||||
class Color
|
||||
{
|
||||
public:
|
||||
Color();
|
||||
Color(T r, T g, T b, T a);
|
||||
|
||||
T r, g, b, a;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
Color<T>::Color()
|
||||
: r(0)
|
||||
, g(0)
|
||||
, b(0)
|
||||
, a(0)
|
||||
{}
|
||||
|
||||
template<class T>
|
||||
Color<T>::Color(T r, T g, T b, T a)
|
||||
: r(r)
|
||||
, g(g)
|
||||
, b(b)
|
||||
, a(a)
|
||||
{}
|
||||
|
||||
typedef Color<float> Colorf;
|
||||
typedef Color<int> Colori;
|
||||
|
||||
#endif // COLOR_H
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef VECTOR_4_H
|
||||
#define VECTOR_4_H
|
||||
|
||||
template<class T>
|
||||
class Vector4
|
||||
{
|
||||
public:
|
||||
Vector4();
|
||||
Vector4(T x, T y, T z, T w);
|
||||
|
||||
T x, y, z, w;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
Vector4<T>::Vector4()
|
||||
: x(0)
|
||||
, y(0)
|
||||
, z(0)
|
||||
, w(0)
|
||||
{}
|
||||
|
||||
template<class T>
|
||||
Vector4<T>::Vector4(T x, T y, T z, T w)
|
||||
: x(x)
|
||||
, y(y)
|
||||
, z(z)
|
||||
, w(w)
|
||||
{}
|
||||
|
||||
typedef Vector4<int> Vec4i;
|
||||
|
||||
#endif // VECTOR_4_H
|
||||
Reference in New Issue
Block a user