okular: adjust to Katie changes

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-05-30 18:42:44 +00:00
parent 2f7efcdb74
commit 302f2d328a
18 changed files with 39 additions and 9 deletions

View file

@ -13,7 +13,9 @@
#include <qlist.h>
#include <qwidget.h>
QT_BEGIN_NAMESPACE
class Ui_DlgAccessibilityBase;
QT_END_NAMESPACE
class DlgAccessibility : public QWidget
{

View file

@ -13,7 +13,9 @@
#include <qhash.h>
#include <qwidget.h>
QT_BEGIN_NAMESPACE
class Ui_DlgEditorBase;
QT_END_NAMESPACE
class DlgEditor : public QWidget
{

View file

@ -14,7 +14,9 @@
#include "part.h"
QT_BEGIN_NAMESPACE
class Ui_DlgGeneralBase;
QT_END_NAMESPACE
class DlgGeneral : public QWidget
{

View file

@ -12,7 +12,9 @@
#include <qwidget.h>
QT_BEGIN_NAMESPACE
class Ui_DlgPerformanceBase;
QT_END_NAMESPACE
class DlgPerformance : public QWidget
{

View file

@ -12,7 +12,9 @@
#include <qwidget.h>
QT_BEGIN_NAMESPACE
class Ui_DlgPresentationBase;
QT_END_NAMESPACE
class DlgPresentation : public QWidget
{

View file

@ -15,7 +15,9 @@
#include <kdialog.h>
#include <kmimetype.h>
QT_BEGIN_NAMESPACE
class Ui_ChooseEngineWidget;
QT_END_NAMESPACE
class ChooseEngineDialog : public KDialog
{

View file

@ -12,7 +12,10 @@
#define _OKULAR_TEXTDOCUMENTSETTINGS_P_H_
class KFontRequester;
QT_BEGIN_NAMESPACE
class Ui_TextDocumentSettings;
QT_END_NAMESPACE
namespace Okular {

View file

@ -23,6 +23,7 @@
#include <QFontDatabase>
#include <QImage>
#include <QPainter>
#include <QPen>
//#define DEBUG_SPECIAL

View file

@ -17,7 +17,7 @@
#include <QTextCharFormat>
#include <QTextFormat>
#include <QTextListFormat>
class QTextTableFormat;
#include <QTextTableFormat>
namespace OOO {

View file

@ -24,6 +24,7 @@
#include <qlist.h>
#include <qpainter.h>
#include <qprinter.h>
#include <qpen.h>
#include <kaboutdata.h>
#include <kglobal.h>
#include <klocale.h>

View file

@ -932,19 +932,14 @@ void Part::clearLastShownSourceLocation()
bool Part::isWatchFileModeEnabled() const
{
return !m_watcher->isStopped();
return true;
}
void Part::setWatchFileModeEnabled(bool enabled)
{
if ( enabled && m_watcher->isStopped() )
{
m_watcher->startScan();
}
else if( !enabled && !m_watcher->isStopped() )
if( !enabled && isWatchFileModeEnabled() )
{
m_dirtyHandler->stop();
m_watcher->stopScan();
}
}

View file

@ -36,6 +36,7 @@
#include <QWidget>
#include <QPrinter>
#include <QMenu>
#include <QTimer>
class KUrl;
class KConfigDialog;

View file

@ -47,6 +47,7 @@ void AnnotatorEngine::decodeEvent( const QMouseEvent * mouseEvent, EventType * e
*button = AnnotatorEngine::Right;
}
#ifndef QT_NO_TABLET
void AnnotatorEngine::decodeEvent( const QTabletEvent * tabletEvent, EventType * eventType, Button * button )
{
switch ( tabletEvent->type() )
@ -72,6 +73,7 @@ void AnnotatorEngine::decodeEvent( const QTabletEvent * tabletEvent, EventType *
break;
}
}
#endif // QT_NO_TABLET
AnnotatorEngine::~AnnotatorEngine()
{

View file

@ -18,8 +18,11 @@
#include "core/area.h"
#include <QMouseEvent>
class QTabletEvent;
#include <QPainter>
#ifndef QT_NO_TABLET
#include <QTabeltEvent>
#endif
class PageViewItem;
namespace Okular {
class Annotation;
@ -51,7 +54,9 @@ class AnnotatorEngine
void setItem( PageViewItem * item ) { m_item = item; }
static void decodeEvent( const QMouseEvent * mouseEvent, EventType * eventType, Button * button );
#ifndef QT_NO_TABLET
static void decodeEvent( const QTabletEvent * tabletEvent, EventType * eventType, Button * button );
#endif
virtual QCursor cursor() const;

View file

@ -1787,6 +1787,7 @@ static QPoint rotateInRect( const QPoint &rotated, Okular::Rotation rotation )
return ret;
}
#ifndef QT_NO_TABLET
void PageView::tabletEvent( QTabletEvent * e )
{
// Ignore tablet events that we don't care about
@ -1824,6 +1825,7 @@ void PageView::tabletEvent( QTabletEvent * e )
e->ignore();
}
}
#endif // QT_NO_TABLET
void PageView::mouseMoveEvent( QMouseEvent * e )
{

View file

@ -133,7 +133,9 @@ Q_OBJECT
void wheelEvent( QWheelEvent* );
void paintEvent( QPaintEvent *e );
#ifndef QT_NO_TABLET
void tabletEvent (QTabletEvent *e );
#endif
void mouseMoveEvent( QMouseEvent *e );
void mousePressEvent( QMouseEvent *e );
void mouseReleaseEvent( QMouseEvent *e );

View file

@ -787,6 +787,7 @@ QCursor PageViewAnnotator::cursor() const
return m_engine->cursor();
}
#ifndef QT_NO_TABLET
QRect PageViewAnnotator::performRouteMouseOrTabletEvent(const AnnotatorEngine::EventType & eventType, const AnnotatorEngine::Button & button,
const QPointF & pos, PageViewItem * item )
{
@ -864,6 +865,7 @@ QRect PageViewAnnotator::performRouteMouseOrTabletEvent(const AnnotatorEngine::E
return modifiedRect;
}
#endif // QT_NO_TABLET
QRect PageViewAnnotator::routeMouseEvent( QMouseEvent * e, PageViewItem * item )
{
@ -876,6 +878,7 @@ QRect PageViewAnnotator::routeMouseEvent( QMouseEvent * e, PageViewItem * item )
return performRouteMouseOrTabletEvent( eventType, button, e->posF(), item );
}
#ifndef QT_NO_TABLET
QRect PageViewAnnotator::routeTabletEvent( QTabletEvent * e, PageViewItem * item, const QPoint & localOriginInGlobal )
{
// Unlike routeMouseEvent, routeTabletEvent must explicitly ignore events it doesn't care about so that
@ -908,6 +911,7 @@ QRect PageViewAnnotator::routeTabletEvent( QTabletEvent * e, PageViewItem * item
const QPointF localPosF = globalPosF - localOriginInGlobal;
return performRouteMouseOrTabletEvent( eventType, button, localPosF, item );
}
#endif // QT_NO_TABLET
bool PageViewAnnotator::routeKeyEvent( QKeyEvent * event )
{

View file

@ -76,7 +76,9 @@ class PageViewAnnotator : public QObject
QCursor cursor() const;
QRect routeMouseEvent( QMouseEvent * event, PageViewItem * item );
#ifndef QT_NO_TABLET
QRect routeTabletEvent( QTabletEvent * event, PageViewItem * item, const QPoint & localOriginInGlobal );
#endif
QRect performRouteMouseOrTabletEvent( const AnnotatorEngine::EventType & eventType, const AnnotatorEngine::Button & button,
const QPointF & pos, PageViewItem * item );
bool routeKeyEvent( QKeyEvent * event );