Commit 288fce0b authored by Pino Toscano's avatar Pino Toscano

AnnotationGuiUtils -> GuiUtils

svn path=/trunk/KDE/kdegraphics/okular/; revision=752259
parent d22bd483
......@@ -110,7 +110,6 @@ set(okularpart_SRCS
conf/dlgpresentation.cpp
ui/embeddedfilesdialog.cpp
ui/annotwindow.cpp
ui/annotationguiutils.cpp
ui/annotationmodel.cpp
ui/annotationpopup.cpp
ui/annotationpropertiesdialog.cpp
......@@ -121,6 +120,7 @@ set(okularpart_SRCS
ui/fileprinterpreview.cpp
ui/findbar.cpp
ui/formwidgets.cpp
ui/guiutils.cpp
ui/ktreeviewsearchline.cpp
ui/minibar.cpp
ui/pageitemdelegate.cpp
......
......@@ -20,7 +20,7 @@
#include "core/document.h"
#include "core/observer.h"
#include "core/page.h"
#include "ui/annotationguiutils.h"
#include "ui/guiutils.h"
struct AnnItem
{
......@@ -304,13 +304,13 @@ QVariant AnnotationModel::data( const QModelIndex &index, int role ) const
switch ( role )
{
case Qt::DisplayRole:
return AnnotationGuiUtils::captionForAnnotation( item->annotation );
return GuiUtils::captionForAnnotation( item->annotation );
break;
case Qt::DecorationRole:
return KIcon( "graphics-viewer-document" );
break;
case Qt::ToolTipRole:
return AnnotationGuiUtils::prettyToolTip( item->annotation );
return GuiUtils::prettyToolTip( item->annotation );
break;
case AuthorRole:
return item->annotation->author();
......
/***************************************************************************
* Copyright (C) 2006 by Pino Toscano <pino@kde.org> *
* Copyright (C) 2006-2007 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 *
......@@ -7,7 +7,7 @@
* (at your option) any later version. *
***************************************************************************/
#include "annotationguiutils.h"
#include "guiutils.h"
// qt/kde includes
#include <klocale.h>
......@@ -15,7 +15,7 @@
// local includes
#include "core/annotations.h"
namespace AnnotationGuiUtils {
namespace GuiUtils {
QString captionForAnnotation( const Okular::Annotation * ann )
{
......
/***************************************************************************
* Copyright (C) 2006 by Pino Toscano <pino@kde.org> *
* Copyright (C) 2006-2007 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 *
......@@ -7,8 +7,8 @@
* (at your option) any later version. *
***************************************************************************/
#ifndef ANNOTATIONGUIUTILS_H
#define ANNOTATIONGUIUTILS_H
#ifndef OKULAR_GUIUTILS_H
#define OKULAR_GUIUTILS_H
#include <QtCore/QString>
......@@ -16,7 +16,7 @@ namespace Okular {
class Annotation;
}
namespace AnnotationGuiUtils
namespace GuiUtils
{
/**
* Returns the translated string with the type of the given @p annotation.
......
......@@ -59,7 +59,7 @@
#include "pagepainter.h"
#include "core/annotations.h"
#include "annotwindow.h"
#include "annotationguiutils.h"
#include "guiutils.h"
#include "annotationpopup.h"
#include "pageviewannotator.h"
#include "toolaction.h"
......@@ -209,7 +209,7 @@ protected:
{
QRect r = rect->boundingRect( pageItem->width(), pageItem->height() );
r.translate( pageItem->geometry().left(), pageItem->geometry().top() );
QString tip = AnnotationGuiUtils::prettyToolTip( ann );
QString tip = GuiUtils::prettyToolTip( ann );
QToolTip::showText( he->globalPos(), tip, this, r );
}
else if ( link )
......@@ -1478,7 +1478,7 @@ void PageView::contentsMousePressEvent( QMouseEvent * e )
if ( orect )
d->mouseAnn = ( (Okular::AnnotationObjectRect *)orect )->annotation();
// consider no annotation caught if its type is not movable
if ( d->mouseAnn && !AnnotationGuiUtils::canBeMoved( d->mouseAnn ) )
if ( d->mouseAnn && !GuiUtils::canBeMoved( d->mouseAnn ) )
d->mouseAnn = 0;
}
if ( !d->mouseAnn )
......@@ -2475,7 +2475,7 @@ void PageView::updateCursor( const QPoint &p )
d->mouseOnRect = false;
if ( annotobj
&& ( QApplication::keyboardModifiers() & Qt::ControlModifier )
&& AnnotationGuiUtils::canBeMoved( static_cast< const Okular::AnnotationObjectRect * >( annotobj )->annotation() ) )
&& GuiUtils::canBeMoved( static_cast< const Okular::AnnotationObjectRect * >( annotobj )->annotation() ) )
{
setCursor( Qt::OpenHandCursor );
}
......
......@@ -30,7 +30,6 @@
#include "core/document.h"
#include "core/page.h"
#include "settings.h"
#include "annotationguiutils.h"
#include "annotationpopup.h"
#include "annotationproxymodels.h"
#include "annotationmodel.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment