digiKam
DigikamGenericGLViewerPlugin::GLViewerTexture Class Reference
+ Inheritance diagram for DigikamGenericGLViewerPlugin::GLViewerTexture:

Public Member Functions

 GLViewerTexture (DInfoInterface *const iface)
 
bool load (const QImage &im)
 
bool load (const QString &fn, const QSize &size)
 
bool loadFullSize ()
 load full size image from disc and save it in texture More...
 
void move (const QPoint &diff)
 new tex coordinates have to be calculated if the view is panned More...
 
void reset (bool resetFullImage=false)
 
void rotate ()
 smart image rotation since the two most frequent usecases are a CW or CCW rotation of 90, perform these rotation with one (+90) or two (-90) calls of rotation() More...
 
bool setNewSize (QSize size)
 
void setViewport (int w, int h)
 
GLfloat vertex_bottom () const
 
GLfloat vertex_left () const
 
GLfloat vertex_right () const
 
GLfloat vertex_top () const
 
void zoom (float delta, const QPoint &mousepos)
 calculate new tex coords on zooming More...
 
void zoomToOriginal ()
 
 ~GLViewerTexture ()
 

Constructor & Destructor Documentation

◆ GLViewerTexture()

DigikamGenericGLViewerPlugin::GLViewerTexture::GLViewerTexture ( DInfoInterface *const  iface)
explicit

◆ ~GLViewerTexture()

DigikamGenericGLViewerPlugin::GLViewerTexture::~GLViewerTexture ( )

Member Function Documentation

◆ load() [1/2]

bool DigikamGenericGLViewerPlugin::GLViewerTexture::load ( const QImage &  im)

References reset().

◆ load() [2/2]

bool DigikamGenericGLViewerPlugin::GLViewerTexture::load ( const QString &  fn,
const QSize &  size 
)

References reset().

◆ loadFullSize()

bool DigikamGenericGLViewerPlugin::GLViewerTexture::loadFullSize ( )

load full size image from disc and save it in texture

References reset().

◆ move()

void DigikamGenericGLViewerPlugin::GLViewerTexture::move ( const QPoint &  diff)

new tex coordinates have to be calculated if the view is panned

◆ reset()

void DigikamGenericGLViewerPlugin::GLViewerTexture::reset ( bool  resetFullImage = false)

◆ rotate()

void DigikamGenericGLViewerPlugin::GLViewerTexture::rotate ( )

smart image rotation since the two most frequent usecases are a CW or CCW rotation of 90, perform these rotation with one (+90) or two (-90) calls of rotation()

References reset(), and Digikam::DItemInfo::setOrientation().

◆ setNewSize()

bool DigikamGenericGLViewerPlugin::GLViewerTexture::setNewSize ( QSize  size)
Parameters
sizedesired texture size. QSize(0,0) will take the full image
Returns
true if size has changed, false otherwise set new texture size in order to reduce AGP bandwidth

◆ setViewport()

void DigikamGenericGLViewerPlugin::GLViewerTexture::setViewport ( int  w,
int  h 
)
Parameters
wwidth of window
hheight of window Set widget's viewport. Ensures that rdx & rdy are always > 1

◆ vertex_bottom()

GLfloat DigikamGenericGLViewerPlugin::GLViewerTexture::vertex_bottom ( ) const

◆ vertex_left()

GLfloat DigikamGenericGLViewerPlugin::GLViewerTexture::vertex_left ( ) const

◆ vertex_right()

GLfloat DigikamGenericGLViewerPlugin::GLViewerTexture::vertex_right ( ) const

◆ vertex_top()

GLfloat DigikamGenericGLViewerPlugin::GLViewerTexture::vertex_top ( ) const

◆ zoom()

void DigikamGenericGLViewerPlugin::GLViewerTexture::zoom ( float  delta,
const QPoint &  mousepos 
)

calculate new tex coords on zooming

Parameters
deltathe delta between previous zoom and current zoom
mouseposmouse position returned by QT \TODO rename mousepos to something more generic

Referenced by reset(), and zoomToOriginal().

◆ zoomToOriginal()

void DigikamGenericGLViewerPlugin::GLViewerTexture::zoomToOriginal ( )

References reset(), and zoom().


The documentation for this class was generated from the following files: