00001 /*************************************************************************** 00002 * Copyright (C) 2013 by James Fuller,,, * 00003 * james@slakware12 * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 //------------------------------------------------------------------- 00021 #ifndef CANVASORTHOTEXT_H 00022 #define CANVASORTHOTEXT_H 00023 //------------------------------------------------------------------- 00024 #include <qcanvas.h> 00025 //------------------------------------------------------------------- 00026 class QCanvas; 00027 //------------------------------------------------------------------- 00031 class CanvasOrthoText : public QCanvasText { 00032 public: 00033 CanvasOrthoText ( QCanvas * canvas ); 00034 00035 CanvasOrthoText ( QString & t, QCanvas * canvas ); 00036 00037 CanvasOrthoText ( QString & t, QFont font, QCanvas * canvas ); 00038 00039 ~CanvasOrthoText(); 00040 00041 virtual void draw ( QPainter & painter ); 00042 00043 virtual QRect boundingRect () const; 00044 00045 virtual void setupPainter ( QPainter & painter ); 00046 00047 void setVertical ( bool bFlag ); 00048 00049 bool vertical ( void ); 00050 00051 int width (); 00052 00053 int height (); 00054 00055 bool shadow ( void ); 00056 00057 void setShadow ( bool bFlag ); 00058 00059 virtual int rtti ( void ) const; 00060 00061 00062 private: 00063 bool bShadow; 00064 bool bVertical; 00065 void translate ( QPoint& qp ); 00066 }; 00067 //------------------------------------------------------------------- 00068 #endif 00069 //------------------------------------------------------------------- 00070