Commit 04ed10d3 authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms

parents 8a1acdcd e3747ca3
{
"phabricator.uri" : "https://phabricator.kde.org/"
}
CMakeLists.txt.user*
*.kdev4
*.swp
/build/
This diff is collapsed.
......@@ -329,7 +329,7 @@ MimeType=application/x-magic;
Terminal=false
Name=okular
GenericName=Document Viewer
Exec=okular %U %i -caption %c
Exec=okular %U %i
Icon=okular
Type=Application
InitialPreference=7
......@@ -658,7 +658,7 @@ class HTMLGenerator : public Okular::Generator
bool canGeneratePixmap() const;
void generatePixmap( Okular::PixmapRequest *request );
virtual const Okular::DocumentInfo* generateDocumentInfo();
virtual Okular::DocumentInfo generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const;
virtual const Okular::DocumentSynopsis* generateDocumentSynopsis();
......@@ -801,9 +801,9 @@ void HTMLGenerator::generatePixmap( Okular::PixmapRequest *request )
signalPixmapRequestDone( request );
}
const Okular::DocumentInfo* HTMLGenerator::generateDocumentInfo()
Okular::DocumentInfo HTMLGenerator::generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const
{
return &mDocumentInfo;
return mDocumentInfo;
}
const Okular::DocumentSynopsis* HTMLGenerator::generateDocumentSynopsis()
......@@ -859,6 +859,3 @@ the pages vector with them.
Afterwards we fill our Okular::DocumentInfo object with data. Since extracting the HTML meta data
would need a lot of code we work with static data here. [to be continued]
*/
// DOXYGEN_EXCLUDE = conf generators shell ui
// DOXYGEN_FILE_PATTERNS = core/*.h *.dox
#!/bin/sh
$EXTRACTRC *.rc */*.rc >> rc.cpp || exit 11
$EXTRACTRC $(find conf/ -name "*.ui") $(find core/ -name "*.ui") $(find ui/ -name "*.ui") $(ls . | grep -E '\.ui') >> rc.cpp || exit 12
$EXTRACTATTR --attr=tool,name ui/data/drawingtools.xml >> rc.cpp || exit 13
$XGETTEXT $(find conf/ -name "*.cpp" -o -name "*.h") $(find core/ -name "*.cpp" -o -name "*.h") $(find ui/ -name "*.cpp" -o -name "*.h") $(find shell/ -name "*.cpp" -o -name "*.h") $(ls . | grep -E '\.cpp$') $(ls . | grep -E '\.h$') -o $podir/okular.pot
@PACKAGE_INIT@
find_dependency(Qt5Core @QT_REQUIRED_VERSION@)
find_dependency(Qt5PrintSupport @QT_REQUIRED_VERSION@)
find_dependency(Qt5Widgets @QT_REQUIRED_VERSION@)
find_dependency(KF5CoreAddons @KF5_REQUIRED_VERSION@)
find_dependency(KF5Config @KF5_REQUIRED_VERSION@)
find_dependency(KF5XmlGui @KF5_REQUIRED_VERSION@)
include("${CMAKE_CURRENT_LIST_DIR}/Okular5Targets.cmake")
# get from the full path to OkularConfig.cmake up to the base dir dir:
get_filename_component( _okularBaseDir ${CMAKE_CURRENT_LIST_FILE} PATH)
get_filename_component( _okularBaseDir ${_okularBaseDir} PATH)
get_filename_component( _okularBaseDir ${_okularBaseDir} PATH)
get_filename_component( _okularBaseDir ${_okularBaseDir} PATH)
# find the full paths to the library and the includes:
find_path(OKULAR_INCLUDE_DIR okular/core/document.h
HINTS ${_okularBaseDir}/include
NO_DEFAULT_PATH)
find_library(OKULAR_CORE_LIBRARY okularcore
HINTS ${_okularBaseDir}/lib
NO_DEFAULT_PATH)
set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY})
# Compat: the old FindOkular.cmake was setting OKULAR_FOUND and the
# new one sets Okular_FOUND.
if(OKULAR_INCLUDE_DIR AND OKULAR_CORE_LIBRARY)
set(OKULAR_FOUND TRUE)
endif()
okular v0.20.60
......@@ -10,36 +10,37 @@
#ifndef _ABOUTDATA_H_
#define _ABOUTDATA_H_
#include <kaboutdata.h>
#include <KAboutData>
#include "core/version.h"
inline KAboutData okularAboutData( const char* name, const char* iname )
#include <klocalizedstring.h>
inline KAboutData okularAboutData()
{
KAboutData about(
name, //"okular",
"okular",
ki18n(iname), //I18N_NOOP("okular"),
OKULAR_VERSION_STRING,
ki18n("Okular, a universal document viewer"),
KAboutData::License_GPL,
ki18n("(C) 2002 Wilco Greven, Christophe Devriese\n"
QStringLiteral("okular"),
i18n("Okular"),
QStringLiteral(OKULAR_VERSION_STRING),
i18n("Okular, a universal document viewer"),
KAboutLicense::GPL,
i18n("(C) 2002 Wilco Greven, Christophe Devriese\n"
"(C) 2004-2005 Enrico Ros\n"
"(C) 2005 Piotr Szymanski\n"
"(C) 2004-2009 Albert Astals Cid\n"
"(C) 2006-2009 Pino Toscano"),
KLocalizedString(),
"http://okular.kde.org"
QString(),
QStringLiteral("http://okular.kde.org")
);
about.addAuthor(ki18n("Pino Toscano"), ki18n("Former maintainer"), "pino@kde.org");
about.addAuthor(ki18n("Tobias Koenig"), ki18n("Lots of framework work, ODT and FictionBook backends"), "tokoe@kde.org");
about.addAuthor(ki18n("Albert Astals Cid"), ki18n("Current maintainer"), "aacid@kde.org");
about.addAuthor(ki18n("Piotr Szymanski"), ki18n("Created Okular from KPDF codebase"), "djurban@pld-dc.org");
about.addAuthor(ki18n("Enrico Ros"), ki18n("KPDF developer"), "eros.kde@email.it");
about.addCredit(ki18n("Eugene Trounev"), ki18n("Annotations artwork"), "eugene.trounev@gmail.com");
about.addCredit(ki18n("Jiri Baum - NICTA"), ki18n("Table selection tool"), "jiri@baum.com.au");
about.addCredit(ki18n("Fabio D'Urso"), ki18n("Annotation improvements"), "fabiodurso@hotmail.it");
about.addAuthor(QStringLiteral("Pino Toscano"), i18n("Former maintainer"), QStringLiteral("pino@kde.org"));
about.addAuthor(QStringLiteral("Tobias Koenig"), i18n("Lots of framework work, ODT and FictionBook backends"), QStringLiteral("tokoe@kde.org"));
about.addAuthor(QStringLiteral("Albert Astals Cid"), i18n("Developer"), QStringLiteral("aacid@kde.org"));
about.addAuthor(QStringLiteral("Piotr Szymanski"), i18n("Created Okular from KPDF codebase"), QStringLiteral("djurban@pld-dc.org"));
about.addAuthor(QStringLiteral("Enrico Ros"), i18n("KPDF developer"), QStringLiteral("eros.kde@email.it"));
about.addCredit(QStringLiteral("Eugene Trounev"), i18n("Annotations artwork"), QStringLiteral("eugene.trounev@gmail.com"));
about.addCredit(QStringLiteral("Jiri Baum - NICTA"), i18n("Table selection tool"), QStringLiteral("jiri@baum.com.au"));
about.addCredit(QStringLiteral("Fabio D'Urso"), i18n("Annotation improvements"), QStringLiteral("fabiodurso@hotmail.it"));
return about;
}
......
macro_optional_find_package(ActiveApp)
macro_log_feature(ACTIVEAPP_FOUND "ActiveApp" "Support for developing applications for Plasma Active" "https://projects.kde.org/projects/extragear/base/plasma-mobile" FALSE "0.1")
if (ACTIVEAPP_FOUND)
add_subdirectory( app )
endif (ACTIVEAPP_FOUND)
add_subdirectory( components )
include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} )
add_subdirectory(src)
# QML-only thing
install(DIRECTORY package/ DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.active.documentviewer)
install(FILES active-documentviewer.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$XGETTEXT `find . -name \*.qml` -L Java -o $podir/org.kde.active.documentviewer.temp.pot
$XGETTEXT `find src/ -name "*.cpp" -o -name "*.h"` -o $podir/org.kde.active.documentviewer.pot
$MSGCAT $podir/org.kde.active.documentviewer.temp.pot $podir/org.kde.active.documentviewer.pot -o $podir/org.kde.active.documentviewer.pot
rm -f $podir/org.kde.active.documentviewer.temp.pot
rm -f rc.cpp
[Desktop Entry]
Name=Reader
Name[ar]=التصيير
Name[bg]=Четец
Name[bs]=Čitač
Name[ca]=Lector
Name[ca@valencia]=Lector
Name[cs]=Čtečka
Name[da]=Læser
Name[de]=Lesegerät
Name[el]=Πρόγραμμα ανάγνωσης
Name[en_GB]=Reader
Name[es]=Lector
Name[et]=Lugeja
Name[fi]=Lukija
Name[fr]=Lecteur
Name[ga]=Léitheoir
Name[gl]=Lector
Name[hu]=Olvasó
Name[ia]=Lector
Name[is]=Lesari
Name[it]=Lettore
Name[kk]=Оқу құралы
Name[ko]=리더
Name[lt]=Skaitytuvas
Name[mr]=वाचक
Name[nb]=Leser
Name[nds]=Leser
Name[nl]=Lezer
Name[pa]=ਰੀਡਰ
Name[pl]=Czytnik
Name[pt]=Leitor
Name[pt_BR]=Leitor
Name[ro]=Cititor
Name[ru]=Просмотрщик
Name[sk]=Čítačka
Name[sl]=Bralnik
Name[sr]=Читач
Name[sr@ijekavian]=Читач
Name[sr@ijekavianlatin]=Čitač
Name[sr@latin]=Čitač
Name[sv]=Läsprogram
Name[tr]=Okuyucu
Name[ug]=ئوقۇغۇ
Name[uk]=Переглядач
Name[x-test]=xxReaderxx
Name[zh_CN]=阅读器
Name[zh_TW]=閱讀器
GenericName=Document viewer
GenericName[ar]=عارض المستندات
GenericName[bg]=Преглед на документи
GenericName[bs]=Prikazivač dokumenata
GenericName[ca]=Visualitzador de documents
GenericName[ca@valencia]=Visualitzador de documents
GenericName[cs]=Prohlížeč dokumentů
GenericName[da]=Dokumentfremviser
GenericName[de]=Dokumentenbetrachter
GenericName[el]=Προβολέας εγγράφων
GenericName[en_GB]=Document Viewer
GenericName[es]=Visor de documentos
GenericName[et]=Dokumendinäitaja
GenericName[fi]=Asiakirjakatselin
GenericName[fr]=Afficheur de document
GenericName[ga]=Amharcán cáipéisí
GenericName[gl]=Visor de documentos
GenericName[hu]=Dokumentummegjelenítő
GenericName[ia]=Visor de documento
GenericName[is]=Skjalaskoðari
GenericName[it]=Visore di documenti
GenericName[kk]=Құжатты қарау құралы
GenericName[ko]=문서 뷰어
GenericName[lt]=Dokumentų žiūryklė
GenericName[mr]=दस्तऐवज प्रदर्शक
GenericName[nb]=Dokumentviser
GenericName[nds]=Dokmentkieker
GenericName[nl]=Documentenviewer
GenericName[pa]=ਡੌਕੂਮੈਂਟ ਦਰਸ਼ਕ
GenericName[pl]=Przeglądarka dokumentów
GenericName[pt]=Visualizador de documentos
GenericName[pt_BR]=Visualizador de documentos
GenericName[ro]=Vizualizor de documente
GenericName[ru]=Просмотр документов
GenericName[sk]=Prehliadač dokumentov
GenericName[sl]=Pregledovalnik dokumentov
GenericName[sr]=Приказивач докумената
GenericName[sr@ijekavian]=Приказивач докумената
GenericName[sr@ijekavianlatin]=Prikazivač dokumenata
GenericName[sr@latin]=Prikazivač dokumenata
GenericName[sv]=Dokumentvisare
GenericName[tr]=Belge görüntüleyici
GenericName[uk]=Переглядач документів
GenericName[x-test]=xxDocument viewerxx
GenericName[zh_CN]=文档查看器
GenericName[zh_TW]=文件檢視器
Comment=Viewer for various types of documents
Comment[ar]=عارض للعديد من أنواع المستندات
Comment[bg]=Преглед на различни видове документи
Comment[bs]=Pregledač raznih vrsta dokumenata
Comment[ca]=Visualitzador de diversos tipus de documents
Comment[ca@valencia]=Visualitzador de diversos tipus de documents
Comment[cs]=Prohlížeč různých typů dokumentů
Comment[da]=Fremviser af diverse dokumenttyper
Comment[de]=Betrachter für verschiedene Arten von Dokumenten
Comment[el]=Πρόγραμμα προβολής για διάφορους τύπους εγγράφων
Comment[en_GB]=Viewer for various types of documents
Comment[es]=Visor de diversos tipos de documentos
Comment[et]=Eri tüüpi dokumentide näitaja
Comment[fi]=Monenlaisten asiakirjojen katseluohjelma
Comment[fr]=Afficheur pour différents types de documents
Comment[ga]=Amharcán le haghaidh cáipéisí éagsúla
Comment[gl]=Visor de varios tipos de documentos.
Comment[hu]=Megjelenítő különféle típusú dokumentumokhoz
Comment[ia]=Visor pro varie typos de documento
Comment[is]=Skoðari fyrir ýmsar gerðir skjala
Comment[it]=Visore per vari tipi di documenti
Comment[kk]=Түрлі құжаттар қарау құралы
Comment[ko]=여러 형식의 문서 뷰어
Comment[lt]=Žiūryklė įvairiems dokumentų tipams
Comment[mr]=विविध प्रकारच्या दस्तऐवजांचा प्रदर्शक
Comment[nb]=Framviser for forskjellige dokumenttyper
Comment[nds]=Kieker för en Reeg Dokmenttypen
Comment[nl]=Viewer voor verschillende typen documenten
Comment[pa]=ਕਈ ਕਿਸਮ ਦੇ ਡੌਕੂਮੈਂਟ ਵੇਖਾਉਣ ਲਈ ਦਰਸ਼ਕ
Comment[pl]=Przeglądarka dla różnych typów dokumentów
Comment[pt]=Visualizador de vários tipos de documentos
Comment[pt_BR]=Visualizador para vários tipos de documentos
Comment[ro]=Vizualizor pentru diferite tipuri de documente
Comment[ru]=Программа для просмотра различных типов документов
Comment[sk]=Prehliadač pre rôzne typy dokumentov
Comment[sl]=Pregledovalnik raznih vrst dokumentov
Comment[sr]=Приказивач различитих врста докумената
Comment[sr@ijekavian]=Приказивач различитих врста докумената
Comment[sr@ijekavianlatin]=Prikazivač različitih vrsta dokumenata
Comment[sr@latin]=Prikazivač različitih vrsta dokumenata
Comment[sv]=Visningsprogram för diverse typer av dokument
Comment[tr]=Çeşitli belge türü için görüntüleyici
Comment[ug]=ھەر خىل تىپتىكى پۈتۈكلەرنى كۆرىدىغان پروگرامما
Comment[uk]=Програма для перегляду документів різних типів
Comment[x-test]=xxViewer for various types of documentsxx
Comment[zh_CN]=可以查看多种文档的工具
Comment[zh_TW]=多種型態文件的檢視器
Exec=active-documentviewer %u
Terminal=false
Icon=okular
Type=Application
Categories=Qt;KDE;Graphics;Office;Viewer;
InitialPreference=6
NoDisplay=true
MimeType=application/vnd.kde.okular-archive;
/*
* Copyright 2012 Marco Martin <mart@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,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 1.1
import org.kde.plasma.components 0.1 as PlasmaComponents
import org.kde.plasma.extras 0.1 as PlasmaExtras
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.mobilecomponents 0.1 as MobileComponents
import org.kde.qtextracomponents 0.1
import org.kde.okular 0.1 as Okular
MobileComponents.OverlayDrawer {
id: resourceBrowser
property string currentUdi
anchors.fill: parent
MouseEventListener {
id: pageArea
anchors.fill: parent
//enabled: !delegate.interactive
property Item delegate: delegate1
property Item oldDelegate: delegate2
property bool incrementing: delegate.delta > 0
Connections {
target: pageArea.delegate
onDeltaChanged: {
pageArea.oldDelegate.delta = pageArea.delegate.delta
if (pageArea.delegate.delta > 0) {
pageArea.oldDelegate.visible = true
pageArea.oldDelegate.pageNumber = pageArea.delegate.pageNumber + 1
documentItem.currentPage = pageArea.oldDelegate.pageNumber
pageArea.oldDelegate.visible = !(pageArea.delegate.pageNumber == documentItem.pageCount-1)
} else if (pageArea.delegate.delta < 0) {
pageArea.oldDelegate.pageNumber = pageArea.delegate.pageNumber - 1
documentItem.currentPage = pageArea.oldDelegate.pageNumber
pageArea.oldDelegate.visible = pageArea.delegate.pageNumber != 0
}
}
}
property int startMouseScreenX
property int startMouseScreenY
onPressed: {
startMouseScreenX = mouse.screenX
startMouseScreenY = mouse.screenY
}
onPositionChanged: {
if (Math.abs(mouse.screenX - startMouseScreenX) > width/5) {
delegate.pageSwitchEnabled = true
}
}
onReleased: {
delegate.pageSwitchEnabled = false
if (Math.abs(mouse.screenX - startMouseScreenX) < 20 &&
Math.abs(mouse.screenY - startMouseScreenY) < 20) {
if (browserFrame.state == "Closed") {
browserFrame.state = "Hidden"
} else {
browserFrame.state = "Closed"
}
} else if (oldDelegate.visible && delegate.delta != 0 &&
(Math.abs(mouse.screenX - startMouseScreenX) > width/5) &&
Math.abs(mouse.screenX - startMouseScreenX) > Math.abs(mouse.screenY - startMouseScreenY)) {
oldDelegate = delegate
delegate = (delegate == delegate1) ? delegate2 : delegate1
switchAnimation.running = true
}
}
FullScreenDelegate {
id: delegate2
width: parent.width
height: parent.height
}
FullScreenDelegate {
id: delegate1
width: parent.width
height: parent.height
Component.onCompleted: pageNumber = documentItem.currentPage
}
SequentialAnimation {