2006-06-30 21:42:41 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2006 by Luigi Toscano <luigi.toscano@tiscali.it> *
|
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _OKULAR_UTILS_H_
|
|
|
|
#define _OKULAR_UTILS_H_
|
|
|
|
|
2007-01-03 14:30:48 +00:00
|
|
|
#include <okular/core/okular_export.h>
|
2006-06-30 21:42:41 +00:00
|
|
|
|
2006-10-29 15:21:03 +00:00
|
|
|
class QRect;
|
2006-06-30 21:42:41 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
namespace Okular
|
2006-06-30 21:42:41 +00:00
|
|
|
{
|
2006-09-21 08:45:36 +00:00
|
|
|
|
2006-10-29 15:21:03 +00:00
|
|
|
/**
|
|
|
|
* @short General utility functions.
|
|
|
|
*
|
|
|
|
* This class contains some static functions of general utility.
|
|
|
|
*/
|
2006-09-21 08:45:36 +00:00
|
|
|
class OKULAR_EXPORT Utils
|
|
|
|
{
|
|
|
|
public:
|
2006-06-30 21:42:41 +00:00
|
|
|
/**
|
|
|
|
* Rotate the rect \p source in the area \p width x \p height with the
|
|
|
|
* specified \p orientation .
|
|
|
|
*/
|
2006-09-21 08:45:36 +00:00
|
|
|
static QRect rotateRect( const QRect & source, int width, int height, int orientation );
|
2006-10-29 15:08:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the horizontal DPI of the main display
|
|
|
|
*/
|
2006-11-27 08:13:47 +00:00
|
|
|
static double dpiX();
|
2006-10-29 15:08:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the vertical DPI of the main display
|
|
|
|
*/
|
2006-11-27 08:13:47 +00:00
|
|
|
static double dpiY();
|
2006-09-21 08:45:36 +00:00
|
|
|
};
|
2006-06-30 21:42:41 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
}
|
2006-06-30 21:42:41 +00:00
|
|
|
|
|
|
|
#endif
|