Modification of files location
This commit is contained in:
1 parent
74f74fec61
commit
875ebfd79a
27 files changed
+41
-44
No files matched your search
Executable
+100
@@ -0,0 +1,100 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by plaYUVer developers
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file GridManager.h
|
||||
* \brief Function to create a grid in the images
|
||||
* Based on the work of Ricardo N. Rocha Sardo in SCode project
|
||||
*/
|
||||
|
||||
#ifndef __GRIDMANAGER_H__
|
||||
#define __GRIDMANAGER_H__
|
||||
|
||||
#include <QRect>
|
||||
#include <QColor>
|
||||
#include <QPen>
|
||||
|
||||
class QPoint;
|
||||
class QBitmap;
|
||||
class QPainter;
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class GridManager
|
||||
{
|
||||
public:
|
||||
|
||||
enum Style
|
||||
{
|
||||
IntersectionDot = 0, IntersectionCross, Dashed, Solid
|
||||
};
|
||||
|
||||
GridManager();
|
||||
|
||||
void drawGrid( QPixmap &image, const QRect& area, QPainter *painter );
|
||||
|
||||
/**
|
||||
* @returns a QRect defined by the grid that contains the point (x, y).
|
||||
*/
|
||||
QRect rectContains( int x, int y ) const;
|
||||
|
||||
/**
|
||||
* This is an overloaded member function, provided for convenience.
|
||||
* @returns a QRect defined by the grid that contains the QPoint pos.
|
||||
*/
|
||||
QRect rectContains( const QPoint &pos ) const;
|
||||
|
||||
/**
|
||||
* @returns @c true if the point (x, y) is over a grid crossing, otherwise
|
||||
* returns @c false
|
||||
*/
|
||||
bool contains( int x, int y );
|
||||
/**
|
||||
* @returns @c true if the point (x, y) is near a grid crossing, otherwise
|
||||
* returns @c false.
|
||||
* @see @p nearPos()
|
||||
*/
|
||||
bool isNear( int x, int y );
|
||||
|
||||
/**
|
||||
* This is an overloaded member function, provided for convenience.
|
||||
* @returns @c true if the given point is near a grid crossing, otherwise
|
||||
* returns @c false.
|
||||
* @see @p nearPos()
|
||||
*/
|
||||
bool isNear( const QPoint &pos );
|
||||
|
||||
/**
|
||||
* @returns the grid crossing position that is near the point (x,y). If
|
||||
* either the x or y are iqual to -1 (default) than returns the last near
|
||||
* grid position found by @p isNear().
|
||||
*/
|
||||
QPoint nearPos( int x = -1, int y = -1 );
|
||||
|
||||
private:
|
||||
|
||||
QPoint m_nearPos;
|
||||
};
|
||||
|
||||
} // NameSpace plaYUVer
|
||||
|
||||
#endif // __GRIDMANAGER_H__
|
||||
Reference in new issue
Block a user