Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > 4272c97b1af3db3f39a3b697bcba7e48 > files > 949

albumshaper-2.1-7mdv2010.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;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.6.2 -->
<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 &quot;<a class="code" href="cursors_8h.html">cursors.h</a>&quot;</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="comment">//Include cursor xpm&#39;s</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../../resources/cursors/crossCursor.xpm&quot;</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;../../resources/cursors/moveSelectionCursor.xpm&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;../../resources/cursors/moveHorCursor.xpm&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;../../resources/cursors/moveVertCursor.xpm&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;../../resources/cursors/moveTLCursor.xpm&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;../../resources/cursors/moveTRCursor.xpm&quot;</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;../../resources/cursors/scaleSelectionCursor.xpm&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;../../resources/cursors/rotateCursor.xpm&quot;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;../../resources/cursors/targetCursor.xpm&quot;</span>
<a name="l00031"></a>00031 <span class="comment">//==============================================</span>
<a name="l00032"></a><a class="code" href="cursors_8cpp.html#a1590c10a41dc99ba907448c6cb171d25">00032</a> QCursor** <a class="code" href="cursors_8cpp.html#a1590c10a41dc99ba907448c6cb171d25">customCursors</a> = <span class="keyword">new</span> QCursor*[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a8fde57ef9823810c4b45519c6a0005ab">CUSTOM_CURSOR_COUNT</a>];
<a name="l00033"></a>00033 <span class="comment">//==============================================</span>
<a name="l00034"></a><a class="code" href="cursors_8h.html#a764dca27451cf6c1c418e7e753fc336c">00034</a> <span class="keywordtype">void</span> <a class="code" href="cursors_8cpp.html#a764dca27451cf6c1c418e7e753fc336c">loadCursors</a>()
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036   <a class="code" href="cursors_8cpp.html#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647ac7f7eb79f43d18a0d6f51be79e78f012">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647ad9da03696a38d1604e9c434702bd04c6">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a8b659aefdfad1b15a9e9dcbd7c524f25">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a75a322d3eb727e1c69e4a945946ad927">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647abe2f77ed8f4adc56663d96359e7a0a72">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a155601d9f05c16bed834635d5d794f88">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a0e8b329bab8d2e425993ca936df878ea">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a2db329c6bb1f6299b9b2eabfa395c29f">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a825ccc8a463af00f9a04b93f28bd3d34">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#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a275cda9c2658fac7b62ea960839d365f">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#a8d89fd03db7e35090175ec42e8af8f3f">00052</a> <span class="keyword">const</span> QCursor&amp; <a class="code" href="cursors_8cpp.html#a8d89fd03db7e35090175ec42e8af8f3f">getCursor</a>( <a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647" 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#a384a874a43b4618a4c20506728f1c647a8fde57ef9823810c4b45519c6a0005ab">CUSTOM_CURSOR_COUNT</a> )
<a name="l00055"></a>00055     <span class="keywordflow">return</span> *<a class="code" href="cursors_8cpp.html#a1590c10a41dc99ba907448c6cb171d25">customCursors</a>[<a class="code" href="cursors_8h.html#a384a874a43b4618a4c20506728f1c647a275cda9c2658fac7b62ea960839d365f">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#a1590c10a41dc99ba907448c6cb171d25">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 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>