00001 /*************************************************************************** 00002 cube.h 00003 ------------------- 00004 copyright : (C) 2004 by Jos van den Oever 00005 email : jos@vandenoever.info 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 #ifndef CUBE_H 00017 #define CUBE_H 00018 00019 #include "object.h" 00020 00021 using namespace std; 00022 00023 QPicture 00024 diceside(short points); 00025 00026 /* this class implements a cube that can be rotate by dragging over it with 00027 the mouse */ 00028 class Cube : public Object { 00029 Q_OBJECT 00030 public: 00031 Cube(QWidget *, const char *name=""); 00032 int heightForWidth(int width) const; 00033 // void setPicture(short side, Symmetry, Rotation, short picuture); 00034 void clear(); 00035 void setOrientation(short); 00036 static const double magicAngle; 00037 }; 00038 00039 #endif