Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 4f45e7bdfd4a5ff17f5f8eaab90d017f > files > 949

albumshaper-2.1-6mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>AlbumShaper: cursors.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>cursors.cpp</h1><a href="cursors_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==============================================</span>
<a name="l00002"></a>00002 <span class="comment">//  copyright            : (C) 2003-2005 by Will Stokes</span>
<a name="l00003"></a>00003 <span class="comment">//==============================================</span>
<a name="l00004"></a>00004 <span class="comment">//  This program is free software; you can redistribute it</span>
<a name="l00005"></a>00005 <span class="comment">//  and/or modify it under the terms of the GNU General</span>
<a name="l00006"></a>00006 <span class="comment">//  Public License as published by the Free Software</span>
<a name="l00007"></a>00007 <span class="comment">//  Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">//  (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">//==============================================</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="comment">//Systemwide includes</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;qcursor.h&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;qpixmap.h&gt;</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="comment">//Projectwide includes</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include "<a class="code" href="cursors_8h.html">cursors.h</a>"</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="comment">//Include cursor xpm's</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include "../../resources/cursors/crossCursor.xpm"</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#include "../../resources/cursors/moveSelectionCursor.xpm"</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include "../../resources/cursors/moveHorCursor.xpm"</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include "../../resources/cursors/moveVertCursor.xpm"</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "../../resources/cursors/moveTLCursor.xpm"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "../../resources/cursors/moveTRCursor.xpm"</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include "../../resources/cursors/scaleSelectionCursor.xpm"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "../../resources/cursors/rotateCursor.xpm"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include "../../resources/cursors/targetCursor.xpm"</span>
<a name="l00031"></a>00031 <span class="comment">//==============================================</span>
<a name="l00032"></a><a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">00032</a> QCursor** <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a> = <span class="keyword">new</span> QCursor*[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c6478fde57ef9823810c4b45519c6a0005ab">CUSTOM_CURSOR_COUNT</a>];
<a name="l00033"></a>00033 <span class="comment">//==============================================</span>
<a name="l00034"></a><a class="code" href="cursors_8h.html#764dca27451cf6c1c418e7e753fc336c">00034</a> <span class="keywordtype">void</span> <a class="code" href="cursors_8cpp.html#764dca27451cf6c1c418e7e753fc336c">loadCursors</a>()
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647c7f7eb79f43d18a0d6f51be79e78f012">CROSS_CURSOR</a>]           = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)crossCursor_xpm));                              
<a name="l00037"></a>00037 
<a name="l00038"></a>00038   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647d9da03696a38d1604e9c434702bd04c6">MOVE_SELECTION_CURSOR</a>]  = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)moveSelectionCursor_xpm));                              
<a name="l00039"></a>00039   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c6478b659aefdfad1b15a9e9dcbd7c524f25">MOVE_HOR_CURSOR</a>]        = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)moveHorCursor_xpm));                              
<a name="l00040"></a>00040   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c64775a322d3eb727e1c69e4a945946ad927">MOVE_VERT_CURSOR</a>]       = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)moveVertCursor_xpm));                              
<a name="l00041"></a>00041   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647be2f77ed8f4adc56663d96359e7a0a72">MOVE_TL_CURSOR</a>]         = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)moveTLCursor_xpm));                              
<a name="l00042"></a>00042   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647155601d9f05c16bed834635d5d794f88">MOVE_TR_CURSOR</a>]         = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)moveTRCursor_xpm));                              
<a name="l00043"></a>00043 
<a name="l00044"></a>00044   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c6470e8b329bab8d2e425993ca936df878ea">SCALE_SELECTION_CURSOR</a>] = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)scaleSelectionCursor_xpm));                              
<a name="l00045"></a>00045   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c6472db329c6bb1f6299b9b2eabfa395c29f">ROTATE_CURSOR</a>]          = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)rotateCursor_xpm));                              
<a name="l00046"></a>00046 
<a name="l00047"></a>00047   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647825ccc8a463af00f9a04b93f28bd3d34">TARGET_CURSOR</a>]          = <span class="keyword">new</span> QCursor( QPixmap( (<span class="keyword">const</span> <span class="keywordtype">char</span>**)targetCursor_xpm));                              
<a name="l00048"></a>00048 
<a name="l00049"></a>00049   <a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647275cda9c2658fac7b62ea960839d365f">DEFAULT_CURSOR</a>]         = <span class="keyword">new</span> QCursor( Qt::ArrowCursor );
<a name="l00050"></a>00050 }
<a name="l00051"></a>00051 <span class="comment">//===========================================================</span>
<a name="l00052"></a><a class="code" href="cursors_8h.html#8d89fd03db7e35090175ec42e8af8f3f">00052</a> <span class="keyword">const</span> QCursor&amp; <a class="code" href="cursors_8cpp.html#8d89fd03db7e35090175ec42e8af8f3f">getCursor</a>( <a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647" title="custom cursor types">CUSTOM_CURSOR_TYPE</a> type )
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054   <span class="keywordflow">if</span>( type &lt; 0 || type &gt;= <a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c6478fde57ef9823810c4b45519c6a0005ab">CUSTOM_CURSOR_COUNT</a> )
<a name="l00055"></a>00055     <span class="keywordflow">return</span> *<a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#384a874a43b4618a4c20506728f1c647275cda9c2658fac7b62ea960839d365f">DEFAULT_CURSOR</a>];
<a name="l00056"></a>00056   <span class="keywordflow">else</span>
<a name="l00057"></a>00057     <span class="keywordflow">return</span> *<a class="code" href="cursors_8cpp.html#1590c10a41dc99ba907448c6cb171d25">customCursors</a>[type];
<a name="l00058"></a>00058 }
<a name="l00059"></a>00059 <span class="comment">//===========================================================</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 23 02:34:25 2009 for AlbumShaper by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>