okular/core/utils_p.h
Jon Mease 43246c563b Viewport transition refinements for Find and Undo/Redo actions
REVIEW: 114060

This patch introduces viewport transitions for undo/redo actions on annotations and forms.  When an annotation/form action is undone/redone but the associated annotation/form is not currently visible, the viewport is updated to center on the undo/redo action. If the annotation/form is visible, the viewport is not updated.

The viewport transitions for the Find action have also been updated to this same algorithm.  Previously the viewport was moved to center on each matching search term even if the search term was already visible in the viewport. This lead to unnecessary viewport transitions if the search term matched several items in a single paragraph for example.

These proposed changes to the viewport transition behavior are consistent with the find and undo behavior of many existing applications including Kate, Open Office, and Foxit PDF Reader.
2013-12-29 23:27:30 +01:00

28 lines
912 B
C++

/***************************************************************************
* Copyright (C) 2008 by Pino Toscano <pino@kde.org> *
* *
* 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_P_H_
#define _OKULAR_UTILS_P_H_
class QIODevice;
namespace Okular
{
void copyQIODevice( QIODevice *from, QIODevice *to );
/**
* Return a rotation matrix corresponding to the @p rotation enumeration.
*/
QTransform buildRotationMatrix( Rotation rotation );
}
#endif