[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: branches/KDE/3.5/kdegraphics/kpdf
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2007-03-30 21:31:58
Message-ID: 200703302331.58969.nicolasg () snafu ! de
[Download RAW message or body]
On Friday 30 March 2007, Pino Toscano wrote:
> SVN commit 648272 by pino:
>
> Add tooltips for links in presentation mode.
> (Not yet in the contents area.)
>
> CCBUGS: 131361
> CCMAIL: kde-i18n-doc@kde.org
>
>
> M +50 -0 core/link.cpp
> M +5 -0 core/link.h
> M +6 -0 ui/presentationwidget.cpp
>
>
> --- branches/KDE/3.5/kdegraphics/kpdf/core/link.cpp #648271:648272
> @@ -10,6 +10,56 @@
> // local includes
> #include "link.h"
>
> +#include <klocale.h>
> +
> KPDFLink::~KPDFLink()
> {
> }
> +
> +QString KPDFLinkGoto::linkTip() const
> +{
> + return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go
> to page %1" ).arg( m_vp.pageNumber + 1 ) : "" ) : i18n("Open external
> file"); +}
As i18n returns a QString, I suppose that using QString() (or QString::null )
instead of "" would be better to avoid potential compilation errors.
> +
[...]
> --- branches/KDE/3.5/kdegraphics/kpdf/ui/presentationwidget.cpp
> #648271:648272 @@ -13,6 +13,7 @@
> #include <qpainter.h>
> #include <qapplication.h>
> #include <qdesktopwidget.h>
> +#include <qtooltip.h>
> #include <kapplication.h>
> #include <kcursor.h>
> #include <ktoolbar.h>
> @@ -406,6 +407,11 @@
> // change cursor shape
> m_handCursor = link != 0;
> setCursor( m_handCursor ? KCursor::handCursor() :
> KCursor::arrowCursor()); +
> + // set tooltip over link's rect
> + QString tip = link ? link->linkTip() : "";
And probably the same here.
> + if ( m_handCursor && !tip.isEmpty() )
> + QToolTip::add( this, linkRect, tip );
> }
> }
Have a nice day!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic