Coin Logo http://www.coin3d.org/
http://www.kongsberg.com/kogt/

SoQtCursor.h

00001 #ifndef SOQT_CURSOR_H
00002 #define SOQT_CURSOR_H
00003 
00004 // src/Inventor/Qt/SoQtCursor.h.  Generated from SoGuiCursor.h.in by configure.
00005 
00006 /**************************************************************************\
00007  * Copyright (c) Kongsberg Oil & Gas Technologies AS
00008  * All rights reserved.
00009  * 
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions are
00012  * met:
00013  * 
00014  * Redistributions of source code must retain the above copyright notice,
00015  * this list of conditions and the following disclaimer.
00016  * 
00017  * Redistributions in binary form must reproduce the above copyright
00018  * notice, this list of conditions and the following disclaimer in the
00019  * documentation and/or other materials provided with the distribution.
00020  * 
00021  * Neither the name of the copyright holder nor the names of its
00022  * contributors may be used to endorse or promote products derived from
00023  * this software without specific prior written permission.
00024  * 
00025  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00026  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00027  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00028  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00029  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00030  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00031  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00032  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00033  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00034  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00035  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 \**************************************************************************/
00037 
00038 #include <Inventor/SbLinear.h>
00039 #include <Inventor/Qt/SoQtBasic.h>
00040 
00041 class SOQT_DLL_API SoQtCursor {
00042 public:
00043   static void initClass(void);
00044 
00045   struct CustomCursor {
00046     SbVec2s dim;
00047     SbVec2s hotspot;
00048     unsigned char * bitmap;
00049     unsigned char * mask;
00050   };
00051 
00052 
00053   // FIXME: add more default shapes. 20011119 pederb.
00054   enum Shape {
00055     CUSTOM_BITMAP = -1,
00056     DEFAULT = 0,
00057     BUSY,
00058     CROSSHAIR,
00059     UPARROW
00060   };
00061   
00062   SoQtCursor(void);
00063   SoQtCursor(const Shape shape);
00064   SoQtCursor(const CustomCursor * cc);
00065   SoQtCursor(const SoQtCursor & cursor);
00066   ~SoQtCursor();
00067 
00068   SoQtCursor & operator=(const SoQtCursor & c);
00069 
00070   Shape getShape(void) const;
00071   void setShape(const Shape shape);
00072 
00073   const CustomCursor & getCustomCursor(void) const;
00074 
00075   static const SoQtCursor & getZoomCursor(void);
00076   static const SoQtCursor & getPanCursor(void);
00077   static const SoQtCursor & getRotateCursor(void);
00078   static const SoQtCursor & getBlankCursor(void);
00079   
00080 private:
00081   void commonConstructor(const Shape shape, const CustomCursor * cc);
00082 
00083   Shape shape;
00084   CustomCursor * cc;
00085 };
00086 
00087 #endif // ! SOQT_CURSOR_H

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Mon Sep 7 2015 11:30:44 for SoQt by Doxygen 1.7.3.