qpdfview-0.4.7/CHANGES0000644000000000000000000005163012246606025012500 0ustar 00000000000000Release 0.4.7: * Extended bookmarks storage format to add labelled bookmarks. * Extended handling of annotations and form fields using overlays. * Added support for opening execute links and for saving file attachments from annotations. * Improved parsing of command-line arguments and Workbench integration on AmigaOS. Thanks to Chris Young. * Improved behaviour of movement keys in certain corner cases. Thanks to Thomas Etter. * Added keyboard shortcuts to focus current page and scale factor in tool bar. * Fixed a race condition that could lead to dropping rendered pages. * Fixed a small issue with adding and removing annotations. * Added partial Lithunian translation. Thanks to Automatizatorius. * Added partial Korean translation. Thanks to Litty. * Updated Czech translations. Thanks to Pavel Fric. * Updated French translations. Thanks to Arnaud Schmittbuhl, Tubuntu, Pierre Soulat and Teromene. * Updated Ukrainian translations. Thanks to Yuri Chornoivan. * Updated British English translations. Thanks to Andi Chandler and Anthony Harrington. * Updated Malay translations. Thanks to abuyop. * Updated Italian translations. Thanks to Claudio Arseni. * Updated Polish translations. Thanks to Mateusz Łukasik and Piotr Strębski. * Updated Brazilian Portuguese translations. Thanks to Rodrigo Zimmermann. * Updated German translations. Thanks to Thomas Worofsky, Tobias B. and Benjamin Eltzner. * Updated Kazakh translations. Thanks to Baurzhan Muftakhidinov. * Updated Slovak translations. Thanks to DAG Software. * Updated Bulgarian translations. Thanks to Atanas Kovachki. * Updated Galician translations. Thanks to Marcos Lans. * Updated Catalan translations. Thanks to VPablo. * Updated Greek translations. Thanks to George Christofis. * Updated Italian translations. Thanks to Giovanni Grieco. * Updated Spanish translations. Thanks to Adolfo Jayme Barrientos. * Updated Azerbaijani translations. Thanks to Rashid Aliyev. Release 0.4.6: * Added function that keeps obsolete pixmaps and displays them until final rendering is available. * Added command-line option that displays a dialog to choose the name of the started instance. * Added confirmation dialog before closing a modified document. * Added optional support for device pixel ratios that are unequal to one. * Added setting to change presentation background. * Added desktop action for non-unique instances and choosing instances to the desktop entry. * Fixed loading of translation for Qt dialogs, e.g. the print dialog. * Added support for translations of online help. Thanks to Yuri Chornoivan. * Added support for searching of online help. Thanks to Benjamin Eltzner. * Updated Ukrainian translation and added translation of the online help. Thanks to Yuri Chornoivan. * Updated Czech translation. Thanks to Pavel Fric. * Updated Galician translation and added partial translation of the online help. Thanks to Marcos Lans. * Updated Malay translation and added partial translation of the online help. Thanks to abuyop. * Updated Polish translation and added partial translation of the online help. Thanks to Mateusz Łukasik. * Updated French translation and added partial translation of the online help. Thanks to Arnaud Schmittbuhl, Pierre Soulat and Pierre Slamich. * Updated Italian translation and added partial translation of the online help. Thanks to Claudio Arseni. * Updated Catalan translation. Thanks to Marc Coll Carrillo and VPablo. * Updated Czech translation and added translation of the online help. Thanks to Pavel Fric. * Updated Slovak translation and added partial translation of the online help. Thanks to DAG Software. * Updated Portuguese translation. Thanks to Sérgio Marques. * Updated British English translation and added partial translation of the online help. Thanks to fossfreedom and Andi Chandler. * Updated Idonesian translation. Thanks to Trisno Pamuji. * Updated Azerbaijani translation and added partial translation of the online help. Thanks to Rashid Aliyev. * Updated Chinese (Simplified) translation and added partial translation of the online help. Thanks to Xiaoxing Ye. * Updated Hebrew translation. Thanks to Yaron Shahrabani. * Updated German translation and added partial translation of the online help. Thanks to Tobias B. and Benjamin Eltzner. * Added partial Bulgarian translation of the online help. Thanks to Atanas Kovachki. Release 0.4.5: * Fixed an error in drawing the search progress. * Fixed an error preventing the annotation context menu from being displayed. * Fixed decorating links when using Qt5. * Improved the layout of the search widgets. * Added setting to heuristically synchronize the outline view to the current page. * Improved thumbnails layout to change between horizontal and vertical according to dock location. * Updated Malay translation. Thanks to abuyop. * Updated Ukrainian translation. Thanks to Yuri Chornoivan. * Updated Czech translation. Thanks to Pavel Fric. * Updated Italian translation. Thanks to Claudio Arseni. * Updated Slovak translation. Thanks to DAG Software. * Updated German translation. Thanks to A. Kohl. * Updated Bulgarian translation. Thanks to Blagovest Petrov. * Updated French translation. Thanks to Arnaud Schmittbuhl. * Updated Kazakh translation. Thanks to Baurzhan Muftakhidinov. Release 0.4.4: * Improved building on Windows and OS/2 and plug-in handling on all platforms. Thanks to Silvan Scherrer. * Added button to revert only the settings on the current tab of the settings dialog to their defaults. * Added tool tip showing paper size to the thumbnails view. * Added setting for number of entries in the recently used list. * Updated Russian translation. Thanks to Kyrill Detinov and Rashid Aliyev. * Updated Azerbaijani translation. Thanks to Rashid Aliyev. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith. * Updated Spanish translation. Thanks to Adolfo Jayme Barrientos. * Updated Slovak translation. Thanks to DAG Software. * Updated Ukrainian translation. Thanks to Yuri Chornoivan. * Updated Esperanto translation. Thanks to Eliovir. * Updated Czech translation. Thanks to Pavel Fric. * Updated Galician translation. Thanks to Marcos Lans. * Updated Romanian translation. Thanks to Vlad Paul Paval. * Updated Malay translation. Thanks to abuyop. * Updated British English translation. Thanks to Andi Chandler. * Updated Italian translation. Thanks to Claudio Arseni. * Updated Polish translation. Thanks to Mateusz Łukasik. * Updated Croatian translation. Thanks to freedomrun. * Updated French translation. Thanks to Teromene. * Added Portuguese translation. Thanks to Sérgio Marques. * Added Kazakh translation. Thanks to Baurzhan Muftakhidinov. Release 0.4.3: * Fixed custom movement shortcuts not being activated after program initialization. * Fixed default scroll area shortcuts not being shadowed completely. * Fixed outline view layout on open and refresh and trying to set resize mode of non-existent outline view columns. * Increased auto-refresh timeout and made auto-refresh and prefetch timeouts configurable. * Improved drawing of search result highlights and added a setting for the highlight color. * Added command-line options '--quiet' and '--help'. * Added support for multiple shortcuts for each action. * Added option to highlight the current thumbnail. * Updated Ukrainian translation. Thanks to Yuri Chornoivan. * Updated Malay translation. Thanks to abuyop. * Updated Slovak translation. Thanks to DAG Software. * Updated Croatian translation. Thanks to freedomrun. * Updated Polish translation. Thanks to Mateusz Łukasik. * Updated Czech translation. Thanks to Pavel Fric. * Updated French translation. Thanks to Hélion du Mas des Bourboux and Dorian. * Updated Catalan translation. Thanks to VPablo. * Updated Hebrew translation. Thanks to Yaron Shahrabani. * Updated Asturian translation. Thanks to Xuacu Saturio. * Updated British English translation. Thanks to Andi Chandler. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith. * Updated Romanian translation. Thanks to Vlad Paul Paval. * Added Galician translation. Thanks to Marcos Lans and Miguel Anxo Bouzada. Release 0.4.2: * Refactoring to improve code size and quality. * Added restoring and saving of printer settings. * Added command-line option to initiate a search in the current tab. * Added setting to determine the color of annotations added. * Instead of return to page, there is now jump backward and forward. * Added setting to limit thumbnails to search results. * Added setting on where to open new tabs. * Added setting to display the current page in the window title. * Updated Czech translation. Thanks Pavel Fric. * Updated Malay translation. Thanks to abuyop. * Updated French translation. Thanks to Tubuntu and Hélion du Mas des Bourboux. * Updated Ukrainian translation. Thanks to Yuri Chornoivan. * Updated Polish translation. Thanks to isamu715 and Mateusz Łukasik. * Updated Azerbaijani translation. Thanks to Rashid Aliyev. * Updated Romanian translation. Thanks to Vlad Paul Paval. * Updated Bulgarian translation. Thanks to Blagovest Petrov. * Updated Slovak translation. Thanks to DAG Software. * Updated Russian translation. Thanks to Eugene Marshal and Ivlev Denis. * Updated British English translation. Thanks to fossfreedom. * Updated Croatian translation. Thanks to freedomrun and Paolo Pelesk. * Updated Spanish translation. Thanks to Adolfo Jayme Barrientos and Aaron Farias. * Updated Italian translation. Thanks to Claudio Arseni. * Updated Catalan translation. Thanks to VPablo. * Updated Chinese (Simplified) translation. Thanks to Wang Dianjin. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith. Release 0.4.1: * Added configurable keyboard shortcuts. * Added per-plug-in settings for PDF and PS plug-ins. * Added granular hinting and thin line mode settings for the PDF plug-in. * Added progress and errors icons for page rendering. * Added workaround for overwriting a file with itself using a temporary file. * Added rudimentary text extraction and search support for DjVu documents. * Changed color inversion to be a per-tab property. * Improved rotation and color inversion in the presentation view. * Updated Danish translation. Thanks to Aputsiaq Niels Janussen. * Updated Czech translation. Thanks to Pavel Fric. * Updated Polish translation. Thanks to Mateusz Łukasik and isamu715. * Updated Malay translation. Thanks to abuyop. * Updated Slovak translation. Thanks to DAG Software. * Updated Italian translation. Thanks to Claudio Arseni. * Updated Russian translation. Thanks to Kyrill Detinov. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith. * Updated Danish translation. Thanks to Aputsiaq Niels Janussen. * Updated French translation. Thanks to Sylvie Gallet and Tubuntu. * Updated Catalan translation. Thanks to VPablo. * Updated Spanish translation. Thanks to Adolfo Jayme Barrientos. * Updated Hebrew translation. Thanks to Yaron Shahrabani. * Updated Ukrainian translation. Thanks to yurchor. * Updated British English translation. Thanks to Andi Chandler. * Added Esperanto translation. Thanks to Donald Rogers. * Added Bulgarian translation. Thanks to Atanas Kovachki and Blagovest Petrov. * Added partial Azerbaijani translation. Thanks to Rashid Aliyev. Release 0.4: * Added support for multiple formats. * Added format detection using libmagic. * Added support for PostScript. Thanks to Alexander Volkov. * Added rudimentary support for DjVu. * Added support for hyperlinks in DjVu documents. Thanks to Alexander Volkov. * Added support for outline and properties of DjVu documents. * Added support for UNIX signals. * Added missing support for links to external documents. * Small improvements to prefetching. * Changed presentation view to support rotation, caching and prefetching. * Dropped support for storing tabs and bookmarks as XML files. * Improved handling of headers and their interdependencies. Thanks to Alexander Volkov. * Updated Ukrainian translation. Thanks to Vladimir Smolyar and yurchor. * Updated Croatian translation. Thanks to freedomrun. * Updated Slovak translation. Thanks to DAG Software. * Updated Czech translation. Thanks to Pavel Fric. * Updated British English translation. Thanks to Andi Chandler. * Updated French translation. Thanks to Hélion du Mas des Bourboux. * Updated Polish translation. Thanks to Mateusz Łukasik and Mike08. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith. * Updated Hebrew translation. Thanks to Yaron Shahrabani. * Updated Catalan translation. Thanks to VPablo. * Updated Asturian translation. Thanks to Xuacu Saturio. * Updated French translation. Thanks to Sylvie Gallet and Tanguy Herrmann. * Updated Italian translation. Thanks to Claudio Arseni. * Updated Spanish translation. Thanks to Dante Diaz. * Updated Russian translation. Thanks to Vladimir Smolyar. * Updated Bosnian translation. Thanks to Kenan Dervišević. * Added Malay translation. Thanks to abuyop. Release 0.3.7: * Added persistent per-file settings. * Separated "Save copy" and "Save as" functionality. * Added extended print option "page ranges". * Added configurable background and paper color. * Added named instances. Thanks to Michał Trybus. * Refactored settings handling. Thanks to Alexander Volkov. * Reduced header interdependencies. Thanks to Alexander Volkov. * Changed searching for data files in the "data" subdirectory of the application directory. * Updated Hebrew translation. Thanks to Yaron Shahrabani. * Updated Italian translation. Thanks to Claudio Arseni. * Updated Slovak translation. Thanks to DAG Software. * Updated Brazilian Portuguese translation. Thanks to Átila Camurça and Phillipe Smith. * Updated Asturian translation. Thanks to Xuacu Saturio. * Updated Czech translation. Thanks to Pavel Fric. * Updated Danish translation. Thanks to Daniel Ejsing-Duun and Aputsiaq Niels Janussen. * Updated Romanian translation. Thanks to Vlad Paul Paval. * Updated Catalan translation. Thanks to VPablo. * Updated Russian translation. Thanks to Nkolay Parukhin. * Updated Spanish translation. Thanks to Adolfo Jayme Barrientos. * Updated Uyghur translation. Thanks to Gheyret T.Kenji and Sahran. * Updated Croatian translation. Thanks to freedomrun. * Added Bosnian translation. Thanks to Kenan Dervišević. * Added Polish translation. Thanks to Michał Trybus. * Added Basque translation. Thanks to Asier Iturralde Sarasola. * Added partial Kirgiz translation. Thanks to blacktext. * Added partial Indonesian translation. Thanks to Abdul Munif Hanafi. Release 0.3.6: * Added a 'multiple pages' layout mode. * Added support for extended options in the print dialog. * Added support for multiple returns. * Added rudimentary form support. * Fixed handling of boolean CUPS options. * Exposed render hint 'overprint preview'. * Added viewport culling for the thumbnails view. * Updated Slovak translation. Thanks to DAG Software. * Updated Czech translation. Thanks Pavel Fric. * Updated Hebrew translation. Thanks to Yaron Shahrabani. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith and Rafael Neri. * Updated Spanish translation. Thanks to Adolfo Jayme Barrientos, manolox and Daniel Ejsing-Duun. * Updated Croatian translation. Thanks to freedomrun and gogo. * Updated French translation. Thanks to Aurélien Ribeiro, Dominique Chomet, Quentin Pagès and Gisele Perreault. * Updated Greek translation. Thanks to George Christofis. * Updated Russian translation. Thanks to Kyrill Detinov and Vladimir Smolyar. * Updated Ukrainian translation. Thanks to Vladimir Smolyar. * Added Danish translation. Thanks to mjjzf, Ask Hjorth Larsen and Daniel Ejsing-Duun. * Added partial Uyghur translation. Thanks to Gheyret T.Kenji. * Added British English translation. Thanks to Andi Chandler. * Added Italian translation. Thanks to Claudio Arseni. * Added Romanian translation. Thanks to Vlad Paul Paval. * Added partial Chinese (Simplified) translation. Thanks to Wang Dianjin. * Added partial Burmese translation. Thanks to Pyae Sone. * Added Catalan translation. Thanks to VPablo. Release 0.3.5: * Improved compatibility with older versions of Qt and Poppler. * Improved the layout of the settings dialog. * Improved compatibility with other applications using Poppler by cropping text annotations to 24px x 24px @ 72dpi. * Added searching data files in the application directory to improve compatibility with Windows and OS/2. * Added a 'save image to file' option to the 'copy to clipboard' pop-up menu. * Added support for forward and inverse search using SyncTeX. * Updated Slovak and Czech translations. Thanks to DAG Software and Pavel Fric. * Updated Brazilian Portuguese translation. Thanks to Phillipe Smith and Fábio Nogueira. * Updated Russian and Ukrainian translations. Thanks to Vladimir Smolyar. * Added Hebrew translation. Thanks to Yaron Shahrabani. * Updated partial Greek translation. Thanks to George Christofis. * Added Turkish translation. Thanks to Şâkir Aşçı. * Added partial Croation translation. Thanks to freedomrun. * Added partial Finnish translation. Thanks to Eetu Aalto. * Added partial Asturian translation. Thanks to Xuacu Saturio. * Added partial French translation. Thanks to Baptiste Fontaine, Kévin Peignot, Smonff, Sylvie Gallet, fbn69 and Gisele Perreault. * Added partial Spanish translation. Thanks to Adolfo Jayme Barrientos, Dante Díaz and Paco Molinero. Release 0.3.4: * Fixed a crash when highlight all is enabled and the document is refreshed. * Fixed problems with highlight all and find next. * Added a setting to select the screen used in the presentation view. * Added a setting to synchronize main view and presentation view. * Added a 'Two pages with cover page' layout mode. * Added delayed pop-up menu for 'recently used' to 'open (in new tab)' tool bar action. * Added Brazilian Portuguese translation. Thanks to Phillipe Smith. * Updated Slovak translation. Thanks to DAG Software. * Updated Czech translation. Thanks to Pavel Fric. * Updated Russian and Ukrainian translations. Thanks to Vladimir Smolyar. Release 0.3.3: * Fixed some rendering artifacts. * Improved navigation using bookmarks. * Reorganized settings dialog and made keyboard modifiers for several mouse actions configurable. * Added menu and tool bar actions to copy texts or images or add annotations. * Added Ukrainian translation. Thanks to Vladimir Smolyar. * Updated Slovak translation. Thanks to DAG Software. * Updated Czech translation. Thanks to Pavel Fric. * Updated Russian translation. Thanks to Eugene Marshal and Vladimir Smolyar. Release 0.3.2: * Reduced code size and complexity. * Reduced memory consumption and made caching optional. * Further interface consolidation. * Changed the search interface to allow concurrent search processes. * Replaced the transient bookmarking mechanism in the document view with an optionally persistent bookmarking mechanism in the main window which bookmarks files and pages. * Added rudimentary annotation support. * Added '--unique' command-line option to the system-wide launcher. * Added Czech translation. Thanks to Pavel Fric. * Added partial Greek translation. Thanks to athmakrigiannis. * Added partial Russian translation. Thanks to v_2e. * Added Slovak translation. Thanks to DAG Software. Release 0.3.1: * Fixed several bugs. * Changed license from GPLv3 to GPLv2 to remove license incompatibilities with poppler. * Removed French, Ukrainian and Russian translations because of license change. Release 0.3: * Focus on usability of the interface. * Improved scaling. * Added printing using CUPS. * Added configurable tool bars. * Added build-time options. * Improved documentation. * Updated German translation. * Updated Russian translation. Thanks to Eugene Marshal. Release 0.2.2: * Improved settings dialog. * Improved thumbnails view. * Added recenctly used menu. * Added presentation view. * Added automatic refresh. * Added simple transient bookmarks mechanism. * Added '--unique' command-line option. * Added some help content and updated the manual page. Thanks to Benjamin Eltzner. * Updated French translation. Thanks to Fabian Pijcke. * Added partial Romanian translation. Thanks to Andi Cristian Șerbănescu. Release 0.2.1: * Extensive refactoring. * Improved search. * Simplified text-selection. * Added outline and thumbnails view. * Added settings dialog. * Added French translation. Thanks to Glad Deschrijver. * Added partial Russian, Belorussian and Ukrainian translations. Thanks to Leo Romanovski. Release 0.2: * Complete rewrite introducing background rendering. * Added rudimentary support for search and text-selection. * Limited page cache by byte count instead of image count. qpdfview-0.4.7/CONTRIBUTORS0000644000000000000000000000546312246606025013370 0ustar 00000000000000Eetu Aalto Automatizatorius abuyop Rashid Aliyev Claudio Arseni Şâkir Aşçı athmakrigiannis Dennis Baudys Adolfo Jayme Barrientos blacktext Hélion du Mas des Bourboux Miguel Anxo Bouzada Tobias B. Átila Camurça Marc Coll Carrillo Andi Chandler Dominique Chomet Yuri Chornoivan George Christofis DAG Software Ivlev Denis Kenan Dervišević Glad Deschrijver Kyrill Detinov Wang Dianjin Dante Díaz Dorian Daniel Ejsing-Duun Eliovir Benjamin Eltzner Thomas Etter Aaron Farias fbn69 Baptiste Fontaine fossfreedom freedomrun Pavel Fric Sylvie Gallet gogo Giovanni Grieco Abdul Munif Hanafi Anthony Harrington Tanguy Herrmann isamu715 Aputsiaq Niels Janussen A. Kohl Atanas Kovachki Marcos Lans Ask Hjorth Larsen Jerome Laurens Litty Mateusz Łukasik manolox Eugene Marshal Sérgio Marques Mike08 mjjzf Paco Molinero Baurzhan Muftakhidinov Rafael Neri Fábio Nogueira Sandor Ortegon Quentin Pagès Trisno Pamuji Nkolay Parukhin Vlad Paul Paval Kévin Peignot Paolo Pelesk Gisele Perreault Blagovest Petrov Fabian Pijcke Eugene Pivnev Adam Reichold Aurélien Ribeiro Donald Rogers Leo Romanovski Sahran Asier Iturralde Sarasola Xuacu Saturio Andi Cristian Șerbănescu Silvan Scherrer Arnaud Schmittbuhl Yaron Shahrabani Pierre Slamich Mark Smith Phillipe Smith Vladimir Smolyar Smonff Pyae Sone Pierre Soulat Piotr Strębski Teromene Gheyret T.Kenji Michał Trybus VPablo Alexander Volkov Thomas Worofsky Xiaoxing Ye Chris Young Rodrigo Zimmermann qpdfview-0.4.7/COPYING0000644000000000000000000004325412246606025012543 0ustar 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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. 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. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. qpdfview-0.4.7/README0000644000000000000000000000550012246606025012360 0ustar 00000000000000qpdfview is a tabbed document viewer using Poppler, libspectre, DjVuLibre, CUPS and Qt, licensed under GPL version 2 or later. The project homepage is "https://launchpad.net/qpdfview". The project maintainer is "Adam Reichold ". It depends on libQtCore, libQtGui. It also depends on libQtSvg, libQtSql, libQtDBus, libcups, resp. libz if SVG, SQL, D-Bus, CUPS, resp. SyncTeX support is enabled. It also depends on libmagic if Qt version 4 is used and libmagic support is enabled. The PDF plug-in depends on libQtCore, libQtXml, libQtGui and libpoppler-qt4. The PS plug-in depends on libQtCore, libQtGui and libspectre. The DjVu plug-in depends on libQtCore, libQtGui and libdjvulibre. It is built using "qmake qpdfview.pro" and "make". It is installed using "make install". The installation paths are defined in "qpdfview.pri". The following build-time options are available: * 'without_svg' disables SVG support, i.e. fallback and application-specific icons will not be available. * 'without_sql' disables SQL support, i.e. restoring tabs, bookmarks and per-file settings will not be available. * 'without_dbus' disables D-Bus support, i.e. the '--unique' command-line option will not be available. * 'without_pkgconfig' disables the use of pkg-config, i.e. compiler and linker options have to be configured manually in "qpdfview.pri". * 'without_pdf' disables PDF support, i.e. the PDF plug-in using Poppler will not be built. * 'without_ps' disables PS support, i.e. the PS plug-in using libspectre will not be built. * 'without_djvu' disables DjVu support, i.e. the DjVu plug-in using DjVuLibre will not be built. * 'static_pdf_plugin' links the PDF plug-in statically (This could lead to linker dependency collisions.) * 'static_ps_plugin' links the PS plug-in statically. (This could lead to linker dependency collisions.) * 'static_djvu_plugin' links the DjVu plug-in statically. (This could lead to linker dependency collisions.) * 'without_cups' disables CUPS support, i.e. the program will attempt to rasterize the document instead of requesting CUPS to print the document file. * 'without_synctex' disables SyncTeX support, i.e. the program will not perform forward and inverse search for sources. * 'without_magic' disables libmagic support, i.e. the program will determine file type using the file suffix. * 'without_signals' disabled support for UNIX signals, i.e. the program will not save bookmarks, tabs and per-file settings on receiving SIGINT or SIGTERM. For example, if one wants to build the program without support for CUPS and PostScript, one could run "qmake CONFIG+="without_cups without_ps" qpdfview.pro" instead of "qmake qpdfview.pro". The fallback and application-specific icons are derived from the Tango icon theme available at "http://tango.freedesktop.org". qpdfview-0.4.7/TODO0000644000000000000000000000022712246606025012171 0ustar 00000000000000* improve DjVu support * add DVI support * improve text-selection support * improve link support * improve annotation support * improve form support qpdfview-0.4.7/help/0000755000000000000000000000000012246606025012430 5ustar 00000000000000qpdfview-0.4.7/icons/0000755000000000000000000000000012246606025012613 5ustar 00000000000000qpdfview-0.4.7/miscellaneous/0000755000000000000000000000000012246606025014343 5ustar 00000000000000qpdfview-0.4.7/qpdfview-application.pro0000644000000000000000000001106212246606025016350 0ustar 00000000000000include(qpdfview.pri) TARGET = qpdfview TEMPLATE = app OBJECTS_DIR = objects MOC_DIR = moc HEADERS += \ sources/global.h \ sources/printoptions.h \ sources/settings.h \ sources/model.h \ sources/pluginhandler.h \ sources/shortcuthandler.h \ sources/rendertask.h \ sources/pageitem.h \ sources/presentationview.h \ sources/searchtask.h \ sources/miscellaneous.h \ sources/documentlayout.h \ sources/documentview.h \ sources/printdialog.h \ sources/settingsdialog.h \ sources/helpdialog.h \ sources/recentlyusedmenu.h \ sources/bookmarkmenu.h \ sources/database.h \ sources/mainwindow.h SOURCES += \ sources/settings.cpp \ sources/pluginhandler.cpp \ sources/shortcuthandler.cpp \ sources/rendertask.cpp \ sources/pageitem.cpp \ sources/presentationview.cpp \ sources/searchtask.cpp \ sources/miscellaneous.cpp \ sources/documentlayout.cpp \ sources/documentview.cpp \ sources/printdialog.cpp \ sources/settingsdialog.cpp \ sources/helpdialog.cpp \ sources/recentlyusedmenu.cpp \ sources/bookmarkmenu.cpp \ sources/database.cpp \ sources/mainwindow.cpp \ sources/main.cpp DEFINES += APPLICATION_VERSION=\\\"$${APPLICATION_VERSION}\\\" QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport !without_svg { DEFINES += WITH_SVG QT += svg RESOURCES += qpdfview.qrc } !without_sql { DEFINES += WITH_SQL QT += sql } !without_dbus { DEFINES += WITH_DBUS QT += dbus } DEFINES += PLUGIN_INSTALL_PATH=\\\"$${PLUGIN_INSTALL_PATH}\\\" !without_pdf { DEFINES += WITH_PDF static_pdf_plugin { isEmpty(PDF_PLUGIN_NAME):PDF_PLUGIN_NAME = libqpdfview_pdf.a DEFINES += STATIC_PDF_PLUGIN LIBS += $$PDF_PLUGIN_NAME PRE_TARGETDEPS += $$PDF_PLUGIN_NAME QT += xml !without_pkgconfig { CONFIG += link_pkgconfig PKGCONFIG += poppler-qt4 } } else { isEmpty(PDF_PLUGIN_NAME):PDF_PLUGIN_NAME = libqpdfview_pdf.so } DEFINES += PDF_PLUGIN_NAME=\\\"$${PDF_PLUGIN_NAME}\\\" } !without_ps { DEFINES += WITH_PS static_ps_plugin { isEmpty(PS_PLUGIN_NAME):PS_PLUGIN_NAME = libqpdfview_ps.a DEFINES += STATIC_PS_PLUGIN LIBS += $$PS_PLUGIN_NAME PRE_TARGETDEPS += $$PS_PLUGIN_NAME !without_pkgconfig { CONFIG += link_pkgconfig PKGCONFIG += libspectre } } else { isEmpty(PS_PLUGIN_NAME):PS_PLUGIN_NAME = libqpdfview_ps.so } DEFINES += PS_PLUGIN_NAME=\\\"$${PS_PLUGIN_NAME}\\\" } !without_djvu { DEFINES += WITH_DJVU static_djvu_plugin { isEmpty(DJVU_PLUGIN_NAME):DJVU_PLUGIN_NAME = libqpdfview_djvu.a DEFINES += STATIC_DJVU_PLUGIN LIBS += $$DJVU_PLUGIN_NAME PRE_TARGETDEPS += $$DJVU_PLUGIN_NAME !without_pkgconfig { CONFIG += link_pkgconfig PKGCONFIG += ddjvuapi } } else { isEmpty(DJVU_PLUGIN_NAME):DJVU_PLUGIN_NAME = libqpdfview_djvu.so } DEFINES += DJVU_PLUGIN_NAME=\\\"$${DJVU_PLUGIN_NAME}\\\" } !without_cups { DEFINES += WITH_CUPS !isEmpty(CUPS_LIBS) { LIBS += $$CUPS_LIBS } else { LIBS += $$system(cups-config --libs) } } !without_synctex { DEFINES += WITH_SYNCTEX LIBS += -lz INCLUDEPATH += synctex SOURCES += synctex/synctex_parser.c synctex/synctex_parser_utils.c } lessThan(QT_MAJOR_VERSION, 5) : !without_magic { DEFINES += WITH_MAGIC LIBS += -lmagic } !without_signals { DEFINES += WITH_SIGNALS HEADERS += sources/signalhandler.h SOURCES += sources/signalhandler.cpp } DEFINES += DATA_INSTALL_PATH=\\\"$${DATA_INSTALL_PATH}\\\" DESKTOP_FILE = miscellaneous/qpdfview.desktop !without_pdf:MIME_TYPES += application/pdf application/x-pdf text/pdf text/x-pdf image/pdf image/x-pdf !without_ps:MIME_TYPES += application/postscript !without_djvu:MIME_TYPES += image/vnd.djvu image/x-djvu system("sed -e \"s:DATA_INSTALL_PATH:$${DATA_INSTALL_PATH}:\" -e \"s:MIME_TYPES:$$join(MIME_TYPES,";","",";"):\" $${DESKTOP_FILE}.in > $${DESKTOP_FILE}") target.path = $${TARGET_INSTALL_PATH} data.files = icons/qpdfview.svg translations/*.qm help/help*.html data.path = $${DATA_INSTALL_PATH} launcher.files = $${DESKTOP_FILE} launcher.path = $${LAUNCHER_INSTALL_PATH} manual.files = miscellaneous/qpdfview.1 manual.path = $${MANUAL_INSTALL_PATH} INSTALLS += target data launcher manual INCLUDEPATH += icons win32:RC_FILE = icons/qpdfview_win32.rc os2:RC_FILE = icons/qpdfview_os2.rc qpdfview-0.4.7/qpdfview-djvu-plugin.pro0000644000000000000000000000126312246606025016313 0ustar 00000000000000include(qpdfview.pri) TARGET = qpdfview_djvu TEMPLATE = lib CONFIG += plugin static_djvu_plugin:CONFIG += static TARGET_SHORT = qpdfdjvu !isEmpty(PLUGIN_DESTDIR): DESTDIR = $$PLUGIN_DESTDIR OBJECTS_DIR = objects-djvu MOC_DIR = moc-dvju HEADERS = sources/global.h sources/model.h sources/djvumodel.h SOURCES = sources/djvumodel.cpp QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets !without_pkgconfig { CONFIG += link_pkgconfig PKGCONFIG += ddjvuapi } else { DEFINES += $$DJVU_PLUGIN_DEFINES INCLUDEPATH += $$DJVU_PLUGIN_INCLUDEPATH LIBS += $$DJVU_PLUGIN_LIBS } !static_dvju_plugin { target.path = $${PLUGIN_INSTALL_PATH} INSTALLS += target } qpdfview-0.4.7/qpdfview-pdf-plugin.pro0000644000000000000000000000244712246606025016121 0ustar 00000000000000include(qpdfview.pri) TARGET = qpdfview_pdf TEMPLATE = lib CONFIG += plugin static_pdf_plugin:CONFIG += static TARGET_SHORT = qpdfpdf !isEmpty(PLUGIN_DESTDIR): DESTDIR = $$PLUGIN_DESTDIR OBJECTS_DIR = objects-pdf MOC_DIR = moc-pdf HEADERS = sources/global.h sources/model.h sources/pdfmodel.h sources/annotationwidgets.h sources/formfieldwidgets.h SOURCES = sources/pdfmodel.cpp sources/annotationwidgets.cpp sources/formfieldwidgets.cpp QT += core xml gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets !without_pkgconfig { poppler_qt_pkg = poppler-qt$${QT_MAJOR_VERSION} CONFIG += link_pkgconfig PKGCONFIG += $${poppler_qt_pkg} system(pkg-config --atleast-version=0.14 $${poppler_qt_pkg}):DEFINES += HAS_POPPLER_14 system(pkg-config --atleast-version=0.18 $${poppler_qt_pkg}):DEFINES += HAS_POPPLER_18 system(pkg-config --atleast-version=0.20.1 $${poppler_qt_pkg}):DEFINES += HAS_POPPLER_20 system(pkg-config --atleast-version=0.22 $${poppler_qt_pkg}):DEFINES += HAS_POPPLER_22 system(pkg-config --atleast-version=0.24 $${poppler_qt_pkg}):DEFINES += HAS_POPPLER_24 } else { DEFINES += $$PDF_PLUGIN_DEFINES INCLUDEPATH += $$PDF_PLUGIN_INCLUDEPATH LIBS += $$PDF_PLUGIN_LIBS } !static_pdf_plugin { target.path = $${PLUGIN_INSTALL_PATH} INSTALLS += target } qpdfview-0.4.7/qpdfview-ps-plugin.pro0000644000000000000000000000123712246606025015766 0ustar 00000000000000include(qpdfview.pri) TARGET = qpdfview_ps TEMPLATE = lib CONFIG += plugin static_ps_plugin:CONFIG += static TARGET_SHORT = qpdfps !isEmpty(PLUGIN_DESTDIR): DESTDIR = $$PLUGIN_DESTDIR OBJECTS_DIR = objects-ps MOC_DIR = moc-ps HEADERS = sources/global.h sources/model.h sources/psmodel.h SOURCES = sources/psmodel.cpp QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets !without_pkgconfig { CONFIG += link_pkgconfig PKGCONFIG += libspectre } else { DEFINES += $$PS_PLUGIN_DEFINES INCLUDEPATH += $$PS_PLUGIN_INCLUDEPATH LIBS += $$PS_PLUGIN_LIBS } !static_ps_plugin { target.path = $${PLUGIN_INSTALL_PATH} INSTALLS += target } qpdfview-0.4.7/qpdfview.pri0000644000000000000000000000072512246606025014045 0ustar 00000000000000isEmpty(APPLICATION_VERSION):APPLICATION_VERSION = 0.4.7 isEmpty(TARGET_INSTALL_PATH):TARGET_INSTALL_PATH = /usr/bin isEmpty(PLUGIN_INSTALL_PATH):PLUGIN_INSTALL_PATH = /usr/lib/qpdfview isEmpty(DATA_INSTALL_PATH):DATA_INSTALL_PATH = /usr/share/qpdfview isEmpty(LAUNCHER_INSTALL_PATH):LAUNCHER_INSTALL_PATH = /usr/share/applications isEmpty(MANUAL_INSTALL_PATH):MANUAL_INSTALL_PATH = /usr/share/man/man1 win32:include(qpdfview_win32.pri) os2:include(qpdfview_os2.pri) qpdfview-0.4.7/qpdfview.pro0000644000000000000000000000321212246606025014045 0ustar 00000000000000include(qpdfview.pri) TEMPLATE = subdirs CONFIG += ordered !without_pdf { SUBDIRS += qpdfview-pdf-plugin.pro qpdfview-application.pro.depends = qpdfview-pdf-plugin.pro } !without_ps { SUBDIRS += qpdfview-ps-plugin.pro qpdfview-application.pro.depends = qpdfview-ps-plugin.pro } !without_djvu { SUBDIRS += qpdfview-djvu-plugin.pro qpdfview-application.pro.depends = qpdfview-djvu-plugin.pro } SUBDIRS += qpdfview-application.pro TRANSLATIONS += \ translations/qpdfview_ast.ts \ translations/qpdfview_az.ts \ translations/qpdfview_bg.ts \ translations/qpdfview_bs.ts \ translations/qpdfview_ca.ts \ translations/qpdfview_cs.ts \ translations/qpdfview_da.ts \ translations/qpdfview_de.ts \ translations/qpdfview_el.ts \ translations/qpdfview_en_GB.ts \ translations/qpdfview_eo.ts \ translations/qpdfview_es.ts \ translations/qpdfview_eu.ts \ translations/qpdfview_fi.ts \ translations/qpdfview_fr.ts \ translations/qpdfview_gl.ts \ translations/qpdfview_he.ts \ translations/qpdfview_hr.ts \ translations/qpdfview_id.ts \ translations/qpdfview_it.ts \ translations/qpdfview_kk.ts \ translations/qpdfview_ky.ts \ translations/qpdfview_lt.ts \ translations/qpdfview_ms.ts \ translations/qpdfview_my.ts \ translations/qpdfview_pl.ts \ translations/qpdfview_pt.ts \ translations/qpdfview_pt_BR.ts \ translations/qpdfview_ro.ts \ translations/qpdfview_ru.ts \ translations/qpdfview_sk.ts \ translations/qpdfview_tr.ts \ translations/qpdfview_ug.ts \ translations/qpdfview_uk.ts \ translations/qpdfview_zh_CN.ts qpdfview-0.4.7/qpdfview.qrc0000644000000000000000000000310612246606025014034 0ustar 00000000000000 icons/qpdfview.svg icons/image-loading.svg icons/image-missing.svg icons/document-open.svg icons/tab-new.svg icons/view-refresh.svg icons/document-print.svg icons/document-save.svg icons/document-save-as.svg icons/go-previous.svg icons/go-next.svg icons/go-first.svg icons/go-last.svg icons/go-jump.svg icons/media-seek-backward.svg icons/media-seek-forward.svg icons/edit-find.svg icons/go-up.svg icons/go-down.svg icons/process-stop.svg icons/edit-copy.svg icons/mail-attachment.svg icons/continuous.svg icons/two-pages.svg icons/two-pages-with-cover-page.svg icons/multiple-pages.svg icons/zoom-in.svg icons/zoom-out.svg icons/zoom-original.svg icons/fit-to-page-width.svg icons/fit-to-page-size.svg icons/object-rotate-left.svg icons/object-rotate-right.svg icons/view-fullscreen.svg icons/x-office-presentation.svg qpdfview-0.4.7/sources/0000755000000000000000000000000012246606025013163 5ustar 00000000000000qpdfview-0.4.7/synctex/0000755000000000000000000000000012246606025013175 5ustar 00000000000000qpdfview-0.4.7/translations/0000755000000000000000000000000012246606025014221 5ustar 00000000000000qpdfview-0.4.7/help/help.html0000644000000000000000000004563312246606025014261 0ustar 00000000000000 Help

Help

Table of contents

  1. Main menu
    1. File
    2. Edit
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Introduction

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_az.html0000644000000000000000000004613412246606025014750 0ustar 00000000000000 Yardım

Yardım

Mündəricat

  1. Ana səhifə
    1. Fayl
    2. Redaktə
    3. Görünüş
    4. Siğmələr
    5. Əlfəcinlər
    6. Yardım
  2. Əsas görünüş
  3. Yardımçı görünüş
  4. Seçənəklər
    1. Davran;. seçənəkləri
    2. Qrafiki seçənəklər
    3. İnterfeys seçənəkləri
    4. Qısayol seçənəkləri
    5. Təyinedici seçənəklər

Giriş

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Ana menyu

Fayl

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Ən çox istid=fadə edilmişlər Ən çox istifadə olunan faylların siyahısını cəmləşdirir (seçənəklərdə aktivləşdirilibsə).
  • Yenilə Hazırkı siğmədə yerləşən faylı yenidən yükləyir.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Çıxış Bütün tabları bağla və proqramdan çıx.

Redaktə

  • Sənədirn Növbəti/Öncəki/İlk/Sonuncu səhifə Növbətiyə keç/öncəkinə/ilkə/son səhifəyə.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

Görünüş

  • Davamedici Səhifənin bütün sətrlərinin hansı halda eyni baxtda görünəcəyini təyin edir.
  • İki səhifə Səhifədə iki sütundan istifadə edilməsinə gətirir.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Miqyası bpyüt Miqyası 10% bpyüdür.
  • Miqyası kiçild 10% miqyası kiçildir.
  • Orijinal ölçü Miqyası orijinal 100%-ə qaytarır.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_bg.html0000644000000000000000000004565112246606025014731 0ustar 00000000000000 Помощ

Помощ

Table of contents

  1. Main menu
    1. File
    2. Edit
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Introduction

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_cs.html0000644000000000000000000005271312246606025014743 0ustar 00000000000000 Nápověda

Nápověda

Obsah

  1. Hlavní nabídku
    1. Soubor
    2. Úpravy
    3. Pohled
    4. Karty
    5. Záložky
    6. Nápověda
  2. Hlavní pohled
  3. Pomocné pohledy
  4. Nastavení
    1. Nastavení chování
    2. Nastavení grafiky
    3. Nastavení rozhraní
    4. Nastavení klávesových zkratek
    5. Nastavení modifikátorů

Úvod

qpdfviewje prohlížeč dokumentů s kartami. Používá Poppler pro podporu PDF, libspectre pro podporu PS, DjVuLibre pro podporu DjVu, CUPS pro podporu tisku a sadu Qt pro své rozhraní.

Podívejte se, prosím, do manuálových stránek, hledáte-li informace k volbám příkazového řádku a k souborům s nastavením.

Hlavní nabídka

Soubor

  • Otevřít... Otevře dialog pro výběr souboru k otevření v nynější kartě. Pokud není žádná karta, soubor je otevřen v nové kartě.
  • Otevřít v nové kartě... Otevře dialog pro výběr souborů k otevření v nových kartách.
  • Nedávno použité Obsahuje seznam naposledy použitých souborů (pokud je to povoleno v nastavení).
  • Obnovit Obnoví soubor zobrazený v nynější kartě.
  • Uložit kopii Otevře dialog pro uložení kopie souboru zobrazeného v nynější kartě.
  • Uložit jako... Otevře dialog pro uložení souboru zobrazeného v nynější kartě včetně změn v poznámkách a formulářových polích.
  • Tisk... Otevře dialog pro vytištění souboru zobrazeného v nynější kartě.
  • Ukončit Zavře všechny karty a program ukončí.

Úpravy

  • Další/Předchozí/První/Poslední strana Skočí na další/předchozí/první/poslední stranu dokumentu.
  • Přejít na stranu... Otevře dialog pro vstoupení na stranu zobrazenou v nynější kartě.
  • Skočit zpět/vpřed Skočí zpět/vpřed v historii zobrazené strany.
  • Hledat... Otevře pod hlavním pohledem vyhledávací řádek. Hledání začne automaticky dvě sekundy po poslední změně hledaného pojmu nebo je spuštěno ručně stisknutím klávesy Enter. Pokud je podržen modifikátor Shift, když je stisknuta klávesa Enter, hledání začne ve všech kartách a ne jen v nynější kartě.
  • Najít předchozí/další Skočí v dokumentu na předchozí/další výskyt hledaného pojmu.
  • Zrušit hledání Zruší nyní probíhající hledání a zavře vyhledávací řádek.
  • Kopírovat do schránky Je-li zaškrtnuto, program počká na vytvoření rámečku pro zkopírování textu nebo obrázků tažením.
  • Přidat poznámku Je-li zaškrtnuto, program počká na vytvoření rámečku pro přidání poznámek tažením.
  • Nastavení... Otevře dialog pro nastavení. Tlačítko označené Výchozí vrátí všechna nastavení všech karet zpět na jejich výchozí hodnoty. Tlačítko označené Výchozí na nynější kartě vrátí zpět na výchozí hodnotu pouze nastavení nynější karty.

Nynější stranu lze změnit zadáním požadované strany do textového pole v panelu nástrojů pro úpravy, který je možné zaměřit pomocí Ctrl+K, a stisknutím klávesy Enter.

Pohled

  • Průběžně Určuje, zda jsou všechny řádky rozvržení strany viditelné zároveň.
  • Dvě strany Určuje, zda rozvržení strany používá dva sloupce
  • Dvě strany s titulní stranou Určuje, zda rozvržení strany používá dva sloupce se zalomením po titulní straně.
  • Více stran Určuje, zda rozvržení strany používá více sloupců. Počet sloupců lze změnit v dialogu pro nastavení.
  • Přiblížit Zvyšuje násobek zvětšení o 10 procent.
  • Oddálit Snižuje násobek zvětšení o 10 procent.
  • Původní velikost Nastaví násobek zvětšení znovu na 100 procent.
  • Přizpůsobit šířce strany Určuje násobek zvětšení tak, že se všechny strany vodorovně zcela vejdou do hlavního pohledu
  • Přizpůsobit velikosti strany Určuje násobek zvětšení tak, že se všechny strany vodorovně i svisle zcela vejdou do hlavního pohledu.
  • Otočit vlevo Otočí strany doleva/proti směru hodinových ručiček o 90 stupňů.
  • Otočit vpravo Otočí strany doprava/po směru hodinových ručiček o 90 stupňů.
  • Obrátit barvy Určuje, zda jsou strany kresleny s obrácenými barvami.
  • Nástrojové panely Tato nabídka obsahuje seznam dostupných nástrojových panelů pro přístup k často používaným činnostem.
  • Postranní panely Tato nabídka obsahuje seznam dostupných postranních panelů pro zobrazení doplňkových informací..
  • Písma... Otevře dialog uvádějící v seznamu písma použitá v dokumentu.
  • Celá obrazovka Přepne režim na celou obrazovku, tj. okno je ukázáno zvětšené a bez dekorace.
  • Promítání... Vstoupí do režimu promítání, jejž lze opustit stisknutím klávesy F12 nebo Esc. Klávesa Home/End se používá k zobrazení první/poslední strany. Klávesy šipek vpravo a dolů, mezerník a Page Down se používají pro skok na další stranu. Klávesy šipek vlevo a nahoru, Backspace a Page Up se používají pro skok na předchozí stranu. Stisknutí Ctrl a Enter provede skok zpět na stranu před posledním skokem.

Násobek zvětšení lze změnit zadáním požadovaného procenta do textového pole v panelu nástrojů pro pohled, který je možné zaměřit pomocí Ctrl+L, a stisknutím klávesy Enter.

Karty

  • Předchozí/Další karta Udělá z předchozí/další karty nynější kartu. Proběhne na poslední/první kartu, pokud je první/poslední karta nynější kartou.
  • Zavřít kartu Zavře nynější kartu.
  • Zavřít všechny karty Zavře všechny karty.
  • Zavřít všechny karty kromě nynější karty Zavře všechny karty kromě nynější karty.

Tato nabídka obsahuje seznam všech karet, ze kterých je možné udělat nynější kartu klepnutím na odpovídající položku nabídky. Karty lze rovněž zavřít klepnutím prostředním tlačítkem myši. Prvních devět karet je také možné zapnout podržením modifikátoru Alt a stisknutím kláves od jedné do devíti.

Záložky

  • Předchozí záložka Skočí na nejbližší záložku před nynější stranou.
  • Další záložka Skočí na nejbližší záložku po nynější straně.
  • Přidat záložku Přidá záložku pro nynější soubor a stranu.
  • Odstranit záložku Odstraní záložku pro nynější soubor a stranu.
  • Odstranit všechny záložky Odstraní všechny záložky.
  • Otevřít Otevře odpovídající soubor v nynější kartě. Pokud není žádná karta, soubor je otevřen v nové kartě.
  • Otevřít v nové kartě Otevře odpovídající soubor v nové kartě.
  • Jít na stranu Skočí na odpovídající stranu, pokud je odpovídající soubor již otevřen. Jinak je odpovídající soubor otevřen v nové kartě.

Nápověda

  • Obsah Zobrazí tento dokument.
  • O programu Zobrazí verzi programu.

Hlavní pohled

Klávesa Backspace/mezerník skočí na předchozí/další stranu. Klávesa Home/End skočí na první/poslední stranu. Klávesy šipek, Page Up a Page Down posouvají pohled. Stisknutím Ctrl a Enter se skočí na stranu před posledním skokem

Pomocí kolečka myši se dokument projíždí nahoru a dolů. Podržením klávesy Alt během používání kolečka myši se dokument posunuje vlevo a vpravo. Podržením Ctrl během používání kolečka myši se mění velikost dokumentu. Podržením klávesy Shift během používání kolečka myši se dokument otáčí. (Modifikátory klávesnice se dají změnit v dialogu pro nastavení.)

Odkazy jsou zvýrazněny červenými rámečky (pokud je to povoleno v nastavení). Klepněte levým tlačítkem myši na odkaz pro ukázání odkazované strany nebo otevření odkazované adresy (URL) ve výchozím prohlížeči (pokud je to povoleno v nastavení). Přejetí nad odkazem zobrazí jeho cíl jako nástrojovou radu.

Formulářová pole jsou zvýrazněna modrými rámečky (pokud je to povoleno v nastavení). Klepněte levým tlačítkem myši na formulářové pole pro upravení jeho obsahu. Přejetí nad formulářovým polem zobrazí jeho cíl jako nástrojovou radu.

Zdroj polohy v dokumentu je vyžádán dvojitým klepnutím levým tlačítkem myši, čímž je pomocí editoru zdroje otevřen první odpovídající uzel SyncTeX.

Pro kopírování textů nebo obrázků podržteShift, klepněte a podržte levé tlačítko myši a tažením okolo oblasti ke zkopírování vytvořte rámeček. Jakmile je tlačítko myši uvolněno, zobrazí se vyskakovací nabídka, kde se zvolí, zda texty nebo obrázky kopírovat do schránky.

Pro přidání poznámek, hold CTRL, podržteShift, klepněte a podržte levé tlačítko myši a tažením okolo zájmové oblasti vytvořte rámeček. Jakmile je tlačítko myši uvolněno, zobrazí se vyskakovací nabídka, kde se zvolí, zda text přidat nebo zvýraznit poznámky. Klepněte levým tlačítkem myši pro upravení poznámek. Klepněte pravým tlačítkem myši pro odstranění poznámek. (přidávání a odstraňování poznámek vyžaduje verzi knihovny Poppler 0.20.1 nebo vyšší.) Přejetí nad poznámkou zobrazí její obsah jako nástrojovou radu.

Pomocné pohledy

Pohled na osnovu zobrazí přehled obsahu dokumentu. Klepnutím levým tlačítkem myši na položku se skočí na příslušnou stranu v hlavním pohledu. K rozbalení/složení všech položek pod vybranou položkou se dá použít nabídka souvisejících činností.

Pohled na vlastnosti zobrazí dodatečné informace obsažené v dokumentu.

Pohled na náhledy zobrazí menší verze stran dokumentu. Klepnutím levým tlačítkem myši na položku se skočí na příslušnou stranu v hlavním pohledu.

Nastavení

Nastavení chování

  • Otevřít adresu (URL) Určuje, zda se odkazy na adresu (URL) otevřou ve výchozím prohlížeči.
  • Otevřít přiložené soubory Určuje, zda budou přiložené soubory otevřeny ihned po uložení.
  • Obnovit automaticky Určuje, zda jsou soubory automaticky nahrány znovu, když jsou změněny na disku.
  • Sledovat nedávno použité Je-li povoleno, je dostupná nabídka pro nedávno použité, v níž je uvedeno tolik nedávno použitých souborů, kolik je nastaveno volbou Počet nedávno použitých. (Nabude účinnosti po opětovném spuštění programu.)
  • Obnovit karty Je-li povoleno, karty a jejich vlastnosti jsou uloženy při ukončení programu a obnoveny po jeho opětovném spuštění.
  • Obnovit záložky Je-li povoleno, záložky jsou uloženy při ukončení programu a obnoveny po jeho opětovném spuštění.
  • Obnovit nastavení souborů Je-li povoleno, nastavení souboru jsou uložena/obnovena při otevření/zavření karet.
  • Ovládat promítání Je-li povoleno, je možné hlavní pohled použít k ovládání pohledu na promítání.
  • Promítací obrazovka Je-li povoleno, je možné hlavní pohled použít k ovládání pohledu na promítání.
  • Barva zvýraznění Určuje barvu zvýraznění.
  • Doba trvání zvýraznění Určuje dobu trvání dočasných zvýraznění.
  • Barva poznámky Barva poznámek přidaná programem pomocí klíčových slov barev SVG nebo šestnáctkovým zápisem '#rrggbb'.
  • Editor zdroje Program, který je spuštěn, aby v něm byly upravovány zdroje. '%1' je nahrazeno absolutní souborovou cestou. '%2' příp. '%3' je nahrazeno číslem řádku popřípadě sloupce.

Nastavení grafiky

  • Zachovat zastaralé pixmapy Je-li povoleno, potom se po změně násobku zvětšení pixmapy uložené ve vyrovnávací paměti použijí na kreslení přibližných pixmap konečných pixmap, dokud tyto nebudou dostupné za cenu zvýšeného využití paměti.
  • Použít poměr pixelu zařízení Je-li povoleno, používá se při kreslení fyzického rozlišení a při zobrazování logického rozlišení nejvyšší dostupný poměr pixelu zařízení.
  • Obtáhnout strany Určuje, zda jsou strany odděleny od pozadí.
  • Obtáhnout odkazy Určuje, zda jsou odkazy zvýrazněny červenými rámečky.
  • Obtáhnout formulářová pole Určuje, zda jsou formulářová pole zvýrazněna modrými rámečky.
  • Barva pozadí Určuje barvu pozadí pomocí klíčových slov barev SVG nebo šestnáctkovým zápisem '#rrggbb'.
  • Barva papíru Určuje barvu stran pomocí klíčových slov barev SVG nebo šestnáctkovým zápisem '#rrggbb'.
  • Barva pozadí promítání Potlačí barvu papíru ve výpočtu barvy pozadí pohledu na promítání. Je stanovena pomocí klíčových slov barev SVG nebo šestnáctkovým zápisem '#rrggbb'.
  • Stran na řádek Počet stran na řádek v režimu rozvržení na více stran
  • Odstup stran Určuje jak svislý tak vodorovný odstup zobrazený mezi stranami.
  • Odstup náhledů Určuje jak svislý tak vodorovný odstup zobrazený mezi náhledy.
  • Velikost náhledů Určuje velikost náhledů.
  • Velikost vyrovnávací paměti Program se pokusí o ukládání vykreslených stran v rámci tohoto omezení do vyrovnávací paměti, čímž dojde ke zvýšení rychlosti kreslení za cenu zvýšeného využití paměti.
  • Přednatažení Program se pokusí o vykreslování stran, jež ještě nejsou viditelné, čímž dojde ke zvýšení rychlosti kreslení za cenu zvýšeného využití paměti.
  • Vzdálenost přednatažení Počet řádků za nynějším řádkem a dvakrát tolik řádků před nynějším řádkem, které jsou přednataženy.
  • Nastavení PDF
    • Náhled přetisku Je-li povoleno, je zobrazen náhled tisku jedné vrstvy černě na vrchu jiné.
    • Vyhlazování Zlepšuje jakost zobrazení za cenu výkonu.
    • Vyhlazování textu Zlepšuje jakost zobrazení textu za cenu výkonu.
    • Instruování textu U některých písem může zlepšit jakost zobrazení textu.
  • Nastavení PS
    • Bity vyhlazování grafiky Určuje množství vyhlazování pro grafiku.
    • Bity vyhlazování textu Určuje množství vyhlazování pro text.

Nastavení rozhraní

  • Umístění karet Stanovuje, při kterém okraji hlavního pohledu budou karty zobrazeny.
  • Viditelnost karet Určuje, zda budou karty zobrazeny, v případě že budou otevřeny méně než dva dokumenty.
  • Nová karta vedle nynější karty Je-li povoleno, jsou nové karty otevřeny napravo od činné karty.
  • Počet nedávno použitých Nastavuje počet souborů, které jsou uvedeny v nabídce s nedávno použitými, jestliže je sledování nedávno použitých povoleno.
  • Panel nástrojů pro soubor Stanovuje, které činnosti jsou viditelné v panelu nástrojů pro soubor. Dostupné činnosti jsou Otevřít v nové kartě, Otevřít, Uložit kopii, Uložit jako, Tisk a oddělovač. (Nabude účinnosti po opětovném spuštění programu.)
  • Panel nástrojů pro úpravy Stanovuje, které činnosti jsou viditelné v panelu nástrojů pro úpravy. Dostupné činnosti jsou Nynější strana, Předchozí strana, Další strana, První strana, Poslední strana, Přejít na stranu, Skočit zpět, Skočit vpřed, Hledat, Kopírovat do schránky, Přidat poznámku a oddělovač. (Nabude účinnosti po opětovném spuštění programu.)
  • Panel nástrojů pro pohled Stanovuje, které činnosti jsou viditelné v panelu nástrojů pro pohled. Dostupné činnosti jsou Násobek zvětšení, Přiblížit, Oddálit, Průběžně, Dvě strany, Dvě strany s titulní stranou, Více stran, Původní velikost, Přizpůsobit šířce strany, Přizpůsobit velikosti strany, Otočit vlevo, Otočit vpravo, Celá obrazovka, Promítání a oddělovač. (Nabude účinnosti po opětovném spuštění programu.)
  • Nynější strana v názvu okna Je-li povoleno, jsou nynější strana a počet stran dokumentu v činné kartě zobrazeny v názvu okna.
  • Zvýraznit položku osnovy Je-li povoleno, bude v pohledu na osnovu zvýrazněna první položka ukazující na nynější stranu, kdykoli se posunutím nynější strana změní.
  • Zvýraznit nynější náhled Je-li povoleno, bude nynější strana zvýrazněna v pohledu na náhledy
  • Omezit náhledy na výsledky Je-li povolena tato volba a je prováděno hledání, budou v pohledu na náhledy zobrazeny jen ty strany, kde byl hledaný pojem nalezen.

Nastavení klávesových zkratek

Nastavení zkratek dovoluje přizpůsobení klávesových zkratek podle osobní volby. Zkratky jsou měněny dvojitým poklepáním na zkratku pro její upravení a zadání nové zkratky. Každá činnost může mít několik zkratek zadáním jejich středníkem odděleného seznamu. Názvy kláves, jež nejsou jednotlivými písmeny, jsou uvedeny výslovně (např. "Alt", "Ctrl", "PgDown"), přičemž není rozlišována velikost písmen. Pokud obsahuje klávesy modifikátorů, jsou názvy kláves spojeny znaménkem plus a klávesy modifikátorů musí být uvedeny nejprve, např. "Crtl+A" nebo "Ctrl++".

Nastavení modifikátorů

  • Zvětšení Klávesy modifikátorů pro zvětšování pomocí kolečka myši v hlavním pohledu.
  • Otáčení Klávesy modifikátorů pro otáčení pomocí kolečka myši v hlavním pohledu.
  • Posunování Klávesy modifikátorů pro posunování pomocí kolečka myši v hlavním pohledu.
  • Kopírovat do schránky Klávesy modifikátorů pro kopírování textů nebo obrázků ze strany do schránky.
  • Přidat poznámku Klávesy modifikátorů pro přidání poznámek ke straně.
qpdfview-0.4.7/help/help_de.html0000644000000000000000000005055412246606025014727 0ustar 00000000000000 Hilfe

Hilfe

Inhaltsverzeichnis

  1. Hauptmenü
    1. Datei
    2. Bearbeiten
    3. Ansicht
    4. Reiter
    5. Lesezeichen
    6. Hilfe
  2. Hauptansicht
  3. Hilfsansichten
  4. Einstellungen
    1. Verhalten
    2. Grafik
    3. Oberfläche
    4. Tastenkürzel
    5. Modifikatoren

Einleitung

qpdfview ist ein Programm zum Anzeigen von Dokumenten mit Reitern. Es verwendet Poppler für PDF-Unterstützung, libspectre für PS-Unterstützung, DjVuLibre für DjVu-Unterstützung, CUPS zum Drucken und den Qt-Werkzeugsatz für die Benutzeroberfläche.

Informationen über Kommandozeilenoptionen und Konfigurationsdateien sind in der Kommandozeilenanleitung zu finden.

Hauptmenü

Datei

  • Öffnen... Öffnet einen Auswahldialog zum Öffnen einer Datei im aktuellen Reiter. Falls kein Reiter vorhanden ist, wird die Datei in einem neuen Reiter geöffnet.
  • In neuem Reiter öffnen... Öffnet einen Auswahldialog zum Öffnen von Dateien in neuen Reitern.
  • Zuletzt verwendet Enthält eine Liste der zehn zuletzt verwendeten Dateien (falls es in den Einstellungen eingeschaltet ist).
  • Aktualisieren Lädt die Datei neu, die im aktuellen Reiter angezeigt wird.
  • Kopie speichern... Öffnet einen Auswahldialog zum Speichern einer Kopie der im aktuellen Reiter angezeigten Datei.
  • Speichern unter... Öffnet einen Auswahldialog zum Speichern einer Kopie der im aktuellen Reiter angezeigten Datei mit allen Änderungen an Anmerkungen und Formularfeldern.
  • Drucken... Öffnet einen Druckdialog für die im aktuellen Reiter angezeigte Datei.
  • Beenden Schließt alle Reiter und beendet das Programm.

Bearbeiten

  • Vorige/Nächste/Erste/Letzte Seite Springt zur vorigen/nächsten/ersten/letzten Seite des Dokuments.
  • Zu Seite springen... Öffnet einen Dialog zur Eingabe einer Seite zur Anzeige im aktuellen Reiter.
  • Springe rückwärts/vorwärts Springt rückwärts/vorwärts in der Chronik der angezeigten Seiten.
  • Suchen... Öffnet die Suchwerkzeugleiste unter der Hauptansicht. Die Suche beginnt automatisch zwei Sekunden nach der letzten Änderung des Suchbegriffs oder wird manuell mit der Eingabetaste gestartet. Falls die Umschalttaste gehalten wird, während die Eingabetaste gedrückt wird, startet die Suche in allen Reitern anstatt nur dem aktuellen Reiter.
  • Rückwärts/Vorwärts suchen Springt zur vorigen/nächsten Fundstelle des Suchbegriffs im Dokument.
  • Suche abbrechen Bricht die aktuelle laufende Suche ab und schließt die Suchwerkzeugleiste.
  • In Zwischenablage kopieren Wenn aktiviert, wird das Programm darauf warten, dass zum Kopieren ein Rahmen um Text oder Bilder gezogen wird.
  • Anmerkung hinzufügen Wenn aktiviert, wird das Programm darauf warten, dass ein Rahmen gezogen wird um Anmerkungen hinzuzufügen.
  • Einstellungen... Öffnet den Einstellungsdialog. Die Schaltflächen mit der Aufschrift 'Vorgaben' setzt alle Einstellungen in allen Reitern des Einstellungsdialogs auf ihre Vorgabewerte. Die Schaltfläche 'Vorgaben auf aktuellem Reiter' setzt nur die Einstellungen im aktuellen Reiter des Einstellungsdialogs auf ihre Vorgabewerte.

Die aktuelle Seite kann geändert werden, indem die Zielseite in das Textfeld in der Bearbeiten-Werkzeugleiste eingegeben wird. Das Textfeld kann durch Druck von Strg+K und Bestätigung mit der Eingabetaste fokussiert werden.

Ansicht

  • Fortlaufend Legt fest, ob die Seiten fortlaufend in Reihen übereinander angezeigt werden.
  • Zweiseitig Legt fest, ob die Seitenanzeige zweispaltig ist.
  • Zweiseitig mit Titelseite Legt fest, ob die Seitenanzeige zweispaltig ist und die Titelseite einzeln anzeigt.
  • Mehrere Seiten Legt fest, ob die Seitenanzeige mehrspaltig ist. Die Anzahl der Spalten für diese Anzeigeart kann im Einstellungsdialog geändert werden.
  • Vergrößern Vergrößert den Skalenfaktor um 10 Prozent.
  • Verkleinern Verkleinert den Skalenfaktor um 10 Prozent.
  • Ursprüngliche Größe Setzt den Skalenfaktor auf 100 Prozent zurück.
  • An Seitenbreite anpassen Bestimmt den Skalenfaktor so dass eine Zeile von Seiten die Hauptansicht horizontal ausfüllt.
  • An Seitengröße anpassen Bestimmt den Skalenfaktor so dass eine Zeile von Seiten vollständig in der Hauptansicht angezeigt wird.
  • Nach links drehen Dreht alle Seiten nach links gegen den Uhrzeigersinn um 90 Grad.
  • Nach rechts drehen Dreht alle Seiten nach rechts im Uhrzeigersinn um 90 Grad.
  • Farben umkehren Legt fest, ob Seiten mit umgekehrten Farben dargestellt werden.
  • Werkzeugleisten Dieses Menü enthält eine Liste verfügbarer Werkzeugleisten zum Zugriff auf häufig genutzte Aktionen.
  • Paletten Dieses Menü enthält eine Liste verfügbarer Paletten zur Anzeige von Zusatzinformationen.
  • Schriften... Öffnet einen Dialog, der die im Dokument verwendeten Schriftarten auflistet.
  • Vollbild Schaltet die Vollbildanzeige ein, in der das Fenster maximiert und ohne Fensterdekorationen angezeigt wird.
  • Präsentation... Schaltet in den Präsentationsmodus, der durch Drücken von F12 oder Escape verlassen werden kann. Die Pos1/Ende-Tasten werden verwendet um die erste/letzte Seite zu zeigen. Die Pfeiltasten rechts und unten, die Leertaste und die Bild-ab-Taste springen zur nächsten Seite. Die Pfeiltasten links und oben, die Rücktaste und die Bild-auf-Taste springen zur vorigen Seite. Drücken von Strg und Eingabetaste springt zur Seite vor dem letzten Sprung.

Der Skalenfaktor kann geändert werden, indem die gewünschte Prozentzahl in das Textfeld in der Ansicht-Werkzeugleiste eingetragen wird. Das Textfeld kann durch Druck von Strg+L und Bestätigung mit der Eingabetaste fokussiert werden.

Reiter

  • Voriger/Nächster Reiter Hebt den vorigen/nächsten Reiter in der Leiste hervor. Springt zum letzten/ersten Reiter, wenn der erste/letzte Reiter aktuell hervorgehoben ist.
  • Reiter schließen Schließt den hervorgehobenen Reiter.
  • Alle Reiter schließen Schließt alle Reiter.
  • Alle Reiter bis auf den Aktuellen schließen Schließt alle bis auf den aktuell hervorgehobenen Reiter.

Dieses Menü enthält eine Liste aller Reiter, die durch ein Klick auf den entsprechenden Menüeintrag hervorgehoben werden können. Reiter können auch durch einen Mittelklick geschlossen werden. Die ersten neun Reiter können auch durch Halten der Alt-Taste und Druck auf die entsprechende Zahltaste hervorgehoben werden.

Lesezeichen

  • Voriges Lesezeichen Springt zum nächsten Lesezeichen vor der aktuellen Seite.
  • Nächstes Lesezeichen Springt zum nächsten Lesezeichen nach der aktuellen Seite.
  • Lesezeichen hinzufügen Fügt ein Lesezeichen für die aktuelle Datei und Seite hinzu.
  • Lesezeichen entfernen Entfernt das Lesezeichen für die aktuelle Datei und Seite.
  • Alle Lesezeichen entfernen Entfernt alle Lesezeichen für alle Dateien.
  • Öffnen Öffnet die entsprechende Datei im aktuellen Reiter. Falls es keinen Reiter gibt, wird die Datei in einem neuen Reiter geöffnet.
  • In neuem Reiter öffnen Öffnet die entsprechende Datei in einem neuen Reiter.
  • Gehe zu Seite Springt zur entsprechenden Seite, falls die entsprechende Datei bereits geöffnet ist. Andernfalls wird die entsprechende Datei in einem neuen Reiter geöffnet.

Hilfe

  • Inhalt Zeigt dieses Dokument an.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

Die Tastenkürzel-Einstellungen ermöglichen die Anpassung der Tastenkürzel an persönliche Vorlieben. Zum Ändern eines Tastenkürzel wird ein Doppelklick auf das Tastenkürzel ausgeführt und anschließend das neue Tastenkürzel eingegeben. Jeder Aktion können mehrere Tastenkürzel zugeordnet werden, die durch Semikolons getrennt aufgelistet werden. Tastennamen, die nicht aus einem Zeichen bestehen, (z.B. "Alt", "Strg", "Bild aufwärts") werden explizit ausgeschrieben, wobei die Erkennung Groß- und Kleinschreibung nicht unterscheidet. Falls das Tastenkürzel Modifikator-Tasten enthält, werden die Namen der Tasten mit einem Pluszeichen zusammengefügt wobei die Modifikator-Taste zuerst genannt werden muss, z.B. "Strg+A" oder "Strg++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_en_GB.html0000644000000000000000000004563512246606025015315 0ustar 00000000000000 Help

Help

Table of contents

  1. Main menu
    1. File
    2. Edit
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Introduction

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_fr.html0000644000000000000000000005441112246606025014742 0ustar 00000000000000 Aide

Aide

Table des matières

  1. Menu principal
    1. Fichier
    2. Édition
    3. Afficher
    4. Onglets
    5. Signets
    6. Aide
  2. Vue principale
  3. Vues auxiliaires
  4. Paramètres
    1. Comportement
    2. Paramètres d'affichage
    3. Paramètres de l'interface
    4. Raccourcis
    5. Modificateurs

Introduction

qpdfview est une visionneuse de documents par onglets. Elle utilise Poppler pour la prise en charge du format PDF, libspectre pour le format PS, DjVuLibre pour le format DjVu, CUPS pour le support d'impression et la bibliothèque Qt pour son interface.

Veuillez consulter la page du manuel pour obtenir des informations sur les options en ligne de commande et sur les fichiers de configuration.

Menu principal

Fichier

  • Ouvrir... Ouvre une boîte de dialogue pour choisir un fichier à ouvrir dans l'onglet courant. S'il n'y a pas d'onglet, le fichier est ouvert dans un nouvel onglet.
  • Ouvrir dans un nouvel onglet... Ouvre une boîte de dialogue pour choisir les fichiers à ouvrir dans de nouveaux onglets.
  • Récemment utilisés Contient une liste des dix fichiers les plus récemment utilisés (si activé dans les paramètres).
  • Actualiser Recharge le fichier affiché dans l'onglet courant.
  • Enregistrer une copie... Ouvre une boîte de dialogue pour enregistrer une copie du fichier affiché dans l'onglet courant.
  • Enregistrer sous... Ouvre une boîte de dialogue pour enregistrer le fichier affiché dans l'onglet courant y compris les modifications des annotations et des champs de formulaire.
  • Imprimer... Ouvre une boîte de dialogue pour imprimer le fichier affiché dans l'onglet courant.
  • Quitter Ferme tous les onglets, puis le programme.

Édition

  • Page suivante/Page précédente/Première page/Dernière page Va à la page suivante/page précédente/première page/dernière page du document.
  • Aller à la page... Ouvre une boîte de dialogue demandant le numéro de la page à afficher dans l'onglet courant.
  • Aller vers l'arrière/l'avant Aller vers l'arrière/l'avant dans l'historique des pages affichées.
  • Rechercher... Ouvre la boîte de dialogue de recherche sous la vue principale. La recherche démarre automatiquement 2 secondes après la dernière saisie dans la barre de recherche ou en appuyant sur la touche entrée. Si la touche Maj est maintenue enfoncée en pressant sur entrée, la recherche est effectuée dans tous les onglets plutôt que dans l'onglet courant.
  • Rechercher le précédent/suivant Saute à l'occurrence précédente/suivante du terme recherché dans le document.
  • Annuler la recherche Annule la recherche en cours et ferme la boîte de dialogue de recherche.
  • Copier dans le presse-papiers Lorsque l'action est lancée, le programme attend le tracé d'une zone de sélection à la souris pour copier son contenu sous forme de textes ou d'images.
  • Ajouter une annotation Lorsque cette action est lancée, le programme attend qu'une zone soit tracée avec la souris pour y ajouter une annotation.
  • Paramètres... Ouvre la boîte de dialogue des paramètres. Le bouton « Défauts » permet de restaurer tous les réglages de tous les onglets à leur valeur par défaut. Le bouton « Défauts sur l'onglet actuel » ne restaure les paramètres par défaut que de l'onglet courant.

La page courante peut être modifiée en saisissant le numéro de la page souhaitée dans le champ de texte de la barre d'outils, auquel on peut accéder par Ctrl+K, et en validant par la touche entrée.

Affichage

  • Continu Permet de rendre simultanément visibles les différentes lignes de la mise en page.
  • Deux pages Mise en page en mode deux colonnes.
  • Deux pages avec page de couverture Mise en page en deux colonnes avec un saut de page pour la page de couverture.
  • Multiples pages Mode de mise en page à plusieurs colonnes. Le nombre de colonnes se règle dans le menu paramètres.
  • Zoomer Augmente le facteur d'échelle de 10 pourcent.
  • Dé-zoomer Diminue le facteur d'échelle de 10 pourcent.
  • Taille originale Rétablit le facteur d'échelle à 100 pourcent.
  • Ajuster à la largeur de la page Ajuste le facteur d'échelle de façon à ce que la page occupe toute la largeur de la fenêtre principale.
  • Ajuster à la taille de la page Ajuste le facteur d'échelle de façon à ce que la page occupe toute la hauteur de la fenêtre principale.
  • Rotation vers la gauche Tourne la page vers la gauche (le sens contraire des aiguilles d'une montre) de 90 degrés.
  • Rotation vers la droite Tourne la page vers la droite (le sens des aiguilles d'une montre) de 90 degrés.
  • Inverser les couleurs Précise que les pages doivent être affichées en couleurs inversées.
  • Barre d'outils Ce menu contient une liste de barres d'outils disponibles pour accéder aux actions fréquemment utilisées.
  • Docks Ce menu contient la liste des docks disponibles pour afficher des informations supplémentaires.
  • Polices... Ouvre une boîte de dialogue cataloguant l'ensemble des polices de caractères utilisées dans le document.
  • Plein écran Bascule en mode plein écran ; la fenêtre occupe la taille maximale sans décoration.
  • Présentation... Entre dans le mode présentation que l'on peut quitter par les touches F12 ou Echap. La touche Home/Fin permet d'afficher la première/dernière page. Les touches droite, bas ou espace permettent d'aller à la page suivante. Les touches gauche, haut ou retour permettent d'aller à la page précédente. L'appui simultané sur les touches control et entrée permet d'aller à la page précédent le dernier saut.

Le facteur d'échelle peut-être modifié en saisissant le pourcentage souhaité dans le champ de texte de la barre d'outils, accessible par le raccourci Ctrl+L, et en valident par la touche entrée.

Onglets

  • Onglet précédent/suivant Passe à l'onglet précédent/suivant. Boucle sur le dernier/premier onglet si l'onglet courant est le premier/dernier.
  • Fermer l'onglet Ferme l'onglet courant.
  • Fermer tous les onglets Ferme tous les onglets.
  • Fermer tous les onglets sauf l'onglet courant Ferme tous les onglets sauf l'onglet courant.

Ce menu contient une liste de tous les onglets qui peuvent devenir l'onglet courant par sélection dans le menu. Les onglets peuvent être fermés en cliquant sur le bouton du milieu de la souris. Les neufs premiers onglets peuvent être sélectionnés en maintenant la touche Alt enfoncée et en pressant une touche de un à neuf.

Signets

  • Signet précédent Va au signet le plus proche avant la page courante.
  • Signet suivant Va au signet le plus proche après la page courante.
  • Ajouter un signet Ajoute un signet à la page courante du fichier courant.
  • Supprimer le signet Supprime le signet de la page courante du fichier courant.
  • Enlever tous les signets Enlève tous les signets.
  • Ouvrir Ouvre le fichier correspondant dans l'onglet courant. S'il n'y a pas d'onglet, le fichier est ouvert dans un nouvel onglet.
  • Ouvrir dans un nouvel onglet Ouvre le fichier correspondant dans un nouvel onglet.
  • Aller à la page Va à la page correspondante si le fichier en question est déjà ouvert. Sinon le fichier est d'abord ouvert dans un nouvel onglet.

Aide

  • Contenu Affiche ce document.
  • À propos Affiche le numéro de version du programme.

Vue principale

La touche retour/espace permet d'aller à la page précédente/suivante. La touche Home/Fin permet d'aller à la première/dernière page. Les flèches, les touches page vers le haut, page vers le bas permettent de faire défiler la vue. L'appui simultané sur les touches control et entrée permet d'aller à la page précédent le dernier saut.

La molette de la souris permet le défilement vertical. Maintenir la touche Alt en utilisant la molette de la souris permet le défilement horizontal. Maintenir la touche Ctrl en utilisant la molette de la souris permet de modifier l'échelle du document. Maintenir la touche Maj en utilisant la molette de la souris permet de faire tourner le document. (Les touches spéciales peuvent être modifiées dans le menu des paramètres.)

Les liens sont mis en valeur par un cadre rouge (si ce comportement a été choisi dans les paramètres). Un clic gauche sur le lien montre la page liée ou ouvre l'URL dans le navigateur par défaut (si ce comportement a été choisi dans les paramètres). Passer sur un lien affiche sa destination dans une bulle d'aide.

Les champs de formulaire sont mis en valeur par un cadre bleu (si ce comportement a été choisi dans les paramètres). Un clic gauche sur un champ de formulaire permet d'en éditer le contenu. Passer sur un champ de formulaire affiche son nom dans une bulle d'aide.

Double cliquer à un endroit précis du document permet d'afficher, dans l'éditeur de sources, le code source extrait du nœud correspondant du fichier SyncTeX.

Pour copier du texte ou des images, maintenir la touche Maj enfoncée, cliquer et maintenir le bouton gauche de la souris enfoncé pour dessiner un cadre autour de la zone à copier. Une fois le bouton de la souris relâché, une boîte de dialogue s'affiche, permettant de choisir de copier le texte ou l'image dans le presse-papiers.

Pour ajouter une annotation, maintenir la touche Ctrl enfoncée, cliquer et maintenir le bouton gauche de la souris pour dessiner un cadre autour de la zone visée. Une fois le bouton de la souris relâché, une boîte de dialogue s'affiche, permettant de choisir d'ajouter du texte ou de surligner la zone. Un clic gauche permet d'éditer l'annotation, un clic droit permet de supprimer l'annotation. (L'ajout et la suppression des annotations nécessite une version de la librairie Poppler au moins égale à la 0.20.1.) Le survol d'une annotation affiche son contenu sous forme d'une bulle d'aide.

Vues auxiliaires

Le sommaire affiche la structure du document. Un clic gauche permet d'afficher la page correspondante dans la vue principale. Le menu contextuel permet de développer ou de réduire tous les items sous l'item sélectionnés.

La vue propriétés affiche des informations complémentaires contenues dans le document.

La vue en miniatures affiche une version réduite des pages du document. Un clic gauche sur une vignette permet d'afficher la page correspondante dans la vue principale.

Paramètres

Comportement

  • Ouvrir une URL Détermine si les liens vers une URL sont ouverts dans le navigateur par défaut.
  • Ouvrir les fichiers joints Commande l'ouverture des fichiers joints lors de leur enregistrement sur le disque dur.
  • Actualisation automatique Détermine si les fichiers sont rechargés automatiquement lors de leur modification sur le disque dur.
  • Fichiers récemment ouverts Si l'item est validé, un menu est disponible et propose autant de fichiers récemment ouverts qu'il est précisé dans le champ « Nombre de fichiers récemment ouverts » (nécessite un redémarrage).
  • Restaurer les onglets Si l'option est validée, les onglets et leurs propriétés sont enregistrées lors de la fermeture du programme et restaurer lors de son ouverture.
  • Restaurer les signets Si l'item est validé, les signets sont enregistrés en quittant le programme et restaurés lors de sa ré-ouverture.
  • Restaurer les paramètres par fichier Si l'item est validé, les réglages propres à chaque fichier sont enregistrés/restaurés à chaque ouverture/fermeture des onglets.
  • Synchroniser la présentation Si l'item est validé, la vue principale permet de contrôler la vue du mode présentation.
  • Écran de présentation La référence de l'écran sur lequel afficher la présentation.
  • Couleur de surlignement Permet de choisir la couleur de surlignement.
  • Durée de mise en surbrillance Précise la durée des surlignements temporaires.
  • Couleur d'annotation Précise la couleur des annotation ajoutées par le programme, en utilisant les couleurs SVG ou la notation hexadécimale '#rrggbb'.
  • Éditeur de source Le programme qui est lancé pour éditer un fichier source. « %1 » est remplacé par le chemin absolu du fichier. « %2 » (resp. « %3 ») est remplacé par le numéro de ligne (resp. colonne).

Affichage

  • Conserver l'affichage lors du zoom Si l'item est validé, le cache graphique est utilisé lors des zoom pour permettre un affichage approximatif temporaire avant le rendu de l'image finale. Cette option augment l'utilisation de la mémoire.
  • Utiliser le taux de pixel de l'appareil Si l'item est validé, l'affichage se fait en utilisant la valeur maximale du taux de pixel.
  • Décorer les pages Permet de tracer le cadre séparant la page de son arrière-plan.
  • Décorer les liens Précise si les liens sont mis en valeur par un cadre rouge.
  • Décorer les champs de formulaire Précise si les champs de formulaire sont mis en valeur par un cadre bleu.
  • Couleur de l'arrière-plan Précise la couleur de l'arrière-plan à l'aide des couleurs SVG ou en notation hexadécimale « #rrggbb ».
  • Couleur du papier Précise la couleur du papier à l'aide des couleurs SVG ou en notation hexadécimal « #rrggbb ».
  • Couleur de l'arrière plan en mode présentation Remplace la couleur du papier dans le mode présentation. La couleur est définie à l'aide des couleurs SVG ou de la notation hexadécimal « #rrggbb » .
  • Pages par ligne Nombre de pages affichées par ligne dans le mode « Pages multiples ».
  • Espacement des pages Précise les espacements verticaux et horizontaux entre les pages.
  • Espacement des miniatures Précise les espacements verticaux et horizontaux entre les miniatures.
  • Taille des miniatures Précise la dimension des miniatures.
  • Taille du cache Le programme stocke les pages affichées dans le cache, dans la limite de l'espace choisi, améliorant ainsi la vitesse d'affichage au prix d'une augmentation de l'utilisation de la mémoire.
  • Préchargement Le programme essaye de préparer l'affichage des pages qui ne sont pas encore visibles afin d'accélérer leur rendu, au prix d'une augmentation de l'usage du cache.
  • Distance de préchargement Le nombre de lignes au-delà de la ligne actuelle et le double du nombre de lignes avant la ligne actuelle qui sont préchargées.
  • Paramètres PDF
    • Sur-imprimer l'aperçu Si l'item est validé, l'aperçu d'impression est affiché en tenant compte de la superposition des couches d'encre.
    • Anti-crénelage Améliore la qualité de l'affichage au prix d'une baisse de performances.
    • Anti-crénelage du texte Améliore l'affichage du texte au prix d'une baisse de performances.
    • Indications Peut améliorer l'affichage de certaines polices de caractères.
  • Paramètres PS
    • Nombre de bits d'anti-crénelage graphique Précise le nombre de bits dédiés à l'anti-crénelage graphique.
    • Nombre de bites d'anti-crénelage du texte Précise le nombre de bits dédiés à l'anti-crénelage du texte.

Interface

  • Position des onglets Défini le côté de la vue principale sur lequel seront placés les onglets.
  • Visibilité des onglets Précise si l'onglet est affiché lorsqu'il y a moins de deux documents ouverts.
  • Nouvel onglet à côté de l'onglet courant Si l'item est validé, les nouveaux onglets sont ouverts à droite de l'onglet courant.
  • Nombre de fichiers récemment ouverts Précise le nombre de fichiers listés dans le menu « Récemment ouverts », si l'item « Suivre les fichiers récemment ouverts » est validé.
  • Barre d'outils Fichier Défini quelles actions sont affichées dans la barre d'outils Fichier. Les actions disponibles sont openInNewTab, open, refresh, saveCopy, saveAs, print et separator. (Nécessite un redémarrage.)
  • Barre d'outils Édition Défini quelles actions sont visibles dans la barre d'outils Édition. Les actions disponibles sont currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode et separator. (Nécessite un redémarrage.)
  • Barre d'outils Affichage Défini quelles actions sont visibles dans la barre d'outils Affichage. Les actions disponibles sont scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation et separator. (Nécessite un redémarrage.)
  • Page courante dans le titre de la fenêtre Si cet item est validé, le numéro de la page et le nombre total de pages du document actif sont affichés dans la barre de titre de la fenêtre.
  • Synchroniser le sommaire Si l'item est validé, la page du sommaire correspondant à la page courante est mise en valeur et s'actualise à tous changements de page.
  • Surligner la miniature courante Si l'item est validé, la page courante est mise en valeur dans la vue des miniatures.
  • Limiter les miniatures aux résultats Si cet item est validé, seules les miniatures contenant le terme recherché sont affichées lors d'une recherche.

Modificateurs

Le menu raccourcis permet d'ajuster les raccourcis clavier à son goût. Double-cliquer sur un raccourci permet de l'éditer pour le modifier. Une même action peut se voir attribuer plusieurs raccourcis clavier, qui doivent alors être séparés par des points-virgules. Les touches qui ne sont pas des caractères uniques (« Alt », « Ctrl », « PgDown », ...) doivent être écrites explicitement ; la casse n'est pas importante. Si le raccourci contient une touche spéciale, les touches doivent être jointes par le signe « + », par exemple « Ctrl+A », « Ctrl++», ...

Modificateurs

  • Zoom La touche spéciale pour zoomer dans la vue principale à l'aide de la molette de la souris.
  • Rotation La touche spéciale permettant la rotation dans la fenêtre principale à l'aide de la molette de la souris.
  • Défiler La touche spéciale permettant le défilement dans la fenêtre principale à l'aide de la molette de la souris.
  • Copier dans le presse-papiers La touche spéciale pour copier textes et images dans le presse-papiers.
  • Ajouter une annotation La touche spéciale pour ajouter une annotation dans une page.
qpdfview-0.4.7/help/help_gl.html0000644000000000000000000004571412246606025014743 0ustar 00000000000000 Axuda

Axuda

Índice

  1. Menú principal
    1. Ficheiro
    2. Editar
    3. Ver
    4. Lapelas
    5. Marcadores
    6. Axuda
  2. Vista principal
  3. Vistas auxiliares
  4. Axustes
    1. Axustes do comportamento
    2. Axustes gráficos
    3. Axustes da interface
    4. Axustes dos atallos
    5. Axustes dos modificadores

Introdución

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Abrir... Inicia o diálogo de selección do ficheiro para abrir na lapela actual. Se non hai aberta unha lapela, abrirase nunha nova.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_it.html0000644000000000000000000004625412246606025014755 0ustar 00000000000000 Guida

Guida

Sommario

  1. Menù principale
    1. File
    2. Modifica
    3. Visualizza
    4. Schede
    5. Segnalibri
    6. Aiuto
  2. Vista principale
  3. Auxiliary views
  4. Impostazioni
    1. Impostazioni del comportamento
    2. Impostazioni grafiche
    3. Impostazioni dell'interfaccia
    4. Impostazioni delle scorciatoie
    5. Impostazioni dei modificatori

Introduzione

qpdfview è un visualizzatore di documenti a schede. Utilizza Poppler per il supporto PDF, libspectre per PS, DjVuLibre per DjVu, CUPS per la stampa e il toolkit Qt per l'interfaccia.

Fare riferimento al manuale per informazioni sulle opzioni a riga di comando e per i file di configurazione.

Menù principale

File

  • Apri... apre un dialogo per consentire la scelta di un file da visualizzare nella scheda corrente. Se non è aperta alcuna scheda, il file verrà aperto in una nuova.
  • Apri in nuova scheda... apre un dialogo per consentire di scegliere i file da aprire nelle nuove schede.
  • Usati di recente contiene un elenco con i dieci file aperti più recentemente (se abilitato nelle impostazioni).
  • Aggiorna ricarica il file visualizzato nella scheda corrente.
  • Salva una copia... apre un dialogo per consentire il salvataggio del file visualizzato nella scheda corrente.
  • Salva come... apre un dialogo per consentire il salvataggio del file visualizzato nella scheda corrente includendo le modifiche alle note e ai campi del form.
  • Stampa... apre un dialogo per la stampa del file visualizzato nella scheda corrente.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_ko.html0000644000000000000000000004563512246606025014754 0ustar 00000000000000 Help

Help

Table of contents

  1. Main menu
    1. File
    2. Edit
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Introduction

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_ms.html0000644000000000000000000004614312246606025014755 0ustar 00000000000000 Bantuan

Bantuan

Senarai kandungan

  1. Menu utama
    1. Fail
    2. Sunting
    3. Lihat
    4. Tab
    5. Tanda buku
    6. Bantuan
  2. Paparan utama
  3. Paparan tambahan
  4. Tetapan
    1. Tetapan kelakuan
    2. Tetapan grafik
    3. Tetapan antaramuka
    4. Tetapan pintasan
    5. Tetapan pengubahsuai

Pengenalan

qpdfview merupakan pelihat dokumen bertab. Ia menggunakan Poppler untuk sokongan PDF, libspectre untuk sokongan PS, DjVuLibre untuk sokongan DjVu, CUPS untuk sokongan percetakan dan kit alat Qt untuk antaramukanya.

Sila rujuk halaman manual untuk maklumat pilihan baris-perintah dan fail konfigurasinya.

Menu utama

Fail

  • Buka... Buka dialog untuk memilih fail yang hendak dibuka dalam tab semasa. Jika tiada tab, Fail akan dibuka pada tab baru.
  • Buka dalam tab baru... Buka dialog untuk memilih fail yang hendak dibuka dalam tab baru.
  • Baru-baru ini digunakan Mengandungi senarai kesepuluh fail yang terkini digunakan (jika dibenarkan dalam tetapan).
  • Segar semula Muat semula fail yang dipaparkan dalam tab semasa.
  • Simpan salinan... Buka dialog untuk menyimpan salinan fail yang dipapar dalam tab semasa.
  • Simpan sebagai... Buka dialog untuk simpan fail yang dipapar dalam tab semasa termasuklah perubahan pada anotasi dan medan borang.
  • Cetak... Buka dialog untuk mencetak fail yang dipapar dalam tab semasa.
  • Keluar Tutup semua tab dan tamatkan program.

Sunting

  • b>Halaman Berikut/Terdahulu/Pertama/Terakhir Langkau ke halaman dokumen berikut/terdahulu/pertama/terakhir.
  • Lompat ke halaman... Buka dialog untuk masuk ke halaman dan dipapar pada tab semasa.
  • Lompat undur/maju Lompat undur/maju dalam sejarah halaman yang dipaparkan.
  • Gelintar... Buka palang alat gelintar dibawah paparan utama. Gelintar akan bermula secara automatik dua saat selepas perubahan terakhir pada terma gelintar atau dimulakan secara manual selepas menekan kekunci return. Jika pengubahsuai Shift ditahan bila kekunci return ditekan, gelintar akan mula dalam semua tab bukan tab semasa sahaja.
  • Cari terdahulu/berikut Lompat ke kemunculan terma gelintar terdahulu/berikut didalam dokumen.
  • Batal gelintar Batalkan gelintar yang kini berjalan dan tutup palang alat gelintar.
  • Salin ke papan keratan Jika ditanda, program akan tunggu bingkai diseret untuk salin teks atau imej.
  • Tambah anotasi Jika ditanda, program akan tunggu bingkai diseret untuk tambah anotasi.
  • Tetapan... Buka dialog tetapan. Butang berlabel 'Lalai' akan kembalikan semua tetapan pada tab ke nilai lalainya. Butang berlabel 'Lalai pada tab semasa' akan hanya kembalikan tetapan pada tab semasa ke nilai lalai mereka.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

Lihat

  • Berterusan Tentukan sama ada semua baris bentangan halaman kelihatan serentak.
  • Dua halaman Tentukan sama ada bentangan halaman gunakan dua lajur.
  • Dua halaman dengan muka hadapan Tentukan sama ada bentangan halaman gunakan dua lajur dengan hentian selepas muka hadapan.
  • Halaman berbilang Tentukan sama ada bentangan halaman gunakan lajur berbilang. Bilangan lajur boleh diubah dalam dialog tetapan.
  • Zum masuk Tingkatkan faktor skala sebanyak 10 peratus.
  • Zum keluar Kurangkan faktor skala sebanyak 10 peratus.
  • Saiz asal Tetap semula faktor skala ke 100 peratus.
  • Muat dengan lebar halaman Tentukan faktor skala supaya semua halaman sepenuhnya muat ke dalam paparan utama secara mengufuk.
  • Muat dengan saiz halaman Tentukan faktor skala supaya semua halaman sepenuhnya muat ke dalam paparan utama secara mengufuk dan menegak.
  • Putar kiri Putar halaman ke kiri/lawan jam sebanyak 90 darjah.
  • Putar kanan Putar halaman ke kanan/ikut jam sebanyak 90 darjah.
  • Warna songsang Tentukan sama ada halaman diterap dengan warna songsang.
  • Palang alat Menu ini mengandungi senarai palang alat yang ada untuk mencapa tindakan yang kerap diguna.
  • b>Labuh Menu ini mengandungi senarai labuh yang ada untuk memaparkan maklumat tambahan.
  • Fon... Buka dialog menyenaraikan fon yang diguna dalam dokumen.
  • Skrin Penuh Togol ke mod skrin penuh, iaitu tetingkap dipaparkan secara maksimum dan tanpa hiasan.
  • Persemabahan... Masuk ke mod persembahan dengan menekan kekunci F12 atau escape. Kekunci home/end digunakan untuk paparkan halaman pertama/terakhir. Kekunci anak panah kanan dan bawah, kekunci space dan page down lompat ke halaman berikutnya. Kekunci anak panah kiri dan atas, kekunci backspace dan page up lompat ke halaman terdahulu. Menekan kekunci control dan return akan lompat kembali ke halaman terdahulu sebelum lompatan terakhir.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tab

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Tutup tab Tutup tab semasa.
  • Tutup semua tab Tutup semua tab.
  • Tutup semua tab kecuali tab semasa Tutup semua tab kecuali tab semasa.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Tanda Buku

  • Tanda buku terdahulu Lompat ke tanda buku terdekat sebelum halaman semasa.
  • Tanda buku berikutnya Lompat ke tanda buku terdekat selepas halaman semasa.
  • Tambah tanda buku Tambah tanda buku untuk fail dan halaman semasa.
  • Buang tanda buku Buang tanda buku untuk fail dan halaman semasa.
  • Buang tanda buku Buang semua tanda buku.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Buka dalam tab baru Buka fail berkenaan dalam tab baru.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Bantuan

  • Kandungan Papar dokumen ini.
  • Perihal Papar versi program.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_pl.html0000644000000000000000000004573212246606025014754 0ustar 00000000000000 Pomoc

Pomoc

Spis treści

  1. Główne menu
    1. Plik
    2. Edycja
    3. Widok
    4. Karty
    5. Zakładki
    6. Pomoc
  2. Widok główny
  3. Widok pomocniczy
  4. Ustawienia
    1. Zachowanie ustawień
    2. Ustawienia grafiki
    3. Ustawienia interfejsu
    4. Ustawienia skrótu
    5. Ustawienia modyfikatora

Wprowadzenie

qpdfview to przeglądarka dokumentów w obsługą kart. Używa Poppler dla wsparcia PDF, libspectre dla PS, DjVuLibre dla DjVu, CUPS dla wsparcia drukowania i bibioteki Qt jako interfejs graficzny.

Proszę odnieść się do strony podręcznika po informację na temat opcji wiersza polecenia i plików konfiguracyjnych.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_pt.html0000644000000000000000000004563512246606025014766 0ustar 00000000000000 Help

Help

Table of contents

  1. Main menu
    1. File
    2. Edit
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Introduction

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_pt_BR.html0000644000000000000000000004614212246606025015343 0ustar 00000000000000 Ajuda

Ajuda

Tabela de conteúdos

  1. Menu principal
    1. Arquivo
    2. Editar
    3. Visualizar
    4. Abas
    5. Marcadores
    6. Ajuda
  2. Visualização principal
  3. Visualizações auxiliares
  4. Ajustes
    1. Ajustes de aparência
    2. Ajustes de gráficos
    3. Configurações da interface
    4. Configuração de atalhos
    5. Configurações de modificação

Introdução

qpdfview é um visualizador de documentos com abas. Utiliza o Poppler para suporte a PDF, libspectre para suporte a PS, DjVuLibre para suporte a DjVu, CUPS para suporte a impressão e QT Toolkit para sua interface.

Por favor, consulte a página do manual para obter informações sobre opções de linha de comando e arquivos de configuração.

Menu principal

Arquivo

  • Abrir... Abre uma janela para selecionar um arquivo para abrir na aba atual. Se não houver nenhuma aba, o arquivo é aberto é uma nova aba.
  • Abrir em nova aba... Abre uma janela para selecionar arquivos a serem abertos em novas abas.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_sk.html0000644000000000000000000004560112246606025014751 0ustar 00000000000000 Pomocník

Pomocník

Obsah

  1. Hlavné menu
    1. Súbor
    2. Edit
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Úvod

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/help/help_uk.html0000644000000000000000000011656612246606025014764 0ustar 00000000000000 Довідка

Довідка

Зміст

  1. Головне меню
    1. Файл
    2. Зміни
    3. Перегляд
    4. Вкладки
    5. Закладки
    6. Довідка
  2. Головна панель перегляду
  3. Допоміжні панелі
  4. Параметри
    1. Параметри поведінки
    2. Параметри графіки
    3. Параметри інтерфейсу
    4. Параметри клавіатурних скорочень
    5. Параметри модифікаторів

Вступ

qpdfview — програма для перегляду документів з використанням вкладок. У програмі використано бібліотеку Poppler для реалізації підтримки PDF, бібліотеку libspectre для реалізації підтримки PS, бібліотеку DjVuLibre для реалізації підтримки DjVu, бібліотеку CUPS для реалізації підтримки друку та набір бібліотек Qt для реалізації інтерфейсу.

Будь ласка, зверніться до сторінки підручника (man), щоб дізнатися більше про параметри командного рядка і файли налаштувань.

Головне меню

Файл

  • Відкрити... — відкриває діалогове вікно вибору файла, який слід відкрити у поточній вкладці. Якщо у вікні програми не відкрито жодної вкладки, файл буде відкрито у новій вкладці.
  • Відкрити у новій вкладці... — відкриває діалогове вікно вибору файлів, які слід відкрити у нових вкладках.
  • Останні відкриті — містить список з десяти останніх відкритих файлів (якщо відповідний пункт позначено у параметрах програми).
  • Оновити — перезавантажити файл, вміст якого показано у поточній вкладці.
  • Зберегти копію... — відкрити діалогове вікно для збереження копії файла, показано на поточній вкладці.
  • Зберегти як... — відкрити діалогове вікно для збереження файла, показаного у поточній вкладці разом зі змінами у анотаціях та заповненими полями форм.
  • Друкувати... — відкрити діалогове вікно для друку файла, вміст якого показано у поточній вкладці.
  • Вийти — закрити усі вкладки і завершити роботу програми.

Зміни

  • Наступна/Попередня/Перша/Остання сторінка — перейти до наступної, попередньої, першої чи останньої сторінки документа.
  • Перейти до сторінки... — відкрити діалогове вікно для введення номеру сторінки, яку слід показати у поточній вкладці.
  • Перейти назад/вперед — перейти назад або вперед журналом перегляду сторінок.
  • Пошук... — відкрити панель пошуку у нижній частині головної панелі перегляду. Пошук буде розпочато автоматично за дві секунди після останньої зміни у фразі для пошуку або одразу після натискання клавіші Enter. Якщо під час натискання клавіші Enter утримуватиметься натиснутою клавіша Shift, пошук буде виконано у всіх вкладках, а не лише у поточній.
  • Знайти попереднє/наступне — перейти до попереднього або наступного випадку використання у документі рядка, пошук якого виконується.
  • Скасувати пошук — скасувати поточний сеанс пошуку і закрити панель пошуку.
  • Копіювати до буфера — якщо позначено, програма зачекає, доки ви позначите область у документі, з якої слід скопіювати текст або зображення.
  • Додати коментар — якщо позначено цей пункт, програма зачекає, доки ви позначите у документі область, що якої слід додати анотацію або коментар.
  • Параметри... — відкрити діалогове вікно параметрів програми. За допомогою натискання кнопки з написом «Типові» можна повернутися до типових значень усіх параметрів на усіх вкладках. За допомогою натискання кнопки з написом «Типові на поточній вкладці» можна повернутися до типових значень параметрів лише для поточної вкладки.

Змінити номер поточної сторінки можна введенням номера бажаної сторінки до поля для редагування тексту на панелі інструментів редагування. Передати фокусування на поле можна за допомогою натискання комбінації клавіш Ctrl+K. Після введення значення слід натиснути клавішу Enter.

Перегляд

  • Неперервний перегляд — визначити, чи слід під час показу документа гортати сторінки неперервно без перестрибування між окремими сторінками.
  • Дві сторінки — визначити, чи слід використовувати у компонуванні сторінок два стовпчики.
  • Дві сторінки та обкладинка — визначити, чи слід використовувати у компонуванні сторінок два стовпчики з проміжком після сторінки обкладинки.
  • Декілька сторінок — визначити, чи слід показувати сторінки документа у декілька стовпців. Кількість показаних стовпців можна змінити за допомогою діалогового вікна параметрів роботи програми.
  • Збільшити — збільшує масштаб на 10 відсотків.
  • Зменшити — зменшує масштаб на 10 відсотків.
  • Початковий розмір — відновити масштабування у 100 відсотків.
  • За шириною — використати масштабування, за якого усі сторінки заповнюватимуть усю ширину головної панелі перегляду програми.
  • Сторінка цілком — використати масштабування, за якого усі сторінки заповнюватимуть усю ширину або висоту головної панелі перегляду програми.
  • Повернути ліворуч — повернути сторінки ліворуч або проти годинникової стрілки на 90 градусів.
  • Повернути праворуч — повернути сторінки праворуч або за годинниковою стрілкою на 90 градусів.
  • Інвертувати кольори — визначає, чи слід інвертувати кольори під час показу сторінок документів.
  • Панелі інструментів — у цьому меню наведено список усіх доступних панелей інструментів, за допомогою яких можна отримувати доступ до кнопок дій, якими користуються найчастіше.
  • Бічні панелі — у цьому меню міститься список усіх доступних бічних панелей, за допомогою яких програма показує допоміжну інформацію.
  • Шрифти... — відкрити діалогове вікно зі списком шрифтів, використаних у поточному документі.
  • На весь екран — вмикає або вимикає повноекранний режим роботи програми, тобто режим, у якому вікно програми максимізується, а декорації вікна приховуються.
  • Презентація... — переводить програму у режим презентації, вийти з якого можна за допомогою натискання клавіші F12 або Esc. Клавішами Home/End можна скористатися для того, щоб перейти до першої або останньої сторінок документа відповідно. Натисканням клавіші зі стрілкою праворуч, клавіші зі стрілкою вниз, пробілу та клавіші Page Down можна перейти до перегляду наступної сторінки. Натисканням клавіші зі стрілкою ліворуч, клавіші зі стрілкою вгору, клавіші Backspace та клавіші Page Up можна перейти до попередньої сторінки. Натисканням комбінації клавіш Ctrl+Enter можна перейти до сторінки, яку ви переглядали до останнього переходу сторінками документа.

Масштаб можна змінити до бажаного значення за допомогою текстового поля на панелі інструментів перегляду. Передати фокусування на поле можна за допомогою натискання комбінації клавіш Ctrl+L. Після введення значення слід натиснути клавішу Enter.

Вкладки

  • Попередня/Наступна вкладка — робить поточною попередню або наступну вкладку. Перехід вкладками виконується циклічно.
  • Закрити вкладку — закриває поточну вкладку.
  • Закрити всі вкладки — закриває усі вкладки.
  • Закрити усі вкладки, крім поточної — закрити усі вкладки, окрім поточної вкладки.

У цьому меню буде наведено список усіх вкладок. Зробити вкладку поточною можна шляхом натискання відповідного пункту у меню. Закрити вкладку можна клацанням середньою кнопкою миші на відповідному пункті меню. Перші дев’ять вкладок у списку також можна активувати одночасним натисканням клавіші Alt та клавіші номера вкладки (від 1 до 9).modifier and pressing keys one to nine.

Закладки

  • Попередня закладка — перейти до найближчої закладки, розташування якої передує поточній сторінці.
  • Наступна закладка — перейти до найближчої закладки, розташованої після поточної сторінки.
  • Додати закладку — додає закладку до поточного файла і сторінки.
  • Вилучити закладку — вилучає закладку для поточного файла і сторінки.
  • Вилучити усі закладки — вилучити з документа усі закладки.
  • Відкрити — відкриває відповідний файл у поточній вкладці. Якщо у вікні програми не відкрито жодної вкладки, файл буде відкрито у новій вкладці.
  • Відкрити у новій вкладці — відкрити відповідний файл у новій вкладці.
  • Перейти до сторінки — перейти до відповідної сторінки, якщо відповідний файл вже відкрито. Якщо файл не відкрито, його буде відкрито у новій вкладці.

Довідка

  • Зміст — показує цей документ.
  • Про програму — показує дані щодо версії програми.

Головна панель перегляду

За допомогою клавіш Backspace/пробіл можна перейти до попередньої/наступної сторінки. Натисканням клавіш Home/End можна перейти до першої/останньої сторінки документа. За допомогою клавіш зі стрілками та клавіш Page Up/Page Down можна гортати документ. За допомогою одночасного натискання клавіш Ctrl і Enter можна перейти до сторінки, яку було відкрито перед виконанням останньої дії з переходу документом.

За допомогою коліщатка миші можна гортати документ вгору і вниз. Якщо під час прокручування коліщатка утримувати натиснутою клавішу Alt, програма гортатиме документ праворуч і ліворуч. Якщо ви утримуватимете натиснутою клавішу Ctrl під час прокручування коліщатка, програма змінюватиме масштаб показу документа. Якщо ви утримуватимете натиснутою клавішу Shift під час прокручування коліщатка, програма обертатиме сторінку документа. Клавіші-модифікатори можна змінити за допомогою діалогового вікна параметрів роботи програми.

Посилання у тексті документа позначатимуться червоними рамками (якщо позначення посилань увімкнено у параметрах програми). Клацанням лівою кнопкою миші на такому посиланні можна відкрити пов’язану з ним сторінку або адресу у типовій програмі для перегляду (якщо це увімкнено у параметрах qpdfview). Якщо ви просто наведете вказівник миші на посилання, програма покаже дані щодо призначення посилання на панелі підказки.

Поля форм буде позначено синіми рамками (якщо це увімкнено у параметрах програми). Після клацання лівою кнопкою миші на полі форми можна змінити вміст поля. Якщо ви наведете вказівник миші на поле форми, програма покаже назву поля на панелі підказки.

Перейти до початкового тексту, що відповідає певній позиції у документі можна подвійним клацанням лівою кнопкою миші. У відповідь буде відкрито типовий редактор коду на позиції першого з відповідних вузлів SyncTeX.

Щоб скопіювати фрагмент тексту або зображення, натисніть і утримуйте клавішу Shift, натисніть ліву кнопку миші і, утримуючи її, обведіть рамкою область, яку слід скопіювати. Щойно ви відпустите кнопку миші, програма покаже контекстне меню, за допомогою якого ви зможете скопіювати текст або зображення до буфера обміну даними.

Щоб додати анотації, натисніть і утримуйте клавішу Ctrl, натисніть ліву кнопку миші і, утримуючи її, обведіть рамкою область, до якої додати анотацію. Щойно ви відпустите кнопку миші, програма покаже контекстне меню, за допомогою якого можна визначити, що слід додати до документа, текстову анотацію чи позначення кольором. Перейти до редагування вже доданої анотації можна клацанням лівою кнопкою миші. Клацанням правою кнопкою миші можна вилучити анотацію. Для додавання або вилучення анотацій у вашій системі має бути встановлено версію 0.20.1 або новішу бібліотеки Poppler. Якщо ви наведете вказівник миші на анотацію і затримаєте його там, програма покаже вміст анотації на панелі підказки.

Допоміжні панелі

На панелі змісту буде показано загальний огляд змісту документа. Клацанням лівою кнопкою миші можна перейти до відповідної сторінки на головній панелі перегляду. Контекстним меню панелі можна скористатися для розгортання або згортання усіх підпунктів окремого пункту змісту.

На панелі перегляду властивостей буде показано додаткові дані, що містяться у документі.

На панелі перегляду мініатюр буде показано зменшені версії сторінок документа. Наведенням вказівника миші на таку мініатюру з наступним клацанням лівою кнопкою миші ви можете одразу перейти до відповідної сторінки на основній панелі перегляду.

Параметри

Параметри поведінки

  • Відкривати URL — визначає, чи слід програмі відкривати посилання з адресами URL у типовій програмі для перегляду відповідних даних.
  • Відкривати долучення до файла — визначає, чи слід відкривати долучення до файла негайно після збереження.
  • Автооновлення — визначає, чи слід автоматично перезавантажувати документи, якщо до відповідних файлів було внесено зміни.
  • Пам’ятати останні відкриті — якщо буде позначено цей пункт, доступним стане меню останніх відкритих документів. Кількість пунктів у меню можна визначити за допомогою параметра «Кількість останніх відкритих». Зміни набудуть чинності після перезапуску програми.
  • Відновлювати вкладки — якщо позначено цей пункт, програма зберігатиме дані щодо вкладок та їхніх властивостей і відновлюватиме ці дані під час запуску.
  • Відновлювати закладки — якщо позначено цей пункт, програма зберігатиме дані щодо закладок і відновлюватиме ці дані під час запуску.
  • Відновлювати налаштування окремих документів — якщо буде позначено цей пункт, програма зберігатиме і відновлюватиме параметри показу окремих файлів під час відкриття і закриття вкладок.
  • Синхронна презентація — якщо буде позначено цей пункт, головною панеллю перегляду можна буде користуватися для керування показом презентації.
  • Екран презентації — за допомогою цього пункту можна визначити індекс екрана, на якому слід показувати презентацію.
  • Колір підсвічування — цей пункт визначає колір підсвічування.
  • Тривалість підсвічування — за допомогою цього пункту можна визначити тривалість тимчасового підсвічування.
  • Колі анотацій — цей пункт визначає колір анотацій, які додаватимуться програмою. Колір можна визначити за допомогою ключового слова SVG або шістнадцяткового позначення у форматі «#ччззсс».
  • Редактор вихідного файла — програма, яку буде запущено для редагування файла початкових даних. «%1» замінюється абсолютним шляхом до файла. «%2» та «%3» замінюються номером рядка та стовпчика відповідно.

Параметри графіки

  • Зберігати застарілі растрові зображення — якщо буде позначено цей пункт, програма використовуватиме кешовані растрові зображення для малювання проміжних зображень сторінок під час зміни масштабу за рахунок збільшення споживання пам’яті.
  • Використовувати співвідношення у пікселях пристрою — якщо буде позначено цей пункт, програма використовуватиме для відтворення на фізичних носіях і показу на екрані найвище з доступних значень роздільної здатності відповідного пристрою.
  • Рамка навколо сторінки — цей пункт визначає, чи слід показувати навколо сторінки рамку для відокремлення її від тла.
  • Виокремлювати посилання — за допомогою цього пункту можна визначити, чи слід програмі виокремлювати посилання червоними рамками.
  • Виокремлювати поля форм — за допомогою цього пункту можна визначити, чи слід програмі виокремлювати поля форм синіми рамками.
  • Колір тла — за допомогою цього пункту можна визначити колір тла. Колір тла можна задати ключовим словом SVG або у форматі шістнадцяткового числа «#ччззсс».
  • Колір паперу — за допомогою цього пункту можна визначити колір «паперу» сторінок. Колір можна задати ключовим словом SVG або у форматі шістнадцяткового числа «#ччззсс».
  • Колір тла презентації — цей пункт перевизначає колір паперу під час визначення кольору тла презентації. Колір можна задати ключовим словом SVG або у форматі шістнадцяткового числа «#ччззсс».
  • Сторінок у ряд — визначає кількість сторінок у ряд у режимі одночасного показу декількох сторінок.
  • Між сторінками — визначає вертикальний і горизонтальний проміжок між сторінками під час показу документа.
  • Між мініатюрами — визначає вертикальний і горизонтальний проміжок між мініатюрами на панелі показу ескізів сторінок.
  • Розмір мініатюр — цей пункт визначає розмір мініатюр на панелі ескізів.
  • Розмір кешу — програма намагатиметься кешувати зображення сторінок у цих межах, збільшуючи швидкість показу за рахунок збільшення об’єму використаної пам’яті.
  • Передзавантаження — якщо буде позначено цей пункт, програма намагатиметься обробити для показу дані сторінок, які ще не показано, збільшуючи швидкість показу за рахунок збільшення об’єму використаного кешу.
  • Довжина передзавантаження — цей пункт визначає кількість рядів сторінок за поточним рядом і подвоєну кількість рядів перед поточним рядом, які попередньо завантажуватимуться програмою.
  • Параметри PDF
    • Перегляд наддруку — якщо буде позначено цей пункт, програма показуватиме попередній перегляд результатів друку шарами чорнил різного кольору.
    • Згладжування — покращує якість показу за рахунок певної втрати швидкодії програми.
    • Згладжування тексту — покращує якість показу тексту за рахунок певної втрати швидкодії.
    • Гінтінґ тексту — може покращити якість показу графіки для певних шрифтів.
  • Параметри PS
    • Бітова маска згладжування графіки — цей пункт визначає рівень згладжування графічних зображень.
    • Бітова маска згладжування тексту — цей пункт визначає рівень згладжування тексту.

Параметри інтерфейсу

  • Розташування вкладок — визначає, на якому боці головної панелі перегляду буде показано вкладки.
  • Показувати вкладки — визначає, чи буде показано вкладки, якщо відкрито менше за два документи.
  • Нова вкладка поруч з поточною — якщо позначено цей пункт, нові вкладки відкриватимуться праворуч від активної вкладки.
  • Кількість останніх відкритих — визначає кількість пунктів файлів, які буде показано у меню «Останні відкриті», якщо позначено пункт «Пам’ятати останні відкриті».
  • Панель «Файл» — цей пункт визначає, які кнопки буде показано на панелі інструментів «Файл». Можливі кнопки: openInNewTab, open, refresh, saveCopy, saveAs, print та separator. Зміни набудуть чинності після перезапуску програми.
  • Панель «Редагування» — цей пункт визначає перелік кнопок, які буде показано на панелі інструментів редагування. Можливі кнопки: currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode та separator. Зміни набудуть чинності після перезапуску програми.
  • Панель «Перегляд» — визначає, які пункти дій буде показано на панелі перегляду. Можна використовувати такі пункти: scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation і separator. (Зміни буде задіяно після перезапуску програми.)
  • Поточна сторінка у заголовку вікна — якщо позначено цей пункт, у заголовку вікна програми буде показано дані щодо поточної сторінки і кількості сторінок документа у активній вкладці програми.
  • Синхронізувати перегляд ескізу — якщо позначено цей пункт, на панелі ескізів під час кожної зміни сторінок буде підсвічено перший запис, що вказуватиме на поточну сторінку.
  • Підсвічування поточної мініатюри — якщо позначено цей пункт, програма підсвічуватиме поточну сторінку на панелі мініатюр.
  • Обмежити мініатюри результатами — якщо позначено цей пункт і виконується пошук, програма показуватиме на панелі мініатюр лише сторінки, де було знайдено рядок пошуку.

Параметри скорочень

За допомогою вкладки параметрів клавіатурних скорочень можна скоригувати перелік клавіатурних скорочень відповідно до ваших уподобань. Щоб змінити скорочення для якоїсь з дій, двічі клацніть лівою кнопкою миші на відповідному пункті і введіть нове скорочення. Для кожної з дій можна вказати декілька скорочень, відокремлених крапкою з комою. Назви клавіш, які складаються з декількох літер, слід вказувати явним чином (наприклад, «Alt», «Ctrl», «PgDown»). Відповідність клавіш встановлюється без врахування регістру. Якщо клавіатурне скорочення містить клавіші-модифікатори, слід відокремлювати клавішу-модифікатор від решти клавіш скорочення символом «+». Клавішу-модифікатор має бути вказано першою. Приклади: «Crtl+A» або «Ctrl++».

Параметри модифікаторів

  • Масштабування — клавіша-модифікатор для масштабування за допомогою коліщатка миші у головній панелі перегляду.
  • Обертання — клавіша-модифікатор для обертання за допомогою коліщатка миші у головній панелі перегляду.
  • Гортання — клавіша-модифікатор для горизонтального гортання за допомогою коліщатка миші у головній панелі перегляду.
  • Копіювати до буфера — клавіша-модифікатор для копіювання текстових фрагментів та зображень зі сторінки до буфера обміну даними системи.
  • Додавання анотації — клавіша-модифікатор для додавання анотацій на сторінку.
qpdfview-0.4.7/help/help_zh_CN.html0000644000000000000000000004563212246606025015341 0ustar 00000000000000 帮助

帮助

目录

  1. 主菜单
    1. 文件
    2. 编辑
    3. View
    4. Tabs
    5. Bookmarks
    6. Help
  2. Main view
  3. Auxiliary views
  4. Settings
    1. Behavior settings
    2. Graphics settings
    3. Interface settings
    4. Shortcut settings
    5. Modifier settings

Introduction

qpdfview is a tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

Please refer to the manual page for information on command-line options and configuration files.

Main menu

File

  • Open... Opens a dialog to choose a file to open in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab... Opens a dialog to choose files to open in new tabs.
  • Recently used Contains a list of the ten most recently used files (if enabled in the settings).
  • Refresh Reloads the file displayed in the current tab.
  • Save copy... Opens a dialog to save a copy of the file displayed in the current tab.
  • Save as... Opens a dialog to save the file displayed in the current tab including changes to annotations and form fields.
  • Print... Opens a dialog to print the file displayed in the current tab.
  • Exit Closes all tabs and ends the program.

Edit

  • Next/Previous/First/Last page Skips to the next/previous/first/last page of the document.
  • Jump to page... Opens a dialog to enter a page to display in the current tab.
  • Jump backward/forward Jumps backward/forward in the history of displayed page.
  • Search... Opens the search tool bar below the main view. The search automatically starts two seconds after the last change of the search term or is manually started by pressing the return key. If the Shift modifier is held when the return key is pressed, the search starts in all tabs instead of just the current tab.
  • Find previous/next Jumps to the previous/next occurrence of the search term in the document.
  • Cancel search Cancels the currently running search and closes the search tool bar.
  • Copy to clipboard If checked, the program will wait for a frame to be dragged to copy texts or images.
  • Add annotation If checked, the program will wait for a frame to be dragged to add annotations.
  • Settings... Opens the settings dialog. The button labeled 'Defaults' will revert all settings on all tabs to their default values. The button labeled 'Defaults on current tab' will revert only the settings on the current tab to their default values.

The current page can be changed by entering the desired page into the text field in the edit tool bar, which can be focused using Ctrl+K, and pressing the return key.

View

  • Continuous Determines whether all rows of the page layout are visible at once.
  • Two pages Determines whether the page layout uses two columns.
  • Two pages with cover page Determines whether the page layout uses two columns with a break after the cover page.
  • Multiple pages Determines whether the page layout uses multiple columns. The number of columns can be changed in the settings dialog.
  • Zoom in Increases the scale factor by 10 percent.
  • Zoom out Decreases the scale factor by 10 percent.
  • Original size Resets the scale factor to 100 percent.
  • Fit to page width Determines the scale factor such that all pages fully fit into the main view horizontally.
  • Fit to page size Determines the scale factor such that all pages fully fit into the main view horizontally and vertically.
  • Rotate left Rotates the pages left/counterclockwise by 90 degrees.
  • Rotate right Rotates the pages right/clockwise by 90 degrees.
  • Invert colors Determines whether pages are rendered with inverted colors.
  • Tool bars This menu contains a list of available tool bars for accessing frequently used actions.
  • Docks This menu contains a list of available docks for displaying supplementary information.
  • Fonts... Opens a dialog listing the fonts used in the document.
  • Fullscreen Toggles the fullscreen mode, i.e. the window is shown maximized and without decoration.
  • Presentation... Enters presentation mode which can be left by pressing F12 or escape. The home/end key is used to display the first/last page. Arrow keys right and down, space and the page down key jump to the next page. Arrow keys left and up, backspace and the page up key jump to the previous page. Pressing control and return jumps back to the page before the last jump.

The scale factor can be changed by entering the desired percentage into the text field in the view tool bar, which can be focused using Ctrl+L, and pressing the return key.

Tabs

  • Previous/Next tab Makes the previous/next tab the current tab. Cycles to the last/first tab if the first/last tab is the current tab.
  • Close tab Closes the current tab.
  • Close all tabs Closes all tabs.
  • Close all tabs but current tab Closes all tabs except for the current tab.

This menu contains a list of all tabs which can be made the current tab by clicking on the corresponding menu item. Tabs can also be closed by middle-clicking. The first nine tabs can also be activated by holding the Alt modifier and pressing keys one to nine.

Bookmarks

  • Previous bookmark Jumps to the closest bookmark before the current page.
  • Next bookmark Jumps to the closest bookmark after the current page.
  • Add bookmark Adds a bookmark for the current file and page.
  • Remove bookmark Removes the bookmark for the current file and page.
  • Remove all bookmarks Removes all bookmarks.
  • Open Opens the corresponding file in the current tab. If there is no tab, the file is opened in a new tab.
  • Open in new tab Opens the corresponding file in a new tab.
  • Jump to page Jumps to the corresponding page if the corresponding file is already open. Otherwise the corresponding file is opened in a new tab.

Help

  • Contents Displays this document.
  • About Displays the program version.

Main view

The backspace/space key skips to the previous/next page. The home/end key skips to the first/last page. The arrow, page up and page down keys scroll the viewport. Pressing control and return jumps to the page before the last jump.

Using the mouse wheel scrolls up and down. Holding ALT while using the mouse wheel scrolls left and right. Holding CTRL while using the mouse wheel scales the document. Holding SHIFT while using the mouse wheel rotates the document. (Keyboard modifiers can be changed in the settings dialog.)

Links are highlighted by red frames (if enabled in the settings). Left-click on a link to show the linked page or open the linked URL in the default browser (if enabled in the settings). Hovering over a link displays its destination as a tool tip.

Form fields are highlighted by blue frames (if enabled in the settings). Left-click on a form field to edit its contents. Hovering over a form field displays its name as a tool tip.

The source of a position in the document is requested by double-clicking which opens the first matching SyncTeX node using the source editor.

To copy texts or images, hold SHIFT, click and hold the left mouse button to drag a frame around the area to copy. Once the mouse button is released, a pop-up menu is displayed to select whether to copy texts or images into the clipboard.

To add annotations, hold CTRL, click and hold the left mouse button to drag a frame around the region of interest. Once the mouse button is released, a pop-up menu is displayed to select whether to add text or highlight annotations. Left-click to edit annotations. Right-click to remove annotations. (Adding and removing annotations requires version 0.20.1 or higher of the Poppler library.) Hovering over an annotation displays its contents as a tool tip.

Auxiliary views

The outline view displays an overview of the contents of the document. A left click on an entry jumps to the respective page in the main view. The context menu can be used to expand/collapse all items below the selected item.

The properties view displays additional information contained in the document.

The thumbnails view displays smaller versions of the pages of the document. A left click on an entry jumps to the respective page in the main view.

Settings

Behavior settings

  • Open URL Determines whether links to URL are opened in the default browser.
  • Open file attachments Determines whether file attachments will be opened immediately after saving.
  • Auto-refresh Determines whether files are automatically reloaded if changed on disk.
  • Track recently used If enabled, a recently used menu is available and lists as many recently used files as set in the "Recently used count" option. (Effective after restart.)
  • Restore tabs If enabled, tabs and their properties are saved on ending the program and restored on restart.
  • Restore bookmarks If enabled, bookmarks are saved on ending the program and restored on restart.
  • Restore per-file settings If enabled, per-file settings are saved/restored on opening/closing tabs.
  • Synchronize presentation If enabled, the main view can be used to control the presentation view.
  • Presentation screen The index of the screen to display the presentation view on.
  • Highlight color Determines the color of highlights.
  • Highlight duration Determines the duration of temporary highlights.
  • Annotation color The color of annotations added by the program using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Source editor The program which is started to edit sources. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.

Graphics settings

  • Keep obsolete pixmaps If enabled, then upon change of the zoom factor, cached pixmaps will be used to draw approximations of final pixmaps until these are available at the cost of increased memory usage.
  • Use device pixel ratio If enabled, the highest available device pixel ratio is used to render at physical and display at logical resolution.
  • Decorate pages Determines whether pages are set apart from the background.
  • Decorate links Determines whether links are highlighted by red frames.
  • Decorate form fields Determines whether form fields are highlighted by blue frames.
  • Background color Determines the color of the background using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Paper color Determines the color of pages using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Presentation background color Overrides the paper color in the computation of the background color of the presentation view and is defined using SVG color keywords or hexadecimal notation '#rrggbb'.
  • Pages per row Number of pages per row in the 'multiple pages' layout mode.
  • Page spacing Determines both vertical and horizontal space displayed between pages.
  • Thumbnail spacing Determines both vertical and horizontal space displayed between thumbnails.
  • Thumbnail size Determines the size of the thumbnails.
  • Cache size The program will try to cache rendered pages within this limit increasing rendering speed at the cost of increased memory usage.
  • Prefetch The program will try to render pages that are not yet visible increasing rendering speed at the cost of increased cache usage.
  • Prefetch distance The number of rows beyond the current row and twice the number of rows before the current row that are prefetched.
  • PDF settings
    • Overprint preview If enabled, a preview of printing one layer of ink on top of another is displayed.
    • Antialiasing Improves display quality at the cost of performance
    • Text antialiasing Improves text display quality at the cost of performance
    • Text hinting May improve text display quality for certain fonts.
  • PS settings
    • Graphics antialias bits Determines the amount of antialiasing for graphics.
    • Text antialias bits Determines the amount of antialiasing for text.

Interface settings

  • Tab position Defines at which edge of the main view tabs will be displayed.
  • Tab visibility Determines whether tabs will be displayed if less than two documents are opened.
  • New tab next to current tab If enabled, new tabs are opened to the right of the active tab.
  • Recently used count Sets the number of files that are listed in the recently used menu, if "Track recently used" is enabled.
  • File tool bar Defines which actions are visible in the file tool bar. Available actions are openInNewTab, open, refresh, saveCopy, saveAs, print and separator. (Effective after restart.)
  • Edit tool bar Defines which actions are visible in the edit tool bar. Available actions are currentPage, previousPage, nextPage, firstPage, lastPage, jumpToPage, jumpBackward, jumpForward, search, copyToClipboardMode, addAnnotationMode and separator. (Effective after restart.)
  • View tool bar Defines which actions are visible in the view tool bar. Available actions are scaleFactor, zoomIn, zoomOut, continuousMode, twoPagesMode, twoPagesWithCoverPageMode, multiplePagesMode, originalSize, fitToPageWidthMode, fitToPageSizeMode, rotateLeft, rotateRight, fullscreen, presentation and separator. (Effective after restart.)
  • Current page in window title If enabled, the current page and number of pages of the document in the active tab are displayed in the window title.
  • Synchronize outline view If enabled, the outline view will highlight the first entry pointing to the current page whenever the current page changes.
  • Highlight current thumbnail If enabled, the current page is highlighted in the thumbnails view.
  • Limit thumbnails to results If this option is enabled and a search is conducted, only the pages where the search term is found are displayed in the thumbnails view.

Shortcut settings

The shortcut settings allows the adjustment of keyboard shortcuts to personal preference. Shortcuts are changed by double-clicking on the shortcut to edit it and entering the new shortcut. Each action can have several shortcuts by entering a semicolon-separated list of them. Names of keys that are not single letters are written out explicitly (e.g. "Alt", "Ctrl", "PgDown"), where the matching is not case sensitive. If the shortcut contains modifier keys, the names of the keys are joined by a plus sign and modifier keys must be listed first, e.g. "Crtl+A" or "Ctrl++".

Modifier settings

  • Zoom The keyboard modifiers to zoom using the mouse wheel in the main view.
  • Rotate The keyboard modifiers to rotate using the mouse wheel in the main view.
  • Scroll The keyboard modifiers to scroll horizontally using the mouse wheel in the main view.
  • Copy to clipboard The keyboard modifiers to copy texts or images from a page to the clipboard.
  • Add annotation The keyboard modifiers to add annotations to a page.
qpdfview-0.4.7/icons/continuous.svg0000644000000000000000000000270712246606025015550 0ustar 00000000000000 qpdfview-0.4.7/icons/document-open.svg0000644000000000000000000002077412246606025016123 0ustar 00000000000000 qpdfview-0.4.7/icons/document-print.svg0000644000000000000000000001507312246606025016312 0ustar 00000000000000 qpdfview-0.4.7/icons/document-save-as.svg0000644000000000000000000002360612246606025016516 0ustar 00000000000000 qpdfview-0.4.7/icons/document-save.svg0000644000000000000000000002250112246606025016106 0ustar 00000000000000 qpdfview-0.4.7/icons/edit-copy.svg0000644000000000000000000000703512246606025015236 0ustar 00000000000000 qpdfview-0.4.7/icons/edit-find.svg0000644000000000000000000003002612246606025015200 0ustar 00000000000000 qpdfview-0.4.7/icons/fit-to-page-size.svg0000644000000000000000000000603312246606025016422 0ustar 00000000000000 qpdfview-0.4.7/icons/fit-to-page-width.svg0000644000000000000000000000441712246606025016573 0ustar 00000000000000 qpdfview-0.4.7/icons/go-down.svg0000644000000000000000000000354012246606025014710 0ustar 00000000000000 qpdfview-0.4.7/icons/go-first.svg0000644000000000000000000000367012246606025015074 0ustar 00000000000000 qpdfview-0.4.7/icons/go-jump.svg0000644000000000000000000000331112246606025014710 0ustar 00000000000000 qpdfview-0.4.7/icons/go-last.svg0000644000000000000000000000363212246606025014706 0ustar 00000000000000 qpdfview-0.4.7/icons/go-next.svg0000644000000000000000000000343612246606025014723 0ustar 00000000000000 qpdfview-0.4.7/icons/go-previous.svg0000644000000000000000000000331712246606025015617 0ustar 00000000000000 qpdfview-0.4.7/icons/go-up.svg0000644000000000000000000000341712246606025014370 0ustar 00000000000000 qpdfview-0.4.7/icons/image-loading.svg0000644000000000000000000002005112246606025016027 0ustar 00000000000000 qpdfview-0.4.7/icons/image-missing.svg0000644000000000000000000000703312246606025016070 0ustar 00000000000000 qpdfview-0.4.7/icons/mail-attachment.svg0000644000000000000000000000347312246606025016413 0ustar 00000000000000 qpdfview-0.4.7/icons/media-seek-backward.svg0000644000000000000000000000474712246606025017130 0ustar 00000000000000 qpdfview-0.4.7/icons/media-seek-forward.svg0000644000000000000000000000513112246606025017002 0ustar 00000000000000 qpdfview-0.4.7/icons/multiple-pages.svg0000644000000000000000000000663412246606025016275 0ustar 00000000000000 qpdfview-0.4.7/icons/object-rotate-left.svg0000644000000000000000000000355512246606025017036 0ustar 00000000000000 qpdfview-0.4.7/icons/object-rotate-right.svg0000644000000000000000000000330212246606025017207 0ustar 00000000000000 qpdfview-0.4.7/icons/process-stop.svg0000644000000000000000000000532512246606025016002 0ustar 00000000000000 qpdfview-0.4.7/icons/qpdfview.svg0000644000000000000000000004301212246606025015161 0ustar 00000000000000 qpdfview-0.4.7/icons/qpdfview_os2.ico0000644000000000000000000001722012246606025015721 0ustar 00000000000000BA(HCI (PCI ((κʞƾںҶƺގ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®ھvr¢Ʀž~®ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾںfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾξrºҾª⦪κֺβƮ溲κζκƾzҾֶfƾ®겮֪ʶΪҾƮªξnvζֲҞ~¢¶ƺƮʲږvʮrrrζζξʶ檮ƪªƦj¦š~궮ҖκƶήBA(CI @CI κʞƾںҶƺގ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®ھvr¢Ʀž~®ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾںfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾξrºҾª⦪κֺβƮ溲κζκƾzҾֶfƾ®겮֪ʶΪҾƮªξnvζֲҞ~¢¶ƺƮʲږvʮrrrζζξʶ檮ƪªƦj¦š~궮ҖκƶήBA( CI  (CI  κʞƾںҶƺގ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®ھvr¢Ʀž~®ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾںfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾξrºҾª⦪κֺβƮ溲κζκƾzҾֶfƾ®겮֪ʶΪҾƮªξnvζֲҞ~¢¶ƺƮʲږvʮrrrζζξʶ檮ƪªƦj¦š~궮ҖκƶήBA(CI  CI κʞƾںҶƺގ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®ھvr¢Ʀž~®ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾںfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾξrºҾª⦪κֺβƮ溲κζκƾzҾֶfƾ®겮֪ʶΪҾƮªξnvζֲҞ~¢¶ƺƮʲږvʮrrrζζξʶ檮ƪªƦj¦š~궮Җκƶή?      W    3333   X F    X +C (((  W   s99\5  b@?4ZNQ  B@N0--EP_(   hq0/-7jj7P2JD  DG2c0T7LL5K/8S b<-)66[E^`  lo{)$IehBJ0x% `ai';'$u>% awi;;',f^cq>k oU/I,&&e6RK?9 ٳ=zy,&&,IR[K}=mQ AnU'',$)E?k  O2)&$)/8m5 p @_J$|$fB "*Z:~%STsnD  "YrբgA p4  .r"4]::ߙ޿  ЈY**""*  .ы*    ##              W    333        X  99\5  b@4ZQ  @N0--EP_(  hq0/7jj72JD b<-)66[^`  lo)$IhBϫ0x `ai''$u> awi;;',^cq> ٳ=y,&,IR[}=mQ An'',$)?k  O2)&$)8m5 GG]O\<28=B "*Z~%Ssn  "YբgA p4  .r"4::ߙ  .*    ##              ƀր:ڀ6:2€::ހ6>ր2>>>6:ـ>:~    W    + (  ?4Q 0-j7J b-6[  `i;$% o/,&R?ĵ AU',)? p_$$v "*:%Tn  ."]: . #ƾ֪ʶҾªƀֲҀ~ƀրڀ    XZQ h07jJ $Bx ai'^q n''$?  G\2=B Ǣ p  #qpdfview-0.4.7/icons/qpdfview_os2.rc0000644000000000000000000000004612246606025015551 0ustar 00000000000000ICON 1 DISCARDABLE "qpdfview_os2.ico" qpdfview-0.4.7/icons/qpdfview_win32.ico0000644000000000000000000002000612246606025016154 0ustar 00000000000000(( F  h((PںҶƺ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®vr¢Ʀž~ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾrºҾªֺβƮκζκzҾf®ʶΪҾƮªξnvζֲ~¢¶ƺʲvrrrζζξʶƪªƦjš~κƶή      W    3333   X F    X +C (((  W   s99\5  b@?4ZNQ  B@N0--EP_(   hq0/-7jj7P2JD  DG2c0T7LL5K/8S b<-)66[E^`  lo{)$IehBJ0x% `ai';'$u>% awi;;',f^cq>k oU/I,&&e6RK?9 ٳ=zy,&&,IR[K}=mQ AnU'',$)E?k  O2)&$)/8m5 p @_J$|$fB "*Z:~%STsnD  "YrբgA p4  .r"4]::ߙ޿  ЈY**""*  .ы*    ##           ?( @ںҶƺ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®vr¢Ʀž~ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾrºҾªֺβƮκζκzҾf®ʶΪҾƮªξnvζֲ~¢¶ƺʲvrrrζζξʶƪªƦjš~κƶή   W    333        X  99\5  b@4ZQ  @N0--EP_(  hq0/7jj72JD b<-)66[^`  lo)$IhBϫ0x `ai''$u> awi;;',^cq> ٳ=y,&,IR[}=mQ An'',$)?k  O2)&$)8m5 GG]O\<28=B "*Z~%Ssn  "YբgA p4  .r"4::ߙ  .*    ##         ((ںҶƺ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®vr¢Ʀž~ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾrºҾªֺβƮκζκzҾf®ʶΪҾƮªξnvζֲ~¢¶ƺʲvrrrζζξʶƪªƦjš~κƶή    W    + (  ?4Q 0-j7J b-6[  `i;$% o/,&R?ĵ AU',)? p_$$v "*:%Tn  ."]: . # :6:2::6>2>>>6:>:~( @ںҶƺ¾ֶºֺƶҺ־Һƞ~βƺʺzƪ®vr¢Ʀž~ʶʮ¾Ҿ²ʾƢƲ²ƶnʲҶξʲƮھšzκƞzֺʺƾʾfʲƺή¦ζªΪʦ־ž¾ʮnnnֺ¶Ƣ–vƲªҾrºҾªֺβƮκζκzҾf®ʶΪҾƮªξnvζֲ~¢¶ƺʲvrrrζζξʶƪªƦjš~κƶή    XZQ h07jJ $Bx ai'^q n''$?  G\2=B Ǣ p  #qpdfview-0.4.7/icons/qpdfview_win32.rc0000644000000000000000000000006112246606025016005 0ustar 00000000000000IDI_ICON1 ICON DISCARDABLE "qpdfview_win32.ico" qpdfview-0.4.7/icons/tab-new.svg0000644000000000000000000000567312246606025014704 0ustar 00000000000000 qpdfview-0.4.7/icons/two-pages-with-cover-page.svg0000644000000000000000000000406712246606025020250 0ustar 00000000000000 qpdfview-0.4.7/icons/two-pages.svg0000644000000000000000000000270612246606025015247 0ustar 00000000000000 qpdfview-0.4.7/icons/view-fullscreen.svg0000644000000000000000000000675112246606025016457 0ustar 00000000000000 qpdfview-0.4.7/icons/view-refresh.svg0000644000000000000000000001120112246606025015735 0ustar 00000000000000 qpdfview-0.4.7/icons/x-office-presentation.svg0000644000000000000000000001431212246606025017546 0ustar 00000000000000 qpdfview-0.4.7/icons/zoom-in.svg0000644000000000000000000000317412246606025014731 0ustar 00000000000000 qpdfview-0.4.7/icons/zoom-original.svg0000644000000000000000000000310312246606025016117 0ustar 00000000000000 1:1 qpdfview-0.4.7/icons/zoom-out.svg0000644000000000000000000000174512246606025015134 0ustar 00000000000000 qpdfview-0.4.7/miscellaneous/qpdfview.10000644000000000000000000001276012246606025016260 0ustar 00000000000000.\" .\" .\" Copyright 2012-2013 Benjamin Eltzner .\" Copyright 2012-2013 Adam Reichold .\" Copyright 2012 Michał Trybus .\" .\" This file is part of qpdfview. .\" .\" qpdfview 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. .\" .\" qpdfview 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 qpdfview. If not, see . .\" .\" This file is additionally licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC-BY-SA) license. The full text of the license can be found at https://creativecommons.org/licenses/by-sa/3.0/legalcode .\" .\" .TH QPDFVIEW 1 "July 2012" .SH NAME qpdfview \- tabbed document viewer .SH SYNOPSIS .B qpdfview .I [options] [--] [file[#page]] [file[#src:name:line:column]] ... .SH DESCRIPTION .B qpdfview is a simple viewer for document files in the portable document format (PDF). It uses the Poppler library for rendering and the Qt toolkit for its interface. .SH OPTIONS .IP "\-\-help" Displays usage information. .IP "\-\-quiet" Suppresses warning messages which are displayed if the program fails to open a file. .IP "\-\-search text" Initiates a search for .I text in the current tab. .IP \-\-unique If an instance of qpdfview is started with this option, any files that are opened using this option afterwards, are opened as tabs in the original window. If a file is already opened in a tab of the original window, it is merely reloaded. .IP "\-\-instance name" Uses .I name as the name of the instance contacted or created using the "\-\-unique" option. This allows one to run multiple instances and remotely open and refresh tabs in any of them by passing the instance name. The argument must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. .IP "\-\-choose-instance" Can be combined with the "\-\-unique" option to display a dialog at start-up where the instance name can be chosen with all instances that have tabs stored as suggestions. .IP [file[#page]] .I file specifies the file to open. The optional parameter .I page opens the file at the given page. Multiple files will be opened in separate tabs. .IP [file[#src:name:line:column]] Forward search using SyncTeX is performed using the optional parameters .I name which is the name of the source file, .I line which is the line number in the source file and .I column which is the column number in the source file where the number 0 matches all lines respectively columns. .SH CONFIGURATION FILE qpdfview uses a configuration file usually located at .RS "~/.config/qpdfview/qpdfview.conf". .RE The icon theme used by Qt can be changed by setting the key "iconTheme" in the section "mainWindow". The application-wide Qt style sheet can be changed by setting the key "styleSheet" in the section "mainWindow". The timeout for auto-refresh resp. prefetch can be changed by setting the key "autoRefreshTimeout" resp. "prefetchTimeout" in the section "documentView". .SH EXAMPLES .RS The command .RE .B qpdfview foo.pdf#3 bar.pdf .RS opens "foo.pdf" in the first tab displaying the third page of the document and "bar.pdf" in the second tab displaying the beginning of the document. The command .RE .B qpdfview \-\-quiet foobar/* .RS opens all files that can be opened in the directory "foobar", suppressing warning messages for files that cannot be opened. The command .RE .B qpdfview \-\-search foo bar.pdf .RS opens "bar.pdf" in the first tab and starts a search for "foo". Subsequent execution of the commands .RE .B qpdfview \-\-unique foo.pdf bar.pdf .RS and .RE .B qpdfview \-\-unique foo.pdf#5 .RS opens "foo.pdf" and "bar.pdf", then reloads "foo.pdf" and displays its fifth page. Subsequent execution of the commands .RE .B qpdfview \-\-unique foo.pdf .RS and .RE .B qpdfview bar.pdf .RS and .RE .B qpdfview \-\-unique foo1.pdf bar1.pdf .RS opens "foo.pdf" in the first window, "bar.pdf" in a second window and then "foo1.pdf" and "bar1.pdf" in additional tabs in the first window. Subsequent execution of the commands .RE .B qpdfview \-\-unique \-\-instance a foo1.pdf bar1.pdf .RS and .RE .B qpdfview \-\-unique \-\-instance b foo2.pdf bar2.pdf .RS and .RE .B qpdfview \-\-unique foo3.pdf bar3.pdf .RS and .RE .B qpdfview \-\-unique \-\-instance a foo1.pdf#4 bar4.pdf .RS opens "foo1.pdf" and "bar1.pdf" in the first window, "foo2.pdf" and "bar2.pdf" in the second window, "foo3.pdf" and "bar3.pdf" in the third window and then reloads "foo1.pdf" and displays its fourth page and opens "bar4.pdf" in an additional tab in the first window. Subsequent execution of the commands .RE .B qpdfview \-\-unique \-\-instance a foo.pdf bar.pdf .RS and .RE .B qpdfview \-\-unique \-\-instance a \-\-search "foobar" .RS opens "foo.pdf" and "bar.pdf" in a window and then starts a search for the term "foobar" in the document in the active tab (which is the last opened "bar.pdf"). The command .RE .B qpdfview \-\-unique foobar.pdf#src:foobar.tex:42:0 .RS opens or refreshes "foobar.pdf" jumping to and highlighting the position that corresponds to line 42 of the source file "foobar.tex". .SH BUGS If you find a bug, please report it at .RS "https://launchpad.net/qpdfview". .RE qpdfview-0.4.7/miscellaneous/qpdfview.desktop.in0000644000000000000000000000074312246606025020174 0ustar 00000000000000[Desktop Entry] Type=Application Terminal=false Name=qpdfview Icon=DATA_INSTALL_PATH/qpdfview.svg GenericName=PDF viewer Comment=A tabbed PDF viewer using the poppler library. Categories=Viewer;Office; TryExec=qpdfview Exec=qpdfview --unique %F MimeType=MIME_TYPES Actions=ChooseInstance;NonUniqueInstance; [Desktop Action ChooseInstance] Name=Choose instance Exec=qpdfview --unique --choose-instance %F [Desktop Action NonUniqueInstance] Name=Non-unique instance Exec=qpdfview %F qpdfview-0.4.7/sources/annotationwidgets.cpp0000644000000000000000000001030712246606025017431 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "annotationwidgets.h" #include #include #include #include #include #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include #else #include #endif // QT_VERSION #include static bool hideOnEscape(QWidget* widget, QKeyEvent* event) { if(event->key() == Qt::Key_Escape) { widget->hide(); event->accept(); return true; } return false; } AnnotationWidget::AnnotationWidget(QMutex* mutex, Poppler::Annotation* annotation, QWidget* parent) : QPlainTextEdit(parent), m_mutex(mutex), m_annotation(annotation) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 setTabChangesFocus(true); setPlainText(m_annotation->contents()); connect(this, SIGNAL(textChanged()), SLOT(on_textChanged())); connect(this, SIGNAL(textChanged()), SIGNAL(wasModified())); moveCursor(QTextCursor::End); } void AnnotationWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QPlainTextEdit::keyPressEvent(event); } } void AnnotationWidget::on_textChanged() { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 m_annotation->setContents(toPlainText()); } FileAttachmentAnnotationWidget::FileAttachmentAnnotationWidget(QMutex* mutex, Poppler::FileAttachmentAnnotation* annotation, QWidget* parent) : QToolButton(parent), m_mutex(mutex), m_annotation(annotation) { m_menu = new QMenu(this); m_saveAction = m_menu->addAction(tr("Save...")); m_saveAndOpenAction = m_menu->addAction(tr("Save and open...")); setMenu(m_menu); setPopupMode(QToolButton::InstantPopup); setIcon(QIcon::fromTheme(QLatin1String("mail-attachment"), QIcon(QLatin1String(":icons/mail-attachment.svg")))); connect(m_menu, SIGNAL(aboutToShow()), SLOT(on_aboutToShow())); connect(m_menu, SIGNAL(aboutToHide()), SLOT(on_aboutToHide())); connect(m_saveAction, SIGNAL(triggered()), SLOT(on_save_triggered())); connect(m_saveAndOpenAction, SIGNAL(triggered()), SLOT(on_saveAndOpen_triggered())); } void FileAttachmentAnnotationWidget::keyPressEvent(QKeyEvent *event) { if(!hideOnEscape(this, event)) { QToolButton::keyPressEvent(event); } } void FileAttachmentAnnotationWidget::on_aboutToShow() { graphicsProxyWidget()->setZValue(1.0); } void FileAttachmentAnnotationWidget::on_aboutToHide() { graphicsProxyWidget()->setZValue(0.0); } void FileAttachmentAnnotationWidget::on_save_triggered() { save(false); } void FileAttachmentAnnotationWidget::on_saveAndOpen_triggered() { save(true); } void FileAttachmentAnnotationWidget::save(bool open) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 Poppler::EmbeddedFile* embeddedFile = m_annotation->embeddedFile(); QString filePath = QFileDialog::getSaveFileName(0, tr("Save file attachment"), embeddedFile->name()); if(!filePath.isEmpty()) { QFile file(filePath); if(file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { file.write(embeddedFile->data()); file.close(); if(open) { QDesktopServices::openUrl(QUrl(filePath)); } } else { QMessageBox::warning(0, tr("Warning"), tr("Could not save file attachment to '%1'.").arg(filePath)); } } } qpdfview-0.4.7/sources/annotationwidgets.h0000644000000000000000000000364212246606025017102 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef ANNOTATIONWIDGETS_H #define ANNOTATIONWIDGETS_H #include #include class QMutex; namespace Poppler { class Annotation; class FileAttachmentAnnotation; } class AnnotationWidget : public QPlainTextEdit { Q_OBJECT public: AnnotationWidget(QMutex* mutex, Poppler::Annotation* annotation, QWidget* parent = 0); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_textChanged(); private: Q_DISABLE_COPY(AnnotationWidget) QMutex* m_mutex; Poppler::Annotation* m_annotation; }; class FileAttachmentAnnotationWidget : public QToolButton { Q_OBJECT public: FileAttachmentAnnotationWidget(QMutex* mutex, Poppler::FileAttachmentAnnotation* annotation, QWidget* parent = 0); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_aboutToShow(); void on_aboutToHide(); void on_save_triggered(); void on_saveAndOpen_triggered(); private: Q_DISABLE_COPY(FileAttachmentAnnotationWidget) QMutex* m_mutex; Poppler::FileAttachmentAnnotation* m_annotation; void save(bool open); QMenu* m_menu; QAction* m_saveAction; QAction* m_saveAndOpenAction; }; #endif // ANNOTATIONWIDGETS_H qpdfview-0.4.7/sources/bookmarkmenu.cpp0000644000000000000000000000701212246606025016361 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "bookmarkmenu.h" #include BookmarkMenu::BookmarkMenu(const QString& filePath, QWidget* parent) : QMenu(parent) { const QFileInfo fileInfo(filePath); menuAction()->setText(fileInfo.completeBaseName()); menuAction()->setToolTip(fileInfo.absoluteFilePath()); menuAction()->setData(filePath); m_openAction = addAction(tr("&Open")); m_openAction->setIcon(QIcon::fromTheme("document-open", QIcon(":icons/document-open.svg"))); m_openAction->setIconVisibleInMenu(true); connect(m_openAction, SIGNAL(triggered()), SLOT(on_open_triggered())); m_openInNewTabAction = addAction(tr("Open in new &tab")); m_openInNewTabAction->setIcon(QIcon::fromTheme("tab-new", QIcon(":icons/tab-new.svg"))); m_openInNewTabAction->setIconVisibleInMenu(true); connect(m_openInNewTabAction, SIGNAL(triggered()), SLOT(on_openInNewTab_triggered())); m_jumpToPageActionGroup = new QActionGroup(this); connect(m_jumpToPageActionGroup, SIGNAL(triggered(QAction*)), SLOT(on_jumpToPage_triggered(QAction*))); m_separatorAction = addSeparator(); m_removeBookmarkAction = addAction(tr("&Remove bookmark")); connect(m_removeBookmarkAction, SIGNAL(triggered()), SLOT(on_removeBookmark_triggered())); } void BookmarkMenu::addJumpToPageAction(int page, const QString& label) { QAction* before = m_separatorAction; foreach(QAction* action, m_jumpToPageActionGroup->actions()) { if(action->data().toInt() == page) { action->setText(label); return; } else if(action->data().toInt() > page) { before = action; break; } } QAction* action = new QAction(label, this); action->setIcon(QIcon::fromTheme("go-jump", QIcon(":icons/go-jump.svg"))); action->setIconVisibleInMenu(true); action->setData(page); insertAction(before, action); m_jumpToPageActionGroup->addAction(action); } void BookmarkMenu::removeJumpToPageAction(int page) { foreach(QAction* action, m_jumpToPageActionGroup->actions()) { if(action->data().toInt() == page) { delete action; break; } } } QString BookmarkMenu::filePath() const { return menuAction()->data().toString(); } JumpList BookmarkMenu::jumps() const { JumpList jumps; foreach(const QAction* action, m_jumpToPageActionGroup->actions()) { jumps.append(qMakePair(action->data().toInt(), action->text())); } return jumps; } void BookmarkMenu::on_removeBookmark_triggered() { deleteLater(); } void BookmarkMenu::on_open_triggered() { emit openTriggered(filePath()); } void BookmarkMenu::on_openInNewTab_triggered() { emit openInNewTabTriggered(filePath()); } void BookmarkMenu::on_jumpToPage_triggered(QAction* action) { emit jumpToPageTriggered(filePath(), action->data().toInt()); } qpdfview-0.4.7/sources/bookmarkmenu.h0000644000000000000000000000316712246606025016035 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef BOOKMARKMENU_H #define BOOKMARKMENU_H #include #include "global.h" class BookmarkMenu : public QMenu { Q_OBJECT public: BookmarkMenu(const QString& filePath, QWidget* parent = 0); void addJumpToPageAction(int page, const QString& label); void removeJumpToPageAction(int page); QString filePath() const; JumpList jumps() const; signals: void openTriggered(const QString& filePath); void openInNewTabTriggered(const QString& filePath); void jumpToPageTriggered(const QString& filePath, int page); protected slots: void on_open_triggered(); void on_openInNewTab_triggered(); void on_jumpToPage_triggered(QAction* action); void on_removeBookmark_triggered(); private: Q_DISABLE_COPY(BookmarkMenu) QAction* m_openAction; QAction* m_openInNewTabAction; QActionGroup* m_jumpToPageActionGroup; QAction* m_separatorAction; QAction* m_removeBookmarkAction; }; #endif // BOOKMARKMENU_H qpdfview-0.4.7/sources/database.cpp0000644000000000000000000003466412246606025015450 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Michał Trybus This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "database.h" #include #include #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include #else #include #endif // QT_VERSION #ifdef WITH_SQL #include #include #endif // WITH_SQL #include "settings.h" #include "documentview.h" #include "bookmarkmenu.h" Database* Database::s_instance = 0; Database* Database::instance() { if(s_instance == 0) { s_instance = new Database(qApp); } return s_instance; } Database::~Database() { s_instance = 0; } QStringList Database::loadInstanceNames() { QStringList instanceNames; #ifdef WITH_SQL if(m_database.isOpen()) { m_database.transaction(); QSqlQuery query(m_database); query.exec("SELECT DISTINCT(instanceName) FROM tabs_v2"); while(query.next()) { if(!query.isActive()) { qDebug() << query.lastError(); break; } if(!query.value(0).toString().isEmpty()) { instanceNames.append(query.value(0).toString()); } } m_database.commit(); } #endif // WITH_SQL return instanceNames; } void Database::restoreTabs() { #ifdef WITH_SQL if(m_database.isOpen()) { m_database.transaction(); QSqlQuery query(m_database); query.prepare("SELECT filePath,currentPage,continuousMode,layoutMode,scaleMode,scaleFactor,rotation FROM tabs_v2 WHERE instanceName==?"); query.bindValue(0, instanceName()); query.exec(); while(query.next()) { if(!query.isActive()) { qDebug() << query.lastError(); break; } emit tabRestored(query.value(0).toString(), static_cast< bool >(query.value(2).toUInt()), static_cast< LayoutMode >(query.value(3).toUInt()), static_cast< ScaleMode >(query.value(4).toUInt()), query.value(5).toReal(), static_cast< Rotation >(query.value(6).toUInt()), query.value(1).toInt()); } m_database.commit(); } #endif // WITH_SQL } void Database::saveTabs(const QList< const DocumentView* >& tabs) { #ifdef WITH_SQL if(m_database.isOpen()) { m_database.transaction(); QSqlQuery query(m_database); if(Settings::instance()->mainWindow().restoreTabs()) { query.prepare("DELETE FROM tabs_v2 WHERE instanceName==?"); query.bindValue(0, instanceName()); query.exec(); if(!query.isActive()) { qDebug() << query.lastError(); } query.prepare("INSERT INTO tabs_v2 " "(filePath,instanceName,currentPage,continuousMode,layoutMode,scaleMode,scaleFactor,rotation)" " VALUES (?,?,?,?,?,?,?,?)"); foreach(const DocumentView* tab, tabs) { query.bindValue(0, QFileInfo(tab->filePath()).absoluteFilePath()); query.bindValue(1, instanceName()); query.bindValue(2, tab->currentPage()); query.bindValue(3, static_cast< uint >(tab->continousMode())); query.bindValue(4, static_cast< uint >(tab->layoutMode())); query.bindValue(5, static_cast< uint >(tab->scaleMode())); query.bindValue(6, tab->scaleFactor()); query.bindValue(7, static_cast< uint >(tab->rotation())); query.exec(); if(!query.isActive()) { qDebug() << query.lastError(); } } } else { query.exec("DELETE FROM tabs_v2"); if(!query.isActive()) { qDebug() << query.lastError(); } } m_database.commit(); } #else Q_UNUSED(tabs); #endif // WITH_SQL } void Database::restoreBookmarks() { #ifdef WITH_SQL if(m_database.isOpen()) { m_database.transaction(); QSqlQuery query(m_database); query.exec("SELECT DISTINCT(filePath) FROM bookmarks_v2"); while(query.next()) { if(!query.isActive()) { qDebug() << query.lastError(); break; } const QString filePath = query.value(0).toString(); QList< QPair< int, QString > > jumps; QSqlQuery innerQuery(m_database); innerQuery.prepare("SELECT page,label FROM bookmarks_v2 WHERE filePath==?"); innerQuery.bindValue(0, filePath); innerQuery.exec(); while(innerQuery.next()) { if(!innerQuery.isActive()) { qDebug() << innerQuery.lastError(); } const int page = innerQuery.value(0).toInt(); const QString label = innerQuery.value(1).toString(); jumps.append(qMakePair(page, label)); } emit bookmarkRestored(filePath, jumps); } m_database.commit(); } #endif // WITH_SQL } void Database::saveBookmarks(const QList< const BookmarkMenu* >& bookmarks) { #ifdef WITH_SQL if(m_database.isOpen()) { m_database.transaction(); QSqlQuery query(m_database); query.exec("DELETE FROM bookmarks_v2"); if(!query.isActive()) { qDebug() << query.lastError(); } if(Settings::instance()->mainWindow().restoreBookmarks()) { query.prepare("INSERT INTO bookmarks_v2 " "(filePath,page,label)" " VALUES (?,?,?)"); foreach(const BookmarkMenu* bookmark, bookmarks) { foreach(const Jump jump, bookmark->jumps()) { query.bindValue(0, QFileInfo(bookmark->filePath()).absoluteFilePath()); query.bindValue(1, jump.first); query.bindValue(2, jump.second); query.exec(); if(!query.isActive()) { qDebug() << query.lastError(); } } } } m_database.commit(); } #else Q_UNUSED(bookmarks); #endif // WITH_SQL } void Database::restorePerFileSettings(DocumentView* tab) { #ifdef WITH_SQL if(Settings::instance()->mainWindow().restorePerFileSettings() && m_database.isOpen() && tab != 0) { m_database.transaction(); QSqlQuery query(m_database); query.prepare("SELECT currentPage,continuousMode,layoutMode,scaleMode,scaleFactor,rotation FROM perfilesettings_v1 WHERE filePath==?"); query.bindValue(0, QCryptographicHash::hash(QFileInfo(tab->filePath()).absoluteFilePath().toUtf8(), QCryptographicHash::Sha1).toBase64()); query.exec(); if(query.next()) { tab->setContinousMode(query.value(1).toBool()); tab->setLayoutMode(static_cast< LayoutMode >(query.value(2).toUInt())); tab->setScaleMode(static_cast< ScaleMode >(query.value(3).toUInt())); tab->setScaleFactor(query.value(4).toReal()); tab->setRotation(static_cast< Rotation >(query.value(5).toUInt())); tab->jumpToPage(query.value(0).toInt(), false); } if(!query.isActive()) { qDebug() << query.lastError(); } m_database.commit(); } #else Q_UNUSED(tab); #endif // WITH_SQL } void Database::savePerFileSettings(const DocumentView* tab) { #ifdef WITH_SQL if(Settings::instance()->mainWindow().restorePerFileSettings() && m_database.isOpen() && tab != 0) { m_database.transaction(); QSqlQuery query(m_database); query.prepare("INSERT OR REPLACE INTO perfilesettings_v1 " "(lastUsed,filePath,currentPage,continuousMode,layoutMode,scaleMode,scaleFactor,rotation)" " VALUES (?,?,?,?,?,?,?,?)"); query.bindValue(0, QDateTime::currentDateTime().toTime_t()); query.bindValue(1, QCryptographicHash::hash(QFileInfo(tab->filePath()).absoluteFilePath().toUtf8(), QCryptographicHash::Sha1).toBase64()); query.bindValue(2, tab->currentPage()); query.bindValue(3, static_cast< uint >(tab->continousMode())); query.bindValue(4, static_cast< uint >(tab->layoutMode())); query.bindValue(5, static_cast< uint >(tab->scaleMode())); query.bindValue(6, tab->scaleFactor()); query.bindValue(7, static_cast< uint >(tab->rotation())); query.exec(); if(!query.isActive()) { qDebug() << query.lastError(); } m_database.commit(); } #else Q_UNUSED(tab); #endif // WITH_SQL } Database::Database(QObject* parent) : QObject(parent) { #ifdef WITH_SQL #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) const QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation); #else const QString path = QDesktopServices::storageLocation(QDesktopServices::DataLocation); #endif // QT_VERSION QDir().mkpath(path); m_database = QSqlDatabase::addDatabase("QSQLITE"); m_database.setDatabaseName(QDir(path).filePath("database")); m_database.open(); if(m_database.isOpen()) { m_database.transaction(); const QStringList tables = m_database.tables(); QSqlQuery query(m_database); // tabs if(!tables.contains("tabs_v2")) { query.exec("CREATE TABLE tabs_v2 " "(filePath TEXT" ",instanceName TEXT" ",currentPage INTEGER" ",continuousMode INTEGER" ",layoutMode INTEGER" ",scaleMode INTEGER" ",scaleFactor REAL" ",rotation INTEGER)"); if(!query.isActive()) { qDebug() << query.lastError(); } if(tables.contains("tabs_v1")) { migrateTabs_v1_v2(); } } // bookmarks if(!tables.contains("bookmarks_v2")) { query.exec("CREATE TABLE bookmarks_v2 " "(filePath TEXT" ",page INTEGER" ",label TEXT)"); if(!query.isActive()) { qDebug() << query.lastError(); } if(tables.contains("bookmarks_v1")) { migrateBookmarks_v1_v2(); } } // per-file settings if(!tables.contains("perfilesettings_v1")) { query.exec("CREATE TABLE perfilesettings_v1 " "(lastUsed INTEGER" ",filePath TEXT PRIMARY KEY" ",currentPage INTEGER" ",continuousMode INTEGER" ",layoutMode INTEGER" ",scaleMode INTEGER" ",scaleFactor REAL" ",rotation INTEGER)"); if(!query.isActive()) { qDebug() << query.lastError(); } } if(Settings::instance()->mainWindow().restorePerFileSettings()) { query.exec("DELETE FROM perfilesettings_v1 WHERE filePath IN (SELECT filePath FROM perfilesettings_v1 ORDER BY lastUsed DESC LIMIT -1 OFFSET 1000)"); } else { query.exec("DELETE FROM perfilesettings_v1"); } if(!query.isActive()) { qDebug() << query.lastError(); } m_database.commit(); } else { qDebug() << m_database.lastError(); } #endif // WITH_SQL } QString Database::instanceName() { return !qApp->objectName().isNull() ? qApp->objectName() : QString(""); } #ifdef WITH_SQL void Database::migrateTabs_v1_v2() { QSqlQuery query(m_database); query.prepare("INSERT INTO tabs_v2 " "SELECT filePath,?,currentPage,continuousMode,layoutMode,scaleMode,scaleFactor,rotation " "FROM tabs_v1"); query.bindValue(0, instanceName()); query.exec(); if(!query.isActive()) { qDebug() << query.lastError(); return; } qWarning() << "Migrated tabs from v1 to v2, dropping v1."; query.exec("DROP TABLE tabs_v1"); } void Database::migrateBookmarks_v1_v2() { QSqlQuery query(m_database); query.exec("SELECT filePath,pages FROM bookmarks_v1"); while(query.next()) { if(!query.isActive()) { qDebug() << query.lastError(); return; } QSqlQuery innerQuery(m_database); innerQuery.prepare("INSERT INTO bookmarks_v2 " "(filePath,page,label)" " VALUES (?,?,?)"); innerQuery.bindValue(0, query.value(0)); foreach(QString page, query.value(1).toString().split(",", QString::SkipEmptyParts)) { innerQuery.bindValue(1, page); innerQuery.bindValue(2, tr("Jump to page %1").arg(page)); innerQuery.exec(); if(!innerQuery.isActive()) { qDebug() << innerQuery.lastError(); return; } } } if(!query.isActive()) { qDebug() << query.lastError(); return; } qWarning() << "Migrated bookmarks from v1 to v2, dropping v1."; query.exec("DROP TABLE bookmarks_v1"); } #endif // WITH_SQL qpdfview-0.4.7/sources/database.h0000644000000000000000000000346712246606025015112 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef DATABASE_H #define DATABASE_H #include #ifdef WITH_SQL #include #endif // WITH_SQL #include "global.h" class DocumentView; class BookmarkMenu; class Database : public QObject { Q_OBJECT public: static Database* instance(); ~Database(); QStringList loadInstanceNames(); void restoreTabs(); void saveTabs(const QList< const DocumentView* >& tabs); void restoreBookmarks(); void saveBookmarks(const QList< const BookmarkMenu* >& bookmarks); void restorePerFileSettings(DocumentView* tab); void savePerFileSettings(const DocumentView* tab); signals: void tabRestored(const QString& filePath, bool continousMode, LayoutMode layoutMode, ScaleMode scaleMode, qreal scaleFactor, Rotation rotation, int currentPage); void bookmarkRestored(const QString& filePath, const JumpList& pages); private: Q_DISABLE_COPY(Database) static Database* s_instance; Database(QObject* parent = 0); #ifdef WITH_SQL static QString instanceName(); void migrateTabs_v1_v2(); void migrateBookmarks_v1_v2(); QSqlDatabase m_database; #endif // WITH_SQL }; #endif // DATABASE_H qpdfview-0.4.7/sources/djvumodel.cpp0000644000000000000000000005100312246606025015657 0ustar 00000000000000/* Copyright 2013 Adam Reichold Copyright 2013 Alexander Volkov This file is part of qpdfview. The implementation is based on KDjVu by Pino Toscano. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "djvumodel.h" #include #include #include #include #include static void clearMessageQueue(ddjvu_context_t* context, bool wait) { if(wait) { ddjvu_message_wait(context); } while(true) { if(ddjvu_message_peek(context) != 0) { ddjvu_message_pop(context); } else { break; } } } static void waitForMessageTag(ddjvu_context_t* context, ddjvu_message_tag_t tag) { ddjvu_message_wait(context); while(true) { ddjvu_message_t* message = ddjvu_message_peek(context); if(message != 0) { if(message->m_any.tag == tag) { break; } ddjvu_message_pop(context); } else { break; } } } Model::DjVuPage::DjVuPage(const DjVuDocument* parent, int index, const ddjvu_pageinfo_t& pageinfo) : m_parent(parent), m_index(index), m_size(pageinfo.width, pageinfo.height), m_resolution(pageinfo.dpi) { } Model::DjVuPage::~DjVuPage() { } QSizeF Model::DjVuPage::size() const { return 72.0 / m_resolution * m_size; } QImage Model::DjVuPage::render(qreal horizontalResolution, qreal verticalResolution, Rotation rotation, const QRect& boundingRect) const { QMutexLocker mutexLocker(&m_parent->m_mutex); ddjvu_status_t status; ddjvu_page_t* page = ddjvu_page_create_by_pageno(m_parent->m_document, m_index); if(page == 0) { return QImage(); } while(true) { status = ddjvu_page_decoding_status(page); if(status < DDJVU_JOB_OK) { clearMessageQueue(m_parent->m_context, true); } else { break; } } if(status >= DDJVU_JOB_FAILED) { ddjvu_page_release(page); return QImage(); } switch(rotation) { default: case RotateBy0: ddjvu_page_set_rotation(page, DDJVU_ROTATE_0); break; case RotateBy90: ddjvu_page_set_rotation(page, DDJVU_ROTATE_270); break; case RotateBy180: ddjvu_page_set_rotation(page, DDJVU_ROTATE_180); break; case RotateBy270: ddjvu_page_set_rotation(page, DDJVU_ROTATE_90); break; } ddjvu_rect_t pagerect; pagerect.x = 0; pagerect.y = 0; switch(rotation) { default: case RotateBy0: case RotateBy180: pagerect.w = qRound(horizontalResolution / m_resolution * m_size.width()); pagerect.h = qRound(verticalResolution / m_resolution * m_size.height()); break; case RotateBy90: case RotateBy270: pagerect.w = qRound(horizontalResolution / m_resolution * m_size.height()); pagerect.h = qRound(verticalResolution / m_resolution * m_size.width()); break; } ddjvu_rect_t renderrect; if(boundingRect.isNull()) { renderrect.x = pagerect.x; renderrect.y = pagerect.y; renderrect.w = pagerect.w; renderrect.h = pagerect.h; } else { renderrect.x = boundingRect.x(); renderrect.y = boundingRect.y(); renderrect.w = boundingRect.width(); renderrect.h = boundingRect.height(); } QImage image(renderrect.w, renderrect.h, QImage::Format_RGB32); if(!ddjvu_page_render(page, DDJVU_RENDER_COLOR, &pagerect, &renderrect, m_parent->m_format, image.bytesPerLine(), reinterpret_cast< char* >(image.bits()))) { image = QImage(); } clearMessageQueue(m_parent->m_context, false); ddjvu_page_release(page); return image; } QList< Model::Link* > Model::DjVuPage::links() const { QMutexLocker mutexLocker(&m_parent->m_mutex); QList< Link* > links; miniexp_t pageAnnoExp; while(true) { pageAnnoExp = ddjvu_document_get_pageanno(m_parent->m_document, m_index); if(pageAnnoExp == miniexp_dummy) { clearMessageQueue(m_parent->m_context, true); } else { break; } } const int pageAnnoLength = miniexp_length(pageAnnoExp); for(int pageAnnoN = 0; pageAnnoN < pageAnnoLength; ++pageAnnoN) { miniexp_t linkExp = miniexp_nth(pageAnnoN, pageAnnoExp); if(miniexp_length(linkExp) <= 3 || qstrncmp(miniexp_to_name(miniexp_nth(0, linkExp)), "maparea", 7 ) != 0 || !miniexp_symbolp(miniexp_nth(0, miniexp_nth(3, linkExp)))) { continue; } const QString type = QString::fromUtf8(miniexp_to_name(miniexp_nth(0, miniexp_nth(3, linkExp)))); if(type == QLatin1String("rect") || type == QLatin1String("oval") || type == QLatin1String("poly")) { // boundary QPainterPath boundary; miniexp_t areaExp = miniexp_nth(3, linkExp); const int areaLength = miniexp_length( areaExp ); if(areaLength == 5 && (type == QLatin1String("rect") || type == QLatin1String("oval"))) { QPoint p(miniexp_to_int(miniexp_nth(1, areaExp)), miniexp_to_int(miniexp_nth(2, areaExp))); QSize s(miniexp_to_int(miniexp_nth(3, areaExp)), miniexp_to_int(miniexp_nth(4, areaExp))); p.setY(m_size.height() - s.height() - p.y()); const QRectF r(p, s); if(type == QLatin1String("rect")) { boundary.addRect(r); } else { boundary.addEllipse(r); } } else if(areaLength > 0 && areaLength % 2 == 1 && type == QLatin1String("poly")) { QPolygon polygon; for(int areaExpN = 1; areaExpN < areaLength; areaExpN += 2) { QPoint p(miniexp_to_int(miniexp_nth(areaExpN, areaExp)), miniexp_to_int(miniexp_nth(areaExpN + 1, areaExp))); p.setY(m_size.height() - p.y()); polygon << p; } boundary.addPolygon(polygon); } if(boundary.isEmpty()) { continue; } boundary = QTransform::fromScale(1.0 / m_size.width(), 1.0 / m_size.height()).map(boundary); // target QString target; miniexp_t targetExp = miniexp_nth(1, linkExp); if(miniexp_stringp(targetExp)) { target = QString::fromUtf8(miniexp_to_str(miniexp_nth(1, linkExp))); } else if(miniexp_length(targetExp) == 3 && qstrncmp(miniexp_to_name(miniexp_nth(0, targetExp)), "url", 3) == 0) { target = QString::fromUtf8(miniexp_to_str(miniexp_nth(1, targetExp))); } if(target.isEmpty()) { continue; } if(target.at(0) == QLatin1Char('#')) { target.remove(0, 1); bool ok = false; int targetPage = target.toInt(&ok); if(!ok) { if(m_parent->m_indexByName.contains(target)) { targetPage = m_parent->m_indexByName[target] + 1; } else { continue; } } else { targetPage = (target.at(0) == QLatin1Char('+') || target.at(0) == QLatin1Char('-')) ? m_index + targetPage : targetPage; } links.append(new Link(boundary, targetPage)); } else { links.append(new Link(boundary, target)); } } } ddjvu_miniexp_release(m_parent->m_document, pageAnnoExp); return links; } static QString loadText(miniexp_t textExp, const QRect& rect, int pageHeight) { const int textLength = miniexp_length(textExp); if(textLength >= 6 && miniexp_symbolp(miniexp_nth(0, textExp))) { const int xmin = miniexp_to_int(miniexp_nth(1, textExp)); const int ymin = miniexp_to_int(miniexp_nth(2, textExp)); const int xmax = miniexp_to_int(miniexp_nth(3, textExp)); const int ymax = miniexp_to_int(miniexp_nth(4, textExp)); if(rect.intersects(QRect(xmin, pageHeight - ymax, xmax - xmin, ymax - ymin))) { if(qstrncmp(miniexp_to_name(miniexp_nth(0, textExp)), "word", 4) == 0) { return QString::fromUtf8(miniexp_to_str(miniexp_nth(5, textExp))); } else { QStringList text; for(int textN = 5; textN < textLength; ++textN) { text.append(loadText(miniexp_nth(textN, textExp), rect, pageHeight)); } if(qstrncmp(miniexp_to_name(miniexp_nth(0, textExp)), "line", 4) == 0) { return text.join(" "); } else { return text.join("\n"); } } } } return QString(); } QString Model::DjVuPage::text(const QRectF& rect) const { QMutexLocker mutexLocker(&m_parent->m_mutex); miniexp_t pageTextExp; while(true) { pageTextExp = ddjvu_document_get_pagetext(m_parent->m_document, m_index, "word"); if(pageTextExp == miniexp_dummy) { clearMessageQueue(m_parent->m_context, true); } else { break; } } const QString text = loadText(pageTextExp, QTransform::fromScale(m_resolution / 72.0, m_resolution / 72.0).mapRect(rect).toRect(), m_size.height()); ddjvu_miniexp_release(m_parent->m_document, pageTextExp); return text.trimmed(); } QList< QRectF > Model::DjVuPage::search(const QString& text, bool matchCase) const { QMutexLocker mutexLocker(&m_parent->m_mutex); miniexp_t pageTextExp; while(true) { pageTextExp = ddjvu_document_get_pagetext(m_parent->m_document, m_index, "word"); if(pageTextExp == miniexp_dummy) { clearMessageQueue(m_parent->m_context, true); } else { break; } } QList< miniexp_t > words; QList< QRectF > results; words.append(pageTextExp); QRectF rect; int index = 0; while(!words.isEmpty()) { miniexp_t textExp = words.takeFirst(); const int textLength = miniexp_length(textExp); if(textLength >= 6 && miniexp_symbolp(miniexp_nth(0, textExp))) { if(qstrncmp(miniexp_to_name(miniexp_nth(0, textExp)), "word", 4) == 0) { const QString word = QString::fromUtf8(miniexp_to_str(miniexp_nth(5, textExp))); if(text.indexOf(word, index, matchCase ? Qt::CaseSensitive : Qt::CaseInsensitive) == index) { const int xmin = miniexp_to_int(miniexp_nth(1, textExp)); const int ymin = miniexp_to_int(miniexp_nth(2, textExp)); const int xmax = miniexp_to_int(miniexp_nth(3, textExp)); const int ymax = miniexp_to_int(miniexp_nth(4, textExp)); rect = rect.united(QRectF(xmin, m_size.height() - ymax, xmax - xmin, ymax - ymin)); index += word.length(); while(text.length() > index && text.at(index).isSpace()) { ++index; } if(text.length() == index) { results.append(rect); rect = QRectF(); index = 0; } } else { rect = QRectF(); index = 0; } } else { for(int textN = 5; textN < textLength; ++textN) { words.append(miniexp_nth(textN, textExp)); } } } } ddjvu_miniexp_release(m_parent->m_document, pageTextExp); QTransform transform = QTransform::fromScale(72.0 / m_resolution, 72.0 / m_resolution); for(int index = 0; index < results.size(); ++index) { results[index] = transform.mapRect(results[index]); } return results; } Model::DjVuDocument::DjVuDocument(ddjvu_context_t* context, ddjvu_document_t* document) : m_mutex(), m_context(context), m_document(document), m_format(0), m_indexByName() { unsigned int mask[] = {0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}; m_format = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 4, mask); ddjvu_format_set_row_order(m_format, 1); ddjvu_format_set_y_direction(m_format, 1); const int fileNum = ddjvu_document_get_filenum(m_document); for(int index = 0; index < fileNum; ++index) { ddjvu_fileinfo_t fileinfo; if(ddjvu_document_get_fileinfo(m_document, index, &fileinfo) != DDJVU_JOB_OK || fileinfo.type != 'P') { continue; } m_indexByName[QString::fromUtf8(fileinfo.id)] = m_indexByName[QString::fromUtf8(fileinfo.name)] = m_indexByName[QString::fromUtf8(fileinfo.title)] = fileinfo.pageno; } } Model::DjVuDocument::~DjVuDocument() { ddjvu_document_release(m_document); ddjvu_context_release(m_context); ddjvu_format_release(m_format); } int Model::DjVuDocument::numberOfPages() const { QMutexLocker mutexLocker(&m_mutex); return ddjvu_document_get_pagenum(m_document); } Model::Page* Model::DjVuDocument::page(int index) const { QMutexLocker mutexLocker(&m_mutex); ddjvu_status_t status; ddjvu_pageinfo_t pageinfo; while(true) { status = ddjvu_document_get_pageinfo(m_document, index, &pageinfo); if(status < DDJVU_JOB_OK) { clearMessageQueue(m_context, true); } else { break; } } if(status >= DDJVU_JOB_FAILED) { return 0; } return new DjVuPage(this, index, pageinfo); } QStringList Model::DjVuDocument::saveFilter() const { return QStringList() << "DjVu (*.djvu *.djv)"; } bool Model::DjVuDocument::canSave() const { return true; } bool Model::DjVuDocument::save(const QString& filePath, bool withChanges) const { Q_UNUSED(withChanges); QMutexLocker mutexLocker(&m_mutex); FILE* file = fopen(QFile::encodeName(filePath), "w+"); if(file == 0) { return false; } ddjvu_job_t* job = ddjvu_document_save(m_document, file, 0, 0); while(!ddjvu_job_done(job)) { clearMessageQueue(m_context, true); } fclose(file); return !ddjvu_job_error(job); } static void loadOutline(miniexp_t outlineExp, int offset, QStandardItem* parent, const QHash< QString, int >& indexByName) { const int outlineLength = miniexp_length(outlineExp); for(int outlineN = qMax(0, offset); outlineN < outlineLength; ++outlineN) { miniexp_t bookmarkExp = miniexp_nth(outlineN, outlineExp); const int bookmarkLength = miniexp_length(bookmarkExp); if(bookmarkLength <= 1 || !miniexp_stringp(miniexp_nth(0, bookmarkExp)) || !miniexp_stringp(miniexp_nth(1, bookmarkExp))) { continue; } const QString title = QString::fromUtf8(miniexp_to_str(miniexp_nth(0, bookmarkExp))); QString destination = QString::fromUtf8(miniexp_to_str(miniexp_nth(1, bookmarkExp))); if(!title.isEmpty() && !destination.isEmpty()) { if(destination.at(0) == QLatin1Char('#')) { destination.remove(0,1); bool ok = false; int destinationPage = destination.toInt(&ok); if(!ok) { if(indexByName.contains(destination)) { destinationPage = indexByName[destination] + 1; } else { continue; } } QStandardItem* item = new QStandardItem(title); item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item->setData(destinationPage, Qt::UserRole + 1); QStandardItem* pageItem = item->clone(); pageItem->setText(QString::number(destinationPage)); pageItem->setTextAlignment(Qt::AlignRight); parent->appendRow(QList< QStandardItem* >() << item << pageItem); if(bookmarkLength >= 3) { loadOutline(bookmarkExp, 2, item, indexByName); } } } } } void Model::DjVuDocument::loadOutline(QStandardItemModel* outlineModel) const { Document::loadOutline(outlineModel); QMutexLocker mutexLocker(&m_mutex); miniexp_t outlineExp; while(true) { outlineExp = ddjvu_document_get_outline(m_document); if(outlineExp == miniexp_dummy) { clearMessageQueue(m_context, true); } else { break; } } if(miniexp_length(outlineExp) <= 1) { return; } if(qstrncmp(miniexp_to_name(miniexp_nth(0, outlineExp)), "bookmarks", 9) != 0) { return; } ::loadOutline(outlineExp, 1, outlineModel->invisibleRootItem(), m_indexByName); ddjvu_miniexp_release(m_document, outlineExp); } void Model::DjVuDocument::loadProperties(QStandardItemModel* propertiesModel) const { Document::loadProperties(propertiesModel); QMutexLocker mutexLocker(&m_mutex); propertiesModel->setColumnCount(2); miniexp_t annoExp; while(true) { annoExp = ddjvu_document_get_anno(m_document, TRUE); if(annoExp == miniexp_dummy) { clearMessageQueue(m_context, true); } else { break; } } const int annoLength = miniexp_length(annoExp); for(int annoN = 0; annoN < annoLength; ++annoN) { miniexp_t listExp = miniexp_nth(annoN, annoExp); const int listLength = miniexp_length(listExp); if(listLength <= 1 || qstrncmp(miniexp_to_name(miniexp_nth(0, listExp)), "metadata", 8) != 0) { continue; } for(int listN = 1; listN < listLength; ++listN) { miniexp_t keyValueExp = miniexp_nth(listN, listExp); if(miniexp_length(keyValueExp) != 2) { continue; } const QString key = QString::fromUtf8(miniexp_to_name(miniexp_nth(0, keyValueExp))); const QString value = QString::fromUtf8(miniexp_to_str(miniexp_nth(1, keyValueExp))); if(!key.isEmpty() && !value.isEmpty()) { propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(key) << new QStandardItem(value)); } } } ddjvu_miniexp_release(m_document, annoExp); } DjVuPlugin::DjVuPlugin(QObject* parent) : QObject(parent) { setObjectName("DjVuPlugin"); } Model::Document* DjVuPlugin::loadDocument(const QString& filePath) const { ddjvu_context_t* context = ddjvu_context_create("qpdfview"); ddjvu_document_t* document = ddjvu_document_create_by_filename(context, QFile::encodeName(filePath), FALSE); if(document == 0) { ddjvu_context_release(context); return 0; } waitForMessageTag(context, DDJVU_DOCINFO); if(ddjvu_document_decoding_error(document)) { ddjvu_document_release(document); ddjvu_context_release(context); return 0; } return new Model::DjVuDocument(context, document); } #if QT_VERSION < QT_VERSION_CHECK(5,0,0) Q_EXPORT_PLUGIN2(qpdfview_djvu, DjVuPlugin) #endif // QT_VERSION qpdfview-0.4.7/sources/djvumodel.h0000644000000000000000000000561212246606025015331 0ustar 00000000000000/* Copyright 2013 Adam Reichold Copyright 2013 Alexander Volkov This file is part of qpdfview. The implementation is based on KDjVu by Pino Toscano. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PDFMODEL_H #define PDFMODEL_H #include #include typedef struct ddjvu_context_s ddjvu_context_t; typedef struct ddjvu_format_s ddjvu_format_t; typedef struct ddjvu_document_s ddjvu_document_t; typedef struct ddjvu_pageinfo_s ddjvu_pageinfo_t; #include "model.h" class DjVuPlugin; namespace Model { class DjVuPage : public Page { friend class DjVuDocument; public: ~DjVuPage(); QSizeF size() const; QImage render(qreal horizontalResolution, qreal verticalResolution, Rotation rotation, const QRect& boundingRect) const; QList< Link* > links() const; QString text(const QRectF& rect) const; QList< QRectF > search(const QString& text, bool matchCase) const; private: Q_DISABLE_COPY(DjVuPage) DjVuPage(const class DjVuDocument* parent, int index, const ddjvu_pageinfo_t& pageinfo); const class DjVuDocument* m_parent; int m_index; QSizeF m_size; int m_resolution; }; class DjVuDocument : public Document { friend class DjVuPage; friend class ::DjVuPlugin; public: ~DjVuDocument(); int numberOfPages() const; Page* page(int index) const; QStringList saveFilter() const; bool canSave() const; bool save(const QString& filePath, bool withChanges) const; void loadOutline(QStandardItemModel* outlineModel) const; void loadProperties(QStandardItemModel* propertiesModel) const; private: Q_DISABLE_COPY(DjVuDocument) DjVuDocument(ddjvu_context_t* context, ddjvu_document_t* document); mutable QMutex m_mutex; ddjvu_context_t* m_context; ddjvu_document_t* m_document; ddjvu_format_t* m_format; QHash< QString, int > m_indexByName; }; } class DjVuPlugin : public QObject, Plugin { Q_OBJECT Q_INTERFACES(Plugin) #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) Q_PLUGIN_METADATA(IID "local.qpdfview.Plugin") #endif // QT_VERSION public: DjVuPlugin(QObject* parent = 0); Model::Document* loadDocument(const QString& filePath) const; }; #endif // PDFMODEL_H qpdfview-0.4.7/sources/documentlayout.cpp0000644000000000000000000002032112246606025016741 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "documentlayout.h" #include "settings.h" #include "pageitem.h" Settings* DocumentLayout::s_settings = 0; DocumentLayout::DocumentLayout() { if(s_settings == 0) { s_settings = Settings::instance(); } } qreal DocumentLayout::visibleHeight(int viewportHeight) const { const qreal pageSpacing = s_settings->documentView().pageSpacing(); return viewportHeight - 2.0 * pageSpacing; } int SinglePageLayout::currentPage(int page) const { return page; } int SinglePageLayout::previousPage(int page) const { return qMax(page - 1, 1); } int SinglePageLayout::nextPage(int page, int count) const { return qMin(page + 1, count); } QPair< int, int > SinglePageLayout::prefetchRange(int page, int count) const { const int prefetchDistance = s_settings->documentView().prefetchDistance(); return qMakePair(qMax(page - prefetchDistance / 2, 1), qMin(page + prefetchDistance, count)); } int SinglePageLayout::leftIndex(int index) const { return index; } int SinglePageLayout::rightIndex(int index, int count) const { Q_UNUSED(count); return index; } qreal SinglePageLayout::visibleWidth(int viewportWidth) const { const qreal pageSpacing = s_settings->documentView().pageSpacing(); return viewportWidth - 6.0 - 2.0 * pageSpacing; } void SinglePageLayout::prepareLayout(const QVector& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height) { const qreal pageSpacing = s_settings->documentView().pageSpacing(); for(int index = 0; index < pageItems.count(); ++index) { PageItem* page = pageItems.at(index); const QRectF boundingRect = page->boundingRect(); page->setPos(-boundingRect.left() - 0.5 * boundingRect.width(), height - boundingRect.top()); heightToIndex.insert(-height + pageSpacing + 0.3 * pageHeight, index); pageHeight = boundingRect.height(); left = qMin(left, -0.5f * boundingRect.width() - pageSpacing); right = qMax(right, 0.5f * boundingRect.width() + pageSpacing); height += pageHeight + pageSpacing; } } int TwoPagesLayout::currentPage(int page) const { return page % 2 != 0 ? page : page - 1; } int TwoPagesLayout::previousPage(int page) const { return qMax(page - 2, 1); } int TwoPagesLayout::nextPage(int page, int count) const { return qMin(page + 2, count); } QPair< int, int > TwoPagesLayout::prefetchRange(int page, int count) const { const int prefetchDistance = s_settings->documentView().prefetchDistance(); return qMakePair(qMax(page - prefetchDistance, 1), qMin(page + 2 * prefetchDistance + 1, count)); } int TwoPagesLayout::leftIndex(int index) const { return index % 2 == 0 ? index : index - 1; } int TwoPagesLayout::rightIndex(int index, int count) const { return qMin(index % 2 == 0 ? index + 1 : index, count - 1); } qreal TwoPagesLayout::visibleWidth(int viewportWidth) const { const qreal pageSpacing = s_settings->documentView().pageSpacing(); return (viewportWidth - 6.0 - 3 * pageSpacing) / 2; } void TwoPagesLayout::prepareLayout(const QVector& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height) { const qreal pageSpacing = s_settings->documentView().pageSpacing(); for(int index = 0; index < pageItems.count(); ++index) { PageItem* page = pageItems.at(index); const QRectF boundingRect = page->boundingRect(); if(index == leftIndex(index)) { page->setPos(-boundingRect.left() - boundingRect.width() - 0.5 * pageSpacing, height - boundingRect.top()); heightToIndex.insert(-height + pageSpacing + 0.3 * pageHeight, index); pageHeight = boundingRect.height(); left = qMin(left, -boundingRect.width() - 1.5f * pageSpacing); if(index == rightIndex(index, pageItems.count())) { right = qMax(right, 0.5f * pageSpacing); height += pageHeight + pageSpacing; } } else { page->setPos(-boundingRect.left() + 0.5 * pageSpacing, height - boundingRect.top()); pageHeight = qMax(pageHeight, boundingRect.height()); right = qMax(right, boundingRect.width() + 1.5f * pageSpacing); height += pageHeight + pageSpacing; } } } int TwoPagesWithCoverPageLayout::currentPage(int page) const { return page == 1 ? page : (page % 2 == 0 ? page : page - 1); } int TwoPagesWithCoverPageLayout::leftIndex(int index) const { return index == 0 ? index : (index % 2 != 0 ? index : index - 1); } int TwoPagesWithCoverPageLayout::rightIndex(int index, int count) const { return qMin(index % 2 != 0 ? index + 1 : index, count - 1); } int MultiplePagesLayout::currentPage(int page) const { const int pagesPerRow = s_settings->documentView().pagesPerRow(); return page - ((page - 1) % pagesPerRow); } int MultiplePagesLayout::previousPage(int page) const { const int pagesPerRow = s_settings->documentView().pagesPerRow(); return qMax(page - pagesPerRow, 1); } int MultiplePagesLayout::nextPage(int page, int count) const { const int pagesPerRow = s_settings->documentView().pagesPerRow(); return qMin(page + pagesPerRow, count); } QPair MultiplePagesLayout::prefetchRange(int page, int count) const { const int prefetchDistance = s_settings->documentView().prefetchDistance(); const int pagesPerRow = s_settings->documentView().pagesPerRow(); return qMakePair(qMax(page - pagesPerRow * (prefetchDistance / 2), 1), qMin(page + pagesPerRow * (prefetchDistance + 1) - 1, count)); } int MultiplePagesLayout::leftIndex(int index) const { const int pagesPerRow = s_settings->documentView().pagesPerRow(); return index - (index % pagesPerRow); } int MultiplePagesLayout::rightIndex(int index, int count) const { const int pagesPerRow = s_settings->documentView().pagesPerRow(); return qMin(index - (index % pagesPerRow) + pagesPerRow - 1, count - 1); } qreal MultiplePagesLayout::visibleWidth(int viewportWidth) const { const qreal pageSpacing = s_settings->documentView().pageSpacing(); const int pagesPerRow = s_settings->documentView().pagesPerRow(); return (viewportWidth - 6.0 - (pagesPerRow + 1) * pageSpacing) / pagesPerRow; } void MultiplePagesLayout::prepareLayout(const QVector< PageItem* >& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height) { const qreal pageSpacing = s_settings->documentView().pageSpacing(); for(int index = 0; index < pageItems.count(); ++index) { PageItem* page = pageItems.at(index); const QRectF boundingRect = page->boundingRect(); page->setPos(left - boundingRect.left() + pageSpacing, height - boundingRect.top()); pageHeight = qMax(pageHeight, boundingRect.height()); left += boundingRect.width() + pageSpacing; if(index == leftIndex(index)) { heightToIndex.insert(-height + pageSpacing + 0.3 * pageHeight, index); } if(index == rightIndex(index, pageItems.count())) { height += pageHeight + pageSpacing; pageHeight = 0.0; right = qMax(right, left + pageSpacing); left = 0.0; } } } qpdfview-0.4.7/sources/documentlayout.h0000644000000000000000000000744712246606025016424 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef DOCUMENTLAYOUT_H #define DOCUMENTLAYOUT_H #include #include "global.h" class Settings; class PageItem; struct DocumentLayout { DocumentLayout(); virtual ~DocumentLayout() {} virtual LayoutMode layoutMode() const = 0; virtual int currentPage(int page) const = 0; virtual int previousPage(int page) const = 0; virtual int nextPage(int page, int count) const = 0; virtual QPair< int, int > prefetchRange(int page, int count) const = 0; virtual int leftIndex(int index) const = 0; virtual int rightIndex(int index, int count) const = 0; virtual qreal visibleWidth(int viewportWidth) const = 0; qreal visibleHeight(int viewportHeight) const; virtual void prepareLayout(const QVector< PageItem* >& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height) = 0; protected: static Settings* s_settings; }; struct SinglePageLayout : public DocumentLayout { LayoutMode layoutMode() const { return SinglePageMode; } int currentPage(int page) const; int previousPage(int page) const; int nextPage(int page, int count) const; QPair< int, int > prefetchRange(int page, int count) const; int leftIndex(int index) const; int rightIndex(int index, int count) const; qreal visibleWidth(int viewportWidth) const; void prepareLayout(const QVector< PageItem* >& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height); }; struct TwoPagesLayout : public DocumentLayout { LayoutMode layoutMode() const { return TwoPagesMode; } int currentPage(int page) const; int previousPage(int page) const; int nextPage(int page, int count) const; QPair< int, int > prefetchRange(int page, int count) const; int leftIndex(int index) const; int rightIndex(int index, int count) const; qreal visibleWidth(int viewportWidth) const; void prepareLayout(const QVector< PageItem* >& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height); }; struct TwoPagesWithCoverPageLayout : public TwoPagesLayout { LayoutMode layoutMode() const { return TwoPagesWithCoverPageMode; } int currentPage(int page) const; int leftIndex(int index) const; int rightIndex(int index, int count) const; }; struct MultiplePagesLayout : public DocumentLayout { LayoutMode layoutMode() const { return MultiplePagesMode; } int currentPage(int page) const; int previousPage(int page) const; int nextPage(int page, int count) const; QPair< int, int > prefetchRange(int page, int count) const; int leftIndex(int index) const; int rightIndex(int index, int count) const; qreal visibleWidth(int viewportWidth) const; void prepareLayout(const QVector< PageItem* >& pageItems, QMap< qreal, int >& heightToIndex, qreal& pageHeight, qreal& left, qreal& right, qreal& height); }; #endif // DOCUMENTLAYOUT_H qpdfview-0.4.7/sources/documentview.cpp0000644000000000000000000014670012246606025016410 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2013 Thomas Etter This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "documentview.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef WITH_CUPS #include #endif // WITH_CUPS #ifdef WITH_SYNCTEX #include #endif // WITH_SYNCTEX #include "settings.h" #include "model.h" #include "pluginhandler.h" #include "shortcuthandler.h" #include "pageitem.h" #include "presentationview.h" #include "searchtask.h" #include "miscellaneous.h" #include "documentlayout.h" Settings* DocumentView::s_settings = 0; ShortcutHandler* DocumentView::s_shortcutHandler = 0; DocumentView::DocumentView(QWidget* parent) : QGraphicsView(parent), m_autoRefreshWatcher(0), m_autoRefreshTimer(0), m_prefetchTimer(0), m_document(0), m_pages(), m_filePath(), m_currentPage(-1), m_wasModified(false), m_past(), m_future(), m_layout(new SinglePageLayout), m_continuousMode(false), m_scaleMode(ScaleFactorMode), m_scaleFactor(1.0), m_rotation(RotateBy0), m_invertColors(false), m_highlightAll(false), m_rubberBandMode(ModifiersMode), m_pageItems(), m_thumbnailItems(), m_heightToIndex(), m_highlight(0), m_thumbnailsOrientation(Qt::Vertical), m_thumbnailsScene(0), m_outlineModel(0), m_propertiesModel(0), m_results(), m_currentResult(m_results.end()), m_searchTask(0) { if(s_settings == 0) { s_settings = Settings::instance(); } if(s_shortcutHandler == 0) { s_shortcutHandler = ShortcutHandler::instance(); } setScene(new QGraphicsScene(this)); setAcceptDrops(false); setDragMode(QGraphicsView::ScrollHandDrag); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), SLOT(on_verticalScrollBar_valueChanged(int))); m_thumbnailsScene = new QGraphicsScene(this); m_outlineModel = new QStandardItemModel(this); m_propertiesModel = new QStandardItemModel(this); // highlight m_highlight = new QGraphicsRectItem(); m_highlight->setGraphicsEffect(new GraphicsCompositionModeEffect(QPainter::CompositionMode_Multiply, this)); m_highlight->setVisible(false); scene()->addItem(m_highlight); // search m_searchTask = new SearchTask(this); connect(m_searchTask, SIGNAL(finished()), SIGNAL(searchFinished())); connect(m_searchTask, SIGNAL(progressChanged(int)), SIGNAL(searchProgressChanged(int))); connect(m_searchTask, SIGNAL(resultsReady(int,QList)), SLOT(on_searchTask_resultsReady(int,QList))); // auto-refresh m_autoRefreshWatcher = new QFileSystemWatcher(this); m_autoRefreshTimer = new QTimer(this); m_autoRefreshTimer->setInterval(s_settings->documentView().autoRefreshTimeout()); m_autoRefreshTimer->setSingleShot(true); connect(m_autoRefreshWatcher, SIGNAL(fileChanged(QString)), m_autoRefreshTimer, SLOT(start())); connect(m_autoRefreshTimer, SIGNAL(timeout()), this, SLOT(refresh())); // prefetch m_prefetchTimer = new QTimer(this); m_prefetchTimer->setInterval(s_settings->documentView().prefetchTimeout()); m_prefetchTimer->setSingleShot(true); connect(this, SIGNAL(currentPageChanged(int)), m_prefetchTimer, SLOT(start())); connect(this, SIGNAL(layoutModeChanged(LayoutMode)), m_prefetchTimer, SLOT(start())); connect(this, SIGNAL(scaleModeChanged(ScaleMode)), m_prefetchTimer, SLOT(start())); connect(this, SIGNAL(scaleFactorChanged(qreal)), m_prefetchTimer, SLOT(start())); connect(this, SIGNAL(rotationChanged(Rotation)), m_prefetchTimer, SLOT(start())); connect(m_prefetchTimer, SIGNAL(timeout()), SLOT(on_prefetch_timeout())); } DocumentView::~DocumentView() { m_searchTask->cancel(); m_searchTask->wait(); qDeleteAll(m_pageItems); qDeleteAll(m_thumbnailItems); qDeleteAll(m_pages); delete m_document; } const QString& DocumentView::filePath() const { return m_filePath; } int DocumentView::numberOfPages() const { return m_pages.count(); } int DocumentView::currentPage() const { return m_currentPage; } bool DocumentView::wasModified() const { return m_wasModified; } QStringList DocumentView::openFilter() { QStringList openFilter; QStringList supportedFormats; #ifdef WITH_PDF openFilter.append("Portable document format (*.pdf)"); supportedFormats.append("*.pdf"); #endif // WITH_PDF #ifdef WITH_PS openFilter.append("PostScript (*.ps)"); openFilter.append("Encapsulated PostScript (*.eps)"); supportedFormats.append("*.ps *.eps"); #endif // WITH_PS #ifdef WITH_DJVU openFilter.append("DjVu (*.djvu *.djv)"); supportedFormats.append("*.djvu"); supportedFormats.append("*.djv"); #endif // WITH_DJVU openFilter.prepend(tr("Supported formats (%1)").arg(supportedFormats.join(" "))); return openFilter; } QStringList DocumentView::saveFilter() const { return m_document->saveFilter(); } bool DocumentView::canSave() const { return m_document->canSave(); } bool DocumentView::continousMode() const { return m_continuousMode; } void DocumentView::setContinousMode(bool continousMode) { if(m_continuousMode != continousMode) { m_continuousMode = continousMode; qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); prepareView(left, top); emit continousModeChanged(m_continuousMode); } } LayoutMode DocumentView::layoutMode() const { return m_layout->layoutMode(); } void DocumentView::setLayoutMode(LayoutMode layoutMode) { if(m_layout->layoutMode() != layoutMode && layoutMode >= 0 && layoutMode < NumberOfLayoutModes) { switch(layoutMode) { default: case SinglePageMode: m_layout.reset(new SinglePageLayout); break; case TwoPagesMode: m_layout.reset(new TwoPagesLayout); break; case TwoPagesWithCoverPageMode: m_layout.reset(new TwoPagesWithCoverPageLayout); break; case MultiplePagesMode: m_layout.reset(new MultiplePagesLayout); break; } if(m_currentPage != m_layout->currentPage(m_currentPage)) { m_currentPage = m_layout->currentPage(m_currentPage); emit currentPageChanged(m_currentPage); } prepareScene(); prepareView(); emit layoutModeChanged(layoutMode); } } ScaleMode DocumentView::scaleMode() const { return m_scaleMode; } void DocumentView::setScaleMode(ScaleMode scaleMode) { if(m_scaleMode != scaleMode && scaleMode >= 0 && scaleMode < NumberOfScaleModes) { m_scaleMode = scaleMode; qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); prepareScene(); prepareView(left, top); emit scaleModeChanged(m_scaleMode); } } qreal DocumentView::scaleFactor() const { return m_scaleFactor; } void DocumentView::setScaleFactor(qreal scaleFactor) { if(!qFuzzyCompare(m_scaleFactor, scaleFactor) && scaleFactor >= Defaults::DocumentView::minimumScaleFactor() && scaleFactor <= Defaults::DocumentView::maximumScaleFactor()) { m_scaleFactor = scaleFactor; if(m_scaleMode == ScaleFactorMode) { qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); prepareScene(); prepareView(left, top); } emit scaleFactorChanged(m_scaleFactor); } } Rotation DocumentView::rotation() const { return m_rotation; } void DocumentView::setRotation(Rotation rotation) { if(m_rotation != rotation && rotation >= 0 && rotation < NumberOfRotations) { m_rotation = rotation; prepareScene(); prepareView(); emit rotationChanged(m_rotation); } } bool DocumentView::invertColors() const { return m_invertColors; } void DocumentView::setInvertColors(bool invertColors) { if(m_invertColors != invertColors) { m_invertColors = invertColors; foreach(PageItem* page, m_pageItems) { page->setInvertColors(m_invertColors); } foreach(PageItem* page, m_thumbnailItems) { page->setInvertColors(m_invertColors); } prepareBackground(); emit invertColorsChanged(m_invertColors); } } bool DocumentView::highlightAll() const { return m_highlightAll; } void DocumentView::setHighlightAll(bool highlightAll) { if(m_highlightAll != highlightAll) { m_highlightAll = highlightAll; for(int index = 0; index < m_pageItems.count(); ++index) { m_pageItems.at(index)->setHighlights(m_highlightAll ? m_results.values(index) : QList< QRectF >()); } for(int index = 0; index < m_thumbnailItems.count(); ++index) { m_thumbnailItems.at(index)->setHighlights(m_highlightAll ? m_results.values(index) : QList< QRectF >()); } emit highlightAllChanged(m_highlightAll); } } RubberBandMode DocumentView::rubberBandMode() const { return m_rubberBandMode; } void DocumentView::setRubberBandMode(RubberBandMode rubberBandMode) { if(m_rubberBandMode != rubberBandMode && rubberBandMode >= 0 && rubberBandMode < NumberOfRubberBandModes) { m_rubberBandMode = rubberBandMode; foreach(PageItem* page, m_pageItems) { page->setRubberBandMode(m_rubberBandMode); } emit rubberBandModeChanged(m_rubberBandMode); } } bool DocumentView::searchWasCanceled() const { return m_searchTask->wasCanceled(); } int DocumentView::searchProgress() const { return m_searchTask->progress(); } Qt::Orientation DocumentView::thumbnailsOrientation() const { return m_thumbnailsOrientation; } void DocumentView::setThumbnailsOrientation(Qt::Orientation thumbnailsOrientation) { if(m_thumbnailsOrientation != thumbnailsOrientation) { m_thumbnailsOrientation = thumbnailsOrientation; prepareThumbnailsScene(); } } QStandardItemModel* DocumentView::outlineModel() const { return m_outlineModel; } QStandardItemModel* DocumentView::propertiesModel() const { return m_propertiesModel; } QStandardItemModel* DocumentView::fontsModel() const { QStandardItemModel* fontsModel = new QStandardItemModel(); m_document->loadFonts(fontsModel); return fontsModel; } const QVector< ThumbnailItem* >& DocumentView::thumbnailItems() const { return m_thumbnailItems; } QGraphicsScene* DocumentView::thumbnailsScene() const { return m_thumbnailsScene; } void DocumentView::show() { QGraphicsView::show(); prepareView(); } bool DocumentView::open(const QString& filePath) { Model::Document* document = PluginHandler::loadDocument(filePath); if(document != 0) { if(document->isLocked()) { QString password = QInputDialog::getText(this, tr("Unlock %1").arg(QFileInfo(filePath).completeBaseName()), tr("Password:"), QLineEdit::Password); if(document->unlock(password)) { delete document; return false; } } m_filePath = filePath; m_currentPage = 1; m_wasModified = false; m_past.clear(); m_future.clear(); prepareDocument(document); prepareScene(); prepareView(); prepareThumbnailsScene(); emit documentChanged(); emit filePathChanged(m_filePath); emit numberOfPagesChanged(m_pages.count()); emit currentPageChanged(m_currentPage); emit canJumpChanged(false, false); } return document != 0; } bool DocumentView::refresh() { Model::Document* document = PluginHandler::loadDocument(m_filePath); if(document != 0) { if(document->isLocked()) { QString password = QInputDialog::getText(this, tr("Unlock %1").arg(QFileInfo(m_filePath).completeBaseName()), tr("Password:"), QLineEdit::Password); if(document->unlock(password)) { delete document; return false; } } qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); m_currentPage = qMin(m_currentPage, document->numberOfPages()); m_wasModified = false; prepareDocument(document); prepareScene(); prepareView(left, top); prepareThumbnailsScene(); emit documentChanged(); emit numberOfPagesChanged(m_pages.count()); emit currentPageChanged(m_currentPage); } return document != 0; } bool DocumentView::save(const QString& filePath, bool withChanges) { QTemporaryFile temporaryFile; QFile file(filePath); if(temporaryFile.open()) { temporaryFile.close(); if(m_document->save(temporaryFile.fileName(), withChanges)) { if(temporaryFile.open()) { if(file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { const qint64 maxSize = 4096; qint64 size = -1; char* data = new char[maxSize]; while(!temporaryFile.atEnd()) { size = temporaryFile.read(data, maxSize); if(size == -1 || file.write(data, size) == -1) { delete[] data; return false; } } if(withChanges) { m_wasModified = false; } delete[] data; return true; } } } } return false; } bool DocumentView::print(QPrinter* printer, const PrintOptions& printOptions) { const int fromPage = printer->fromPage() != 0 ? printer->fromPage() : 1; const int toPage = printer->toPage() != 0 ? printer->toPage() : m_pages.count(); #ifdef WITH_CUPS if(m_document->canBePrintedUsingCUPS()) { return printUsingCUPS(printer, printOptions, fromPage, toPage); } #endif // WITH_CUPS return printUsingQt(printer, printOptions, fromPage, toPage); } void DocumentView::previousPage() { jumpToPage(m_layout->previousPage(m_currentPage)); } void DocumentView::nextPage() { jumpToPage(m_layout->nextPage(m_currentPage, m_pages.count())); } void DocumentView::firstPage() { jumpToPage(1); } void DocumentView::lastPage() { jumpToPage(m_pages.count()); } void DocumentView::jumpToPage(int page, bool trackChange, qreal changeLeft, qreal changeTop) { if(page >= 1 && page <= m_pages.count()) { qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); if(m_currentPage != m_layout->currentPage(page) || qAbs(left - changeLeft) > 0.01 || qAbs(top - changeTop) > 0.01) { if(trackChange) { m_past.append(Position(m_currentPage, left, top)); m_future.clear(); emit canJumpChanged(true, false); } m_currentPage = m_layout->currentPage(page); prepareView(changeLeft, changeTop); emit currentPageChanged(m_currentPage, trackChange); } } } bool DocumentView::canJumpBackward() const { return !m_past.isEmpty(); } void DocumentView::jumpBackward() { if(!m_past.isEmpty()) { qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); m_future.prepend(Position(m_currentPage, left, top)); const Position pos = m_past.takeLast(); jumpToPage(pos.page, false, pos.left, pos.top); emit canJumpChanged(!m_past.isEmpty(), !m_future.isEmpty()); } } bool DocumentView::canJumpForward() const { return !m_future.isEmpty(); } void DocumentView::jumpForward() { if(!m_future.isEmpty()) { qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); m_past.append(Position(m_currentPage, left, top)); const Position pos = m_future.takeFirst(); jumpToPage(pos.page, false, pos.left, pos.top); emit canJumpChanged(!m_past.isEmpty(), !m_future.isEmpty()); } } void DocumentView::temporaryHighlight(int page, const QRectF& highlight) { if(page >= 1 && page <= m_pages.count() && !highlight.isNull()) { prepareHighlight(page - 1, highlight); QTimer::singleShot(s_settings->documentView().highlightDuration(), this, SLOT(on_temporaryHighlight_timeout())); } } void DocumentView::startSearch(const QString& text, bool matchCase) { cancelSearch(); m_searchTask->start(m_pages, text, matchCase, m_currentPage); } void DocumentView::cancelSearch() { m_searchTask->cancel(); m_searchTask->wait(); m_results.clear(); m_currentResult = m_results.end(); foreach(PageItem* page, m_pageItems) { page->setHighlights(QList< QRectF >()); } foreach(PageItem* page, m_thumbnailItems) { page->setHighlights(QList< QRectF >()); } prepareThumbnailsScene(); m_highlight->setVisible(false); } void DocumentView::findPrevious() { if(m_currentResult != m_results.end()) { if(m_layout->leftIndex(m_currentResult.key()) == m_currentPage - 1) { m_currentResult = previousResult(m_currentResult); } else { m_currentResult = previousResult(m_results.upperBound(m_currentPage - 1)); } } else { m_currentResult = previousResult(m_results.upperBound(m_currentPage - 1)); } if(m_currentResult == m_results.end()) { m_currentResult = previousResult(m_results.end()); } if(m_currentResult != m_results.end()) { jumpToPage(m_currentResult.key() + 1); prepareHighlight(m_currentResult.key(), m_currentResult.value()); } else { m_highlight->setVisible(false); } } void DocumentView::findNext() { if(m_currentResult != m_results.end()) { if(m_layout->leftIndex(m_currentResult.key()) == m_currentPage - 1) { ++m_currentResult; } else { m_currentResult = m_results.lowerBound(m_currentPage - 1); } } else { m_currentResult = m_results.lowerBound(m_currentPage - 1); } if(m_currentResult == m_results.end()) { m_currentResult = m_results.begin(); } if(m_currentResult != m_results.end()) { jumpToPage(m_currentResult.key() + 1); prepareHighlight(m_currentResult.key(), m_currentResult.value()); } else { m_highlight->setVisible(false); } } void DocumentView::zoomIn() { if(scaleMode() != ScaleFactorMode) { setScaleFactor(qMin(m_pageItems.at(m_currentPage - 1)->scaleFactor() + Defaults::DocumentView::zoomBy(), Defaults::DocumentView::maximumScaleFactor())); setScaleMode(ScaleFactorMode); } else { setScaleFactor(qMin(m_scaleFactor + Defaults::DocumentView::zoomBy(), Defaults::DocumentView::maximumScaleFactor())); } } void DocumentView::zoomOut() { if(scaleMode() != ScaleFactorMode) { setScaleFactor(qMax(m_pageItems.at(m_currentPage - 1)->scaleFactor() - Defaults::DocumentView::zoomBy(), Defaults::DocumentView::minimumScaleFactor())); setScaleMode(ScaleFactorMode); } else { setScaleFactor(qMax(m_scaleFactor - Defaults::DocumentView::zoomBy(), Defaults::DocumentView::minimumScaleFactor())); } } void DocumentView::originalSize() { setScaleFactor(1.0); setScaleMode(ScaleFactorMode); } void DocumentView::rotateLeft() { switch(m_rotation) { default: case RotateBy0: setRotation(RotateBy270); break; case RotateBy90: setRotation(RotateBy0); break; case RotateBy180: setRotation(RotateBy90); break; case RotateBy270: setRotation(RotateBy180); break; } } void DocumentView::rotateRight() { switch(m_rotation) { default: case RotateBy0: setRotation(RotateBy90); break; case RotateBy90: setRotation(RotateBy180); break; case RotateBy180: setRotation(RotateBy270); break; case RotateBy270: setRotation(RotateBy0); break; } } void DocumentView::startPresentation() { const int screen = s_settings->presentationView().screen(); PresentationView* presentationView = new PresentationView(m_pages); presentationView->setGeometry(QApplication::desktop()->screenGeometry(screen)); presentationView->show(); presentationView->setAttribute(Qt::WA_DeleteOnClose); connect(this, SIGNAL(destroyed()), presentationView, SLOT(close())); connect(this, SIGNAL(filePathChanged(QString)), presentationView, SLOT(close())); connect(this, SIGNAL(numberOfPagesChanged(int)), presentationView, SLOT(close())); presentationView->setRotation(rotation()); presentationView->setInvertColors(invertColors()); presentationView->jumpToPage(currentPage(), false); if(s_settings->presentationView().sync()) { connect(this, SIGNAL(currentPageChanged(int,bool)), presentationView, SLOT(jumpToPage(int,bool))); connect(presentationView, SIGNAL(currentPageChanged(int,bool)), this, SLOT(jumpToPage(int,bool))); } } void DocumentView::on_verticalScrollBar_valueChanged(int value) { if(m_continuousMode) { const QRectF visibleRect = mapToScene(viewport()->rect()).boundingRect(); foreach(PageItem* page, m_pageItems) { if(!page->boundingRect().translated(page->pos()).intersects(visibleRect)) { page->cancelRender(); } } const QMap< qreal, int >::iterator lowerBound = m_heightToIndex.lowerBound(-value); if(lowerBound != m_heightToIndex.end()) { const int page = lowerBound.value() + 1; if(m_currentPage != page) { m_currentPage = page; emit currentPageChanged(m_currentPage); if(s_settings->documentView().highlightCurrentThumbnail()) { for(int index = 0; index < m_thumbnailItems.count(); ++index) { m_thumbnailItems.at(index)->setCurrent(index == m_currentPage - 1); } } } } } } void DocumentView::on_prefetch_timeout() { const QPair< int, int > prefetchRange = m_layout->prefetchRange(m_currentPage, m_pages.count()); for(int index = prefetchRange.first - 1; index <= prefetchRange.second - 1; ++index) { m_pageItems.at(index)->startRender(true); } } void DocumentView::on_temporaryHighlight_timeout() { m_highlight->setVisible(false); } void DocumentView::on_searchTask_resultsReady(int index, QList< QRectF > results) { if(m_searchTask->wasCanceled()) { return; } while(!results.isEmpty()) { m_results.insertMulti(index, results.takeLast()); } if(m_highlightAll) { m_pageItems.at(index)->setHighlights(m_results.values(index)); m_thumbnailItems.at(index)->setHighlights(m_results.values(index)); } if(s_settings->documentView().limitThumbnailsToResults()) { prepareThumbnailsScene(); } if(m_results.contains(index) && m_currentResult == m_results.end()) { findNext(); } } void DocumentView::on_pages_linkClicked(int page, qreal left, qreal top) { page = qMax(page, 1); page = qMin(page, m_pages.count()); left = left >= 0.0 ? left : 0.0; left = left <= 1.0 ? left : 1.0; top = top >= 0.0 ? top : 0.0; top = top <= 1.0 ? top : 1.0; jumpToPage(page, true, left, top); } void DocumentView::on_pages_linkClicked(const QString& url) { if(s_settings->documentView().openUrl()) { QUrl resolvedUrl(url); if(resolvedUrl.isRelative() && QFileInfo(url).isRelative()) { resolvedUrl.setPath(QFileInfo(m_filePath).dir().filePath(url)); } QDesktopServices::openUrl(resolvedUrl); } else { QMessageBox::information(this, tr("Information"), tr("Opening URL is disabled in the settings.")); } } void DocumentView::on_pages_linkClicked(const QString& fileName, int page) { const QString filePath = QFileInfo(fileName).isAbsolute() ? fileName : QFileInfo(m_filePath).dir().filePath(fileName); emit linkClicked(filePath, page); } void DocumentView::on_pages_rubberBandFinished() { setRubberBandMode(ModifiersMode); } void DocumentView::on_pages_sourceRequested(int page, const QPointF& pos) { #ifdef WITH_SYNCTEX if(s_settings->documentView().sourceEditor().isEmpty()) { return; } const QFileInfo fileInfo(m_filePath); synctex_scanner_t scanner = synctex_scanner_new_with_output_file(fileInfo.absoluteFilePath().toLocal8Bit(), 0, 1); if(scanner != 0) { if(synctex_edit_query(scanner, page, pos.x(), pos.y()) > 0) { for(synctex_node_t node = synctex_next_result(scanner); node != 0; node = synctex_next_result(scanner)) { QString sourceName = QString::fromLocal8Bit(synctex_scanner_get_name(scanner, synctex_node_tag(node))); int sourceLine = synctex_node_line(node); int sourceColumn = synctex_node_column(node); sourceLine = sourceLine >= 0 ? sourceLine : 0; sourceColumn = sourceColumn >= 0 ? sourceColumn : 0; QProcess::startDetached(s_settings->documentView().sourceEditor().arg(fileInfo.dir().absoluteFilePath(sourceName), QString::number(sourceLine), QString::number(sourceColumn))); break; } } synctex_scanner_free(scanner); } else { QMessageBox::warning(this, tr("Warning"), tr("SyncTeX data for '%1' could not be found.").arg(fileInfo.absoluteFilePath())); } #else Q_UNUSED(page); Q_UNUSED(pos); #endif // WITH_SYNCTEX } void DocumentView::on_pages_wasModified() { m_wasModified = true; } void DocumentView::resizeEvent(QResizeEvent* event) { QGraphicsView::resizeEvent(event); if(m_scaleMode != ScaleFactorMode) { qreal left = 0.0, top = 0.0; saveLeftAndTop(left, top); prepareScene(); prepareView(left, top); } } void DocumentView::keyPressEvent(QKeyEvent* event) { const QKeySequence keySequence(event->modifiers() + event->key()); int maskedKey = -1; if(s_shortcutHandler->matchesSkipBackward(keySequence)) { maskedKey = Qt::Key_PageUp; } else if(s_shortcutHandler->matchesSkipForward(keySequence)) { maskedKey = Qt::Key_PageDown; } else if(s_shortcutHandler->matchesMoveUp(keySequence)) { maskedKey = Qt::Key_Up; } else if(s_shortcutHandler->matchesMoveDown(keySequence)) { maskedKey = Qt::Key_Down; } else if(s_shortcutHandler->matchesMoveLeft(keySequence)) { maskedKey = Qt::Key_Left; } else if(s_shortcutHandler->matchesMoveRight(keySequence)) { maskedKey = Qt::Key_Right; } else if(event->key() == Qt::Key_PageUp || event->key() == Qt::Key_PageDown || event->key() == Qt::Key_Up || event->key() == Qt::Key_Down || event->key() == Qt::Key_Left || event->key() == Qt::Key_Right) { event->ignore(); return; } if(maskedKey != -1) { QKeyEvent keyEvent(event->type(), maskedKey, Qt::NoModifier, event->text(), event->isAutoRepeat(), event->count()); QGraphicsView::keyPressEvent(&keyEvent); } else { QGraphicsView::keyPressEvent(event); } if(maskedKey == Qt::Key_PageUp || maskedKey == Qt::Key_PageDown || maskedKey == Qt::Key_Up || maskedKey == Qt::Key_Down || maskedKey == Qt::Key_Left || maskedKey == Qt::Key_Right) { foreach(const PageItem* page, m_pageItems) { if(page->showsAnnotationOverlay() || page->showsFormFieldOverlay()) { return; } } if(!m_continuousMode) { if(maskedKey == Qt::Key_PageUp && verticalScrollBar()->value() == verticalScrollBar()->minimum() && m_currentPage != 1) { previousPage(); verticalScrollBar()->setValue(verticalScrollBar()->maximum()); event->accept(); return; } else if(maskedKey == Qt::Key_PageDown && verticalScrollBar()->value() == verticalScrollBar()->maximum() && m_currentPage != m_layout->currentPage(m_pages.count())) { nextPage(); verticalScrollBar()->setValue(verticalScrollBar()->minimum()); event->accept(); return; } } if((maskedKey == Qt::Key_Up && verticalScrollBar()->minimum() == verticalScrollBar()->maximum()) || (maskedKey == Qt::Key_Left && !horizontalScrollBar()->isVisible())) { previousPage(); event->accept(); return; } else if((maskedKey == Qt::Key_Down && verticalScrollBar()->minimum() == verticalScrollBar()->maximum()) || (maskedKey == Qt::Key_Right && !horizontalScrollBar()->isVisible())) { nextPage(); event->accept(); return; } } } void DocumentView::wheelEvent(QWheelEvent* event) { if(event->modifiers() == s_settings->documentView().zoomModifiers()) { if(event->delta() > 0) { zoomIn(); } else { zoomOut(); } event->accept(); return; } else if(event->modifiers() == s_settings->documentView().rotateModifiers()) { if(event->delta() > 0) { rotateLeft(); } else { rotateRight(); } event->accept(); return; } else if(event->modifiers() == s_settings->documentView().scrollModifiers()) { QWheelEvent wheelEvent(event->pos(), event->delta(), event->buttons(), Qt::AltModifier, Qt::Horizontal); QGraphicsView::wheelEvent(&wheelEvent); event->accept(); return; } else if(event->modifiers() == Qt::NoModifier) { if(!m_continuousMode) { if(event->delta() > 0 && verticalScrollBar()->value() == verticalScrollBar()->minimum() && m_currentPage != 1) { previousPage(); verticalScrollBar()->setValue(verticalScrollBar()->maximum()); event->accept(); return; } else if(event->delta() < 0 && verticalScrollBar()->value() == verticalScrollBar()->maximum() && m_currentPage != m_layout->currentPage(m_pages.count())) { nextPage(); verticalScrollBar()->setValue(verticalScrollBar()->minimum()); event->accept(); return; } } } QGraphicsView::wheelEvent(event); } void DocumentView::contextMenuEvent(QContextMenuEvent* event) { event->setAccepted(false); QGraphicsView::contextMenuEvent(event); if(!event->isAccepted()) { event->setAccepted(true); emit customContextMenuRequested(event->pos()); } } #ifdef WITH_CUPS bool DocumentView::printUsingCUPS(QPrinter* printer, const PrintOptions& printOptions, int fromPage, int toPage) { int num_dests = 0; cups_dest_t* dests = 0; int num_options = 0; cups_option_t* options = 0; cups_dest_t* dest = 0; int jobId = 0; num_dests = cupsGetDests(&dests); dest = cupsGetDest(printer->printerName().toLocal8Bit(), 0, num_dests, dests); if(dest != 0) { for(int index = 0; index < dest->num_options; ++index) { num_options = cupsAddOption(dest->options[index].name, dest->options[index].value, num_options, &options); } #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) num_options = cupsAddOption("copies", QString::number(printer->copyCount()).toLocal8Bit(), num_options, &options); #endif // QT_VERSION num_options = cupsAddOption("Collate", printer->collateCopies() ? "true" : "false", num_options, &options); switch(printer->pageOrder()) { case QPrinter::FirstPageFirst: num_options = cupsAddOption("outputorder", "normal", num_options, &options); break; case QPrinter::LastPageFirst: num_options = cupsAddOption("outputorder", "reverse", num_options, &options); break; } num_options = cupsAddOption("fit-to-page", printOptions.fitToPage ? "true" : "false", num_options, &options); switch(printer->orientation()) { case QPrinter::Portrait: num_options = cupsAddOption("landscape", "false", num_options, &options); break; case QPrinter::Landscape: num_options = cupsAddOption("landscape", "true", num_options, &options); break; } switch(printer->colorMode()) { case QPrinter::Color: break; case QPrinter::GrayScale: num_options = cupsAddOption("ColorModel", "Gray", num_options, &options); break; } switch(printer->duplex()) { case QPrinter::DuplexNone: num_options = cupsAddOption("sides", "one-sided", num_options, &options); break; case QPrinter::DuplexAuto: break; case QPrinter::DuplexLongSide: num_options = cupsAddOption("sides", "two-sided-long-edge", num_options, &options); break; case QPrinter::DuplexShortSide: num_options = cupsAddOption("sides", "two-sided-short-edge", num_options, &options); break; } int numberUp = 1; switch(printOptions.numberUp) { case PrintOptions::SinglePage: num_options = cupsAddOption("number-up", "1", num_options, &options); numberUp = 1; break; case PrintOptions::TwoPages: num_options = cupsAddOption("number-up", "2", num_options, &options); numberUp = 2; break; case PrintOptions::FourPages: num_options = cupsAddOption("number-up", "4", num_options, &options); numberUp = 4; break; case PrintOptions::SixPages: num_options = cupsAddOption("number-up", "6", num_options, &options); numberUp = 6; break; case PrintOptions::NinePages: num_options = cupsAddOption("number-up", "9", num_options, &options); numberUp = 9; break; case PrintOptions::SixteenPages: num_options = cupsAddOption("number-up", "16", num_options, &options); numberUp = 16; break; } fromPage = (fromPage - 1) / numberUp + 1; toPage = (toPage - 1) / numberUp + 1; switch(printOptions.numberUpLayout) { case PrintOptions::BottomTopLeftRight: num_options = cupsAddOption("number-up-layout", "btlr", num_options, &options); break; case PrintOptions::BottomTopRightLeft: num_options = cupsAddOption("number-up-layout", "btrl", num_options, &options); break; case PrintOptions::LeftRightBottomTop: num_options = cupsAddOption("number-up-layout", "lrbt", num_options, &options); break; case PrintOptions::LeftRightTopBottom: num_options = cupsAddOption("number-up-layout", "lrtb", num_options, &options); break; case PrintOptions::RightLeftBottomTop: num_options = cupsAddOption("number-up-layout", "rlbt", num_options, &options); break; case PrintOptions::RightLeftTopBottom: num_options = cupsAddOption("number-up-layout", "rltb", num_options, &options); break; case PrintOptions::TopBottomLeftRight: num_options = cupsAddOption("number-up-layout", "tblr", num_options, &options); break; case PrintOptions::TopBottomRightLeft: num_options = cupsAddOption("number-up-layout", "tbrl", num_options, &options); break; } if(printOptions.pageRanges.isEmpty()) { num_options = cupsAddOption("page-ranges", QString("%1-%2").arg(fromPage).arg(toPage).toLocal8Bit(), num_options, &options); } else { num_options = cupsAddOption("page-ranges", printOptions.pageRanges.toLocal8Bit(), num_options, &options); } switch(printOptions.pageSet) { case PrintOptions::AllPages: break; case PrintOptions::EvenPages: num_options = cupsAddOption("page-set", "even", num_options, &options); break; case PrintOptions::OddPages: num_options = cupsAddOption("page-set", "odd", num_options, &options); break; } QTemporaryFile temporaryFile; if(temporaryFile.open()) { temporaryFile.close(); if(m_document->save(temporaryFile.fileName(), true)) { jobId = cupsPrintFile(dest->name, QFileInfo(temporaryFile).absoluteFilePath().toLocal8Bit(), QFileInfo(m_filePath).completeBaseName().toLocal8Bit(), num_options, options); if(jobId < 1) { qWarning() << cupsLastErrorString(); } } } } else { qWarning() << cupsLastErrorString(); } cupsFreeDests(num_dests, dests); cupsFreeOptions(num_options, options); return jobId >= 1; } #endif // WITH_CUPS bool DocumentView::printUsingQt(QPrinter* printer, const PrintOptions& printOptions, int fromPage, int toPage) { QScopedPointer< QProgressDialog > progressDialog(new QProgressDialog(this)); progressDialog->setLabelText(tr("Printing '%1'...").arg(m_filePath)); progressDialog->setRange(fromPage - 1, toPage); QPainter painter(printer); for(int index = fromPage - 1; index <= toPage - 1; ++index) { progressDialog->setValue(index); QApplication::processEvents(); painter.save(); const Model::Page* page = m_pages.at(index); if(printOptions.fitToPage) { const qreal pageWidth = printer->physicalDpiX() / 72.0 * page->size().width(); const qreal pageHeight = printer->physicalDpiY() / 72.0 * page->size().width(); const qreal scaleFactor = qMin(printer->width() / pageWidth, printer->height() / pageHeight); painter.setTransform(QTransform::fromScale(scaleFactor, scaleFactor)); } else { const qreal scaleFactorX = static_cast< qreal >(printer->logicalDpiX()) / static_cast< qreal >(printer->physicalDpiX()); const qreal scaleFactorY = static_cast< qreal >(printer->logicalDpiY()) / static_cast< qreal >(printer->physicalDpiY()); painter.setTransform(QTransform::fromScale(scaleFactorX, scaleFactorY)); } painter.drawImage(QPointF(), page->render(printer->physicalDpiX(), printer->physicalDpiY())); painter.restore(); if(index < toPage - 1) { printer->newPage(); } QApplication::processEvents(); if(progressDialog->wasCanceled()) { printer->abort(); return false; } } return true; } void DocumentView::saveLeftAndTop(qreal& left, qreal& top) const { const PageItem* page = m_pageItems.at(m_currentPage - 1); const QRectF boundingRect = page->boundingRect().translated(page->pos()); const QPointF topLeft = mapToScene(viewport()->rect().topLeft()); left = (topLeft.x() - boundingRect.x()) / boundingRect.width(); top = (topLeft.y() - boundingRect.y()) / boundingRect.height(); left = left >= 0.0 ? left : 0.0; top = top >= 0.0 ? top : 0.0; } void DocumentView::loadFallbackOutline() { if(m_outlineModel->rowCount() > 0) { return; } for(int page = 1; page <= m_pages.count(); ++page) { QStandardItem* item = new QStandardItem(tr("Page %1").arg(page)); item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item->setData(page, Qt::UserRole + 1); QStandardItem* pageItem = item->clone(); pageItem->setText(QString::number(page)); pageItem->setTextAlignment(Qt::AlignRight); m_outlineModel->appendRow(QList< QStandardItem* >() << item << pageItem); } } void DocumentView::prepareDocument(Model::Document* document) { m_prefetchTimer->blockSignals(true); m_prefetchTimer->stop(); cancelSearch(); qDeleteAll(m_pageItems); qDeleteAll(m_thumbnailItems); qDeleteAll(m_pages); if(m_document != 0) { delete m_document; if(!m_autoRefreshWatcher->files().isEmpty()) { m_autoRefreshWatcher->removePaths(m_autoRefreshWatcher->files()); } } m_document = document; if(s_settings->documentView().autoRefresh()) { m_autoRefreshWatcher->addPath(m_filePath); } m_document->setPaperColor(s_settings->pageItem().paperColor()); m_pages.clear(); for(int index = 0; index < m_document->numberOfPages(); ++index) { m_pages.append(m_document->page(index)); } preparePages(); prepareThumbnails(); prepareBackground(); m_document->loadOutline(m_outlineModel); m_document->loadProperties(m_propertiesModel); loadFallbackOutline(); if(s_settings->documentView().prefetch()) { m_prefetchTimer->blockSignals(false); m_prefetchTimer->start(); } } void DocumentView::preparePages() { m_pageItems.clear(); m_pageItems.reserve(m_pages.count()); for(int index = 0; index < m_pages.count(); ++index) { PageItem* page = new PageItem(m_pages.at(index), index); page->setInvertColors(m_invertColors); page->setRubberBandMode(m_rubberBandMode); scene()->addItem(page); m_pageItems.append(page); connect(page, SIGNAL(linkClicked(int,qreal,qreal)), SLOT(on_pages_linkClicked(int,qreal,qreal))); connect(page, SIGNAL(linkClicked(QString)), SLOT(on_pages_linkClicked(QString))); connect(page, SIGNAL(linkClicked(QString,int)), SLOT(on_pages_linkClicked(QString,int))); connect(page, SIGNAL(rubberBandFinished()), SLOT(on_pages_rubberBandFinished())); connect(page, SIGNAL(sourceRequested(int,QPointF)), SLOT(on_pages_sourceRequested(int,QPointF))); connect(page, SIGNAL(wasModified()), SLOT(on_pages_wasModified())); } } void DocumentView::prepareThumbnails() { m_thumbnailItems.clear(); m_thumbnailItems.reserve(m_pages.count()); for(int index = 0; index < m_pages.count(); ++index) { ThumbnailItem* page = new ThumbnailItem(m_pages.at(index), index); page->setInvertColors(m_invertColors); m_thumbnailsScene->addItem(page); m_thumbnailItems.append(page); connect(page, SIGNAL(linkClicked(int,qreal,qreal)), SLOT(on_pages_linkClicked(int,qreal,qreal))); } } void DocumentView::prepareBackground() { QColor backgroundColor; if(s_settings->pageItem().decoratePages()) { backgroundColor = s_settings->pageItem().backgroundColor(); } else { backgroundColor = s_settings->pageItem().paperColor(); if(m_invertColors) { backgroundColor.setRgb(~backgroundColor.rgb()); } } scene()->setBackgroundBrush(QBrush(backgroundColor)); m_thumbnailsScene->setBackgroundBrush(QBrush(backgroundColor)); } void DocumentView::prepareScene() { // prepare scale factor and rotation const qreal visibleWidth = m_layout->visibleWidth(viewport()->width()); const qreal visibleHeight = m_layout->visibleHeight(viewport()->height()); foreach(PageItem* page, m_pageItems) { #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) page->setDevicePixelRatio(devicePixelRatio()); #endif // QT_VERSION page->setResolution(logicalDpiX(), logicalDpiY()); qreal pageWidth = 0.0; qreal pageHeight = 0.0; switch(m_rotation) { default: case RotateBy0: case RotateBy180: pageWidth = logicalDpiX() / 72.0 * page->size().width(); pageHeight = logicalDpiY() / 72.0 * page->size().height(); break; case RotateBy90: case RotateBy270: pageWidth = logicalDpiX() / 72.0 * page->size().height(); pageHeight = logicalDpiY() / 72.0 * page->size().width(); break; } switch(m_scaleMode) { default: case ScaleFactorMode: page->setScaleFactor(m_scaleFactor); break; case FitToPageWidthMode: page->setScaleFactor(visibleWidth / pageWidth); break; case FitToPageSizeMode: page->setScaleFactor(qMin(visibleWidth / pageWidth, visibleHeight / pageHeight)); break; } page->setRotation(m_rotation); } // prepare layout m_heightToIndex.clear(); qreal pageHeight = 0.0; qreal left = 0.0; qreal right = 0.0; qreal height = s_settings->documentView().pageSpacing(); m_layout->prepareLayout(m_pageItems, m_heightToIndex, pageHeight, left, right, height); scene()->setSceneRect(left, 0.0, right - left, height); } void DocumentView::prepareView(qreal changeLeft, qreal changeTop) { const bool highlightCurrentThumbnail = s_settings->documentView().highlightCurrentThumbnail(); qreal left = scene()->sceneRect().left(); qreal top = scene()->sceneRect().top(); qreal width = scene()->sceneRect().width(); qreal height = scene()->sceneRect().height(); int horizontalValue = 0; int verticalValue = 0; for(int index = 0; index < m_pageItems.count(); ++index) { PageItem* page = m_pageItems.at(index); const QRectF boundingRect = page->boundingRect().translated(page->pos()); if(m_continuousMode) { page->setVisible(true); if(index == m_currentPage - 1) { horizontalValue = qFloor(boundingRect.left() + changeLeft * boundingRect.width()); verticalValue = qFloor(boundingRect.top() + changeTop * boundingRect.height()); } } else { if(m_layout->leftIndex(index) == m_currentPage - 1) { page->setVisible(true); top = boundingRect.top() - s_settings->documentView().pageSpacing(); height = boundingRect.height() + 2.0 * s_settings->documentView().pageSpacing(); if(index == m_currentPage - 1) { horizontalValue = qFloor(boundingRect.left() + changeLeft * boundingRect.width()); verticalValue = qFloor(boundingRect.top() + changeTop * boundingRect.height()); } } else { page->setVisible(false); page->cancelRender(); } } if(m_currentResult != m_results.end()) { if(m_currentResult.key() == index) { m_highlight->setPos(page->pos()); m_highlight->setTransform(page->transform()); page->stackBefore(m_highlight); } } m_thumbnailItems.at(index)->setCurrent(highlightCurrentThumbnail && (index == m_currentPage - 1)); } setSceneRect(left, top, width, height); horizontalScrollBar()->setValue(horizontalValue); verticalScrollBar()->setValue(verticalValue); viewport()->update(); } void DocumentView::prepareThumbnailsScene() { const qreal thumbnailSpacing = s_settings->documentView().thumbnailSpacing(); qreal left = 0.0; qreal right = m_thumbnailsOrientation == Qt::Vertical ? 0.0 : thumbnailSpacing; qreal top = 0.0; qreal bottom = m_thumbnailsOrientation == Qt::Vertical ? thumbnailSpacing : 0.0; const bool limitThumbnailsToResults = s_settings->documentView().limitThumbnailsToResults(); for(int index = 0; index < m_thumbnailItems.count(); ++index) { PageItem* page = m_thumbnailItems.at(index); if(limitThumbnailsToResults && !m_results.isEmpty() && !m_results.contains(index)) { page->setVisible(false); page->cancelRender(); continue; } page->setVisible(true); // prepare scale factor #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) page->setDevicePixelRatio(devicePixelRatio()); #endif // QT_VERSION page->setResolution(logicalDpiX(), logicalDpiY()); const qreal pageWidth = logicalDpiX() / 72.0 * page->size().width(); const qreal pageHeight = logicalDpiY() / 72.0 * page->size().height(); page->setScaleFactor(qMin(s_settings->documentView().thumbnailSize() / pageWidth, s_settings->documentView().thumbnailSize() / pageHeight)); // prepare layout const QRectF boundingRect = page->boundingRect(); if(m_thumbnailsOrientation == Qt::Vertical) { page->setPos(-boundingRect.left() - 0.5 * boundingRect.width(), bottom - boundingRect.top()); left = qMin(left, -0.5f * boundingRect.width() - thumbnailSpacing); right = qMax(right, 0.5f * boundingRect.width() + thumbnailSpacing); bottom += boundingRect.height() + thumbnailSpacing; } else { page->setPos(right - boundingRect.left(), -boundingRect.top() - 0.5 * boundingRect.height()); top = qMin(top, -0.5f * boundingRect.height() - thumbnailSpacing); bottom = qMax(bottom, 0.5f * boundingRect.height() + thumbnailSpacing); right += boundingRect.width() + thumbnailSpacing; } } m_thumbnailsScene->setSceneRect(left, top, right - left, bottom - top); } void DocumentView::prepareHighlight(int index, const QRectF& rect) { PageItem* page = m_pageItems.at(index); m_highlight->setPos(page->pos()); m_highlight->setTransform(page->transform()); m_highlight->setRect(rect.normalized()); m_highlight->setBrush(QBrush(s_settings->pageItem().highlightColor())); page->stackBefore(m_highlight); m_highlight->setVisible(true); disconnect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(on_verticalScrollBar_valueChanged(int))); centerOn(m_highlight); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(on_verticalScrollBar_valueChanged(int))); viewport()->update(); } DocumentView::Results::iterator DocumentView::previousResult(const Results::iterator& result) { return result != m_results.begin() ? result - 1 : m_results.end(); } qpdfview-0.4.7/sources/documentview.h0000644000000000000000000001572412246606025016056 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef DOCUMENTVIEW_H #define DOCUMENTVIEW_H #include #include class QDomNode; class QFileSystemWatcher; class QPrinter; class QStandardItemModel; #include "global.h" #include "printoptions.h" namespace Model { class Annotation; class Page; class Document; } class Settings; class PageItem; class ThumbnailItem; class SearchTask; class PresentationView; class ShortcutHandler; class DocumentLayout; class DocumentView : public QGraphicsView { Q_OBJECT public: explicit DocumentView(QWidget* parent = 0); ~DocumentView(); const QString& filePath() const; int numberOfPages() const; int currentPage() const; bool wasModified() const; static QStringList openFilter(); QStringList saveFilter() const; bool canSave() const; bool continousMode() const; void setContinousMode(bool continousMode); LayoutMode layoutMode() const; void setLayoutMode(LayoutMode layoutMode); ScaleMode scaleMode() const; void setScaleMode(ScaleMode scaleMode); qreal scaleFactor() const; void setScaleFactor(qreal scaleFactor); Rotation rotation() const; void setRotation(Rotation rotation); bool invertColors() const; void setInvertColors(bool invertColors); bool highlightAll() const; void setHighlightAll(bool highlightAll); RubberBandMode rubberBandMode() const; void setRubberBandMode(RubberBandMode rubberBandMode); bool searchWasCanceled() const; int searchProgress() const; Qt::Orientation thumbnailsOrientation() const; void setThumbnailsOrientation(Qt::Orientation thumbnailsOrientation); const QVector< ThumbnailItem* >& thumbnailItems() const; QGraphicsScene* thumbnailsScene() const; QStandardItemModel* outlineModel() const; QStandardItemModel* propertiesModel() const; QStandardItemModel* fontsModel() const; signals: void documentChanged(); void filePathChanged(const QString& filePath); void numberOfPagesChanged(int numberOfPages); void currentPageChanged(int currentPage, bool trackChange = false); void canJumpChanged(bool backward, bool forward); void continousModeChanged(bool continousMode); void layoutModeChanged(LayoutMode layoutMode); void scaleModeChanged(ScaleMode scaleMode); void scaleFactorChanged(qreal scaleFactor); void rotationChanged(Rotation rotation); void linkClicked(const QString& filePath, int page); void invertColorsChanged(bool invertColors); void highlightAllChanged(bool highlightAll); void rubberBandModeChanged(RubberBandMode rubberBandMode); void searchFinished(); void searchProgressChanged(int progress); public slots: void show(); bool open(const QString& filePath); bool refresh(); bool save(const QString& filePath, bool withChanges); bool print(QPrinter* printer, const PrintOptions& printOptions = PrintOptions()); void previousPage(); void nextPage(); void firstPage(); void lastPage(); void jumpToPage(int page, bool trackChange = true, qreal changeLeft = 0.0, qreal changeTop = 0.0); bool canJumpBackward() const; void jumpBackward(); bool canJumpForward() const; void jumpForward(); void temporaryHighlight(int page, const QRectF& highlight); void startSearch(const QString& text, bool matchCase = true); void cancelSearch(); void findPrevious(); void findNext(); void zoomIn(); void zoomOut(); void originalSize(); void rotateLeft(); void rotateRight(); void startPresentation(); protected slots: void on_verticalScrollBar_valueChanged(int value); void on_prefetch_timeout(); void on_temporaryHighlight_timeout(); void on_searchTask_resultsReady(int index, QList< QRectF > results); void on_pages_linkClicked(int page, qreal left, qreal top); void on_pages_linkClicked(const QString& url); void on_pages_linkClicked(const QString& fileName, int page); void on_pages_rubberBandFinished(); void on_pages_sourceRequested(int page, const QPointF& pos); void on_pages_wasModified(); protected: void resizeEvent(QResizeEvent* event); void keyPressEvent(QKeyEvent* event); void wheelEvent(QWheelEvent* event); void contextMenuEvent(QContextMenuEvent* event); private: Q_DISABLE_COPY(DocumentView) static Settings* s_settings; static ShortcutHandler* s_shortcutHandler; QFileSystemWatcher* m_autoRefreshWatcher; QTimer* m_autoRefreshTimer; QTimer* m_prefetchTimer; Model::Document* m_document; QList< Model::Page* > m_pages; QString m_filePath; int m_currentPage; bool m_wasModified; #ifdef WITH_CUPS bool printUsingCUPS(QPrinter* printer, const PrintOptions& printOptions, int fromPage, int toPage); #endif // WITH_CUPS bool printUsingQt(QPrinter* printer, const PrintOptions& printOptions, int fromPage, int toPage); struct Position { int page; qreal left; qreal top; Position(int page, qreal left, qreal top) : page(page), left(left), top(top) {} }; QList< Position > m_past; QList< Position > m_future; void saveLeftAndTop(qreal& left, qreal& top) const; QScopedPointer< DocumentLayout > m_layout; bool m_continuousMode; ScaleMode m_scaleMode; qreal m_scaleFactor; Rotation m_rotation; bool m_invertColors; bool m_highlightAll; RubberBandMode m_rubberBandMode; QVector< PageItem* > m_pageItems; QVector< ThumbnailItem* > m_thumbnailItems; QMap< qreal, int > m_heightToIndex; QGraphicsRectItem* m_highlight; Qt::Orientation m_thumbnailsOrientation; QGraphicsScene* m_thumbnailsScene; QStandardItemModel* m_outlineModel; QStandardItemModel* m_propertiesModel; void loadFallbackOutline(); void prepareDocument(Model::Document* document); void preparePages(); void prepareThumbnails(); void prepareBackground(); void prepareScene(); void prepareView(qreal changeLeft = 0.0, qreal changeTop = 0.0); void prepareThumbnailsScene(); void prepareHighlight(int index, const QRectF& highlight); // search typedef QMultiMap< int, QRectF > Results; Results m_results; Results::iterator m_currentResult; Results::iterator previousResult(const Results::iterator& result); SearchTask* m_searchTask; }; #endif // DOCUMENTVIEW_H qpdfview-0.4.7/sources/formfieldwidgets.cpp0000644000000000000000000002075412246606025017235 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "formfieldwidgets.h" #include #include #include static bool hideOnEscape(QWidget* widget, QKeyEvent* event) { if(event->key() == Qt::Key_Escape) { widget->hide(); event->accept(); return true; } return false; } NormalTextFieldWidget::NormalTextFieldWidget(QMutex* mutex, Poppler::FormFieldText* formField, QWidget* parent) : QLineEdit(parent), m_mutex(mutex), m_formField(formField) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 setText(m_formField->text()); setMaxLength(m_formField->maximumLength()); setAlignment(m_formField->textAlignment()); setEchoMode(m_formField->isPassword() ? QLineEdit::Password : QLineEdit::Normal); connect(this, SIGNAL(textChanged(QString)), SLOT(on_textChanged(QString))); connect(this, SIGNAL(textChanged(QString)), SIGNAL(wasModified())); connect(this, SIGNAL(returnPressed()), SLOT(hide())); } void NormalTextFieldWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QLineEdit::keyPressEvent(event); } } void NormalTextFieldWidget::on_textChanged(const QString& text) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 m_formField->setText(text); } MultilineTextFieldWidget::MultilineTextFieldWidget(QMutex* mutex, Poppler::FormFieldText* formField, QWidget* parent) : QPlainTextEdit(parent), m_mutex(mutex), m_formField(formField) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 setPlainText(m_formField->text()); connect(this, SIGNAL(textChanged()), SLOT(on_textChanged())); connect(this, SIGNAL(textChanged()), SIGNAL(wasModified())); moveCursor(QTextCursor::End); } void MultilineTextFieldWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QPlainTextEdit::keyPressEvent(event); } } void MultilineTextFieldWidget::on_textChanged() { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 m_formField->setText(toPlainText()); } ComboBoxChoiceFieldWidget::ComboBoxChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldChoice* formField, QWidget* parent) : QComboBox(parent), m_mutex(mutex), m_formField(formField) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 addItems(m_formField->choices()); if(!m_formField->currentChoices().isEmpty()) { setCurrentIndex(m_formField->currentChoices().first()); } connect(this, SIGNAL(currentIndexChanged(int)), SLOT(on_currentIndexChanged(int))); connect(this, SIGNAL(currentIndexChanged(int)), SIGNAL(wasModified())); #ifdef HAS_POPPLER_22 if(m_formField->isEditable()) { setEditable(true); setInsertPolicy(QComboBox::NoInsert); lineEdit()->setText(m_formField->editChoice()); connect(lineEdit(), SIGNAL(textChanged(QString)), SLOT(on_currentTextChanged(QString))); connect(lineEdit(), SIGNAL(textChanged(QString)), SIGNAL(wasModified())); connect(lineEdit(), SIGNAL(returnPressed()), SLOT(hide())); } else { connect(this, SIGNAL(activated(int)), SLOT(hide())); } #else connect(this, SIGNAL(activated(int)), SLOT(hide())); #endif // HAS_POPPLER_22 } void ComboBoxChoiceFieldWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QComboBox::keyPressEvent(event); } } void ComboBoxChoiceFieldWidget::showPopup() { QComboBox::showPopup(); graphicsProxyWidget()->setZValue(1.0); } void ComboBoxChoiceFieldWidget::hidePopup() { QComboBox::hidePopup(); graphicsProxyWidget()->setZValue(0.0); } void ComboBoxChoiceFieldWidget::on_currentIndexChanged(int index) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 m_formField->setCurrentChoices(QList< int >() << index); } void ComboBoxChoiceFieldWidget::on_currentTextChanged(const QString& text) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 #ifdef HAS_POPPLER_22 m_formField->setEditChoice(text); #endif // HAS_POPPLER_22 } ListBoxChoiceFieldWidget::ListBoxChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldChoice* formField, QWidget* parent) : QListWidget(parent), m_mutex(mutex), m_formField(formField) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 addItems(m_formField->choices()); setSelectionMode(m_formField->multiSelect() ? QAbstractItemView::MultiSelection : QAbstractItemView::SingleSelection); foreach(int index, m_formField->currentChoices()) { if(index >= 0 && index < count()) { item(index)->setSelected(true); } } connect(this, SIGNAL(itemSelectionChanged()), SLOT(on_itemSelectionChanged())); connect(this, SIGNAL(itemSelectionChanged()), SIGNAL(wasModified())); } void ListBoxChoiceFieldWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QListWidget::keyPressEvent(event); } } void ListBoxChoiceFieldWidget::on_itemSelectionChanged() { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 QList< int > currentChoices; for(int index = 0; index < count(); ++index) { if(item(index)->isSelected()) { currentChoices.append(index); } } m_formField->setCurrentChoices(currentChoices); } CheckBoxChoiceFieldWidget::CheckBoxChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldButton* formField, QWidget* parent) : QCheckBox(parent), m_mutex(mutex), m_formField(formField) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 setChecked(m_formField->state()); connect(this, SIGNAL(toggled(bool)), SLOT(on_toggled(bool))); connect(this, SIGNAL(toggled(bool)), SIGNAL(wasModified())); } void CheckBoxChoiceFieldWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QCheckBox::keyPressEvent(event); } } void CheckBoxChoiceFieldWidget::on_toggled(bool checked) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 m_formField->setState(checked); } RadioChoiceFieldWidget::Siblings RadioChoiceFieldWidget::s_siblings; RadioChoiceFieldWidget::RadioChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldButton* formField, QWidget* parent) : QRadioButton(parent), m_mutex(mutex), m_formField(formField) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 s_siblings.insert(qMakePair(m_mutex, m_formField->id()), this); setAutoExclusive(false); setChecked(m_formField->state()); connect(this, SIGNAL(toggled(bool)), SLOT(on_toggled(bool))); connect(this, SIGNAL(toggled(bool)), SIGNAL(wasModified())); } RadioChoiceFieldWidget::~RadioChoiceFieldWidget() { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 s_siblings.remove(qMakePair(m_mutex, m_formField->id())); } void RadioChoiceFieldWidget::keyPressEvent(QKeyEvent* event) { if(!hideOnEscape(this, event)) { QRadioButton::keyPressEvent(event); } } void RadioChoiceFieldWidget::on_toggled(bool checked) { #ifndef HAS_POPPLER_24 m_mutex->lock(); #endif // HAS_POPPLER_24 const QList< int > siblings = m_formField->siblings(); m_formField->setState(checked); #ifndef HAS_POPPLER_24 m_mutex->unlock(); #endif // HAS_POPPLER_24 if(checked) { foreach(int id, siblings) { QPair< QMutex*, int > key = qMakePair(m_mutex, id); if(s_siblings.contains(key)) { s_siblings.value(key)->setChecked(false); } } } } qpdfview-0.4.7/sources/formfieldwidgets.h0000644000000000000000000000754412246606025016704 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef FORMFIELDWIDGETS_H #define FORMFIELDWIDGETS_H #include #include #include #include #include #include class QMutex; namespace Poppler { class FormField; class FormFieldText; class FormFieldChoice; class FormFieldButton; } class NormalTextFieldWidget : public QLineEdit { Q_OBJECT public: NormalTextFieldWidget(QMutex* mutex, Poppler::FormFieldText* formField, QWidget* parent = 0); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_textChanged(const QString& text); private: Q_DISABLE_COPY(NormalTextFieldWidget) QMutex* m_mutex; Poppler::FormFieldText* m_formField; }; class MultilineTextFieldWidget : public QPlainTextEdit { Q_OBJECT public: MultilineTextFieldWidget(QMutex* mutex, Poppler::FormFieldText* formField, QWidget* parent = 0); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_textChanged(); private: Q_DISABLE_COPY(MultilineTextFieldWidget) QMutex* m_mutex; Poppler::FormFieldText* m_formField; }; class ComboBoxChoiceFieldWidget : public QComboBox { Q_OBJECT public: ComboBoxChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldChoice* formField, QWidget* parent = 0); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); void showPopup(); void hidePopup(); protected slots: void on_currentIndexChanged(int index); void on_currentTextChanged(const QString& text); private: Q_DISABLE_COPY(ComboBoxChoiceFieldWidget) QMutex* m_mutex; Poppler::FormFieldChoice* m_formField; }; class ListBoxChoiceFieldWidget : public QListWidget { Q_OBJECT public: ListBoxChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldChoice* formField, QWidget* parent = 0); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_itemSelectionChanged(); private: Q_DISABLE_COPY(ListBoxChoiceFieldWidget) QMutex* m_mutex; Poppler::FormFieldChoice* m_formField; }; class CheckBoxChoiceFieldWidget : public QCheckBox { Q_OBJECT public: CheckBoxChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldButton* formField, QWidget* parent = 0); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_toggled(bool checked); protected slots: private: Q_DISABLE_COPY(CheckBoxChoiceFieldWidget) QMutex* m_mutex; Poppler::FormFieldButton* m_formField; }; class RadioChoiceFieldWidget : public QRadioButton { Q_OBJECT public: RadioChoiceFieldWidget(QMutex* mutex, Poppler::FormFieldButton* formField, QWidget* parent = 0); ~RadioChoiceFieldWidget(); signals: void wasModified(); protected: void keyPressEvent(QKeyEvent* event); protected slots: void on_toggled(bool checked); private: Q_DISABLE_COPY(RadioChoiceFieldWidget) typedef QMap< QPair< QMutex*, int >, RadioChoiceFieldWidget* > Siblings; static Siblings s_siblings; QMutex* m_mutex; Poppler::FormFieldButton* m_formField; }; #endif // FORMFIELDWIDGETS_H qpdfview-0.4.7/sources/global.h0000644000000000000000000000260312246606025014575 0ustar 00000000000000/* Copyright 2013 Adam Reichold Copyright 2013 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef GLOBAL_H #define GLOBAL_H #include enum Rotation { RotateBy0 = 0, RotateBy90 = 1, RotateBy180 = 2, RotateBy270 = 3, NumberOfRotations = 4 }; enum RubberBandMode { ModifiersMode = 0, CopyToClipboardMode = 1, AddAnnotationMode = 2, NumberOfRubberBandModes = 3 }; enum LayoutMode { SinglePageMode = 0, TwoPagesMode = 1, TwoPagesWithCoverPageMode = 2, MultiplePagesMode = 3, NumberOfLayoutModes = 4 }; enum ScaleMode { ScaleFactorMode = 0, FitToPageWidthMode = 1, FitToPageSizeMode = 2, NumberOfScaleModes = 3 }; typedef QPair< int, QString > Jump; typedef QList< QPair< int, QString > > JumpList; #endif // GLOBAL_H qpdfview-0.4.7/sources/helpdialog.cpp0000644000000000000000000000561512246606025016006 0ustar 00000000000000/* Copyright 2013 Benjamin Eltzner Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "helpdialog.h" #include #include #include #include #include #include #include HelpDialog::HelpDialog(QWidget* parent) : QDialog(parent) { m_textBrowser = new QTextBrowser(this); m_textBrowser->setTextInteractionFlags(Qt::TextBrowserInteraction | Qt::TextSelectableByKeyboard); m_textBrowser->setSearchPaths(QStringList() << QDir(QApplication::applicationDirPath()).filePath("data") << DATA_INSTALL_PATH); //: Please replace by file name of localized help if available, e.g. "help_fr.html". m_textBrowser->setSource(QUrl(tr("help.html"))); if(m_textBrowser->document()->isEmpty()) { m_textBrowser->setSource(QUrl("help.html")); } m_dialogButtonBox = new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal, this); connect(m_dialogButtonBox, SIGNAL(accepted()), SLOT(accept())); connect(m_dialogButtonBox, SIGNAL(rejected()), SLOT(reject())); m_searchLineEdit = new QLineEdit(this); connect(m_searchLineEdit, SIGNAL(returnPressed()), SLOT(on_findNext_triggered())); m_findPreviousButton = m_dialogButtonBox->addButton(tr("Find previous"), QDialogButtonBox::ActionRole); m_findPreviousButton->setShortcut(QKeySequence::FindPrevious); connect(m_findPreviousButton, SIGNAL(clicked()), SLOT(on_findPrevious_triggered())); m_findNextButton = m_dialogButtonBox->addButton(tr("Find next"), QDialogButtonBox::ActionRole); m_findNextButton->setShortcut(QKeySequence::FindNext); connect(m_findNextButton, SIGNAL(clicked()), SLOT(on_findNext_triggered())); setLayout(new QVBoxLayout(this)); layout()->addWidget(m_textBrowser); layout()->addWidget(m_searchLineEdit); layout()->addWidget(m_dialogButtonBox); m_searchLineEdit->setFocus(); } void HelpDialog::on_findPrevious_triggered() { if(!m_searchLineEdit->text().isEmpty() && m_textBrowser->find(m_searchLineEdit->text(), QTextDocument::FindBackward)) { m_textBrowser->setFocus(); } } void HelpDialog::on_findNext_triggered() { if(!m_searchLineEdit->text().isEmpty() && m_textBrowser->find(m_searchLineEdit->text())) { m_textBrowser->setFocus(); } } qpdfview-0.4.7/sources/helpdialog.h0000644000000000000000000000237312246606025015451 0ustar 00000000000000/* Copyright 2013 Benjamin Eltzner Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef HELPDIALOG_H #define HELPDIALOG_H #include class QDialogButtonBox; class QTextBrowser; class QLineEdit; class HelpDialog : public QDialog { Q_OBJECT public: explicit HelpDialog(QWidget* parent = 0); protected slots: void on_findPrevious_triggered(); void on_findNext_triggered(); private: Q_DISABLE_COPY(HelpDialog) QTextBrowser* m_textBrowser; QDialogButtonBox* m_dialogButtonBox; QLineEdit* m_searchLineEdit; QPushButton* m_findPreviousButton; QPushButton* m_findNextButton; }; #endif // HELPDIALOG_H qpdfview-0.4.7/sources/main.cpp0000644000000000000000000003412612246606025014621 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Michał Trybus Copyright 2013 Chris Young This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include #include #include #include #include #include #include #include #include #ifdef WITH_DBUS #include #include #endif // WITH_DBUS #ifdef WITH_SYNCTEX #include #endif // WITH_SYNCTEX #include "documentview.h" #include "database.h" #include "mainwindow.h" #ifdef WITH_SIGNALS #include "signalhandler.h" #endif // WITH_SIGNALS #ifdef __amigaos4__ #include #include const char* __attribute__((used)) stack_cookie = "\0$STACK:500000\0"; #endif // __amigaos4__ struct File { QString filePath; int page; QString sourceName; int sourceLine; int sourceColumn; QRectF enclosingBox; File() : filePath(), page(-1), sourceName(), sourceLine(-1), sourceColumn(-1), enclosingBox() {} }; enum ExitStatus { ExitOk = 0, ExitUnknownArgument = 1, ExitIllegalArgument = 2, ExitInconsistentArguments = 3, ExitDBusError = 4 }; static bool unique = false; static bool quiet = false; static QString instanceName; static QString searchText; static QList< File > files; static QTranslator* toolkitTranslator = 0; static QTranslator* applicationTranslator = 0; static MainWindow* mainWindow = 0; static void loadTranslators() { toolkitTranslator = new QTranslator(qApp); applicationTranslator = new QTranslator(qApp); #if QT_VERSION >= QT_VERSION_CHECK(4,8,0) if(toolkitTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { qApp->installTranslator(toolkitTranslator); } if(applicationTranslator->load(QLocale::system(), "qpdfview", "_", QDir(QApplication::applicationDirPath()).filePath("data"))) { qApp->installTranslator(applicationTranslator); } else if(applicationTranslator->load(QLocale::system(), "qpdfview", "_", DATA_INSTALL_PATH)) { qApp->installTranslator(applicationTranslator); } #else if(toolkitTranslator->load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { qApp->installTranslator(toolkitTranslator); } if(applicationTranslator->load("qpdfview_" + QLocale::system().name(), QDir(QApplication::applicationDirPath()).filePath("data"))) { qApp->installTranslator(applicationTranslator); } else if(applicationTranslator->load("qpdfview_" + QLocale::system().name(), DATA_INSTALL_PATH)) { qApp->installTranslator(applicationTranslator); } #endif // QT_VERSION } static void parseCommandLineArguments() { bool instanceNameIsNext = false; bool searchTextIsNext = false; bool noMoreOptions = false; QRegExp fileAndPageRegExp("(.+)#(\\d+)"); QRegExp fileAndSourceRegExp("(.+)#src:(.+):(\\d+):(\\d+)"); QRegExp instanceNameRegExp("[A-Za-z_]+[A-Za-z0-9_]*"); QStringList arguments = QApplication::arguments(); if(!arguments.isEmpty()) { arguments.removeFirst(); } foreach(const QString& argument, arguments) { if(instanceNameIsNext) { if(argument.isEmpty()) { qCritical() << QObject::tr("An empty instance name is not allowed."); exit(ExitIllegalArgument); } instanceNameIsNext = false; instanceName = argument; } else if(searchTextIsNext) { if(argument.isEmpty()) { qCritical() << QObject::tr("An empty search text is not allowed."); exit(ExitIllegalArgument); } searchTextIsNext = false; searchText = argument; } else if(!noMoreOptions && argument.startsWith("--")) { if(argument == QLatin1String("--unique")) { unique = true; } else if(argument == QLatin1String("--quiet")) { quiet = true; } else if(argument == QLatin1String("--instance")) { instanceNameIsNext = true; } else if(argument == QLatin1String("--search")) { searchTextIsNext = true; } else if(argument == QLatin1String("--choose-instance")) { bool ok = false; const QString chosenInstanceName = QInputDialog::getItem(0, QObject::tr("Choose instance"), QObject::tr("Instance:"), Database::instance()->loadInstanceNames(), 0, true, &ok); if(ok) { instanceName = chosenInstanceName; } } else if(argument == QLatin1String("--help")) { std::cout << "Usage: qpdfview [options] [--] [file[#page]] [file[#src:name:line:column]] ..." << std::endl << std::endl << "Available options:" << std::endl << " --help Show this information" << std::endl << " --quiet Suppress warning messages when opening files" << std::endl << " --search text Search for text in the current tab" << std::endl << " --unique Open files as tabs in unique window" << std::endl << " --unique --instance name Open files as tabs in named instance" << std::endl << " --unique --choose-instance Open files as tabs after choosing an instance name" << std::endl << std::endl << "Please report bugs at \"https://launchpad.net/qpdfview\"." << std::endl; exit(ExitOk); } else if(argument == QLatin1String("--")) { noMoreOptions = true; } else { qCritical() << QObject::tr("Unknown command-line option '%1'.").arg(argument); exit(ExitUnknownArgument); } } else { File file; if(fileAndPageRegExp.exactMatch(argument)) { file.filePath = fileAndPageRegExp.cap(1); file.page = fileAndPageRegExp.cap(2).toInt(); } else if(fileAndSourceRegExp.exactMatch(argument)) { file.filePath = fileAndSourceRegExp.cap(1); file.sourceName = fileAndSourceRegExp.cap(2); file.sourceLine = fileAndSourceRegExp.cap(3).toInt(); file.sourceColumn = fileAndSourceRegExp.cap(4).toInt(); } else { file.filePath = argument; } files.append(file); } } if(instanceNameIsNext) { qCritical() << QObject::tr("Using '--instance' requires an instance name."); exit(ExitInconsistentArguments); } if(!unique && !instanceName.isEmpty()) { qCritical() << QObject::tr("Using '--instance' is not allowed without using '--unique'."); exit(ExitInconsistentArguments); } if(!instanceName.isEmpty() && !instanceNameRegExp.exactMatch(instanceName)) { qCritical() << QObject::tr("An instance name must only contain the characters \"[A-Z][a-z][0-9]_\" and must not begin with a digit."); exit(ExitIllegalArgument); } if(searchTextIsNext) { qCritical() << QObject::tr("Using '--search' requires a search text."); exit(ExitInconsistentArguments); } } static void parseWorkbenchExtendedSelection(int argc, char** argv) { #ifdef __amigaos4__ if(argc == 0) { const int pathLength = 1024; const QScopedArrayPointer< char > filePath(new char[pathLength]); const struct WBStartup* wbStartup = reinterpret_cast< struct WBStartup* >(argv); for(int index = 1; index < wbStartup->sm_NumArgs; ++index) { const struct WBArg* wbArg = wbStartup->sm_ArgList + index; if((wbArg->wa_Lock) && (*wbArg->wa_Name)) { IDOS->DevNameFromLock(wbArg->wa_Lock, filePath.data(), pathLength, DN_FULLPATH); IDOS->AddPart(filePath.data(), wbArg->wa_Name, pathLength); File file; file.filePath = filePath.data(); files.append(file); } } } #else Q_UNUSED(argc); Q_UNUSED(argv); #endif // __amigaos4__ } static void resolveSourceReferences() { #ifdef WITH_SYNCTEX for(int index = 0; index < files.count(); ++index) { File& file = files[index]; if(!file.sourceName.isNull()) { synctex_scanner_t scanner = synctex_scanner_new_with_output_file(file.filePath.toLocal8Bit(), 0, 1); if(scanner != 0) { if(synctex_display_query(scanner, file.sourceName.toLocal8Bit(), file.sourceLine, file.sourceColumn) > 0) { for(synctex_node_t node = synctex_next_result(scanner); node != 0; node = synctex_next_result(scanner)) { int page = synctex_node_page(node); QRectF enclosingBox(synctex_node_box_visible_h(node), synctex_node_box_visible_v(node), synctex_node_box_visible_width(node), synctex_node_box_visible_height(node)); if(file.page != page) { file.page = page; file.enclosingBox = enclosingBox; } else { file.enclosingBox = file.enclosingBox.united(enclosingBox); } } } synctex_scanner_free(scanner); } else { qWarning() << QObject::tr("SyncTeX data for '%1' could not be found.").arg(file.filePath); } } } #endif // WITH_SYNCTEX } static void activateUniqueInstance() { qApp->setObjectName(instanceName); #ifdef WITH_DBUS if(unique) { QString serviceName = QApplication::organizationDomain(); if(!instanceName.isEmpty()) { serviceName.append('.'); serviceName.append(instanceName); } QScopedPointer< QDBusInterface > interface(new QDBusInterface(serviceName, "/MainWindow", "local.qpdfview.MainWindow", QDBusConnection::sessionBus())); if(interface->isValid()) { interface->call("raiseAndActivate"); foreach(const File& file, files) { QDBusReply< bool > reply = interface->call("jumpToPageOrOpenInNewTab", QFileInfo(file.filePath).absoluteFilePath(), file.page, true, file.enclosingBox, quiet); if(!reply.isValid()) { qCritical() << QDBusConnection::sessionBus().lastError().message(); exit(ExitDBusError); } } if(!searchText.isEmpty()) { interface->call("startSearch", searchText); } exit(ExitOk); } else { mainWindow = new MainWindow(); new MainWindowAdaptor(mainWindow); if(!QDBusConnection::sessionBus().registerService(serviceName)) { qCritical() << QDBusConnection::sessionBus().lastError().message(); delete mainWindow; exit(ExitDBusError); } if(!QDBusConnection::sessionBus().registerObject("/MainWindow", mainWindow)) { qCritical() << QDBusConnection::sessionBus().lastError().message(); delete mainWindow; exit(ExitDBusError); } } } else { mainWindow = new MainWindow(); } #else mainWindow = new MainWindow(); #endif // WITH_DBUS } static void prepareSignalHandler() { #ifdef WITH_SIGNALS if(SignalHandler::prepareSignals()) { SignalHandler* signalHandler = new SignalHandler(mainWindow); QObject::connect(signalHandler, SIGNAL(sigIntReceived()), mainWindow, SLOT(close())); QObject::connect(signalHandler, SIGNAL(sigTermReceived()), mainWindow, SLOT(close())); } else { qWarning() << QObject::tr("Could not prepare signal handler."); } #endif // WITH_SIGNALS } int main(int argc, char** argv) { qRegisterMetaType< QList< QRectF > >("QList"); qRegisterMetaType< Rotation >("Rotation"); parseWorkbenchExtendedSelection(argc, argv); QApplication application(argc, argv); QApplication::setOrganizationDomain("local.qpdfview"); QApplication::setOrganizationName("qpdfview"); QApplication::setApplicationName("qpdfview"); QApplication::setApplicationVersion(APPLICATION_VERSION); QApplication::setWindowIcon(QIcon(":icons/qpdfview.svg")); loadTranslators(); parseCommandLineArguments(); resolveSourceReferences(); activateUniqueInstance(); prepareSignalHandler(); mainWindow->show(); mainWindow->setAttribute(Qt::WA_DeleteOnClose); foreach(const File& file, files) { mainWindow->openInNewTab(file.filePath, file.page, file.enclosingBox, quiet); } if(!searchText.isEmpty()) { mainWindow->startSearch(searchText); } return application.exec(); } qpdfview-0.4.7/sources/mainwindow.cpp0000644000000000000000000023312612246606025016052 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Michał Trybus Copyright 2012 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "mainwindow.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include #endif // QT_VERSION #include "settings.h" #include "shortcuthandler.h" #include "pageitem.h" #include "documentview.h" #include "miscellaneous.h" #include "printdialog.h" #include "settingsdialog.h" #include "helpdialog.h" #include "recentlyusedmenu.h" #include "bookmarkmenu.h" #include "database.h" Settings* MainWindow::s_settings = 0; Database* MainWindow::s_database = 0; MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) { if(s_settings == 0) { s_settings = Settings::instance(); } s_settings->sync(); if(s_settings->mainWindow().hasIconTheme()) { QIcon::setThemeName(s_settings->mainWindow().iconTheme()); } if(s_settings->mainWindow().hasStyleSheet()) { qApp->setStyleSheet(s_settings->mainWindow().styleSheet()); } setAcceptDrops(true); createWidgets(); createActions(); createToolBars(); createDocks(); createMenus(); restoreGeometry(s_settings->mainWindow().geometry()); restoreState(s_settings->mainWindow().state()); m_matchCaseCheckBox->setChecked(s_settings->documentView().matchCase()); if(s_database == 0) { s_database = Database::instance(); } connect(s_database, SIGNAL(tabRestored(QString,bool,LayoutMode,ScaleMode,qreal,Rotation,int)), SLOT(on_database_tabRestored(QString,bool,LayoutMode,ScaleMode,qreal,Rotation,int))); connect(s_database, SIGNAL(bookmarkRestored(QString,JumpList)), SLOT(on_database_bookmarkRestored(QString,JumpList))); s_database->restoreTabs(); s_database->restoreBookmarks(); on_tabWidget_currentChanged(m_tabWidget->currentIndex()); } QSize MainWindow::sizeHint() const { return QSize(600, 800); } QMenu* MainWindow::createPopupMenu() { QMenu* menu = new QMenu(); menu->addAction(m_fileToolBar->toggleViewAction()); menu->addAction(m_editToolBar->toggleViewAction()); menu->addAction(m_viewToolBar->toggleViewAction()); menu->addSeparator(); menu->addAction(m_outlineDock->toggleViewAction()); menu->addAction(m_propertiesDock->toggleViewAction()); menu->addAction(m_thumbnailsDock->toggleViewAction()); return menu; } bool MainWindow::open(const QString& filePath, int page, const QRectF& highlight, bool quiet) { if(m_tabWidget->currentIndex() != -1) { saveModifications(currentTab()); if(currentTab()->open(filePath)) { const QFileInfo fileInfo(filePath); s_settings->mainWindow().setOpenPath(fileInfo.absolutePath()); m_recentlyUsedMenu->addOpenAction(filePath); m_tabWidget->setTabText(m_tabWidget->currentIndex(), fileInfo.completeBaseName()); m_tabWidget->setTabToolTip(m_tabWidget->currentIndex(), fileInfo.absoluteFilePath()); s_database->restorePerFileSettings(currentTab()); currentTab()->jumpToPage(page, false); currentTab()->setFocus(); if(!highlight.isNull()) { currentTab()->temporaryHighlight(page, highlight); } return true; } else { if(!quiet) { QMessageBox::warning(this, tr("Warning"), tr("Could not open '%1'.").arg(filePath)); } } } return false; } bool MainWindow::openInNewTab(const QString& filePath, int page, const QRectF& highlight, bool quiet) { DocumentView* newTab = new DocumentView(this); if(newTab->open(filePath)) { newTab->setContinousMode(s_settings->documentView().continuousMode()); newTab->setLayoutMode(s_settings->documentView().layoutMode()); newTab->setScaleMode(s_settings->documentView().scaleMode()); newTab->setScaleFactor(s_settings->documentView().scaleFactor()); newTab->setRotation(s_settings->documentView().rotation()); newTab->setInvertColors(s_settings->documentView().invertColors()); newTab->setHighlightAll(s_settings->documentView().highlightAll()); const QFileInfo fileInfo(filePath); s_settings->mainWindow().setOpenPath(fileInfo.absolutePath()); m_recentlyUsedMenu->addOpenAction(filePath); int index; if(s_settings->mainWindow().newTabNextToCurrentTab()) { index = m_tabWidget->insertTab(m_tabWidget->currentIndex() + 1, newTab, fileInfo.completeBaseName()); } else { index = m_tabWidget->addTab(newTab, fileInfo.completeBaseName()); } m_tabWidget->setTabToolTip(index, fileInfo.absoluteFilePath()); m_tabWidget->setCurrentIndex(index); QAction* tabAction = new QAction(m_tabWidget->tabText(index), newTab); connect(tabAction, SIGNAL(triggered()), SLOT(on_tabAction_triggered())); m_tabsMenu->addAction(tabAction); on_thumbnails_dockLocationChanged(dockWidgetArea(m_thumbnailsDock)); connect(newTab, SIGNAL(documentChanged()), SLOT(on_currentTab_documentChanged())); connect(newTab, SIGNAL(filePathChanged(QString)), SLOT(on_currentTab_filePathChanged(QString))); connect(newTab, SIGNAL(numberOfPagesChanged(int)), SLOT(on_currentTab_numberOfPagesChaned(int))); connect(newTab, SIGNAL(currentPageChanged(int)), SLOT(on_currentTab_currentPageChanged(int))); connect(newTab, SIGNAL(canJumpChanged(bool,bool)), SLOT(on_currentTab_canJumpChanged(bool,bool))); connect(newTab, SIGNAL(continousModeChanged(bool)), SLOT(on_currentTab_continuousModeChanged(bool))); connect(newTab, SIGNAL(layoutModeChanged(LayoutMode)), SLOT(on_currentTab_layoutModeChanged(LayoutMode))); connect(newTab, SIGNAL(scaleModeChanged(ScaleMode)), SLOT(on_currentTab_scaleModeChanged(ScaleMode))); connect(newTab, SIGNAL(scaleFactorChanged(qreal)), SLOT(on_currentTab_scaleFactorChanged(qreal))); connect(newTab, SIGNAL(rotationChanged(Rotation)), SLOT(on_currentTab_rotationChanged(Rotation))); connect(newTab, SIGNAL(linkClicked(QString,int)), SLOT(on_currentTab_linkClicked(QString,int))); connect(newTab, SIGNAL(invertColorsChanged(bool)), SLOT(on_currentTab_invertColorsChanged(bool))); connect(newTab, SIGNAL(highlightAllChanged(bool)), SLOT(on_currentTab_highlightAllChanged(bool))); connect(newTab, SIGNAL(rubberBandModeChanged(RubberBandMode)), SLOT(on_currentTab_rubberBandModeChanged(RubberBandMode))); connect(newTab, SIGNAL(searchFinished()), SLOT(on_currentTab_searchFinished())); connect(newTab, SIGNAL(searchProgressChanged(int)), SLOT(on_currentTab_searchProgressChanged(int))); connect(newTab, SIGNAL(customContextMenuRequested(QPoint)), SLOT(on_currentTab_customContextMenuRequested(QPoint))); newTab->show(); s_database->restorePerFileSettings(newTab); newTab->jumpToPage(page, false); newTab->setFocus(); if(!highlight.isNull()) { newTab->temporaryHighlight(page, highlight); } return true; } else { delete newTab; if(!quiet) { QMessageBox::warning(this, tr("Warning"), tr("Could not open '%1'.").arg(filePath)); } } return false; } bool MainWindow::jumpToPageOrOpenInNewTab(const QString& filePath, int page, bool refreshBeforeJump, const QRectF& highlight, bool quiet) { const QFileInfo fileInfo(filePath); for(int index = 0; index < m_tabWidget->count(); ++index) { if(QFileInfo(tab(index)->filePath()).absoluteFilePath() == fileInfo.absoluteFilePath()) { m_tabWidget->setCurrentIndex(index); if(refreshBeforeJump) { if(!currentTab()->refresh()) { return false; } } currentTab()->jumpToPage(page); currentTab()->setFocus(); if(!highlight.isNull()) { currentTab()->temporaryHighlight(page, highlight); } return true; } } return openInNewTab(filePath, page, highlight, quiet); } void MainWindow::startSearch(const QString& text) { if(m_tabWidget->currentIndex() != -1) { m_searchDock->setVisible(true); m_searchLineEdit->setText(text); m_searchLineEdit->startSearch(); currentTab()->setFocus(); } } void MainWindow::on_tabWidget_currentChanged(int index) { if(index != -1) { m_openContainingFolderAction->setEnabled(true); m_refreshAction->setEnabled(true); m_saveCopyAction->setEnabled(currentTab()->canSave()); m_saveAsAction->setEnabled(currentTab()->canSave()); m_printAction->setEnabled(true); m_previousPageAction->setEnabled(true); m_nextPageAction->setEnabled(true); m_firstPageAction->setEnabled(true); m_lastPageAction->setEnabled(true); m_jumpToPageAction->setEnabled(true); m_searchAction->setEnabled(true); m_copyToClipboardModeAction->setEnabled(true); m_addAnnotationModeAction->setEnabled(true); m_continuousModeAction->setEnabled(true); m_twoPagesModeAction->setEnabled(true); m_twoPagesWithCoverPageModeAction->setEnabled(true); m_multiplePagesModeAction->setEnabled(true); m_zoomInAction->setEnabled(true); m_zoomOutAction->setEnabled(true); m_originalSizeAction->setEnabled(true); m_fitToPageWidthModeAction->setEnabled(true); m_fitToPageSizeModeAction->setEnabled(true); m_rotateLeftAction->setEnabled(true); m_rotateRightAction->setEnabled(true); m_invertColorsAction->setEnabled(true); m_fontsAction->setEnabled(true); m_presentationAction->setEnabled(true); m_previousTabAction->setEnabled(true); m_nextTabAction->setEnabled(true); m_closeTabAction->setEnabled(true); m_closeAllTabsAction->setEnabled(true); m_closeAllTabsButCurrentTabAction->setEnabled(true); m_previousBookmarkAction->setEnabled(true); m_nextBookmarkAction->setEnabled(true); m_addBookmarkAction->setEnabled(true); m_removeBookmarkAction->setEnabled(true); m_currentPageSpinBox->setEnabled(true); m_scaleFactorComboBox->setEnabled(true); m_searchLineEdit->setEnabled(true); m_matchCaseCheckBox->setEnabled(true); m_highlightAllCheckBox->setEnabled(true); if(m_searchDock->isVisible()) { m_searchLineEdit->stopTimer(); m_searchLineEdit->setProgress(currentTab()->searchProgress()); } m_outlineView->setModel(currentTab()->outlineModel()); m_propertiesView->setModel(currentTab()->propertiesModel()); m_thumbnailsView->setScene(currentTab()->thumbnailsScene()); on_currentTab_documentChanged(); on_currentTab_filePathChanged(currentTab()->filePath()); on_currentTab_numberOfPagesChaned(currentTab()->numberOfPages()); on_currentTab_currentPageChanged(currentTab()->currentPage()); on_currentTab_canJumpChanged(currentTab()->canJumpBackward(), currentTab()->canJumpForward()); on_currentTab_continuousModeChanged(currentTab()->continousMode()); on_currentTab_layoutModeChanged(currentTab()->layoutMode()); on_currentTab_scaleModeChanged(currentTab()->scaleMode()); on_currentTab_scaleFactorChanged(currentTab()->scaleFactor()); on_currentTab_rotationChanged(currentTab()->rotation()); on_currentTab_invertColorsChanged(currentTab()->invertColors()); on_currentTab_highlightAllChanged(currentTab()->highlightAll()); on_currentTab_rubberBandModeChanged(currentTab()->rubberBandMode()); m_outlineView->restoreExpansion(); } else { m_openContainingFolderAction->setEnabled(false); m_refreshAction->setEnabled(false); m_saveCopyAction->setEnabled(false); m_saveAsAction->setEnabled(false); m_printAction->setEnabled(false); m_previousPageAction->setEnabled(false); m_nextPageAction->setEnabled(false); m_firstPageAction->setEnabled(false); m_lastPageAction->setEnabled(false); m_jumpToPageAction->setEnabled(false); m_jumpBackwardAction->setEnabled(false); m_jumpForwardAction->setEnabled(false); m_searchAction->setEnabled(false); m_copyToClipboardModeAction->setEnabled(false); m_addAnnotationModeAction->setEnabled(false); m_continuousModeAction->setEnabled(false); m_twoPagesModeAction->setEnabled(false); m_twoPagesWithCoverPageModeAction->setEnabled(false); m_multiplePagesModeAction->setEnabled(false); m_zoomInAction->setEnabled(false); m_zoomOutAction->setEnabled(false); m_originalSizeAction->setEnabled(false); m_fitToPageWidthModeAction->setEnabled(false); m_fitToPageSizeModeAction->setEnabled(false); m_rotateLeftAction->setEnabled(false); m_rotateRightAction->setEnabled(false); m_invertColorsAction->setEnabled(false); m_fontsAction->setEnabled(false); m_presentationAction->setEnabled(false); m_previousTabAction->setEnabled(false); m_nextTabAction->setEnabled(false); m_closeTabAction->setEnabled(false); m_closeAllTabsAction->setEnabled(false); m_closeAllTabsButCurrentTabAction->setEnabled(false); m_previousBookmarkAction->setEnabled(false); m_nextBookmarkAction->setEnabled(false); m_addBookmarkAction->setEnabled(false); m_removeBookmarkAction->setEnabled(false); m_currentPageSpinBox->setEnabled(false); m_scaleFactorComboBox->setEnabled(false); m_searchLineEdit->setEnabled(false); m_matchCaseCheckBox->setEnabled(false); m_highlightAllCheckBox->setEnabled(false); if(m_searchDock->isVisible()) { m_searchLineEdit->stopTimer(); m_searchLineEdit->setProgress(0); } m_searchDock->setVisible(false); m_outlineView->setModel(0); m_propertiesView->setModel(0); m_thumbnailsView->setScene(0); setWindowTitleForCurrentTab(); m_currentPageSpinBox->setValue(1); m_currentPageSpinBox->setSuffix(" / 1"); m_scaleFactorComboBox->setCurrentIndex(4); m_copyToClipboardModeAction->setChecked(false); m_addAnnotationModeAction->setChecked(false); m_continuousModeAction->setChecked(false); m_twoPagesModeAction->setChecked(false); m_twoPagesWithCoverPageModeAction->setChecked(false); m_multiplePagesModeAction->setChecked(false); m_fitToPageSizeModeAction->setChecked(false); m_fitToPageWidthModeAction->setChecked(false); m_invertColorsAction->setChecked(false); } } void MainWindow::on_tabWidget_tabCloseRequested(int index) { if(saveModifications(tab(index))) { delete tab(index); } } void MainWindow::on_tabWidget_tabContextMenuRequested(const QPoint& globalPos, int index) { QMenu menu; const QAction* closeAllTabsButThisOneAction = menu.addAction(tr("Close all tabs but this one")); const QAction* closeAllTabsToTheLeftAction = menu.addAction(tr("Close all tabs to the left")); const QAction* closeAllTabsToTheRightAction = menu.addAction(tr("Close all tabs to the right")); const QAction* action = menu.exec(globalPos); const int count = m_tabWidget->count(); QList< DocumentView* > tabsToClose; if(action == closeAllTabsButThisOneAction) { for(int indexToClose = 0; indexToClose < count; ++indexToClose) { if(indexToClose != index) { tabsToClose.append(tab(indexToClose)); } } } else if(action == closeAllTabsToTheLeftAction) { for(int indexToClose = 0; indexToClose < index; ++indexToClose) { tabsToClose.append(tab(indexToClose)); } } else if(action == closeAllTabsToTheRightAction) { for(int indexToClose = count - 1; indexToClose > index; --indexToClose) { tabsToClose.append(tab(indexToClose)); } } disconnect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); foreach(DocumentView* tab, tabsToClose) { if(saveModifications(tab)) { delete tab; } } connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); on_tabWidget_currentChanged(m_tabWidget->currentIndex()); } void MainWindow::on_currentTab_documentChanged() { if(m_outlineView->header()->count() > 0) { #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) m_outlineView->header()->setSectionResizeMode(0, QHeaderView::Stretch); #else m_outlineView->header()->setResizeMode(0, QHeaderView::Stretch); #endif // QT_VERSION } if(m_outlineView->header()->count() > 1) { #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) m_outlineView->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents); #else m_outlineView->header()->setResizeMode(1, QHeaderView::ResizeToContents); #endif // QT_VERSION } m_outlineView->header()->setMinimumSectionSize(0); m_outlineView->header()->setStretchLastSection(false); m_outlineView->header()->setVisible(false); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) m_propertiesView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); m_propertiesView->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); #else m_propertiesView->horizontalHeader()->setResizeMode(QHeaderView::Stretch); m_propertiesView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); #endif // QT_VERSION m_propertiesView->horizontalHeader()->setVisible(false); m_propertiesView->verticalHeader()->setVisible(false); } void MainWindow::on_currentTab_filePathChanged(const QString& filePath) { for(int index = 0; index < m_tabWidget->count(); ++index) { if(sender() == m_tabWidget->widget(index)) { const QFileInfo fileInfo(filePath); m_tabWidget->setTabText(index, fileInfo.completeBaseName()); m_tabWidget->setTabToolTip(index, fileInfo.absoluteFilePath()); foreach(QAction* tabAction, m_tabsMenu->actions()) { if(tabAction->parent() == m_tabWidget->widget(index)) { tabAction->setText(m_tabWidget->tabText(index)); break; } } break; } } if(senderIsCurrentTab()) { setWindowTitleForCurrentTab(); } } void MainWindow::on_currentTab_numberOfPagesChaned(int numberOfPages) { if(senderIsCurrentTab()) { m_currentPageSpinBox->setRange(1, numberOfPages); m_currentPageSpinBox->setSuffix(QString(" / %1").arg(numberOfPages)); setWindowTitleForCurrentTab(); } } static QModelIndex synchronizeOutlineView(int currentPage, TreeView* outlineView, const QModelIndex& parent) { for(int row = 0; row < outlineView->model()->rowCount(parent); ++row) { const QModelIndex index = outlineView->model()->index(row, 0, parent); bool ok = false; const int page = outlineView->model()->data(index, Qt::UserRole + 1).toInt(&ok); if(ok && page == currentPage) { return index; } } for(int row = 0; row < outlineView->model()->rowCount(parent); ++row) { const QModelIndex index = outlineView->model()->index(row, 0, parent); const QModelIndex match = synchronizeOutlineView(currentPage, outlineView, index); if(match.isValid()) { return match; } } return QModelIndex(); } void MainWindow::on_currentTab_currentPageChanged(int currentPage) { if(senderIsCurrentTab()) { m_currentPageSpinBox->setValue(currentPage); if(s_settings->mainWindow().synchronizeOutlineView() && m_outlineView->model() != 0) { const QModelIndex match = synchronizeOutlineView(currentPage, m_outlineView, QModelIndex()); if(match.isValid()) { m_outlineView->collapseAll(); m_outlineView->expandAbove(match); m_outlineView->setCurrentIndex(match); } } m_thumbnailsView->ensureVisible(currentTab()->thumbnailItems().at(currentPage - 1)); setWindowTitleForCurrentTab(); } } void MainWindow::on_currentTab_canJumpChanged(bool backward, bool forward) { if(senderIsCurrentTab()) { m_jumpBackwardAction->setEnabled(backward); m_jumpForwardAction->setEnabled(forward); } } void MainWindow::on_currentTab_continuousModeChanged(bool continuousMode) { if(senderIsCurrentTab()) { m_continuousModeAction->setChecked(continuousMode); s_settings->documentView().setContinuousMode(continuousMode); } } void MainWindow::on_currentTab_layoutModeChanged(LayoutMode layoutMode) { if(senderIsCurrentTab()) { m_twoPagesModeAction->setChecked(layoutMode == TwoPagesMode); m_twoPagesWithCoverPageModeAction->setChecked(layoutMode == TwoPagesWithCoverPageMode); m_multiplePagesModeAction->setChecked(layoutMode == MultiplePagesMode); s_settings->documentView().setLayoutMode(layoutMode); } } void MainWindow::on_currentTab_scaleModeChanged(ScaleMode scaleMode) { if(senderIsCurrentTab()) { switch(scaleMode) { default: case ScaleFactorMode: m_fitToPageWidthModeAction->setChecked(false); m_fitToPageSizeModeAction->setChecked(false); on_currentTab_scaleFactorChanged(currentTab()->scaleFactor()); break; case FitToPageWidthMode: m_fitToPageWidthModeAction->setChecked(true); m_fitToPageSizeModeAction->setChecked(false); m_scaleFactorComboBox->setCurrentIndex(0); m_zoomInAction->setEnabled(true); m_zoomOutAction->setEnabled(true); break; case FitToPageSizeMode: m_fitToPageWidthModeAction->setChecked(false); m_fitToPageSizeModeAction->setChecked(true); m_scaleFactorComboBox->setCurrentIndex(1); m_zoomInAction->setEnabled(true); m_zoomOutAction->setEnabled(true); break; } s_settings->documentView().setScaleMode(scaleMode); } } void MainWindow::on_currentTab_scaleFactorChanged(qreal scaleFactor) { if(senderIsCurrentTab()) { if(currentTab()->scaleMode() == ScaleFactorMode) { m_scaleFactorComboBox->setCurrentIndex(m_scaleFactorComboBox->findData(scaleFactor)); m_scaleFactorComboBox->lineEdit()->setText(QString("%1 %").arg(qRound(scaleFactor * 100.0))); m_zoomInAction->setDisabled(qFuzzyCompare(scaleFactor, Defaults::DocumentView::maximumScaleFactor())); m_zoomOutAction->setDisabled(qFuzzyCompare(scaleFactor, Defaults::DocumentView::minimumScaleFactor())); } s_settings->documentView().setScaleFactor(scaleFactor); } } void MainWindow::on_currentTab_rotationChanged(Rotation rotation) { if(senderIsCurrentTab()) { s_settings->documentView().setRotation(rotation); } } void MainWindow::on_currentTab_linkClicked(const QString& filePath, int page) { jumpToPageOrOpenInNewTab(filePath, page, true); } void MainWindow::on_currentTab_invertColorsChanged(bool invertColors) { if(senderIsCurrentTab()) { m_invertColorsAction->setChecked(invertColors); s_settings->documentView().setInvertColors(invertColors); } } void MainWindow::on_currentTab_highlightAllChanged(bool highlightAll) { if(senderIsCurrentTab()) { m_highlightAllCheckBox->setChecked(highlightAll); s_settings->documentView().setHighlightAll(highlightAll); } } void MainWindow::on_currentTab_rubberBandModeChanged(RubberBandMode rubberBandMode) { if(senderIsCurrentTab()) { m_copyToClipboardModeAction->setChecked(rubberBandMode == CopyToClipboardMode); m_addAnnotationModeAction->setChecked(rubberBandMode == AddAnnotationMode); } } void MainWindow::on_currentTab_searchFinished() { if(senderIsCurrentTab()) { m_searchLineEdit->setProgress(0); } } void MainWindow::on_currentTab_searchProgressChanged(int progress) { if(senderIsCurrentTab()) { m_searchLineEdit->setProgress(progress); } } void MainWindow::on_currentTab_customContextMenuRequested(const QPoint& pos) { if(senderIsCurrentTab()) { QMenu menu; menu.addAction(m_openContainingFolderAction); menu.addSeparator(); menu.addActions(QList< QAction* >() << m_previousPageAction << m_nextPageAction << m_firstPageAction << m_lastPageAction << m_jumpToPageAction); menu.addSeparator(); menu.addActions(QList< QAction* >() << m_jumpBackwardAction << m_jumpForwardAction); if(m_searchDock->isVisible()) { menu.addSeparator(); menu.addActions(QList< QAction* >() << m_findPreviousAction << m_findNextAction << m_cancelSearchAction); } menu.exec(currentTab()->mapToGlobal(pos)); } } void MainWindow::on_currentPage_editingFinished() { if(m_tabWidget->currentIndex() != -1) { currentTab()->jumpToPage(m_currentPageSpinBox->value()); } } void MainWindow::on_currentPage_returnPressed() { currentTab()->setFocus(); } void MainWindow::on_scaleFactor_activated(int index) { if(index == 0) { currentTab()->setScaleMode(FitToPageWidthMode); } else if(index == 1) { currentTab()->setScaleMode(FitToPageSizeMode); } else { bool ok = false; const qreal scaleFactor = m_scaleFactorComboBox->itemData(index).toReal(&ok); if(ok) { currentTab()->setScaleFactor(scaleFactor); currentTab()->setScaleMode(ScaleFactorMode); } } currentTab()->setFocus(); } void MainWindow::on_scaleFactor_editingFinished() { if(m_tabWidget->currentIndex() != -1) { bool ok = false; qreal scaleFactor = m_scaleFactorComboBox->lineEdit()->text().toInt(&ok) / 100.0; scaleFactor = scaleFactor >= Defaults::DocumentView::minimumScaleFactor() ? scaleFactor : Defaults::DocumentView::minimumScaleFactor(); scaleFactor = scaleFactor <= Defaults::DocumentView::maximumScaleFactor() ? scaleFactor : Defaults::DocumentView::maximumScaleFactor(); if(ok) { currentTab()->setScaleFactor(scaleFactor); currentTab()->setScaleMode(ScaleFactorMode); } on_currentTab_scaleFactorChanged(currentTab()->scaleFactor()); on_currentTab_scaleModeChanged(currentTab()->scaleMode()); } } void MainWindow::on_scaleFactor_returnPressed() { currentTab()->setFocus(); } void MainWindow::on_open_triggered() { if(m_tabWidget->currentIndex() != -1) { const QString path = s_settings->mainWindow().openPath(); const QString filePath = QFileDialog::getOpenFileName(this, tr("Open"), path, DocumentView::openFilter().join(";;")); if(!filePath.isEmpty()) { open(filePath); } } else { on_openInNewTab_triggered(); } } void MainWindow::on_openInNewTab_triggered() { const QString path = s_settings->mainWindow().openPath(); const QStringList filePaths = QFileDialog::getOpenFileNames(this, tr("Open in new tab"), path, DocumentView::openFilter().join(";;")); if(!filePaths.isEmpty()) { disconnect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); foreach(const QString& filePath, filePaths) { openInNewTab(filePath); } connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); on_tabWidget_currentChanged(m_tabWidget->currentIndex()); } } void MainWindow::on_openContainingFolder_triggered() { const QString absolutePath = QFileInfo(currentTab()->filePath()).absolutePath(); QDesktopServices::openUrl(QLatin1String("file://") + absolutePath); } void MainWindow::on_refresh_triggered() { if(!currentTab()->refresh()) { QMessageBox::warning(this, tr("Warning"), tr("Could not refresh '%1'.").arg(currentTab()->filePath())); } } void MainWindow::on_saveCopy_triggered() { const QDir dir = QDir(s_settings->mainWindow().savePath()); const QString fileName = QFileInfo(currentTab()->filePath()).fileName(); const QString filePath = QFileDialog::getSaveFileName(this, tr("Save copy"), QFileInfo(dir, fileName).filePath(), currentTab()->saveFilter().join(";;")); if(!filePath.isEmpty()) { if(currentTab()->save(filePath, false)) { s_settings->mainWindow().setSavePath(QFileInfo(filePath).absolutePath()); } else { QMessageBox::warning(this, tr("Warning"), tr("Could not save copy at '%1'.").arg(filePath)); } } } void MainWindow::on_saveAs_triggered() { const QString filePath = QFileDialog::getSaveFileName(this, tr("Save as"), currentTab()->filePath(), currentTab()->saveFilter().join(";;")); if(!filePath.isEmpty()) { if(currentTab()->save(filePath, true)) { open(filePath, currentTab()->currentPage()); } else { QMessageBox::warning(this, tr("Warning"), tr("Could not save as '%1'.").arg(filePath)); } } } void MainWindow::on_print_triggered() { QPrinter* printer = PrintDialog::createPrinter(); PrintDialog* printDialog = new PrintDialog(printer, this); printer->setDocName(QFileInfo(currentTab()->filePath()).completeBaseName()); printer->setFullPage(true); printDialog->setMinMax(1, currentTab()->numberOfPages()); printDialog->setOption(QPrintDialog::PrintToFile, false); #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) printDialog->setOption(QPrintDialog::PrintCurrentPage, true); #endif // QT_VERSION if(printDialog->exec() == QDialog::Accepted) { #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) if(printDialog->printRange() == QPrintDialog::CurrentPage) { printer->setFromTo(currentTab()->currentPage(), currentTab()->currentPage()); } #endif // QT_VERSION if(!currentTab()->print(printer, printDialog->printOptions())) { QMessageBox::warning(this, tr("Warning"), tr("Could not print '%1'.").arg(currentTab()->filePath())); } } delete printDialog; delete printer; } void MainWindow::on_recentlyUsed_openTriggered(const QString& filePath) { if(!jumpToPageOrOpenInNewTab(filePath, -1, true)) { m_recentlyUsedMenu->removeOpenAction(filePath); } } void MainWindow::on_previousPage_triggered() { currentTab()->previousPage(); } void MainWindow::on_nextPage_triggered() { currentTab()->nextPage(); } void MainWindow::on_firstPage_triggered() { currentTab()->firstPage(); } void MainWindow::on_lastPage_triggered() { currentTab()->lastPage(); } void MainWindow::on_jumpToPage_triggered() { bool ok = false; const int page = QInputDialog::getInt(this, tr("Jump to page"), tr("Page:"), currentTab()->currentPage(), 1, currentTab()->numberOfPages(), 1, &ok); if(ok) { currentTab()->jumpToPage(page); } } void MainWindow::on_jumpBackward_triggered() { currentTab()->jumpBackward(); } void MainWindow::on_jumpForward_triggered() { currentTab()->jumpForward(); } void MainWindow::on_search_triggered() { m_searchDock->setVisible(true); m_searchLineEdit->selectAll(); m_searchLineEdit->setFocus(); } void MainWindow::on_findPrevious_triggered() { if(!m_searchLineEdit->text().isEmpty()) { currentTab()->findPrevious(); } } void MainWindow::on_findNext_triggered() { if(!m_searchLineEdit->text().isEmpty()) { currentTab()->findNext(); } } void MainWindow::on_cancelSearch_triggered() { m_searchLineEdit->stopTimer(); m_searchLineEdit->setProgress(0); m_searchDock->setVisible(false); for(int index = 0; index < m_tabWidget->count(); ++index) { tab(index)->cancelSearch(); } currentTab()->setFocus(); } void MainWindow::on_copyToClipboardMode_triggered(bool checked) { currentTab()->setRubberBandMode(checked ? CopyToClipboardMode : ModifiersMode); } void MainWindow::on_addAnnotationMode_triggered(bool checked) { currentTab()->setRubberBandMode(checked ? AddAnnotationMode : ModifiersMode); } void MainWindow::on_settings_triggered() { QScopedPointer< SettingsDialog > settingsDialog(new SettingsDialog(this)); settingsDialog->resize(s_settings->mainWindow().settingsDialogSize(settingsDialog->sizeHint())); if(settingsDialog->exec() == QDialog::Accepted) { s_settings->sync(); m_tabWidget->setTabPosition(static_cast< QTabWidget::TabPosition >(s_settings->mainWindow().tabPosition())); m_tabWidget->setTabBarPolicy(static_cast< TabWidget::TabBarPolicy >(s_settings->mainWindow().tabVisibility())); for(int index = 0; index < m_tabWidget->count(); ++index) { if(!tab(index)->refresh()) { QMessageBox::warning(this, tr("Warning"), tr("Could not refresh '%1'.").arg(currentTab()->filePath())); } } } s_settings->mainWindow().setSettingsDialogSize(settingsDialog->size()); } void MainWindow::on_continuousMode_triggered(bool checked) { currentTab()->setContinousMode(checked); } void MainWindow::on_twoPagesMode_triggered(bool checked) { currentTab()->setLayoutMode(checked ? TwoPagesMode : SinglePageMode); } void MainWindow::on_twoPagesWithCoverPageMode_triggered(bool checked) { currentTab()->setLayoutMode(checked ? TwoPagesWithCoverPageMode : SinglePageMode); } void MainWindow::on_multiplePagesMode_triggered(bool checked) { currentTab()->setLayoutMode(checked ? MultiplePagesMode : SinglePageMode); } void MainWindow::on_zoomIn_triggered() { currentTab()->zoomIn(); } void MainWindow::on_zoomOut_triggered() { currentTab()->zoomOut(); } void MainWindow::on_originalSize_triggered() { currentTab()->originalSize(); } void MainWindow::on_fitToPageWidthMode_triggered(bool checked) { currentTab()->setScaleMode(checked ? FitToPageWidthMode : ScaleFactorMode); } void MainWindow::on_fitToPageSizeMode_triggered(bool checked) { currentTab()->setScaleMode(checked ? FitToPageSizeMode : ScaleFactorMode); } void MainWindow::on_rotateLeft_triggered() { currentTab()->rotateLeft(); } void MainWindow::on_rotateRight_triggered() { currentTab()->rotateRight(); } void MainWindow::on_invertColors_triggered(bool checked) { currentTab()->setInvertColors(checked); } void MainWindow::on_fonts_triggered() { QStandardItemModel* fontsModel = currentTab()->fontsModel(); QDialog* dialog = new QDialog(this); QTableView* tableView = new QTableView(dialog); tableView->setModel(fontsModel); tableView->setAlternatingRowColors(true); tableView->setSortingEnabled(true); tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); tableView->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); tableView->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); #else tableView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); tableView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); #endif // QT_VERSION tableView->verticalHeader()->setVisible(false); QDialogButtonBox* dialogButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Horizontal, dialog); connect(dialogButtonBox, SIGNAL(accepted()), dialog, SLOT(accept())); connect(dialogButtonBox, SIGNAL(rejected()), dialog, SLOT(reject())); dialog->setLayout(new QVBoxLayout(dialog)); dialog->layout()->addWidget(tableView); dialog->layout()->addWidget(dialogButtonBox); dialog->resize(s_settings->mainWindow().fontsDialogSize(dialog->sizeHint())); dialog->exec(); s_settings->mainWindow().setFontsDialogSize(dialog->size()); delete dialog; delete fontsModel; } void MainWindow::on_fullscreen_triggered(bool checked) { if(checked) { m_fullscreenAction->setData(saveGeometry()); showFullScreen(); } else { restoreGeometry(m_fullscreenAction->data().toByteArray()); showNormal(); restoreGeometry(m_fullscreenAction->data().toByteArray()); } } void MainWindow::on_presentation_triggered() { currentTab()->startPresentation(); } void MainWindow::on_previousTab_triggered() { if(m_tabWidget->currentIndex() > 0) { m_tabWidget->setCurrentIndex(m_tabWidget->currentIndex() - 1); } else { m_tabWidget->setCurrentIndex(m_tabWidget->count() - 1); } } void MainWindow::on_nextTab_triggered() { if(m_tabWidget->currentIndex() < m_tabWidget->count() - 1) { m_tabWidget->setCurrentIndex(m_tabWidget->currentIndex() + 1); } else { m_tabWidget->setCurrentIndex(0); } } void MainWindow::on_closeTab_triggered() { if(saveModifications(currentTab())) { delete currentTab(); } } void MainWindow::on_closeAllTabs_triggered() { disconnect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); foreach(DocumentView* tab, tabs()) { if(saveModifications(tab)) { delete tab; } } connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); on_tabWidget_currentChanged(m_tabWidget->currentIndex()); } void MainWindow::on_closeAllTabsButCurrentTab_triggered() { disconnect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); DocumentView* oldTab = currentTab(); const int oldIndex = m_tabWidget->currentIndex(); const QString tabText = m_tabWidget->tabText(oldIndex); const QString tabToolTip = m_tabWidget->tabToolTip(oldIndex); m_tabWidget->removeTab(oldIndex); foreach(DocumentView* tab, tabs()) { if(saveModifications(tab)) { delete tab; } } const int newIndex = m_tabWidget->addTab(oldTab, tabText); m_tabWidget->setTabToolTip(newIndex, tabToolTip); m_tabWidget->setCurrentIndex(newIndex); connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); on_tabWidget_currentChanged(m_tabWidget->currentIndex()); } void MainWindow::on_tabAction_triggered() { for(int index = 0; index < m_tabWidget->count(); ++index) { if(sender()->parent() == m_tabWidget->widget(index)) { m_tabWidget->setCurrentIndex(index); break; } } } void MainWindow::on_tabShortcut_activated() { for(int index = 0; index < 9; ++index) { if(sender() == m_tabShortcuts[index]) { m_tabWidget->setCurrentIndex(index); break; } } } void MainWindow::on_previousBookmark_triggered() { const BookmarkMenu* bookmark = bookmarkForCurrentTab(); if(bookmark != 0) { QList< int > pages; foreach(const Jump jump, bookmark->jumps()) { pages.append(jump.first); } if(!pages.isEmpty()) { qSort(pages); QList< int >::const_iterator lowerBound = --qLowerBound(pages, currentTab()->currentPage()); if(lowerBound >= pages.constBegin()) { currentTab()->jumpToPage(*lowerBound); } else { currentTab()->jumpToPage(pages.last()); } } } } void MainWindow::on_nextBookmark_triggered() { const BookmarkMenu* bookmark = bookmarkForCurrentTab(); if(bookmark != 0) { QList< int > pages; foreach(const Jump jump, bookmark->jumps()) { pages.append(jump.first); } if(!pages.isEmpty()) { qSort(pages); QList< int >::const_iterator upperBound = qUpperBound(pages, currentTab()->currentPage()); if(upperBound < pages.constEnd()) { currentTab()->jumpToPage(*upperBound); } else { currentTab()->jumpToPage(pages.first()); } } } } void MainWindow::on_addBookmark_triggered() { const QString filePath = currentTab()->filePath(); const int page = currentTab()->currentPage(); bool ok = false; const QString label = QInputDialog::getText(this, tr("Add bookmark"), tr("Label"), QLineEdit::Normal, tr("Jump to page %1").arg(page), &ok); if(!ok) { return; } BookmarkMenu* bookmark = bookmarkForCurrentTab(); if(bookmark != 0) { bookmark->addJumpToPageAction(page, label); } else { bookmark = new BookmarkMenu(filePath, this); bookmark->addJumpToPageAction(page, label); connect(bookmark, SIGNAL(openTriggered(QString)), SLOT(on_bookmark_openTriggered(QString))); connect(bookmark, SIGNAL(openInNewTabTriggered(QString)), SLOT(on_bookmark_openInNewTabTriggered(QString))); connect(bookmark, SIGNAL(jumpToPageTriggered(QString,int)), SLOT(on_bookmark_jumpToPageTriggered(QString,int))); m_bookmarksMenu->addMenu(bookmark); } } void MainWindow::on_removeBookmark_triggered() { BookmarkMenu* bookmark = bookmarkForCurrentTab(); if(bookmark != 0) { bookmark->removeJumpToPageAction(currentTab()->currentPage()); } } void MainWindow::on_removeAllBookmarks_triggered() { foreach(const QAction* action, m_bookmarksMenu->actions()) { BookmarkMenu* bookmark = qobject_cast< BookmarkMenu* >(action->menu()); if(bookmark != 0) { delete bookmark; } } } void MainWindow::on_bookmark_openTriggered(const QString& filePath) { if(m_tabWidget->currentIndex() != -1) { open(filePath); } else { openInNewTab(filePath); } } void MainWindow::on_bookmark_openInNewTabTriggered(const QString& filePath) { openInNewTab(filePath); } void MainWindow::on_bookmark_jumpToPageTriggered(const QString& filePath, int page) { jumpToPageOrOpenInNewTab(filePath, page); } void MainWindow::on_contents_triggered() { QScopedPointer< HelpDialog > dialog(new HelpDialog(this)); dialog->resize(s_settings->mainWindow().contentsDialogSize(dialog->sizeHint())); dialog->exec(); s_settings->mainWindow().setContentsDialogSize(dialog->size()); } void MainWindow::on_about_triggered() { QMessageBox::about(this, tr("About qpdfview"), (tr("

qpdfview %1

qpdfview is a tabbed document viewer using Qt.

" "

This version includes:" "

    ") #ifdef WITH_PDF + tr("
  • PDF support using Poppler
  • ") #endif // WITH_PDF #ifdef WITH_PS + tr("
  • PS support using libspectre
  • ") #endif // WITH_PS #ifdef WITH_DJVU + tr("
  • DjVu support using DjVuLibre
  • ") #endif // WITH_DJVU #ifdef WITH_CUPS + tr("
  • Printing support using CUPS
  • ") #endif // WITH_CUPS + tr("
" "

See launchpad.net/qpdfview for more information.

© 2012-2013 The qpdfview developers

")).arg(QApplication::applicationVersion())); } void MainWindow::on_focusCurrentPage_activated() { m_currentPageSpinBox->setFocus(); m_currentPageSpinBox->selectAll(); } void MainWindow::on_focusScaleFactor_activated() { m_scaleFactorComboBox->setFocus(); m_scaleFactorComboBox->lineEdit()->selectAll(); } void MainWindow::on_searchInitiated(const QString& text, bool allTabs) { if(!text.isEmpty()) { if(allTabs) { for(int index = 0; index < m_tabWidget->count(); ++index) { tab(index)->startSearch(text, m_matchCaseCheckBox->isChecked()); } } else { currentTab()->startSearch(text, m_matchCaseCheckBox->isChecked()); } } } void MainWindow::on_highlightAll_clicked(bool checked) { currentTab()->setHighlightAll(checked); } void MainWindow::on_outline_clicked(const QModelIndex& index) { bool ok = false; const int page = m_outlineView->model()->data(index, Qt::UserRole + 1).toInt(&ok); const qreal left = m_outlineView->model()->data(index, Qt::UserRole + 2).toReal(); const qreal top = m_outlineView->model()->data(index, Qt::UserRole + 3).toReal(); if(ok) { currentTab()->jumpToPage(page, true, left, top); } } void MainWindow::on_thumbnails_dockLocationChanged(Qt::DockWidgetArea area) { for(int index = 0; index < m_tabWidget->count(); ++index) { tab(index)->setThumbnailsOrientation(area == Qt::TopDockWidgetArea || area == Qt::BottomDockWidgetArea ? Qt::Horizontal : Qt::Vertical); } } void MainWindow::on_thumbnails_verticalScrollBar_valueChanged(int value) { Q_UNUSED(value); if(m_thumbnailsView->scene() != 0) { const QRectF visibleRect = m_thumbnailsView->mapToScene(m_thumbnailsView->viewport()->rect()).boundingRect(); foreach(ThumbnailItem* page, currentTab()->thumbnailItems()) { if(!page->boundingRect().translated(page->pos()).intersects(visibleRect)) { page->cancelRender(); } } } } void MainWindow::on_database_tabRestored(const QString& filePath, bool continousMode, LayoutMode layoutMode, ScaleMode scaleMode, qreal scaleFactor, Rotation rotation, int currentPage) { if(openInNewTab(filePath)) { currentTab()->setContinousMode(continousMode); currentTab()->setLayoutMode(layoutMode); currentTab()->setScaleMode(scaleMode); currentTab()->setScaleFactor(scaleFactor); currentTab()->setRotation(rotation); currentTab()->jumpToPage(currentPage); } } void MainWindow::on_database_bookmarkRestored(const QString& filePath, const JumpList& jumps) { BookmarkMenu* bookmark = new BookmarkMenu(filePath, this); foreach(const Jump jump, jumps) { bookmark->addJumpToPageAction(jump.first, jump.second); } connect(bookmark, SIGNAL(openTriggered(QString)), SLOT(on_bookmark_openTriggered(QString))); connect(bookmark, SIGNAL(openInNewTabTriggered(QString)), SLOT(on_bookmark_openInNewTabTriggered(QString))); connect(bookmark, SIGNAL(jumpToPageTriggered(QString,int)), SLOT(on_bookmark_jumpToPageTriggered(QString,int))); m_bookmarksMenu->addMenu(bookmark); } void MainWindow::closeEvent(QCloseEvent* event) { saveTabs(); saveBookmarks(); s_settings->mainWindow().setRecentlyUsed(s_settings->mainWindow().trackRecentlyUsed() ? m_recentlyUsedMenu->filePaths() : QStringList()); s_settings->documentView().setMatchCase(m_matchCaseCheckBox->isChecked()); s_settings->mainWindow().setGeometry(m_fullscreenAction->isChecked() ? m_fullscreenAction->data().toByteArray() : saveGeometry()); s_settings->mainWindow().setState(saveState()); for(int index = 0; index < m_tabWidget->count(); ++index) { if(!saveModifications(tab(index))) { m_tabWidget->setCurrentIndex(index); event->setAccepted(false); return; } } m_searchDock->setVisible(false); QMainWindow::closeEvent(event); } void MainWindow::dragEnterEvent(QDragEnterEvent* event) { if(event->mimeData()->hasUrls()) { event->acceptProposedAction(); } } void MainWindow::dropEvent(QDropEvent* event) { if(event->mimeData()->hasUrls()) { event->acceptProposedAction(); disconnect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); foreach(const QUrl& url, event->mimeData()->urls()) { #if QT_VERSION >= QT_VERSION_CHECK(4,8,0) if(url.isLocalFile()) #else if(url.scheme() == "file") #endif // QT_VERSION { openInNewTab(url.toLocalFile()); } } connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); on_tabWidget_currentChanged(m_tabWidget->currentIndex()); } } DocumentView* MainWindow::currentTab() const { return qobject_cast< DocumentView* >(m_tabWidget->currentWidget()); } DocumentView* MainWindow::tab(int index) const { return qobject_cast< DocumentView* >(m_tabWidget->widget(index)); } QList< DocumentView* > MainWindow::tabs() const { QList< DocumentView* > tabs; for(int index = 0; index < m_tabWidget->count(); ++index) { tabs.append(tab(index)); } return tabs; } bool MainWindow::senderIsCurrentTab() const { return sender() == m_tabWidget->currentWidget() || qobject_cast< DocumentView* >(sender()) == 0; } void MainWindow::setWindowTitleForCurrentTab() { QString windowTitle; if(m_tabWidget->currentIndex() != -1) { windowTitle += m_tabWidget->tabText(m_tabWidget->currentIndex()); if(s_settings->mainWindow().currentPageInWindowTitle()) { windowTitle += QString(" (%1 / %2)").arg(currentTab()->currentPage()).arg(currentTab()->numberOfPages()); } windowTitle += QLatin1String(" - qpdfview"); } else { windowTitle += QLatin1String("qpdfview"); } if(s_settings->mainWindow().instanceNameInWindowTitle() && !qApp->objectName().isEmpty()) { windowTitle += QString(" (%1)").arg(qApp->objectName()); } setWindowTitle(windowTitle); } BookmarkMenu* MainWindow::bookmarkForCurrentTab() const { foreach(QAction* action, m_bookmarksMenu->actions()) { BookmarkMenu* bookmark = qobject_cast< BookmarkMenu* >(action->menu()); if(bookmark != 0) { if(QFileInfo(bookmark->filePath()).absoluteFilePath() == QFileInfo(currentTab()->filePath()).absoluteFilePath()) { return bookmark; } } } return 0; } void MainWindow::saveTabs() const { QList< const DocumentView* > tabs; for(int index = 0; index < m_tabWidget->count(); ++index) { tabs.append(tab(index)); } s_database->saveTabs(tabs); } void MainWindow::saveBookmarks() const { QList< const BookmarkMenu* > bookmarks; foreach(const QAction* action, m_bookmarksMenu->actions()) { const BookmarkMenu* bookmark = qobject_cast< BookmarkMenu* >(action->menu()); if(bookmark != 0) { bookmarks.append(bookmark); } } s_database->saveBookmarks(bookmarks); } bool MainWindow::saveModifications(DocumentView* tab) { s_database->savePerFileSettings(tab); if(tab->wasModified()) { const int button = QMessageBox::warning(this, tr("Warning"), tr("The document '%1' has been modified. Do you want to save your changes?").arg(tab->filePath()), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save); if(button == QMessageBox::Save) { const QString filePath = QFileDialog::getSaveFileName(this, tr("Save as"), tab->filePath(), tab->saveFilter().join(";;")); if(!filePath.isEmpty()) { if(tab->save(filePath, true)) { return true; } else { QMessageBox::warning(this, tr("Warning"), tr("Could not save as '%1'.").arg(filePath)); } } } else if(button == QMessageBox::Discard) { return true; } return false; } return true; } void MainWindow::createWidgets() { m_tabWidget = new TabWidget(this); m_tabWidget->setDocumentMode(true); m_tabWidget->setMovable(true); m_tabWidget->setTabsClosable(true); m_tabWidget->setElideMode(Qt::ElideRight); m_tabWidget->setTabPosition(static_cast< QTabWidget::TabPosition >(s_settings->mainWindow().tabPosition())); m_tabWidget->setTabBarPolicy(static_cast< TabWidget::TabBarPolicy >(s_settings->mainWindow().tabVisibility())); setCentralWidget(m_tabWidget); connect(m_tabWidget, SIGNAL(currentChanged(int)), SLOT(on_tabWidget_currentChanged(int))); connect(m_tabWidget, SIGNAL(tabCloseRequested(int)), SLOT(on_tabWidget_tabCloseRequested(int))); connect(m_tabWidget, SIGNAL(tabContextMenuRequested(QPoint,int)), SLOT(on_tabWidget_tabContextMenuRequested(QPoint,int))); // current page m_currentPageSpinBox = new SpinBox(this); m_currentPageSpinBox->setAlignment(Qt::AlignCenter); m_currentPageSpinBox->setButtonSymbols(QAbstractSpinBox::NoButtons); m_currentPageSpinBox->setKeyboardTracking(false); connect(m_currentPageSpinBox, SIGNAL(editingFinished()), SLOT(on_currentPage_editingFinished())); connect(m_currentPageSpinBox, SIGNAL(returnPressed()), SLOT(on_currentPage_returnPressed())); m_currentPageAction = new QWidgetAction(this); m_currentPageAction->setObjectName(QLatin1String("currentPage")); m_currentPageAction->setDefaultWidget(m_currentPageSpinBox); // scale factor m_scaleFactorComboBox = new ComboBox(this); m_scaleFactorComboBox->setEditable(true); m_scaleFactorComboBox->setInsertPolicy(QComboBox::NoInsert); m_scaleFactorComboBox->addItem(tr("Page width")); m_scaleFactorComboBox->addItem(tr("Page size")); m_scaleFactorComboBox->addItem("50 %", 0.5); m_scaleFactorComboBox->addItem("75 %", 0.75); m_scaleFactorComboBox->addItem("100 %", 1.0); m_scaleFactorComboBox->addItem("125 %", 1.25); m_scaleFactorComboBox->addItem("150 %", 1.5); m_scaleFactorComboBox->addItem("200 %", 2.0); m_scaleFactorComboBox->addItem("400 %", 4.0); connect(m_scaleFactorComboBox, SIGNAL(activated(int)), SLOT(on_scaleFactor_activated(int))); connect(m_scaleFactorComboBox->lineEdit(), SIGNAL(editingFinished()), SLOT(on_scaleFactor_editingFinished())); connect(m_scaleFactorComboBox->lineEdit(), SIGNAL(returnPressed()), SLOT(on_scaleFactor_returnPressed())); m_scaleFactorAction = new QWidgetAction(this); m_scaleFactorAction->setObjectName(QLatin1String("scaleFactor")); m_scaleFactorAction->setDefaultWidget(m_scaleFactorComboBox); // search m_searchLineEdit = new SearchLineEdit(this); m_matchCaseCheckBox = new QCheckBox(tr("Match &case"), this); m_highlightAllCheckBox = new QCheckBox(tr("Highlight &all"), this); connect(m_searchLineEdit, SIGNAL(searchInitiated(QString,bool)), SLOT(on_searchInitiated(QString,bool))); connect(m_highlightAllCheckBox, SIGNAL(clicked(bool)), SLOT(on_highlightAll_clicked(bool))); } QAction* MainWindow::createAction(const QString& text, const QString& objectName, const QIcon& icon, const QKeySequence& shortcut, const char* member, bool checkable) { QAction* action = new QAction(text, this); action->setObjectName(objectName); action->setIcon(icon); action->setShortcut(shortcut); if(!objectName.isEmpty()) { ShortcutHandler::instance()->registerAction(action); } if(checkable) { action->setCheckable(true); connect(action, SIGNAL(triggered(bool)), member); } else { action->setIconVisibleInMenu(true); connect(action, SIGNAL(triggered()), member); } return action; } QAction* MainWindow::createAction(const QString& text, const QString& objectName, const QString& iconName, const QKeySequence& shortcut, const char* member, bool checkable) { return createAction(text, objectName, QIcon::fromTheme(iconName, QIcon(QLatin1String(":icons/") + iconName + QLatin1String(".svg"))), shortcut, member, checkable); } void MainWindow::createActions() { // file m_openAction = createAction(tr("&Open..."), QLatin1String("open"), QLatin1String("document-open"), QKeySequence::Open, SLOT(on_open_triggered())); m_openInNewTabAction = createAction(tr("Open in new &tab..."), QLatin1String("openInNewTab"), QLatin1String("tab-new"), QKeySequence::AddTab, SLOT(on_openInNewTab_triggered())); m_openContainingFolderAction = createAction(tr("Open containing folder"), QString(), QIcon(), QKeySequence(), SLOT(on_openContainingFolder_triggered())); m_refreshAction = createAction(tr("&Refresh"), QLatin1String("refresh"), QLatin1String("view-refresh"), QKeySequence::Refresh, SLOT(on_refresh_triggered())); m_saveCopyAction = createAction(tr("&Save copy..."), QLatin1String("saveCopy"), QLatin1String("document-save"), QKeySequence::Save, SLOT(on_saveCopy_triggered())); m_saveAsAction = createAction(tr("Save &as..."), QLatin1String("saveAs"), QLatin1String("document-save-as"), QKeySequence::SaveAs, SLOT(on_saveAs_triggered())); m_printAction = createAction(tr("&Print..."), QLatin1String("print"), QLatin1String("document-print"), QKeySequence::Print, SLOT(on_print_triggered())); m_exitAction = createAction(tr("E&xit"), QLatin1String("exit"), QIcon::fromTheme("application-exit"), QKeySequence::Quit, SLOT(close())); // edit m_previousPageAction = createAction(tr("&Previous page"), QLatin1String("previousPage"), QLatin1String("go-previous"), QKeySequence(Qt::Key_Backspace), SLOT(on_previousPage_triggered())); m_nextPageAction = createAction(tr("&Next page"), QLatin1String("nextPage"), QLatin1String("go-next"), QKeySequence(Qt::Key_Space), SLOT(on_nextPage_triggered())); m_firstPageAction = createAction(tr("&First page"), QLatin1String("firstPage"), QLatin1String("go-first"), QKeySequence(Qt::Key_Home), SLOT(on_firstPage_triggered())); m_lastPageAction = createAction(tr("&Last page"), QLatin1String("lastPage"), QLatin1String("go-last"), QKeySequence(Qt::Key_End), SLOT(on_lastPage_triggered())); m_jumpToPageAction = createAction(tr("&Jump to page..."), QLatin1String("jumpToPage"), QLatin1String("go-jump"), QKeySequence(Qt::CTRL + Qt::Key_J), SLOT(on_jumpToPage_triggered())); m_jumpBackwardAction = createAction(tr("Jump &backward"), QLatin1String("jumpBackward"), QLatin1String("media-seek-backward"), QKeySequence(Qt::CTRL + Qt::Key_Return), SLOT(on_jumpBackward_triggered())); m_jumpForwardAction = createAction(tr("Jump for&ward"), QLatin1String("jumpForward"), QLatin1String("media-seek-forward"), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Return), SLOT(on_jumpForward_triggered())); m_searchAction = createAction(tr("&Search..."), QLatin1String("search"), QLatin1String("edit-find"), QKeySequence::Find, SLOT(on_search_triggered())); m_findPreviousAction = createAction(tr("Find previous"), QLatin1String("findPrevious"), QLatin1String("go-up"), QKeySequence::FindPrevious, SLOT(on_findPrevious_triggered())); m_findNextAction = createAction(tr("Find next"), QLatin1String("findNext"), QLatin1String("go-down"), QKeySequence::FindNext, SLOT(on_findNext_triggered())); m_cancelSearchAction = createAction(tr("Cancel search"), QLatin1String("cancelSearch"), QLatin1String("process-stop"), QKeySequence(Qt::Key_Escape), SLOT(on_cancelSearch_triggered())); m_copyToClipboardModeAction = createAction(tr("&Copy to clipboard"), QLatin1String("copyToClipboardMode"), QLatin1String("edit-copy"), QKeySequence(Qt::CTRL + Qt::Key_C), SLOT(on_copyToClipboardMode_triggered(bool)), true); m_addAnnotationModeAction = createAction(tr("&Add annotation"), QLatin1String("addAnnotationMode"), QLatin1String("mail-attachment"), QKeySequence(Qt::CTRL + Qt::Key_A), SLOT(on_addAnnotationMode_triggered(bool)), true); m_settingsAction = createAction(tr("Settings..."), QString(), QIcon(), QKeySequence(), SLOT(on_settings_triggered())); // view m_continuousModeAction = createAction(tr("&Continuous"), QLatin1String("continuousMode"), QIcon(":icons/continuous.svg"), QKeySequence(Qt::CTRL + Qt::Key_7), SLOT(on_continuousMode_triggered(bool)), true); m_twoPagesModeAction = createAction(tr("&Two pages"), QLatin1String("twoPagesMode"), QIcon(":icons/two-pages.svg"), QKeySequence(Qt::CTRL + Qt::Key_6), SLOT(on_twoPagesMode_triggered(bool)), true); m_twoPagesWithCoverPageModeAction = createAction(tr("Two pages &with cover page"), QLatin1String("twoPagesWithCoverPageMode"), QIcon(":icons/two-pages-with-cover-page.svg"), QKeySequence(Qt::CTRL + Qt::Key_5), SLOT(on_twoPagesWithCoverPageMode_triggered(bool)), true); m_multiplePagesModeAction = createAction(tr("&Multiple pages"), QLatin1String("multiplePagesMode"), QIcon(":icons/multiple-pages.svg"), QKeySequence(Qt::CTRL + Qt::Key_4), SLOT(on_multiplePagesMode_triggered(bool)), true); m_zoomInAction = createAction(tr("Zoom &in"), QLatin1String("zoomIn"), QLatin1String("zoom-in"), QKeySequence(Qt::CTRL + Qt::Key_Up), SLOT(on_zoomIn_triggered())); m_zoomOutAction = createAction(tr("Zoom &out"), QLatin1String("zoomOut"), QLatin1String("zoom-out"), QKeySequence(Qt::CTRL + Qt::Key_Down), SLOT(on_zoomOut_triggered())); m_originalSizeAction = createAction(tr("Original &size"), QLatin1String("originalSize"), QLatin1String("zoom-original"), QKeySequence(Qt::CTRL + Qt::Key_0), SLOT(on_originalSize_triggered())); m_fitToPageWidthModeAction = createAction(tr("Fit to page width"), QLatin1String("fitToPageWidthMode"), QIcon(":icons/fit-to-page-width.svg"), QKeySequence(Qt::CTRL + Qt::Key_9), SLOT(on_fitToPageWidthMode_triggered(bool)), true); m_fitToPageSizeModeAction = createAction(tr("Fit to page size"), QLatin1String("fitToPageSizeMode"), QIcon(":icons/fit-to-page-size.svg"), QKeySequence(Qt::CTRL + Qt::Key_8), SLOT(on_fitToPageSizeMode_triggered(bool)), true); m_rotateLeftAction = createAction(tr("Rotate &left"), QLatin1String("rotateLeft"), QLatin1String("object-rotate-left"), QKeySequence(Qt::CTRL + Qt::Key_Left), SLOT(on_rotateLeft_triggered())); m_rotateRightAction = createAction(tr("Rotate &right"), QLatin1String("rotateRight"), QLatin1String("object-rotate-right"), QKeySequence(Qt::CTRL + Qt::Key_Right), SLOT(on_rotateRight_triggered())); m_invertColorsAction = createAction(tr("Invert colors"), QLatin1String("invertColors"), QIcon(), QKeySequence(Qt::CTRL + Qt::Key_I), SLOT(on_invertColors_triggered(bool)), true); m_fontsAction = createAction(tr("Fonts..."), QString(), QIcon(), QKeySequence(), SLOT(on_fonts_triggered())); m_fullscreenAction = createAction(tr("&Fullscreen"), QLatin1String("fullscreen"), QLatin1String("view-fullscreen"), QKeySequence(Qt::Key_F11), SLOT(on_fullscreen_triggered(bool)), true); m_presentationAction = createAction(tr("&Presentation..."), QLatin1String("presentation"), QLatin1String("x-office-presentation"), QKeySequence(Qt::Key_F12), SLOT(on_presentation_triggered())); // tabs m_previousTabAction = createAction(tr("&Previous tab"), QLatin1String("previousTab"), QIcon(), QKeySequence::PreviousChild, SLOT(on_previousTab_triggered())); m_nextTabAction = createAction(tr("&Next tab"), QLatin1String("nextTab"), QIcon(), QKeySequence::NextChild, SLOT(on_nextTab_triggered())); m_closeTabAction = createAction(tr("&Close tab"), QLatin1String("closeTab"), QIcon::fromTheme("window-close"), QKeySequence(Qt::CTRL + Qt::Key_W), SLOT(on_closeTab_triggered())); m_closeAllTabsAction = createAction(tr("Close &all tabs"), QLatin1String("closeAllTabs"), QIcon(), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_W), SLOT(on_closeAllTabs_triggered())); m_closeAllTabsButCurrentTabAction = createAction(tr("Close all tabs &but current tab"), QLatin1String("closeAllTabsButCurrent"), QIcon(), QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_W), SLOT(on_closeAllTabsButCurrentTab_triggered())); // tab shortcuts for(int index = 0; index < 9; ++index) { m_tabShortcuts[index] = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_1 + index), this, SLOT(on_tabShortcut_activated())); } // bookmarks m_previousBookmarkAction = createAction(tr("&Previous bookmark"), QLatin1String("previousBookmarkAction"), QIcon(), QKeySequence(Qt::CTRL + Qt::Key_PageUp), SLOT(on_previousBookmark_triggered())); m_nextBookmarkAction = createAction(tr("&Next bookmark"), QLatin1String("nextBookmarkAction"), QIcon(), QKeySequence(Qt::CTRL + Qt::Key_PageDown), SLOT(on_nextBookmark_triggered())); m_addBookmarkAction = createAction(tr("&Add bookmark"), QLatin1String("addBookmark"), QIcon(), QKeySequence(Qt::CTRL + Qt::Key_B), SLOT(on_addBookmark_triggered())); m_removeBookmarkAction = createAction(tr("&Remove bookmark"), QLatin1String("removeBookmark"), QIcon(), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B), SLOT(on_removeBookmark_triggered())); m_removeAllBookmarksAction = createAction(tr("Remove all bookmarks"), QLatin1String("removeAllBookmark"), QIcon(), QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_B), SLOT(on_removeAllBookmarks_triggered())); // help m_contentsAction = createAction(tr("&Contents"), QLatin1String("contents"), QIcon::fromTheme("help-contents"), QKeySequence::HelpContents, SLOT(on_contents_triggered())); m_aboutAction = createAction(tr("&About"), QString(), QIcon::fromTheme("help-about"), QKeySequence(), SLOT(on_about_triggered())); } QToolBar* MainWindow::createToolBar(const QString& text, const QString& objectName, const QStringList& actionNames, const QList< QAction* >& actions) { QToolBar* toolBar = addToolBar(text); toolBar->setObjectName(objectName); foreach(const QString& actionName, actionNames) { if(actionName == QLatin1String("separator")) { toolBar->addSeparator(); continue; } foreach(QAction* action, actions) { if(actionName == action->objectName()) { toolBar->addAction(action); break; } } } return toolBar; } void MainWindow::createToolBars() { m_fileToolBar = createToolBar(tr("&File"), QLatin1String("fileToolBar"), s_settings->mainWindow().fileToolBar(), QList< QAction* >() << m_openAction << m_openInNewTabAction << m_refreshAction << m_saveCopyAction << m_saveAsAction << m_printAction); m_editToolBar = createToolBar(tr("&Edit"), QLatin1String("editToolBar"), s_settings->mainWindow().editToolBar(), QList< QAction* >() << m_currentPageAction << m_previousPageAction << m_nextPageAction << m_firstPageAction << m_lastPageAction << m_jumpToPageAction << m_searchAction << m_jumpBackwardAction << m_jumpForwardAction << m_copyToClipboardModeAction << m_addAnnotationModeAction); m_viewToolBar = createToolBar(tr("&View"), QLatin1String("viewToolBar"), s_settings->mainWindow().viewToolBar(), QList< QAction* >() << m_scaleFactorAction << m_continuousModeAction << m_twoPagesModeAction << m_twoPagesWithCoverPageModeAction << m_multiplePagesModeAction << m_zoomInAction << m_zoomOutAction << m_originalSizeAction << m_fitToPageWidthModeAction << m_fitToPageSizeModeAction << m_rotateLeftAction << m_rotateRightAction << m_fullscreenAction << m_presentationAction); m_focusCurrentPageShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_K), this, SLOT(on_focusCurrentPage_activated())); m_focusScaleFactorShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_L), this, SLOT(on_focusScaleFactor_activated())); } QDockWidget* MainWindow::createDock(const QString& text, const QString& objectName, const QKeySequence& toggleViewShortcut) { QDockWidget* dock = new QDockWidget(text, this); dock->setObjectName(objectName); dock->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); addDockWidget(Qt::LeftDockWidgetArea, dock); dock->toggleViewAction()->setObjectName(objectName + QLatin1String("ToggleView")); dock->toggleViewAction()->setShortcut(toggleViewShortcut); ShortcutHandler::instance()->registerAction(dock->toggleViewAction()); dock->hide(); return dock; } void MainWindow::createDocks() { // outline m_outlineDock = createDock(tr("&Outline"), QLatin1String("outlineDock"), QKeySequence(Qt::Key_F6)); m_outlineView = new TreeView(Qt::UserRole, this); m_outlineView->setAlternatingRowColors(true); m_outlineView->setEditTriggers(QAbstractItemView::NoEditTriggers); m_outlineView->setSelectionBehavior(QAbstractItemView::SelectRows); connect(m_outlineView, SIGNAL(clicked(QModelIndex)), SLOT(on_outline_clicked(QModelIndex))); m_outlineDock->setWidget(m_outlineView); // properties m_propertiesDock = createDock(tr("&Properties"), QLatin1String("propertiesDock"), QKeySequence(Qt::Key_F7)); m_propertiesView = new QTableView(this); m_propertiesView->setAlternatingRowColors(true); m_propertiesView->setEditTriggers(QAbstractItemView::NoEditTriggers); m_propertiesDock->setWidget(m_propertiesView); // thumbnails m_thumbnailsDock = createDock(tr("&Thumbnails"), QLatin1String("thumbnailsDock"), QKeySequence(Qt::Key_F8)); connect(m_thumbnailsDock, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), SLOT(on_thumbnails_dockLocationChanged(Qt::DockWidgetArea))); m_thumbnailsView = new QGraphicsView(this); connect(m_thumbnailsView->verticalScrollBar(), SIGNAL(valueChanged(int)), SLOT(on_thumbnails_verticalScrollBar_valueChanged(int))); m_thumbnailsDock->setWidget(m_thumbnailsView); // search m_searchDock = new QDockWidget(tr("&Search"), this); m_searchDock->setObjectName(QLatin1String("searchDock")); m_searchDock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetVerticalTitleBar); addDockWidget(Qt::BottomDockWidgetArea, m_searchDock); m_searchWidget = new QWidget(this); QToolButton* findPreviousButton = new QToolButton(m_searchWidget); findPreviousButton->setAutoRaise(true); findPreviousButton->setDefaultAction(m_findPreviousAction); QToolButton* findNextButton = new QToolButton(m_searchWidget); findNextButton->setAutoRaise(true); findNextButton->setDefaultAction(m_findNextAction); QToolButton* cancelSearchButton = new QToolButton(m_searchWidget); cancelSearchButton->setAutoRaise(true); cancelSearchButton->setDefaultAction(m_cancelSearchAction); QGridLayout* searchLayout = new QGridLayout(m_searchWidget); searchLayout->setRowStretch(2, 1); searchLayout->setColumnStretch(2, 1); searchLayout->addWidget(m_searchLineEdit, 0, 0, 1, 6); searchLayout->addWidget(m_matchCaseCheckBox, 1, 0); searchLayout->addWidget(m_highlightAllCheckBox, 1, 1); searchLayout->addWidget(findPreviousButton, 1, 3); searchLayout->addWidget(findNextButton, 1, 4); searchLayout->addWidget(cancelSearchButton, 1, 5); m_searchDock->setWidget(m_searchWidget); connect(m_searchDock, SIGNAL(visibilityChanged(bool)), m_findPreviousAction, SLOT(setEnabled(bool))); connect(m_searchDock, SIGNAL(visibilityChanged(bool)), m_findNextAction, SLOT(setEnabled(bool))); connect(m_searchDock, SIGNAL(visibilityChanged(bool)), m_cancelSearchAction, SLOT(setEnabled(bool))); m_searchDock->setVisible(false); m_findPreviousAction->setEnabled(false); m_findNextAction->setEnabled(false); m_cancelSearchAction->setEnabled(false); } void MainWindow::createMenus() { // file m_fileMenu = menuBar()->addMenu(tr("&File")); m_fileMenu->addActions(QList< QAction* >() << m_openAction << m_openInNewTabAction); m_recentlyUsedMenu = new RecentlyUsedMenu(s_settings->mainWindow().recentlyUsedCount(), this); if(s_settings->mainWindow().trackRecentlyUsed()) { foreach(const QString& filePath, s_settings->mainWindow().recentlyUsed()) { m_recentlyUsedMenu->addOpenAction(filePath); } connect(m_recentlyUsedMenu, SIGNAL(openTriggered(QString)), SLOT(on_recentlyUsed_openTriggered(QString))); m_fileMenu->addMenu(m_recentlyUsedMenu); QToolButton* openToolButton = qobject_cast< QToolButton* >(m_fileToolBar->widgetForAction(m_openAction)); if(openToolButton != 0) { openToolButton->setMenu(m_recentlyUsedMenu); } QToolButton* openInNewTabToolButton = qobject_cast< QToolButton* >(m_fileToolBar->widgetForAction(m_openInNewTabAction)); if(openInNewTabToolButton != 0) { openInNewTabToolButton->setMenu(m_recentlyUsedMenu); } } m_fileMenu->addActions(QList< QAction* >() << m_refreshAction << m_saveCopyAction << m_saveAsAction << m_printAction); m_fileMenu->addSeparator(); m_fileMenu->addAction(m_exitAction); // edit m_editMenu = menuBar()->addMenu(tr("&Edit")); m_editMenu->addActions(QList< QAction* >() << m_previousPageAction << m_nextPageAction << m_firstPageAction << m_lastPageAction << m_jumpToPageAction); m_editMenu->addSeparator(); m_editMenu->addActions(QList< QAction* >() << m_jumpBackwardAction << m_jumpForwardAction); m_editMenu->addSeparator(); m_editMenu->addActions(QList< QAction* >() << m_searchAction << m_findPreviousAction << m_findNextAction << m_cancelSearchAction); m_editMenu->addSeparator(); m_editMenu->addActions(QList< QAction* >() << m_copyToClipboardModeAction << m_addAnnotationModeAction); m_editMenu->addSeparator(); m_editMenu->addAction(m_settingsAction); // view m_viewMenu = menuBar()->addMenu(tr("&View")); m_viewMenu->addActions(QList< QAction* >() << m_continuousModeAction << m_twoPagesModeAction << m_twoPagesWithCoverPageModeAction << m_multiplePagesModeAction); m_viewMenu->addSeparator(); m_viewMenu->addActions(QList< QAction* >() << m_zoomInAction << m_zoomOutAction << m_originalSizeAction << m_fitToPageWidthModeAction << m_fitToPageSizeModeAction); m_viewMenu->addSeparator(); m_viewMenu->addActions(QList< QAction* >() << m_rotateLeftAction << m_rotateRightAction); m_viewMenu->addSeparator(); m_viewMenu->addAction(m_invertColorsAction); m_viewMenu->addSeparator(); QMenu* toolBarsMenu = m_viewMenu->addMenu(tr("&Tool bars")); toolBarsMenu->addActions(QList< QAction* >() << m_fileToolBar->toggleViewAction() << m_editToolBar->toggleViewAction() << m_viewToolBar->toggleViewAction()); QMenu* docksMenu = m_viewMenu->addMenu(tr("&Docks")); docksMenu->addActions(QList< QAction* >() << m_outlineDock->toggleViewAction() << m_propertiesDock->toggleViewAction() << m_thumbnailsDock->toggleViewAction()); m_viewMenu->addAction(m_fontsAction); m_viewMenu->addSeparator(); m_viewMenu->addActions(QList< QAction* >() << m_fullscreenAction << m_presentationAction); // tabs m_tabsMenu = menuBar()->addMenu(tr("&Tabs")); m_tabsMenu->addActions(QList< QAction* >() << m_previousTabAction << m_nextTabAction); m_tabsMenu->addSeparator(); m_tabsMenu->addActions(QList< QAction* >() << m_closeTabAction << m_closeAllTabsAction << m_closeAllTabsButCurrentTabAction); m_tabsMenu->addSeparator(); // bookmarks m_bookmarksMenu = menuBar()->addMenu(tr("&Bookmarks")); m_bookmarksMenu->addActions(QList< QAction* >() << m_previousBookmarkAction << m_nextBookmarkAction); m_bookmarksMenu->addSeparator(); m_bookmarksMenu->addActions(QList< QAction* >() << m_addBookmarkAction << m_removeBookmarkAction << m_removeAllBookmarksAction); m_bookmarksMenu->addSeparator(); // help m_helpMenu = menuBar()->addMenu(tr("&Help")); m_helpMenu->addActions(QList< QAction* >() << m_contentsAction << m_aboutAction); } #ifdef WITH_DBUS MainWindowAdaptor::MainWindowAdaptor(MainWindow* mainWindow) : QDBusAbstractAdaptor(mainWindow) { } bool MainWindowAdaptor::open(const QString& filePath, int page, const QRectF& highlight, bool quiet) { return mainWindow()->open(filePath, page, highlight, quiet); } bool MainWindowAdaptor::openInNewTab(const QString& filePath, int page, const QRectF& highlight, bool quiet) { return mainWindow()->openInNewTab(filePath, page, highlight, quiet); } bool MainWindowAdaptor::jumpToPageOrOpenInNewTab(const QString& filePath, int page, bool refreshBeforeJump, const QRectF& highlight, bool quiet) { return mainWindow()->jumpToPageOrOpenInNewTab(filePath, page, refreshBeforeJump, highlight, quiet); } void MainWindowAdaptor::startSearch(const QString& text) { mainWindow()->startSearch(text); } void MainWindowAdaptor::raiseAndActivate() { mainWindow()->raise(); mainWindow()->activateWindow(); } MainWindow* MainWindowAdaptor::mainWindow() const { return qobject_cast< MainWindow* >(parent()); } # endif // WITH_DBUS qpdfview-0.4.7/sources/mainwindow.h0000644000000000000000000002546412246606025015523 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Michał Trybus Copyright 2012 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include #ifdef WITH_DBUS #include #endif // WITH_DBUS class QCheckBox; class QGraphicsView; class QModelIndex; class QShortcut; class QTableView; class QWidgetAction; #include "global.h" class Settings; class DocumentView; class TabWidget; class TreeView; class ComboBox; class SpinBox; class SearchLineEdit; class RecentlyUsedMenu; class BookmarkMenu; class Database; class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget* parent = 0); QSize sizeHint() const; QMenu* createPopupMenu(); public slots: bool open(const QString& filePath, int page = -1, const QRectF& highlight = QRectF(), bool quiet = false); bool openInNewTab(const QString& filePath, int page = -1, const QRectF& highlight = QRectF(), bool quiet = false); bool jumpToPageOrOpenInNewTab(const QString& filePath, int page = -1, bool refreshBeforeJump = false, const QRectF& highlight = QRectF(), bool quiet = false); void startSearch(const QString& text); protected slots: void on_tabWidget_currentChanged(int index); void on_tabWidget_tabCloseRequested(int index); void on_tabWidget_tabContextMenuRequested(const QPoint& globalPos, int index); void on_currentTab_documentChanged(); void on_currentTab_filePathChanged(const QString& filePath); void on_currentTab_numberOfPagesChaned(int numberOfPages); void on_currentTab_currentPageChanged(int currentPage); void on_currentTab_canJumpChanged(bool backward, bool forward); void on_currentTab_continuousModeChanged(bool continuousMode); void on_currentTab_layoutModeChanged(LayoutMode layoutMode); void on_currentTab_scaleModeChanged(ScaleMode scaleMode); void on_currentTab_scaleFactorChanged(qreal scaleFactor); void on_currentTab_rotationChanged(Rotation rotation); void on_currentTab_linkClicked(const QString& filePath, int page); void on_currentTab_invertColorsChanged(bool invertColors); void on_currentTab_highlightAllChanged(bool highlightAll); void on_currentTab_rubberBandModeChanged(RubberBandMode rubberBandMode); void on_currentTab_searchFinished(); void on_currentTab_searchProgressChanged(int progress); void on_currentTab_customContextMenuRequested(const QPoint& pos); void on_currentPage_editingFinished(); void on_currentPage_returnPressed(); void on_scaleFactor_activated(int index); void on_scaleFactor_editingFinished(); void on_scaleFactor_returnPressed(); void on_open_triggered(); void on_openInNewTab_triggered(); void on_openContainingFolder_triggered(); void on_refresh_triggered(); void on_saveCopy_triggered(); void on_saveAs_triggered(); void on_print_triggered(); void on_recentlyUsed_openTriggered(const QString& filePath); void on_previousPage_triggered(); void on_nextPage_triggered(); void on_firstPage_triggered(); void on_lastPage_triggered(); void on_jumpToPage_triggered(); void on_jumpBackward_triggered(); void on_jumpForward_triggered(); void on_search_triggered(); void on_findPrevious_triggered(); void on_findNext_triggered(); void on_cancelSearch_triggered(); void on_copyToClipboardMode_triggered(bool checked); void on_addAnnotationMode_triggered(bool checked); void on_settings_triggered(); void on_continuousMode_triggered(bool checked); void on_twoPagesMode_triggered(bool checked); void on_twoPagesWithCoverPageMode_triggered(bool checked); void on_multiplePagesMode_triggered(bool checked); void on_zoomIn_triggered(); void on_zoomOut_triggered(); void on_originalSize_triggered(); void on_fitToPageWidthMode_triggered(bool checked); void on_fitToPageSizeMode_triggered(bool checked); void on_rotateLeft_triggered(); void on_rotateRight_triggered(); void on_invertColors_triggered(bool checked); void on_fonts_triggered(); void on_fullscreen_triggered(bool checked); void on_presentation_triggered(); void on_previousTab_triggered(); void on_nextTab_triggered(); void on_closeTab_triggered(); void on_closeAllTabs_triggered(); void on_closeAllTabsButCurrentTab_triggered(); void on_tabAction_triggered(); void on_tabShortcut_activated(); void on_previousBookmark_triggered(); void on_nextBookmark_triggered(); void on_addBookmark_triggered(); void on_removeBookmark_triggered(); void on_removeAllBookmarks_triggered(); void on_bookmark_openTriggered(const QString& filePath); void on_bookmark_openInNewTabTriggered(const QString& filePath); void on_bookmark_jumpToPageTriggered(const QString& filePath, int page); void on_contents_triggered(); void on_about_triggered(); void on_focusCurrentPage_activated(); void on_focusScaleFactor_activated(); void on_searchInitiated(const QString& text, bool allTabs); void on_highlightAll_clicked(bool checked); void on_outline_clicked(const QModelIndex& index); void on_thumbnails_dockLocationChanged(Qt::DockWidgetArea area); void on_thumbnails_verticalScrollBar_valueChanged(int value); void on_database_tabRestored(const QString& filePath, bool continousMode, LayoutMode layoutMode, ScaleMode scaleMode, qreal scaleFactor, Rotation rotation, int currentPage); void on_database_bookmarkRestored(const QString& filePath, const JumpList& pages); protected: void closeEvent(QCloseEvent* event); void dragEnterEvent(QDragEnterEvent* event); void dropEvent(QDropEvent* event); private: Q_DISABLE_COPY(MainWindow) static Settings* s_settings; static Database* s_database; TabWidget* m_tabWidget; DocumentView* currentTab() const; DocumentView* tab(int index) const; QList< DocumentView* > tabs() const; bool senderIsCurrentTab() const; void setWindowTitleForCurrentTab(); BookmarkMenu* bookmarkForCurrentTab() const; void saveTabs() const; void saveBookmarks() const; bool saveModifications(DocumentView* tab); SpinBox* m_currentPageSpinBox; QWidgetAction* m_currentPageAction; ComboBox* m_scaleFactorComboBox; QWidgetAction* m_scaleFactorAction; SearchLineEdit* m_searchLineEdit; QCheckBox* m_matchCaseCheckBox; QCheckBox* m_highlightAllCheckBox; void createWidgets(); QAction* m_openAction; QAction* m_openInNewTabAction; QAction* m_openContainingFolderAction; QAction* m_refreshAction; QAction* m_saveCopyAction; QAction* m_saveAsAction; QAction* m_printAction; QAction* m_exitAction; QAction* m_previousPageAction; QAction* m_nextPageAction; QAction* m_firstPageAction; QAction* m_lastPageAction; QAction* m_jumpToPageAction; QAction* m_jumpBackwardAction; QAction* m_jumpForwardAction; QAction* m_searchAction; QAction* m_findPreviousAction; QAction* m_findNextAction; QAction* m_cancelSearchAction; QAction* m_copyToClipboardModeAction; QAction* m_addAnnotationModeAction; QAction* m_settingsAction; QAction* m_continuousModeAction; QAction* m_twoPagesModeAction; QAction* m_twoPagesWithCoverPageModeAction; QAction* m_multiplePagesModeAction; QAction* m_zoomInAction; QAction* m_zoomOutAction; QAction* m_originalSizeAction; QAction* m_fitToPageWidthModeAction; QAction* m_fitToPageSizeModeAction; QAction* m_rotateLeftAction; QAction* m_rotateRightAction; QAction* m_invertColorsAction; QAction* m_fontsAction; QAction* m_fullscreenAction; QAction* m_presentationAction; QAction* m_previousTabAction; QAction* m_nextTabAction; QAction* m_closeTabAction; QAction* m_closeAllTabsAction; QAction* m_closeAllTabsButCurrentTabAction; QShortcut* m_tabShortcuts[9]; QAction* m_previousBookmarkAction; QAction* m_nextBookmarkAction; QAction* m_addBookmarkAction; QAction* m_removeBookmarkAction; QAction* m_removeAllBookmarksAction; QAction* m_contentsAction; QAction* m_aboutAction; QAction* createAction(const QString& text, const QString& objectName, const QIcon& icon, const QKeySequence& shortcut, const char* member, bool checkable = false); QAction* createAction(const QString& text, const QString& objectName, const QString& iconName, const QKeySequence& shortcut, const char* member, bool checkable = false); void createActions(); QToolBar* m_fileToolBar; QToolBar* m_editToolBar; QToolBar* m_viewToolBar; QShortcut* m_focusCurrentPageShortcut; QShortcut* m_focusScaleFactorShortcut; QToolBar* createToolBar(const QString& text, const QString& objectName, const QStringList& actionNames, const QList< QAction* >& actions); void createToolBars(); QDockWidget* m_outlineDock; TreeView* m_outlineView; QDockWidget* m_propertiesDock; QTableView* m_propertiesView; QDockWidget* m_thumbnailsDock; QGraphicsView* m_thumbnailsView; QDockWidget* m_searchDock; QWidget* m_searchWidget; QDockWidget* createDock(const QString& text, const QString& objectName, const QKeySequence& toggleViewShortcut); void createDocks(); QMenu* m_fileMenu; RecentlyUsedMenu* m_recentlyUsedMenu; QMenu* m_editMenu; QMenu* m_viewMenu; QMenu* m_tabsMenu; QMenu* m_bookmarksMenu; QMenu* m_helpMenu; void createMenus(); }; #ifdef WITH_DBUS class MainWindowAdaptor : public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "local.qpdfview.MainWindow") public: explicit MainWindowAdaptor(MainWindow* mainWindow); public slots: bool open(const QString& filePath, int page = -1, const QRectF& highlight = QRectF(), bool quiet = false); bool openInNewTab(const QString& filePath, int page = -1, const QRectF& highlight = QRectF(), bool quiet = false); bool jumpToPageOrOpenInNewTab(const QString& filePath, int page = -1, bool refreshBeforeJump = false, const QRectF& highlight = QRectF(), bool quiet = false); Q_NOREPLY void startSearch(const QString& text); Q_NOREPLY void raiseAndActivate(); private: MainWindow* mainWindow() const; }; #endif // WITH_DBUS #endif // MAINWINDOW_H qpdfview-0.4.7/sources/miscellaneous.cpp0000644000000000000000000001610712246606025016537 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "miscellaneous.h" #include #include #include GraphicsCompositionModeEffect::GraphicsCompositionModeEffect(QPainter::CompositionMode compositionMode, QObject* parent) : QGraphicsEffect(parent), m_compositionMode(compositionMode) { } void GraphicsCompositionModeEffect::draw(QPainter* painter) { painter->save(); painter->setCompositionMode(m_compositionMode); drawSource(painter); painter->restore(); } TabBar::TabBar(QWidget* parent) : QTabBar(parent) { setContextMenuPolicy(Qt::CustomContextMenu); } void TabBar::mousePressEvent(QMouseEvent* event) { QTabBar::mousePressEvent(event); if(event->button() == Qt::MidButton) { emit tabCloseRequested(tabAt(event->pos())); } } TabWidget::TabWidget(QWidget* parent) : QTabWidget(parent), m_tabBarPolicy(TabBarAsNeeded) { setTabBar(new TabBar(this)); connect(tabBar(), SIGNAL(customContextMenuRequested(QPoint)), SLOT(on_tabBar_customContextMenuRequested(QPoint))); } TabWidget::TabBarPolicy TabWidget::tabBarPolicy() const { return m_tabBarPolicy; } void TabWidget::setTabBarPolicy(TabWidget::TabBarPolicy tabBarPolicy) { m_tabBarPolicy = tabBarPolicy; switch(m_tabBarPolicy) { case TabBarAsNeeded: tabBar()->setVisible(count() > 1); break; case TabBarAlwaysOn: tabBar()->setVisible(true); break; case TabBarAlwaysOff: tabBar()->setVisible(false); break; } } void TabWidget::on_tabBar_customContextMenuRequested(const QPoint &pos) { emit tabContextMenuRequested(tabBar()->mapToGlobal(pos), tabBar()->tabAt(pos)); } void TabWidget::tabInserted(int index) { QTabWidget::tabInserted(index); if(m_tabBarPolicy == TabBarAsNeeded) { tabBar()->setVisible(count() > 1); } } void TabWidget::tabRemoved(int index) { QTabWidget::tabRemoved(index); if(m_tabBarPolicy == TabBarAsNeeded) { tabBar()->setVisible(count() > 1); } } TreeView::TreeView(int expansionRole, QWidget* parent) : QTreeView(parent), m_expansionRole(expansionRole) { connect(this, SIGNAL(expanded(QModelIndex)), SLOT(on_expanded(QModelIndex))); connect(this, SIGNAL(collapsed(QModelIndex)), SLOT(on_collapsed(QModelIndex))); } void TreeView::expandAbove(const QModelIndex& child) { for(QModelIndex index = child.parent(); index.isValid(); index = index.parent()) { expand(index); } } void TreeView::expandAll(const QModelIndex& index) { if(index.isValid()) { expand(index); for(int row = 0; row < model()->rowCount(index); ++row) { expandAll(index.child(row, 0)); } } else { QTreeView::expandAll(); } } void TreeView::collapseAll(const QModelIndex& index) { if(index.isValid()) { collapse(index); for(int row = 0; row < model()->rowCount(index); ++row) { collapseAll(index.child(row, 0)); } } else { QTreeView::collapseAll(); } } void TreeView::restoreExpansion(const QModelIndex& index) { if(index.isValid()) { if(model()->data(index, m_expansionRole).toBool()) { expand(index); } else { collapse(index); } } for(int row = 0; row < model()->rowCount(index); ++row) { restoreExpansion(model()->index(row, 0, index)); } } void TreeView::contextMenuEvent(QContextMenuEvent* event) { QTreeView::contextMenuEvent(event); if(!event->isAccepted()) { QMenu menu; const QAction* expandAllAction = menu.addAction(tr("&Expand all")); const QAction* collapseAllAction = menu.addAction(tr("&Collapse all")); const QAction* action = menu.exec(event->globalPos()); if(action == expandAllAction) { expandAll(indexAt(event->pos())); } else if(action == collapseAllAction) { collapseAll(indexAt(event->pos())); } } } void TreeView::on_expanded(const QModelIndex& index) { model()->setData(index, true, m_expansionRole); } void TreeView::on_collapsed(const QModelIndex& index) { model()->setData(index, false, m_expansionRole); } LineEdit::LineEdit(QWidget* parent) : QLineEdit(parent) { } void LineEdit::mousePressEvent(QMouseEvent* event) { QLineEdit::mousePressEvent(event); selectAll(); } ComboBox::ComboBox(QWidget* parent) : QComboBox(parent) { setLineEdit(new LineEdit(this)); } SpinBox::SpinBox(QWidget* parent) : QSpinBox(parent) { setLineEdit(new LineEdit(this)); } void SpinBox::keyPressEvent(QKeyEvent* event) { QSpinBox::keyPressEvent(event); if(event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) { emit returnPressed(); } } ProgressLineEdit::ProgressLineEdit(QWidget* parent) : QLineEdit(parent), m_progress(0) { } int ProgressLineEdit::progress() const { return m_progress; } void ProgressLineEdit::setProgress(int progress) { if(m_progress != progress && progress >= 0 && progress <= 100) { m_progress = progress; update(); } } void ProgressLineEdit::paintEvent(QPaintEvent* event) { QLineEdit::paintEvent(event); QPainter painter(this); painter.setCompositionMode(QPainter::CompositionMode_Multiply); painter.fillRect(0, 0, m_progress * width() / 100, height(), palette().highlight()); } void ProgressLineEdit::keyPressEvent(QKeyEvent* event) { QLineEdit::keyPressEvent(event); if(event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) { emit returnPressed(event->modifiers()); } } // search line edit SearchLineEdit::SearchLineEdit(QWidget* parent) : ProgressLineEdit(parent) { m_timer = new QTimer(this); m_timer->setInterval(2000); m_timer->setSingleShot(true); connect(this, SIGNAL(textEdited(QString)), m_timer, SLOT(start())); connect(this, SIGNAL(returnPressed(Qt::KeyboardModifiers)), SLOT(on_returnPressed(Qt::KeyboardModifiers))); connect(m_timer, SIGNAL(timeout()), SLOT(on_timeout())); } void SearchLineEdit::startSearch() { QTimer::singleShot(0, this, SLOT(on_timeout())); } void SearchLineEdit::stopTimer() { m_timer->stop(); } void SearchLineEdit::on_timeout() { emit searchInitiated(text()); } void SearchLineEdit::on_returnPressed(const Qt::KeyboardModifiers& modifiers) { stopTimer(); emit searchInitiated(text(), modifiers == Qt::ShiftModifier); } qpdfview-0.4.7/sources/miscellaneous.h0000644000000000000000000001021412246606025016175 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef MISCELLANEOUS_H #define MISCELLANEOUS_H #include #include #include #include #include #include // graphics composition mode effect class GraphicsCompositionModeEffect : public QGraphicsEffect { Q_OBJECT public: GraphicsCompositionModeEffect(QPainter::CompositionMode compositionMode, QObject* parent = 0); protected: void draw(QPainter* painter); private: QPainter::CompositionMode m_compositionMode; }; // tab bar class TabBar : public QTabBar { Q_OBJECT public: explicit TabBar(QWidget* parent = 0); protected: void mousePressEvent(QMouseEvent* event); private: Q_DISABLE_COPY(TabBar) }; // tab widget class TabWidget : public QTabWidget { Q_OBJECT public: explicit TabWidget(QWidget* parent = 0); enum TabBarPolicy { TabBarAsNeeded = 0, TabBarAlwaysOn = 1, TabBarAlwaysOff = 2 }; TabBarPolicy tabBarPolicy() const; void setTabBarPolicy(TabBarPolicy tabBarPolicy); signals: void tabContextMenuRequested(const QPoint& globalPos, int index); protected slots: void on_tabBar_customContextMenuRequested(const QPoint& pos); protected: void tabInserted(int index); void tabRemoved(int index); private: Q_DISABLE_COPY(TabWidget) TabBarPolicy m_tabBarPolicy; }; // tree view class TreeView : public QTreeView { Q_OBJECT public: explicit TreeView(int expansionRole, QWidget* parent = 0); public slots: void expandAbove(const QModelIndex& child); void expandAll(const QModelIndex& index = QModelIndex()); void collapseAll(const QModelIndex& index = QModelIndex()); void restoreExpansion(const QModelIndex& index = QModelIndex()); protected: void contextMenuEvent(QContextMenuEvent* event); protected slots: void on_expanded(const QModelIndex& index); void on_collapsed(const QModelIndex& index); private: Q_DISABLE_COPY(TreeView) int m_expansionRole; }; // line edit class LineEdit : public QLineEdit { Q_OBJECT public: explicit LineEdit(QWidget* parent = 0); protected: void mousePressEvent(QMouseEvent* event); private: Q_DISABLE_COPY(LineEdit) }; // combo box class ComboBox : public QComboBox { Q_OBJECT public: explicit ComboBox(QWidget* parent = 0); private: Q_DISABLE_COPY(ComboBox) }; // spin box class SpinBox : public QSpinBox { Q_OBJECT public: explicit SpinBox(QWidget* parent = 0); signals: void returnPressed(); protected: void keyPressEvent(QKeyEvent* event); private: Q_DISABLE_COPY(SpinBox) }; // progress line edit class ProgressLineEdit : public QLineEdit { Q_OBJECT public: explicit ProgressLineEdit(QWidget* parent = 0); int progress() const; void setProgress(int progress); signals: void returnPressed(const Qt::KeyboardModifiers& modifiers); protected: void paintEvent(QPaintEvent* event); void keyPressEvent(QKeyEvent* event); private: Q_DISABLE_COPY(ProgressLineEdit) int m_progress; }; // search line edit class SearchLineEdit : public ProgressLineEdit { Q_OBJECT public: explicit SearchLineEdit(QWidget* parent = 0); void startSearch(); void stopTimer(); signals: void searchInitiated(const QString& text, bool allTabs = false); protected slots: void on_timeout(); void on_returnPressed(const Qt::KeyboardModifiers& modifiers); private: Q_DISABLE_COPY(SearchLineEdit) QTimer* m_timer; }; #endif // MISCELLANEOUS_H qpdfview-0.4.7/sources/model.h0000644000000000000000000001301012246606025014427 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef DOCUMENTMODEL_H #define DOCUMENTMODEL_H #include #include #include #include #include #include class QColor; class QImage; class QPrinter; class QSizeF; #include "global.h" namespace Model { struct Link { QPainterPath boundary; int page; qreal left; qreal top; QString urlOrFileName; Link() : boundary(), page(-1), left(0.0), top(0.0), urlOrFileName() {} Link(const QPainterPath& boundary, int page, qreal left = 0.0, qreal top = 0.0) : boundary(boundary), page(page), left(left), top(top), urlOrFileName() {} Link(const QRectF& boundingRect, int page, qreal left = 0.0, qreal top = 0.0) : boundary(), page(page), left(left), top(top), urlOrFileName() { boundary.addRect(boundingRect); } Link(const QPainterPath& boundary, const QString& url) : boundary(boundary), page(-1), left(0.0), top(0.0), urlOrFileName(url) {} Link(const QRectF& boundingRect, const QString& url) : boundary(), page(-1), left(0.0), top(0.0), urlOrFileName(url) { boundary.addRect(boundingRect); } Link(const QPainterPath& boundary, const QString& fileName, int page) : boundary(boundary), page(page), left(0.0), top(0.0), urlOrFileName(fileName) {} Link(const QRectF& boundingRect, const QString& fileName, int page) : boundary(), page(page), left(0.0), top(0.0), urlOrFileName(fileName) { boundary.addRect(boundingRect); } }; class Annotation : public QObject { Q_OBJECT public: Annotation() : QObject() {} virtual ~Annotation() {} virtual QRectF boundary() const = 0; virtual QString contents() const = 0; virtual QWidget* createWidget() = 0; signals: void wasModified(); }; class FormField : public QObject { Q_OBJECT public: FormField() : QObject() {} virtual ~FormField() {} virtual QRectF boundary() const = 0; virtual QString name() const = 0; virtual QWidget* createWidget() = 0; signals: void wasModified(); }; class Page { public: virtual ~Page() {} virtual QSizeF size() const = 0; virtual QImage render(qreal horizontalResolution = 72.0, qreal verticalResolution = 72.0, Rotation rotation = RotateBy0, const QRect& boundingRect = QRect()) const = 0; virtual QList< Link* > links() const { return QList< Link* >(); } virtual QString text(const QRectF& rect) const { Q_UNUSED(rect); return QString(); } virtual QList< QRectF > search(const QString& text, bool matchCase) const { Q_UNUSED(text); Q_UNUSED(matchCase); return QList< QRectF >(); } virtual QList< Annotation* > annotations() const { return QList< Annotation* >(); } virtual bool canAddAndRemoveAnnotations() const { return false; } virtual Annotation* addTextAnnotation(const QRectF& boundary, const QColor& color) { Q_UNUSED(boundary); Q_UNUSED(color); return 0; } virtual Annotation* addHighlightAnnotation(const QRectF& boundary, const QColor& color) { Q_UNUSED(boundary); Q_UNUSED(color); return 0; } virtual void removeAnnotation(Annotation* annotation) { Q_UNUSED(annotation); } virtual QList< FormField* > formFields() const { return QList< FormField* >(); } }; class Document { public: virtual ~Document() {} virtual int numberOfPages() const = 0; virtual Page* page(int index) const = 0; virtual bool isLocked() const { return false; } virtual bool unlock(const QString& password) { Q_UNUSED(password); return false; } virtual QStringList saveFilter() const { return QStringList(); } virtual bool canSave() const { return false; } virtual bool save(const QString& filePath, bool withChanges) const { Q_UNUSED(filePath); Q_UNUSED(withChanges); return false; } virtual bool canBePrintedUsingCUPS() const { return false; } virtual void setPaperColor(const QColor& paperColor) { Q_UNUSED(paperColor); } virtual void loadOutline(QStandardItemModel* outlineModel) const { outlineModel->clear(); } virtual void loadProperties(QStandardItemModel* propertiesModel) const { propertiesModel->clear(); } virtual void loadFonts(QStandardItemModel* fontsModel) const { fontsModel->clear(); } }; } class SettingsWidget : public QWidget { Q_OBJECT public: explicit SettingsWidget(QWidget* parent = 0) : QWidget(parent) {} virtual void accept() = 0; virtual void reset() = 0; }; class Plugin { public: virtual ~Plugin() {} virtual Model::Document* loadDocument(const QString& filePath) const = 0; virtual SettingsWidget* createSettingsWidget(QWidget* parent = 0) const { Q_UNUSED(parent); return 0; } }; Q_DECLARE_INTERFACE(Plugin, "local.qpdfview.Plugin") #endif // DOCUMENTMODEL_H qpdfview-0.4.7/sources/pageitem.cpp0000644000000000000000000007777712246606025015513 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "pageitem.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "settings.h" #include "model.h" #include "rendertask.h" Settings* PageItem::s_settings = 0; QCache< PageItem*, QPixmap > PageItem::s_cache; PageItem::PageItem(Model::Page* page, int index, bool presentationMode, QGraphicsItem* parent) : QGraphicsObject(parent), m_page(0), m_index(-1), m_size(), m_links(), m_annotations(), m_formFields(), m_annotationOverlay(), m_formFieldOverlay(), m_presentationMode(presentationMode), m_invertColors(false), m_highlights(), m_rubberBandMode(ModifiersMode), m_rubberBand(), m_resolutionX(72), m_resolutionY(72), m_devicePixelRatio(1.0), m_scaleFactor(1.0), m_rotation(RotateBy0), m_transform(), m_normalizedTransform(), m_boundingRect(), m_pixmap(), m_renderTask(0), m_obsoletePixmap(), m_obsoleteTransform() { if(s_settings == 0) { s_settings = Settings::instance(); } s_cache.setMaxCost(s_settings->pageItem().cacheSize()); setAcceptHoverEvents(true); m_renderTask = new RenderTask(this); connect(m_renderTask, SIGNAL(finished()), SLOT(on_renderTask_finished())); connect(m_renderTask, SIGNAL(imageReady(int,int,qreal,qreal,Rotation,bool,bool,QImage)), SLOT(on_renderTask_imageReady(int,int,qreal,qreal,Rotation,bool,bool,QImage))); m_page = page; m_index = index; m_size = m_page->size(); QTimer::singleShot(0, this, SLOT(loadInteractiveElements())); prepareGeometry(); } PageItem::~PageItem() { hideAnnotationOverlay(false); hideFormFieldOverlay(false); m_renderTask->cancel(); m_renderTask->wait(); s_cache.remove(this); qDeleteAll(m_links); qDeleteAll(m_annotations); qDeleteAll(m_formFields); } QRectF PageItem::boundingRect() const { return m_boundingRect; } void PageItem::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) { paintPage(painter, cachedPixmap()); paintLinks(painter); paintFormFields(painter); paintHighlights(painter); paintRubberBand(painter); } int PageItem::index() const { return m_index; } const QSizeF& PageItem::size() const { return m_size; } bool PageItem::invertColors() { return m_invertColors; } void PageItem::setInvertColors(bool invertColors) { m_invertColors = invertColors; refresh(); } const QList< QRectF >& PageItem::highlights() const { return m_highlights; } void PageItem::setHighlights(const QList< QRectF >& highlights) { m_highlights = highlights; update(); } RubberBandMode PageItem::rubberBandMode() const { return m_rubberBandMode; } void PageItem::setRubberBandMode(RubberBandMode rubberBandMode) { if(m_rubberBandMode != rubberBandMode && rubberBandMode >= 0 && rubberBandMode < NumberOfRubberBandModes) { m_rubberBandMode = rubberBandMode; if(m_rubberBandMode == ModifiersMode) { unsetCursor(); } else { setCursor(Qt::CrossCursor); } } } bool PageItem::showsAnnotationOverlay() const { return !m_annotationOverlay.isEmpty(); } bool PageItem::showsFormFieldOverlay() const { return !m_formFieldOverlay.isEmpty(); } int PageItem::resolutionX() const { return m_resolutionX; } int PageItem::resolutionY() const { return m_resolutionY; } void PageItem::setResolution(int resolutionX, int resolutionY) { if((m_resolutionX != resolutionX || m_resolutionY != resolutionY) && resolutionX > 0 && resolutionY > 0) { refresh(); m_resolutionX = resolutionX; m_resolutionY = resolutionY; prepareGeometryChange(); prepareGeometry(); } } qreal PageItem::devicePixelRatio() const { return m_devicePixelRatio; } void PageItem::setDevicePixelRatio(qreal devicePixelRatio) { if(!qFuzzyCompare(m_devicePixelRatio, devicePixelRatio) && devicePixelRatio > 0.0) { refresh(); m_devicePixelRatio = devicePixelRatio; prepareGeometryChange(); prepareGeometry(); } } qreal PageItem::scaleFactor() const { return m_scaleFactor; } void PageItem::setScaleFactor(qreal scaleFactor) { if(!qFuzzyCompare(m_scaleFactor, scaleFactor) && scaleFactor > 0.0) { refresh(); m_scaleFactor = scaleFactor; prepareGeometryChange(); prepareGeometry(); } } Rotation PageItem::rotation() const { return m_rotation; } void PageItem::setRotation(Rotation rotation) { if(m_rotation != rotation && rotation >= 0 && rotation < NumberOfRotations) { refresh(); m_rotation = rotation; prepareGeometryChange(); prepareGeometry(); } } const QTransform& PageItem::transform() const { return m_transform; } const QTransform& PageItem::normalizedTransform() const { return m_normalizedTransform; } void PageItem::refresh() { m_renderTask->cancel(); if(s_settings->pageItem().keepObsoletePixmaps() && s_cache.contains(this)) { m_obsoletePixmap = *s_cache.object(this); m_obsoleteTopLeft = m_boundingRect.topLeft(); m_obsoleteTransform = m_transform.inverted(); } m_pixmap = QPixmap(); s_cache.remove(this); update(); } void PageItem::startRender(bool prefetch) { if(prefetch && s_cache.contains(this)) { return; } if(!m_renderTask->isRunning()) { m_renderTask->start(m_page, m_resolutionX, m_resolutionY, effectiveDevicePixelRatio(), m_scaleFactor, m_rotation, m_invertColors, prefetch); } } void PageItem::cancelRender() { m_renderTask->cancel(); m_pixmap = QPixmap(); m_obsoletePixmap = QPixmap(); } void PageItem::on_renderTask_finished() { update(); } void PageItem::on_renderTask_imageReady(int resolutionX, int resolutionY, qreal devicePixelRatio, qreal scaleFactor, Rotation rotation, bool invertColors, bool prefetch, QImage image) { if(m_resolutionX != resolutionX || m_resolutionY != resolutionY || !qFuzzyCompare(effectiveDevicePixelRatio(), devicePixelRatio) || !qFuzzyCompare(m_scaleFactor, scaleFactor) || m_rotation != rotation || m_invertColors != invertColors) { return; } if(image.isNull()) { // error icon const qreal extent = qMin(0.1 * m_boundingRect.width(), 0.1 * m_boundingRect.height()); const QRectF rect(0.01 * m_boundingRect.width(), 0.01 * m_boundingRect.height(), extent, extent); image = QImage(qFloor(0.01 * m_boundingRect.width() + extent), qFloor(0.01 * m_boundingRect.height() + extent), QImage::Format_ARGB32); image.fill(Qt::transparent); QPainter painter(&image); s_settings->pageItem().errorIcon().paint(&painter, rect.toRect()); } if(prefetch) { QPixmap* pixmap = new QPixmap(QPixmap::fromImage(image)); int cost = pixmap->width() * pixmap->height() * pixmap->depth() / 8; s_cache.insert(this, pixmap, cost); } else { if(!m_renderTask->wasCanceled()) { m_pixmap = QPixmap::fromImage(image); } } m_obsoletePixmap = QPixmap(); } void PageItem::showAnnotationOverlay(Model::Annotation* selectedAnnotation) { if(s_settings->pageItem().annotationOverlay()) { showOverlay(m_annotationOverlay, SLOT(hideAnnotationOverlay()), m_annotations, selectedAnnotation); } else { hideAnnotationOverlay(false); addProxy(m_annotationOverlay, SLOT(hideAnnotationOverlay()), selectedAnnotation); m_annotationOverlay.value(selectedAnnotation)->widget()->setFocus(); } } void PageItem::hideAnnotationOverlay(bool deleteLater) { hideOverlay(m_annotationOverlay, deleteLater); } void PageItem::updateAnnotationOverlay() { updateOverlay(m_annotationOverlay); } void PageItem::showFormFieldOverlay(Model::FormField* selectedFormField) { if(s_settings->pageItem().formFieldOverlay()) { showOverlay(m_formFieldOverlay, SLOT(hideFormFieldOverlay()), m_formFields, selectedFormField); } else { hideFormFieldOverlay(false); addProxy(m_formFieldOverlay, SLOT(hideFormFieldOverlay()), selectedFormField); m_formFieldOverlay.value(selectedFormField)->widget()->setFocus(); } } void PageItem::updateFormFieldOverlay() { updateOverlay(m_formFieldOverlay); } void PageItem::hideFormFieldOverlay(bool deleteLater) { hideOverlay(m_formFieldOverlay, deleteLater); } void PageItem::hoverEnterEvent(QGraphicsSceneHoverEvent*) { } void PageItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) { if(m_rubberBandMode == ModifiersMode && event->modifiers() == Qt::NoModifier) { // links foreach(const Model::Link* link, m_links) { if(m_normalizedTransform.map(link->boundary).contains(event->pos())) { if(link->page != -1 && (link->urlOrFileName.isNull() || !m_presentationMode)) { setCursor(Qt::PointingHandCursor); if(link->urlOrFileName.isNull()) { QToolTip::showText(event->screenPos(), tr("Go to page %1.").arg(link->page)); } else { QToolTip::showText(event->screenPos(), tr("Go to page %1 of file '%2'.").arg(link->page).arg(link->urlOrFileName)); } return; } else if(!link->urlOrFileName.isNull() && !m_presentationMode) { setCursor(Qt::PointingHandCursor); QToolTip::showText(event->screenPos(), tr("Open '%1'.").arg(link->urlOrFileName)); return; } } } if(m_presentationMode) { unsetCursor(); QToolTip::hideText(); return; } // annotations foreach(const Model::Annotation* annotation, m_annotations) { if(m_normalizedTransform.mapRect(annotation->boundary()).contains(event->pos())) { setCursor(Qt::PointingHandCursor); QToolTip::showText(event->screenPos(), annotation->contents()); return; } } // form fields foreach(const Model::FormField* formField, m_formFields) { if(m_normalizedTransform.mapRect(formField->boundary()).contains(event->pos())) { setCursor(Qt::PointingHandCursor); QToolTip::showText(event->screenPos(), tr("Edit form field '%1'.").arg(formField->name())); return; } } unsetCursor(); QToolTip::hideText(); } } void PageItem::hoverLeaveEvent(QGraphicsSceneHoverEvent*) { } void PageItem::mousePressEvent(QGraphicsSceneMouseEvent* event) { // rubber band if(m_rubberBandMode == ModifiersMode && !m_presentationMode && (event->modifiers() == s_settings->pageItem().copyToClipboardModifiers() || event->modifiers() == s_settings->pageItem().addAnnotationModifiers()) && event->button() == Qt::LeftButton) { setCursor(Qt::CrossCursor); if(event->modifiers() == s_settings->pageItem().copyToClipboardModifiers()) { m_rubberBandMode = CopyToClipboardMode; } else if(event->modifiers() == s_settings->pageItem().addAnnotationModifiers()) { m_rubberBandMode = AddAnnotationMode; } } if(m_rubberBandMode != ModifiersMode) { m_rubberBand = QRectF(event->pos(), QSizeF()); emit rubberBandStarted(); update(); event->accept(); return; } if(event->modifiers() == Qt::NoModifier && event->button() == Qt::LeftButton) { // links foreach(const Model::Link* link, m_links) { if(m_normalizedTransform.map(link->boundary).contains(event->pos())) { unsetCursor(); if(link->page != -1 && (link->urlOrFileName.isNull() || !m_presentationMode)) { if(link->urlOrFileName.isNull()) { emit linkClicked(link->page, link->left, link->top); } else { emit linkClicked(link->urlOrFileName, link->page); } event->accept(); return; } else if(!link->urlOrFileName.isNull() && !m_presentationMode) { emit linkClicked(link->urlOrFileName); event->accept(); return; } } } if(m_presentationMode) { event->ignore(); return; } // annotations foreach(Model::Annotation* annotation, m_annotations) { if(m_normalizedTransform.mapRect(annotation->boundary()).contains(event->pos())) { unsetCursor(); showAnnotationOverlay(annotation); event->accept(); return; } } hideAnnotationOverlay(); // form fields foreach(Model::FormField* formField, m_formFields) { if(m_normalizedTransform.mapRect(formField->boundary()).contains(event->pos())) { unsetCursor(); showFormFieldOverlay(formField); event->accept(); return; } } hideFormFieldOverlay(); } event->ignore(); } void PageItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { emit sourceRequested(m_index + 1, m_transform.inverted().map(event->pos())); } void PageItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { if(!m_rubberBand.isNull()) { if(m_boundingRect.contains(event->pos())) { m_rubberBand.setBottomRight(event->pos()); update(); event->accept(); return; } } event->ignore(); } void PageItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { if(!m_rubberBand.isNull()) { unsetCursor(); m_rubberBand = m_rubberBand.normalized(); if(m_rubberBandMode == CopyToClipboardMode) { copyToClipboard(event->screenPos()); } else if(m_rubberBandMode == AddAnnotationMode) { addAnnotation(event->screenPos()); } m_rubberBandMode = ModifiersMode; m_rubberBand = QRectF(); emit rubberBandFinished(); update(); event->accept(); return; } event->ignore(); } void PageItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) { if(m_presentationMode) { event->ignore(); return; } foreach(Model::Annotation* annotation, m_annotations) { if(m_normalizedTransform.mapRect(annotation->boundary()).contains(event->pos())) { unsetCursor(); removeAnnotation(annotation, event->screenPos()); event->accept(); return; } } event->ignore(); } void PageItem::loadInteractiveElements() { m_links = m_page->links(); if(!m_presentationMode) { m_annotations = m_page->annotations(); foreach(const Model::Annotation* annotation, m_annotations) { connect(annotation, SIGNAL(wasModified()), SIGNAL(wasModified())); } m_formFields = m_page->formFields(); foreach(const Model::FormField* formField, m_formFields) { connect(formField, SIGNAL(wasModified()), SIGNAL(wasModified())); } } update(); } void PageItem::copyToClipboard(const QPoint& screenPos) { QMenu menu; const QAction* copyTextAction = menu.addAction(tr("Copy &text")); const QAction* copyImageAction = menu.addAction(tr("Copy &image")); const QAction* saveImageToFileAction = menu.addAction(tr("Save image to &file...")); const QAction* action = menu.exec(screenPos); if(action == copyTextAction) { const QString text = m_page->text(m_transform.inverted().mapRect(m_rubberBand)); if(!text.isEmpty()) { QApplication::clipboard()->setText(text); } } else if(action == copyImageAction || action == saveImageToFileAction) { const QRect rect = m_rubberBand.translated(-m_boundingRect.topLeft()).toRect(); const QImage image = s_cache.contains(this) ? s_cache.object(this)->copy(rect).toImage() : m_page->render(m_resolutionX * m_scaleFactor, m_scaleFactor * m_resolutionY, m_rotation, rect); if(!image.isNull()) { if(action == copyImageAction) { QApplication::clipboard()->setImage(image); } else if(action == saveImageToFileAction) { const QString fileName = QFileDialog::getSaveFileName(0, tr("Save image to file"), QDir::homePath(), "Portable network graphics (*.png)"); if(!image.save(fileName, "PNG")) { QMessageBox::warning(0, tr("Warning"), tr("Could not save image to file '%1'.").arg(fileName)); } } } } } void PageItem::addAnnotation(const QPoint& screenPos) { if(m_page->canAddAndRemoveAnnotations()) { QMenu menu; const QAction* addTextAction = menu.addAction(tr("Add &text")); const QAction* addHighlightAction = menu.addAction(tr("Add &highlight")); const QAction* action = menu.exec(screenPos); if(action == addTextAction || action == addHighlightAction) { QRectF boundary = m_normalizedTransform.inverted().mapRect(m_rubberBand); Model::Annotation* annotation = 0; if(action == addTextAction) { boundary.setWidth(24.0 / m_size.width()); boundary.setHeight(24.0 / m_size.height()); annotation = m_page->addTextAnnotation(boundary, s_settings->pageItem().annotationColor()); } else if(action == addHighlightAction) { annotation = m_page->addHighlightAnnotation(boundary, s_settings->pageItem().annotationColor()); } m_annotations.append(annotation); connect(annotation, SIGNAL(wasModified()), SIGNAL(wasModified())); refresh(); emit wasModified(); showAnnotationOverlay(annotation); } } } void PageItem::removeAnnotation(Model::Annotation* annotation, const QPoint& screenPos) { if(m_page->canAddAndRemoveAnnotations()) { QMenu menu; const QAction* removeAnnotationAction = menu.addAction(tr("&Remove annotation")); const QAction* action = menu.exec(screenPos); if(action == removeAnnotationAction) { m_annotations.removeAll(annotation); m_page->removeAnnotation(annotation); annotation->deleteLater(); refresh(); emit wasModified(); } } } template< typename Overlay, typename Element > void PageItem::showOverlay(Overlay& overlay, const char* hideOverlay, const QList< Element* >& elements, Element* selectedElement) { foreach(Element* element, elements) { if(!overlay.contains(element)) { addProxy(overlay, hideOverlay, element); } if(element == selectedElement) { overlay.value(element)->widget()->setFocus(); } } } template< typename Overlay, typename Element > void PageItem::addProxy(Overlay& overlay, const char* hideOverlay, Element* element) { QGraphicsProxyWidget* proxy = new QGraphicsProxyWidget(this); proxy->setWidget(element->createWidget()); #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) proxy->setAutoFillBackground(true); #endif // QT_VERSION overlay.insert(element, proxy); setProxyGeometry(element, proxy); connect(proxy, SIGNAL(visibleChanged()), hideOverlay); } template< typename Overlay > void PageItem::hideOverlay(Overlay& overlay, bool deleteLater) { Overlay discardedOverlay; #if QT_VERSION >= QT_VERSION_CHECK(4,8,0) discardedOverlay.swap(overlay); #else discardedOverlay = overlay; overlay = Overlay(); #endif // QT_VERSION if(!discardedOverlay.isEmpty()) { for(typename Overlay::const_iterator i = discardedOverlay.constBegin(); i != discardedOverlay.constEnd(); ++i) { if(deleteLater) { i.value()->deleteLater(); } else { delete i.value(); } } refresh(); } } template< typename Overlay > void PageItem::updateOverlay(const Overlay& overlay) const { for(typename Overlay::const_iterator i = overlay.constBegin(); i != overlay.constEnd(); ++i) { setProxyGeometry(i.key(), i.value()); } } void PageItem::setProxyGeometry(Model::Annotation* annotation, QGraphicsProxyWidget* proxy) const { const QPointF center = m_normalizedTransform.map(annotation->boundary().center()); qreal x = center.x() - 0.5 * proxy->preferredWidth(); qreal y = center.y() - 0.5 * proxy->preferredHeight(); qreal width = proxy->preferredWidth(); qreal height = proxy->preferredHeight(); x = qMax(x, m_boundingRect.left() + proxyPadding); y = qMax(y, m_boundingRect.top() + proxyPadding); width = qMin(width, m_boundingRect.right() - proxyPadding - x); height = qMin(height, m_boundingRect.bottom() - proxyPadding - y); proxy->setGeometry(QRectF(x, y, width, height)); } void PageItem::setProxyGeometry(Model::FormField* formField, QGraphicsProxyWidget* proxy) const { QRectF rect = m_normalizedTransform.mapRect(formField->boundary()); qreal x = rect.x(); qreal y = rect.y(); qreal width = rect.width(); qreal height = rect.height(); switch(m_rotation) { default: case RotateBy0: proxy->setRotation(0.0); break; case RotateBy90: x += width; qSwap(width, height); proxy->setRotation(90.0); break; case RotateBy180: x += width; y += height; proxy->setRotation(180.0); break; case RotateBy270: y += height; qSwap(width, height); proxy->setRotation(270.0); break; } width /= m_scaleFactor; height /= m_scaleFactor; proxy->setScale(m_scaleFactor); proxy->setGeometry(QRectF(x - proxyPadding, y - proxyPadding, width + proxyPadding, height + proxyPadding)); } qreal PageItem::effectiveDevicePixelRatio() { #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) return s_settings->pageItem().useDevicePixelRatio() ? m_devicePixelRatio : 1.0; #else return 1.0; #endif // QT_VERSION } void PageItem::prepareGeometry() { m_transform.reset(); m_normalizedTransform.reset(); switch(m_rotation) { default: case RotateBy0: break; case RotateBy90: m_transform.rotate(90.0); m_normalizedTransform.rotate(90.0); break; case RotateBy180: m_transform.rotate(180.0); m_normalizedTransform.rotate(180.0); break; case RotateBy270: m_transform.rotate(270.0); m_normalizedTransform.rotate(270.0); break; } switch(m_rotation) { default: case RotateBy0: case RotateBy180: m_transform.scale(m_scaleFactor * m_resolutionX / 72.0, m_scaleFactor * m_resolutionY / 72.0); m_normalizedTransform.scale(m_scaleFactor * m_resolutionX / 72.0 * m_size.width(), m_scaleFactor * m_resolutionY / 72.0 * m_size.height()); break; case RotateBy90: case RotateBy270: m_transform.scale(m_scaleFactor * m_resolutionY / 72.0, m_scaleFactor * m_resolutionX / 72.0); m_normalizedTransform.scale(m_scaleFactor * m_resolutionY / 72.0 * m_size.width(), m_scaleFactor * m_resolutionX / 72.0 * m_size.height()); break; } m_boundingRect = m_transform.mapRect(QRectF(QPointF(), m_size)); m_boundingRect.setWidth(qRound(m_boundingRect.width())); m_boundingRect.setHeight(qRound(m_boundingRect.height())); updateAnnotationOverlay(); updateFormFieldOverlay(); } QPixmap PageItem::cachedPixmap() { QPixmap pixmap; if(s_cache.contains(this)) { pixmap = *s_cache.object(this); } else { if(!m_pixmap.isNull()) { pixmap = m_pixmap; m_pixmap = QPixmap(); int cost = pixmap.width() * pixmap.height() * pixmap.depth() / 8; s_cache.insert(this, new QPixmap(pixmap), cost); } else { startRender(); } } return pixmap; } void PageItem::paintPage(QPainter* painter, const QPixmap& pixmap) const { if(s_settings->pageItem().decoratePages() && !m_presentationMode) { QColor paperColor = s_settings->pageItem().paperColor(); if(m_invertColors) { paperColor.setRgb(~paperColor.rgb()); } painter->fillRect(m_boundingRect, QBrush(paperColor)); } if(!pixmap.isNull()) { painter->drawPixmap(m_boundingRect.topLeft(), pixmap); } else if(!m_obsoletePixmap.isNull()) { painter->save(); painter->setTransform(m_obsoleteTransform, true); painter->setTransform(m_transform, true); painter->drawPixmap(m_obsoleteTopLeft, m_obsoletePixmap); painter->restore(); } else { // progess icon const qreal extent = qMin(0.1 * m_boundingRect.width(), 0.1 * m_boundingRect.height()); const QRectF rect(m_boundingRect.left() + 0.01 * m_boundingRect.width(), m_boundingRect.top() + 0.01 * m_boundingRect.height(), extent, extent); s_settings->pageItem().progressIcon().paint(painter, rect.toRect()); } if(s_settings->pageItem().decoratePages() && !m_presentationMode) { painter->drawRect(m_boundingRect); } } void PageItem::paintLinks(QPainter* painter) const { if(s_settings->pageItem().decorateLinks() && !m_presentationMode && !m_links.isEmpty()) { painter->save(); painter->setTransform(m_normalizedTransform, true); painter->setPen(QPen(Qt::red, 0.0)); foreach(const Model::Link* link, m_links) { painter->drawPath(link->boundary); } painter->restore(); } } void PageItem::paintFormFields(QPainter* painter) const { if(s_settings->pageItem().decorateFormFields() && !m_presentationMode && !m_formFields.isEmpty()) { painter->save(); painter->setTransform(m_normalizedTransform, true); painter->setPen(QPen(Qt::blue, 0.0)); foreach(const Model::FormField* formField, m_formFields) { painter->drawRect(formField->boundary()); } painter->restore(); } } void PageItem::paintHighlights(QPainter* painter) const { if(!m_highlights.isEmpty()) { painter->save(); painter->setTransform(m_transform, true); painter->setPen(QPen(s_settings->pageItem().highlightColor(), 0.0)); painter->setBrush(QBrush(s_settings->pageItem().highlightColor())); painter->setCompositionMode(QPainter::CompositionMode_Multiply); foreach(const QRectF highlight, m_highlights) { painter->drawRect(highlight.normalized()); } painter->restore(); } } void PageItem::paintRubberBand(QPainter* painter) const { if(!m_rubberBand.isNull()) { painter->save(); painter->setPen(QPen(Qt::white, 0.0, Qt::DashLine)); painter->setCompositionMode(QPainter::CompositionMode_Difference); painter->drawRect(m_rubberBand); painter->restore(); } } ThumbnailItem::ThumbnailItem(Model::Page* page, int index, QGraphicsItem* parent) : PageItem(page, index, false, parent), #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) m_text(QString::number(index + 1)), #endif // QT_VERSION m_current(false) { setAcceptHoverEvents(false); } QRectF ThumbnailItem::boundingRect() const { #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) return PageItem::boundingRect().adjusted(0.0, 0.0, 0.0, 2.0 * m_text.size().height()); #else return PageItem::boundingRect().adjusted(0.0, 0.0, 0.0, 2.0 * QFontMetrics(QFont()).height()); #endif // QT_VERSION } void ThumbnailItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { PageItem::paint(painter, option, widget); const QRectF boundingRect = PageItem::boundingRect(); #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) const QSizeF textSize = m_text.size(); QPointF pos = boundingRect.bottomLeft(); pos.rx() += 0.5 * (boundingRect.width() - textSize.width()); pos.ry() += 0.5 * textSize.height(); painter->drawStaticText(pos, m_text); #else const QString text = QString::number(index() + 1); const QFontMetrics fontMetrics = QFontMetrics(QFont()); QPointF pos = boundingRect.bottomLeft(); pos.rx() += 0.5 * (boundingRect.width() - fontMetrics.width(text)); pos.ry() += fontMetrics.height(); painter->drawText(pos, text); #endif // QT_VERSION if(m_current) { painter->save(); painter->setCompositionMode(QPainter::CompositionMode_Multiply); painter->fillRect(boundingRect, widget->palette().highlight()); painter->restore(); } } bool ThumbnailItem::isCurrent() const { return m_current; } void ThumbnailItem::setCurrent(bool current) { if(m_current != current) { m_current = current; update(); } } void ThumbnailItem::mousePressEvent(QGraphicsSceneMouseEvent*) { emit linkClicked(index() + 1); } void ThumbnailItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent*) { } void ThumbnailItem::mouseMoveEvent(QGraphicsSceneMouseEvent*) { } void ThumbnailItem::mouseReleaseEvent(QGraphicsSceneMouseEvent*) { } void ThumbnailItem::contextMenuEvent(QGraphicsSceneContextMenuEvent*) { } void ThumbnailItem::loadInteractiveElements() { const qreal width = size().width() / 72.0 * 25.4; const qreal height = size().height() / 72.0 * 25.4; const qreal longEdge = qMax(width, height); const qreal shortEdge = qMin(width, height); QString paperSize; if(qAbs(longEdge - 279.4) <= 1.0 && qAbs(shortEdge - 215.9) <= 1.0) { paperSize = QLatin1String(" (Letter)"); } else { qreal longEdgeA = 1189.0; qreal shortEdgeA = 841.0; qreal longEdgeB = 1414.0; qreal shortEdgeB = 1000.0; for(int i = 0; i <= 10; ++i) { if(qAbs(longEdge - longEdgeA) <= 1.0 && qAbs(shortEdge - shortEdgeA) <= 1.0) { paperSize = QString(" (A%1)").arg(i); break; } else if(qAbs(longEdge - longEdgeB) <= 1.0 && qAbs(shortEdge - shortEdgeB) <= 1.0) { paperSize = QString(" (B%1)").arg(i); break; } longEdgeA = shortEdgeA; shortEdgeA /= qSqrt(2.0); longEdgeB = shortEdgeB; shortEdgeB /= qSqrt(2.0); } } setToolTip(QString("%1 mm x %2 mm%3").arg(width, 0, 'f', 1).arg(height, 0, 'f', 1).arg(paperSize)); } qpdfview-0.4.7/sources/pageitem.h0000644000000000000000000001550212246606025015132 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PAGEITEM_H #define PAGEITEM_H #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) #include #endif // QT_VERSION class QGraphicsProxyWidget; #include "global.h" namespace Model { struct Link; class Annotation; class FormField; class Page; } class Settings; class RenderTask; class PageItem : public QGraphicsObject { Q_OBJECT public: PageItem(Model::Page* page, int index, bool presentationMode = false, QGraphicsItem* parent = 0); ~PageItem(); QRectF boundingRect() const; void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*); int index() const; const QSizeF& size() const; bool invertColors(); void setInvertColors(bool invertColors); const QList< QRectF >& highlights() const; void setHighlights(const QList< QRectF >& highlights); RubberBandMode rubberBandMode() const; void setRubberBandMode(RubberBandMode rubberBandMode); bool showsAnnotationOverlay() const; bool showsFormFieldOverlay() const; int resolutionX() const; int resolutionY() const; void setResolution(int resolutionX, int resolutionY); qreal devicePixelRatio() const; void setDevicePixelRatio(qreal devicePixelRatio); qreal scaleFactor() const; void setScaleFactor(qreal scaleFactor); Rotation rotation() const; void setRotation(Rotation rotation); const QTransform& transform() const; const QTransform& normalizedTransform() const; signals: void linkClicked(int page, qreal left = 0.0, qreal top = 0.0); void linkClicked(const QString& url); void linkClicked(const QString& fileName, int page); void rubberBandStarted(); void rubberBandFinished(); void sourceRequested(int page, const QPointF& pos); void wasModified(); public slots: void refresh(); void startRender(bool prefetch = false); void cancelRender(); protected slots: void on_renderTask_finished(); void on_renderTask_imageReady(int resolutionX, int resolutionY, qreal devicePixelRatio, qreal scaleFactor, Rotation rotation, bool invertColors, bool prefetch, QImage image); void showAnnotationOverlay(Model::Annotation* selectedAnnotation); void hideAnnotationOverlay(bool deleteLater = true); void updateAnnotationOverlay(); void showFormFieldOverlay(Model::FormField* selectedFormField); void hideFormFieldOverlay(bool deleteLater = true); void updateFormFieldOverlay(); protected: void hoverEnterEvent(QGraphicsSceneHoverEvent*); void hoverMoveEvent(QGraphicsSceneHoverEvent* event); void hoverLeaveEvent(QGraphicsSceneHoverEvent*); void mousePressEvent(QGraphicsSceneMouseEvent* event); void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); void mouseMoveEvent(QGraphicsSceneMouseEvent* event); void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); private slots: virtual void loadInteractiveElements(); private: Q_DISABLE_COPY(PageItem) static Settings* s_settings; static QCache< PageItem*, QPixmap > s_cache; Model::Page* m_page; int m_index; QSizeF m_size; QList< Model::Link* > m_links; QList< Model::Annotation* > m_annotations; QList< Model::FormField* > m_formFields; typedef QMap< Model::Annotation*, QGraphicsProxyWidget* > AnnotationOverlay; AnnotationOverlay m_annotationOverlay; typedef QMap< Model::FormField*, QGraphicsProxyWidget* > FormFieldOverlay; FormFieldOverlay m_formFieldOverlay; bool m_presentationMode; bool m_invertColors; QList< QRectF > m_highlights; RubberBandMode m_rubberBandMode; QRectF m_rubberBand; void copyToClipboard(const QPoint& screenPos); void addAnnotation(const QPoint& screenPos); void removeAnnotation(Model::Annotation* annotation, const QPoint& screenPos); template< typename Overlay, typename Element > void showOverlay(Overlay& overlay, const char* hideOverlay, const QList< Element* >& elements, Element* selectedElement); template< typename Overlay, typename Element > void addProxy(Overlay& overlay, const char* hideOverlay, Element* element); template< typename Overlay > void hideOverlay(Overlay& overlay, bool deleteLater); template< typename Overlay > void updateOverlay(const Overlay& overlay) const; static const qreal proxyPadding = 2.0; void setProxyGeometry(Model::Annotation* annotation, QGraphicsProxyWidget* proxy) const; void setProxyGeometry(Model::FormField* formField, QGraphicsProxyWidget* proxy) const; // geometry int m_resolutionX; int m_resolutionY; qreal m_devicePixelRatio; qreal effectiveDevicePixelRatio(); qreal m_scaleFactor; Rotation m_rotation; QTransform m_transform; QTransform m_normalizedTransform; QRectF m_boundingRect; QPixmap m_pixmap; void prepareGeometry(); RenderTask* m_renderTask; // obsolete pixmap QPixmap m_obsoletePixmap; QPointF m_obsoleteTopLeft; QTransform m_obsoleteTransform; // paint QPixmap cachedPixmap(); void paintPage(QPainter* painter, const QPixmap& pixmap) const; void paintLinks(QPainter* painter) const; void paintFormFields(QPainter* painter) const; void paintHighlights(QPainter* painter) const; void paintRubberBand(QPainter* painter) const; }; class ThumbnailItem : public PageItem { Q_OBJECT public: ThumbnailItem(Model::Page* page, int index, QGraphicsItem* parent = 0); QRectF boundingRect() const; void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); bool isCurrent() const; void setCurrent(bool current); protected: void mousePressEvent(QGraphicsSceneMouseEvent*); void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*); void mouseMoveEvent(QGraphicsSceneMouseEvent*); void mouseReleaseEvent(QGraphicsSceneMouseEvent*); void contextMenuEvent(QGraphicsSceneContextMenuEvent*); private slots: void loadInteractiveElements(); private: Q_DISABLE_COPY(ThumbnailItem) #if QT_VERSION >= QT_VERSION_CHECK(4,7,0) QStaticText m_text; #endif // QT_VERSION bool m_current; }; #endif // PAGEITEM_H qpdfview-0.4.7/sources/pdfmodel.cpp0000644000000000000000000006333012246606025015466 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "pdfmodel.h" #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include #else #include #endif // QT_VERSION #include #include "annotationwidgets.h" #include "formfieldwidgets.h" Model::PdfAnnotation::PdfAnnotation(QMutex* mutex, Poppler::Annotation* annotation) : Annotation(), m_mutex(mutex), m_annotation(annotation) { } Model::PdfAnnotation::~PdfAnnotation() { delete m_annotation; } QRectF Model::PdfAnnotation::boundary() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 return m_annotation->boundary().normalized(); } QString Model::PdfAnnotation::contents() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 return m_annotation->contents(); } QWidget* Model::PdfAnnotation::createWidget() { QWidget* widget = 0; if(m_annotation->subType() == Poppler::Annotation::AText || m_annotation->subType() == Poppler::Annotation::AHighlight) { widget = new AnnotationWidget(m_mutex, m_annotation); connect(widget, SIGNAL(wasModified()), SIGNAL(wasModified())); } else if(m_annotation->subType() == Poppler::Annotation::AFileAttachment) { widget = new FileAttachmentAnnotationWidget(m_mutex, static_cast< Poppler::FileAttachmentAnnotation* >(m_annotation)); } connect(this, SIGNAL(destroyed()), widget, SLOT(deleteLater())); return widget; } Model::PdfFormField::PdfFormField(QMutex* mutex, Poppler::FormField* formField) : FormField(), m_mutex(mutex), m_formField(formField) { } Model::PdfFormField::~PdfFormField() { delete m_formField; } QRectF Model::PdfFormField::boundary() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 return m_formField->rect().normalized(); } QString Model::PdfFormField::name() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 return m_formField->name(); } QWidget* Model::PdfFormField::createWidget() { QWidget* widget = 0; if(m_formField->type() == Poppler::FormField::FormText) { Poppler::FormFieldText* formFieldText = static_cast< Poppler::FormFieldText* >(m_formField); if(formFieldText->textType() == Poppler::FormFieldText::Normal) { widget = new NormalTextFieldWidget(m_mutex, formFieldText); } else if(formFieldText->textType() == Poppler::FormFieldText::Multiline) { widget = new MultilineTextFieldWidget(m_mutex, formFieldText); } } else if(m_formField->type() == Poppler::FormField::FormChoice) { Poppler::FormFieldChoice* formFieldChoice = static_cast< Poppler::FormFieldChoice* >(m_formField); if(formFieldChoice->choiceType() == Poppler::FormFieldChoice::ComboBox) { widget = new ComboBoxChoiceFieldWidget(m_mutex, formFieldChoice); } else if(formFieldChoice->choiceType() == Poppler::FormFieldChoice::ListBox) { widget = new ListBoxChoiceFieldWidget(m_mutex, formFieldChoice); } } else if(m_formField->type() == Poppler::FormField::FormButton) { Poppler::FormFieldButton* formFieldButton = static_cast< Poppler::FormFieldButton* >(m_formField); if(formFieldButton->buttonType() == Poppler::FormFieldButton::CheckBox) { widget = new CheckBoxChoiceFieldWidget(m_mutex, formFieldButton); } else if(formFieldButton->buttonType() == Poppler::FormFieldButton::Radio) { widget = new RadioChoiceFieldWidget(m_mutex, formFieldButton); } } connect(widget, SIGNAL(wasModified()), SIGNAL(wasModified())); return widget; } Model::PdfPage::PdfPage(QMutex* mutex, Poppler::Page* page) : m_mutex(mutex), m_page(page) { } Model::PdfPage::~PdfPage() { delete m_page; } QSizeF Model::PdfPage::size() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 return m_page->pageSizeF(); } QImage Model::PdfPage::render(qreal horizontalResolution, qreal verticalResolution, Rotation rotation, const QRect& boundingRect) const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 double xres; double yres; switch(rotation) { default: case RotateBy0: case RotateBy180: xres = horizontalResolution; yres = verticalResolution; break; case RotateBy90: case RotateBy270: xres = verticalResolution; yres = horizontalResolution; break; } Poppler::Page::Rotation rotate; switch(rotation) { default: case RotateBy0: rotate = Poppler::Page::Rotate0; break; case RotateBy90: rotate = Poppler::Page::Rotate90; break; case RotateBy180: rotate = Poppler::Page::Rotate180; break; case RotateBy270: rotate = Poppler::Page::Rotate270; break; } int x = -1; int y = -1; int w = -1; int h = -1; if(!boundingRect.isNull()) { x = boundingRect.x(); y = boundingRect.y(); w = boundingRect.width(); h = boundingRect.height(); } return m_page->renderToImage(xres, yres, x, y, w, h, rotate); } QList< Model::Link* > Model::PdfPage::links() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 QList< Link* > links; foreach(const Poppler::Link* link, m_page->links()) { if(link->linkType() == Poppler::Link::Goto) { const Poppler::LinkGoto* linkGoto = static_cast< const Poppler::LinkGoto* >(link); const QRectF boundary = linkGoto->linkArea().normalized(); const int page = linkGoto->destination().pageNumber(); qreal left = linkGoto->destination().isChangeLeft() ? linkGoto->destination().left() : 0.0; qreal top = linkGoto->destination().isChangeTop() ? linkGoto->destination().top() : 0.0; left = left >= 0.0 ? left : 0.0; left = left <= 1.0 ? left : 1.0; top = top >= 0.0 ? top : 0.0; top = top <= 1.0 ? top : 1.0; if(linkGoto->isExternal()) { links.append(new Link(boundary, linkGoto->fileName(), page)); } else { links.append(new Link(boundary, page, left, top)); } } else if(link->linkType() == Poppler::Link::Browse) { const Poppler::LinkBrowse* linkBrowse = static_cast< const Poppler::LinkBrowse* >(link); const QRectF boundary = linkBrowse->linkArea().normalized(); const QString url = linkBrowse->url(); links.append(new Link(boundary, url)); } else if(link->linkType() == Poppler::Link::Execute) { const Poppler::LinkExecute* linkExecute = static_cast< const Poppler::LinkExecute* >(link); const QRectF boundary = linkExecute->linkArea().normalized(); const QString url = linkExecute->fileName(); links.append(new Link(boundary, url)); } delete link; } return links; } QString Model::PdfPage::text(const QRectF& rect) const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 return m_page->text(rect); } QList< QRectF > Model::PdfPage::search(const QString& text, bool matchCase) const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 QList< QRectF > results; #if defined(HAS_POPPLER_22) results = m_page->search(text, matchCase ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive); #elif defined(HAS_POPPLER_14) double left = 0.0, top = 0.0, right = 0.0, bottom = 0.0; while(m_page->search(text, left, top, right, bottom, Poppler::Page::NextResult, matchCase ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive)) { QRectF rect; rect.setLeft(left); rect.setTop(top); rect.setRight(right); rect.setBottom(bottom); results.append(rect); } #else QRectF rect; while(m_page->search(text, rect, Poppler::Page::NextResult, matchCase ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive)) { results.append(rect); } #endif return results; } QList< Model::Annotation* > Model::PdfPage::annotations() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 QList< Annotation* > annotations; foreach(Poppler::Annotation* annotation, m_page->annotations()) { if(annotation->subType() == Poppler::Annotation::AText || annotation->subType() == Poppler::Annotation::AHighlight || annotation->subType() == Poppler::Annotation::AFileAttachment) { annotations.append(new PdfAnnotation(m_mutex, annotation)); continue; } delete annotation; } return annotations; } bool Model::PdfPage::canAddAndRemoveAnnotations() const { #ifdef HAS_POPPLER_20 return true; #else QMessageBox::information(0, tr("Information"), tr("Version 0.20.1 or higher of the Poppler library is required to add or remove annotations.")); return false; #endif // HAS_POPPLER_20 } Model::Annotation* Model::PdfPage::addTextAnnotation(const QRectF& boundary, const QColor& color) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 #ifdef HAS_POPPLER_20 Poppler::Annotation::Style style; style.setColor(color); Poppler::Annotation::Popup popup; popup.setFlags(Poppler::Annotation::Hidden | Poppler::Annotation::ToggleHidingOnMouse); Poppler::Annotation* annotation = new Poppler::TextAnnotation(Poppler::TextAnnotation::Linked); annotation->setBoundary(boundary); annotation->setStyle(style); annotation->setPopup(popup); m_page->addAnnotation(annotation); return new PdfAnnotation(m_mutex, annotation); #else Q_UNUSED(boundary); Q_UNUSED(color); return 0; #endif // HAS_POPPLER_20 } Model::Annotation* Model::PdfPage::addHighlightAnnotation(const QRectF& boundary, const QColor& color) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 #ifdef HAS_POPPLER_20 Poppler::Annotation::Style style; style.setColor(color); Poppler::Annotation::Popup popup; popup.setFlags(Poppler::Annotation::Hidden | Poppler::Annotation::ToggleHidingOnMouse); Poppler::HighlightAnnotation* annotation = new Poppler::HighlightAnnotation(); Poppler::HighlightAnnotation::Quad quad; quad.points[0] = boundary.topLeft(); quad.points[1] = boundary.topRight(); quad.points[2] = boundary.bottomRight(); quad.points[3] = boundary.bottomLeft(); annotation->setHighlightQuads(QList< Poppler::HighlightAnnotation::Quad >() << quad); annotation->setBoundary(boundary); annotation->setStyle(style); annotation->setPopup(popup); m_page->addAnnotation(annotation); return new PdfAnnotation(m_mutex, annotation); #else Q_UNUSED(boundary); Q_UNUSED(color); return 0; #endif // HAS_POPPLER_20 } void Model::PdfPage::removeAnnotation(Annotation* annotation) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 #ifdef HAS_POPPLER_20 PdfAnnotation* pdfAnnotation = static_cast< PdfAnnotation* >(annotation); m_page->removeAnnotation(pdfAnnotation->m_annotation); pdfAnnotation->m_annotation = 0; #else Q_UNUSED(annotation); #endif // HAS_POPPLER_20 } QList< Model::FormField* > Model::PdfPage::formFields() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(m_mutex); #endif // HAS_POPPLER_24 QList< FormField* > formFields; foreach(Poppler::FormField* formField, m_page->formFields()) { if(!formField->isVisible() || formField->isReadOnly()) { delete formField; continue; } if(formField->type() == Poppler::FormField::FormText) { Poppler::FormFieldText* formFieldText = static_cast< Poppler::FormFieldText* >(formField); if(formFieldText->textType() == Poppler::FormFieldText::Normal || formFieldText->textType() == Poppler::FormFieldText::Multiline) { formFields.append(new PdfFormField(m_mutex, formField)); continue; } } else if(formField->type() == Poppler::FormField::FormChoice) { Poppler::FormFieldChoice* formFieldChoice = static_cast< Poppler::FormFieldChoice* >(formField); if(formFieldChoice->choiceType() == Poppler::FormFieldChoice::ListBox || formFieldChoice->choiceType() == Poppler::FormFieldChoice::ComboBox) { formFields.append(new PdfFormField(m_mutex, formField)); continue; } } else if(formField->type() == Poppler::FormField::FormButton) { Poppler::FormFieldButton* formFieldButton = static_cast< Poppler::FormFieldButton* >(formField); if(formFieldButton->buttonType() == Poppler::FormFieldButton::CheckBox || formFieldButton->buttonType() == Poppler::FormFieldButton::Radio) { formFields.append(new PdfFormField(m_mutex, formField)); continue; } } delete formField; } return formFields; } Model::PdfDocument::PdfDocument(Poppler::Document* document) : m_mutex(), m_document(document) { } Model::PdfDocument::~PdfDocument() { delete m_document; } int Model::PdfDocument::numberOfPages() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 return m_document->numPages(); } Model::Page* Model::PdfDocument::page(int index) const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 Poppler::Page* page = m_document->page(index); return page != 0 ? new PdfPage(&m_mutex, page) : 0; } bool Model::PdfDocument::isLocked() const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 return m_document->isLocked(); } bool Model::PdfDocument::unlock(const QString& password) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 return m_document->unlock(password.toLatin1(), password.toLatin1()); } QStringList Model::PdfDocument::saveFilter() const { return QStringList() << "Portable document format (*.pdf)"; } bool Model::PdfDocument::canSave() const { return true; } bool Model::PdfDocument::save(const QString& filePath, bool withChanges) const { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 QScopedPointer< Poppler::PDFConverter > pdfConverter(m_document->pdfConverter()); pdfConverter->setOutputFileName(filePath); if(withChanges) { pdfConverter->setPDFOptions(pdfConverter->pdfOptions() | Poppler::PDFConverter::WithChanges); } return pdfConverter->convert(); } bool Model::PdfDocument::canBePrintedUsingCUPS() const { return true; } void Model::PdfDocument::setPaperColor(const QColor& paperColor) { #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 m_document->setPaperColor(paperColor); } static void loadOutline(Poppler::Document* document, const QDomNode& node, QStandardItem* parent) { const QDomElement element = node.toElement(); QStandardItem* item = new QStandardItem(element.tagName()); item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); Poppler::LinkDestination* linkDestination = 0; if(element.hasAttribute("Destination")) { linkDestination = new Poppler::LinkDestination(element.attribute("Destination")); } else if(element.hasAttribute("DestinationName")) { linkDestination = document->linkDestination(element.attribute("DestinationName")); } if(linkDestination != 0) { int page = linkDestination->pageNumber(); qreal left = 0.0; qreal top = 0.0; page = page >= 1 ? page : 1; page = page <= document->numPages() ? page : document->numPages(); if(linkDestination->isChangeLeft()) { left = linkDestination->left(); left = left >= 0.0 ? left : 0.0; left = left <= 1.0 ? left : 1.0; } if(linkDestination->isChangeTop()) { top = linkDestination->top(); top = top >= 0.0 ? top : 0.0; top = top <= 1.0 ? top : 1.0; } delete linkDestination; item->setData(page, Qt::UserRole + 1); item->setData(left, Qt::UserRole + 2); item->setData(top, Qt::UserRole + 3); QStandardItem* pageItem = item->clone(); pageItem->setText(QString::number(page)); pageItem->setTextAlignment(Qt::AlignRight); parent->appendRow(QList< QStandardItem* >() << item << pageItem); } else { parent->appendRow(item); } const QDomNode& siblingNode = node.nextSibling(); if(!siblingNode.isNull()) { loadOutline(document, siblingNode, parent); } const QDomNode& childNode = node.firstChild(); if(!childNode.isNull()) { loadOutline(document, childNode, item); } } void Model::PdfDocument::loadOutline(QStandardItemModel* outlineModel) const { Document::loadOutline(outlineModel); #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 QDomDocument* toc = m_document->toc(); if(toc != 0) { ::loadOutline(m_document, toc->firstChild(), outlineModel->invisibleRootItem()); delete toc; } } void Model::PdfDocument::loadProperties(QStandardItemModel* propertiesModel) const { Document::loadProperties(propertiesModel); #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 QStringList keys = m_document->infoKeys(); propertiesModel->setRowCount(keys.count()); propertiesModel->setColumnCount(2); for(int index = 0; index < keys.count(); ++index) { const QString key = keys.at(index); QString value = m_document->info(key); if(value.startsWith("D:")) { value = m_document->date(key).toString(); } propertiesModel->setItem(index, 0, new QStandardItem(key)); propertiesModel->setItem(index, 1, new QStandardItem(value)); } } void Model::PdfDocument::loadFonts(QStandardItemModel* fontsModel) const { Document::Document::loadFonts(fontsModel); #ifndef HAS_POPPLER_24 QMutexLocker mutexLocker(&m_mutex); #endif // HAS_POPPLER_24 const QList< Poppler::FontInfo > fonts = m_document->fonts(); fontsModel->setRowCount(fonts.count()); fontsModel->setColumnCount(5); fontsModel->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Embedded") << tr("Subset") << tr("File")); for(int index = 0; index < fonts.count(); ++index) { const Poppler::FontInfo& font = fonts[index]; fontsModel->setItem(index, 0, new QStandardItem(font.name())); fontsModel->setItem(index, 1, new QStandardItem(font.typeName())); fontsModel->setItem(index, 2, new QStandardItem(font.isEmbedded() ? tr("Yes") : tr("No"))); fontsModel->setItem(index, 3, new QStandardItem(font.isSubset() ? tr("Yes") : tr("No"))); fontsModel->setItem(index, 4, new QStandardItem(font.file())); } } PdfSettingsWidget::PdfSettingsWidget(QSettings* settings, QWidget* parent) : SettingsWidget(parent), m_settings(settings) { m_layout = new QFormLayout(this); // antialiasing m_antialiasingCheckBox = new QCheckBox(this); m_antialiasingCheckBox->setChecked(m_settings->value("antialiasing", true).toBool()); m_layout->addRow(tr("Antialiasing:"), m_antialiasingCheckBox); // text antialising m_textAntialiasingCheckBox = new QCheckBox(this); m_textAntialiasingCheckBox->setChecked(m_settings->value("textAntialiasing", true).toBool()); m_layout->addRow(tr("Text antialiasing:"), m_textAntialiasingCheckBox); // text hinting #ifdef HAS_POPPLER_18 m_textHintingComboBox = new QComboBox(this); m_textHintingComboBox->addItem(tr("None")); m_textHintingComboBox->addItem(tr("Full")); m_textHintingComboBox->addItem(tr("Reduced")); m_textHintingComboBox->setCurrentIndex(m_settings->value("textHinting", 0).toInt()); m_layout->addRow(tr("Text hinting:"), m_textHintingComboBox); #else m_textHintingCheckBox = new QCheckBox(this); m_textHintingCheckBox->setChecked(m_settings->value("textHinting", false).toBool()); m_layout->addRow(tr("Text hinting:"), m_textHintingCheckBox); #endif // HAS_POPPLER_18 #ifdef HAS_POPPLER_22 // overprint preview m_overprintPreviewCheckBox = new QCheckBox(this); m_overprintPreviewCheckBox->setChecked(m_settings->value("overprintPreview", false).toBool()); m_layout->addRow(tr("Overprint preview:"), m_overprintPreviewCheckBox); #endif // HAS_POPPLER_22 #ifdef HAS_POPPLER_24 m_thinLineModeComboBox = new QComboBox(this); m_thinLineModeComboBox->addItem(tr("None")); m_thinLineModeComboBox->addItem(tr("Solid")); m_thinLineModeComboBox->addItem(tr("Shaped")); m_thinLineModeComboBox->setCurrentIndex(m_settings->value("thinLineMode", 0).toInt()); m_layout->addRow(tr("Thin line mode:"), m_thinLineModeComboBox); #endif // HAS_POPPLER_24 } void PdfSettingsWidget::accept() { m_settings->setValue("antialiasing", m_antialiasingCheckBox->isChecked()); m_settings->setValue("textAntialiasing", m_textAntialiasingCheckBox->isChecked()); #ifdef HAS_POPPLER_18 m_settings->setValue("textHinting", m_textHintingComboBox->currentIndex()); #else m_settings->setValue("textHinting", m_textHintingCheckBox->isChecked()); #endif // HAS_POPPLER_18 #ifdef HAS_POPPLER_22 m_settings->setValue("overprintPreview", m_overprintPreviewCheckBox->isChecked()); #endif // HAS_POPPLER_22 #ifdef HAS_POPPLER_24 m_settings->setValue("thinLineMode", m_thinLineModeComboBox->currentIndex()); #endif // HAS_POPPLER_24 } void PdfSettingsWidget::reset() { m_antialiasingCheckBox->setChecked(true); m_textAntialiasingCheckBox->setChecked(true); #ifdef HAS_POPPLER_18 m_textHintingComboBox->setCurrentIndex(0); #else m_textHintingCheckBox->setChecked(false); #endif // HAS_POPPLER_18 #ifdef HAS_POPPLER_22 m_overprintPreviewCheckBox->setChecked(false); #endif // HAS_POPPLER_22 #ifdef HAS_POPPLER_24 m_thinLineModeComboBox->setCurrentIndex(0); #endif // HAS_POPPLER_24 } PdfPlugin::PdfPlugin(QObject* parent) : QObject(parent) { setObjectName("PdfPlugin"); m_settings = new QSettings("qpdfview", "pdf-plugin", this); } Model::Document* PdfPlugin::loadDocument(const QString& filePath) const { Poppler::Document* document = Poppler::Document::load(filePath); if(document != 0) { document->setRenderHint(Poppler::Document::Antialiasing, m_settings->value("antialiasing", true).toBool()); document->setRenderHint(Poppler::Document::TextAntialiasing, m_settings->value("textAntialiasing", true).toBool()); #ifdef HAS_POPPLER_18 switch(m_settings->value("textHinting", 0).toInt()) { default: case 0: document->setRenderHint(Poppler::Document::TextHinting, false); break; case 1: document->setRenderHint(Poppler::Document::TextHinting, true); document->setRenderHint(Poppler::Document::TextSlightHinting, false); break; case 2: document->setRenderHint(Poppler::Document::TextHinting, true); document->setRenderHint(Poppler::Document::TextSlightHinting, true); break; } #else document->setRenderHint(Poppler::Document::TextHinting, m_settings->value("textHinting", false).toBool()); #endif // HAS_POPPLER_18 #ifdef HAS_POPPLER_22 document->setRenderHint(Poppler::Document::OverprintPreview, m_settings->value("overprintPreview", false).toBool()); #endif // HAS_POPPLER_22 #ifdef HAS_POPPLER_24 switch(m_settings->value("thinLineMode", 0).toInt()) { default: case 0: document->setRenderHint(Poppler::Document::ThinLineSolid, false); document->setRenderHint(Poppler::Document::ThinLineShape, false); break; case 1: document->setRenderHint(Poppler::Document::ThinLineSolid, true); document->setRenderHint(Poppler::Document::ThinLineShape, false); break; case 2: document->setRenderHint(Poppler::Document::ThinLineSolid, false); document->setRenderHint(Poppler::Document::ThinLineShape, true); break; } #endif // HAS_POPPLER_24 } return document != 0 ? new Model::PdfDocument(document) : 0; } SettingsWidget* PdfPlugin::createSettingsWidget(QWidget* parent) const { return new PdfSettingsWidget(m_settings, parent); } #if QT_VERSION < QT_VERSION_CHECK(5,0,0) Q_EXPORT_PLUGIN2(qpdfview_pdf, PdfPlugin) #endif // QT_VERSION qpdfview-0.4.7/sources/pdfmodel.h0000644000000000000000000001162012246606025015126 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PDFMODEL_H #define PDFMODEL_H #include #include #include class QCheckBox; class QComboBox; class QFormLayout; class QSettings; namespace Poppler { class Annotation; class Document; class FormField; class Page; } #include "model.h" class PdfPlugin; namespace Model { class PdfAnnotation : public Annotation { Q_OBJECT friend class PdfPage; public: ~PdfAnnotation(); QRectF boundary() const; QString contents() const; QWidget* createWidget(); private: Q_DISABLE_COPY(PdfAnnotation) PdfAnnotation(QMutex* mutex, Poppler::Annotation* annotation); mutable QMutex* m_mutex; Poppler::Annotation* m_annotation; }; class PdfFormField : public FormField { Q_OBJECT friend class PdfPage; public: ~PdfFormField(); QRectF boundary() const; QString name() const; QWidget* createWidget(); private: Q_DISABLE_COPY(PdfFormField) PdfFormField(QMutex* mutex, Poppler::FormField* formField); mutable QMutex* m_mutex; Poppler::FormField* m_formField; }; class PdfPage : public Page { Q_DECLARE_TR_FUNCTIONS(Model::PdfPage) friend class PdfDocument; public: ~PdfPage(); QSizeF size() const; QImage render(qreal horizontalResolution, qreal verticalResolution, Rotation rotation, const QRect& boundingRect) const; QList< Link* > links() const; QString text(const QRectF& rect) const; QList< QRectF > search(const QString& text, bool matchCase) const; QList< Annotation* > annotations() const; bool canAddAndRemoveAnnotations() const; Annotation* addTextAnnotation(const QRectF& boundary, const QColor& color); Annotation* addHighlightAnnotation(const QRectF& boundary, const QColor& color); void removeAnnotation(Annotation* annotation); QList< FormField* > formFields() const; private: Q_DISABLE_COPY(PdfPage) PdfPage(QMutex* mutex, Poppler::Page* page); mutable QMutex* m_mutex; Poppler::Page* m_page; }; class PdfDocument : public Document { Q_DECLARE_TR_FUNCTIONS(Model::PdfDocument) friend class ::PdfPlugin; public: ~PdfDocument(); int numberOfPages() const; Page* page(int index) const; bool isLocked() const; bool unlock(const QString& password); QStringList saveFilter() const; bool canSave() const; bool save(const QString& filePath, bool withChanges) const; bool canBePrintedUsingCUPS() const; void setPaperColor(const QColor& paperColor); void loadOutline(QStandardItemModel* outlineModel) const; void loadProperties(QStandardItemModel* propertiesModel) const; void loadFonts(QStandardItemModel* fontsModel) const; private: Q_DISABLE_COPY(PdfDocument) PdfDocument(Poppler::Document* document); mutable QMutex m_mutex; Poppler::Document* m_document; }; } class PdfSettingsWidget : public SettingsWidget { Q_OBJECT public: PdfSettingsWidget(QSettings* settings, QWidget* parent = 0); void accept(); void reset(); private: Q_DISABLE_COPY(PdfSettingsWidget) QSettings* m_settings; QFormLayout* m_layout; QCheckBox* m_antialiasingCheckBox; QCheckBox* m_textAntialiasingCheckBox; #ifdef HAS_POPPLER_18 QComboBox* m_textHintingComboBox; #else QCheckBox* m_textHintingCheckBox; #endif // HAS_POPPLER_18 #ifdef HAS_POPPLER_22 QCheckBox* m_overprintPreviewCheckBox; #endif // HAS_POPPLER_22 #ifdef HAS_POPPLER_24 QComboBox* m_thinLineModeComboBox; #endif // HAS_POPPLER_24 }; class PdfPlugin : public QObject, Plugin { Q_OBJECT Q_INTERFACES(Plugin) #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) Q_PLUGIN_METADATA(IID "local.qpdfview.Plugin") #endif // QT_VERSION public: PdfPlugin(QObject* parent = 0); Model::Document* loadDocument(const QString& filePath) const; SettingsWidget* createSettingsWidget(QWidget* parent) const; private: Q_DISABLE_COPY(PdfPlugin) QSettings* m_settings; }; #endif // PDFMODEL_H qpdfview-0.4.7/sources/pluginhandler.cpp0000644000000000000000000001620312246606025016525 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "pluginhandler.h" #include #include #include #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include #endif // QT_VERSION #ifdef WITH_MAGIC #include #endif // WITH_MAGIC #include "model.h" #ifdef WITH_PDF Plugin* PluginHandler::s_pdfPlugin = 0; #endif // WITH_PDF #ifdef WITH_PS Plugin* PluginHandler::s_psPlugin = 0; #endif // WITH_PS #ifdef WITH_DJVU Plugin* PluginHandler::s_djvuPlugin = 0; #endif // WITH_DJVU Model::Document* PluginHandler::loadDocument(const QString& filePath) { enum { UnknownType = 0, PDF = 1, PS = 2, DjVu = 3 } fileType = UnknownType; #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) const QMimeType mimeType = QMimeDatabase().mimeTypeForFile(filePath, QMimeDatabase::MatchContent); if(mimeType.name() == "application/pdf") { fileType = PDF; } else if(mimeType.name() == "application/postscript") { fileType = PS; } else if(mimeType.name() == "image/vnd.djvu") { fileType = DjVu; } else { qDebug() << "Unknown file type:" << mimeType.name(); } #else #ifdef WITH_MAGIC magic_t cookie = magic_open(MAGIC_MIME_TYPE | MAGIC_SYMLINK); if(magic_load(cookie, 0) == 0) { const char* mime_type = magic_file(cookie, QFile::encodeName(filePath)); if(qstrncmp(mime_type, "application/pdf", 15) == 0) { fileType = PDF; } else if(qstrncmp(mime_type, "application/postscript", 22) == 0) { fileType = PS; } else if(qstrncmp(mime_type, "image/vnd.djvu", 14) == 0) { fileType = DjVu; } else { qDebug() << "Unknown file type:" << mime_type; } } magic_close(cookie); #else const QFileInfo fileInfo(filePath); if(fileInfo.suffix().toLower() == "pdf") { fileType = PDF; } else if(fileInfo.suffix().toLower() == "ps" || fileInfo.suffix().toLower() == "eps") { fileType = PS; } else if(fileInfo.suffix().toLower() == "djvu" || fileInfo.suffix().toLower() == "djv") { fileType = DjVu; } else { qDebug() << "Unkown file type:" << fileInfo.suffix().toLower(); } #endif // WITH_MAGIC #endif // QT_VERSION #ifdef WITH_PDF if(fileType == PDF) { loadPdfPlugin(); return s_pdfPlugin != 0 ? s_pdfPlugin->loadDocument(filePath) : 0; } #endif // WITH_PDF #ifdef WITH_PS if(fileType == PS) { loadPsPlugin(); return s_psPlugin != 0 ? s_psPlugin->loadDocument(filePath) : 0; } #endif // WITH_PS #ifdef WITH_DJVU if(fileType == DjVu) { loadDjVuPlugin(); return s_djvuPlugin != 0 ? s_djvuPlugin->loadDocument(filePath) : 0; } #endif // WITH_DJVU return 0; } #ifdef WITH_PDF SettingsWidget* PluginHandler::createPdfSettingsWidget(QWidget* parent) { loadPdfPlugin(); return s_pdfPlugin != 0 ? s_pdfPlugin->createSettingsWidget(parent) : 0; } #endif // WITH_PDF #ifdef WITH_PS SettingsWidget* PluginHandler::createPsSettingsWidget(QWidget* parent) { loadPsPlugin(); return s_psPlugin != 0 ? s_psPlugin->createSettingsWidget(parent) : 0; } #endif // WITH_PS Plugin* PluginHandler::loadPlugin(const QString& fileName) { QPluginLoader pluginLoader(QDir(QApplication::applicationDirPath()).absoluteFilePath(fileName)); if(!pluginLoader.load()) { const QString firstFileName = pluginLoader.fileName(); const QString firstErrorString = pluginLoader.errorString(); pluginLoader.setFileName(QDir(PLUGIN_INSTALL_PATH).absoluteFilePath(fileName)); if(!pluginLoader.load()) { qCritical() << "Could not load plug-in in first attempt:" << firstFileName; qCritical() << firstErrorString; qCritical() << "Could not load plug-in in second attempt:" << pluginLoader.fileName(); qCritical() << pluginLoader.errorString(); return 0; } } Plugin* plugin = qobject_cast< Plugin* >(pluginLoader.instance()); if(plugin == 0) { qCritical() << "Could not instantiate plug-in:" << pluginLoader.fileName(); qCritical() << pluginLoader.errorString(); } return plugin; } Plugin* PluginHandler::loadStaticPlugin(const QString& objectName) { foreach(QObject* object, QPluginLoader::staticInstances()) { if(object->objectName() == objectName) { Plugin* plugin = qobject_cast< Plugin* >(object); if(plugin != 0) { return plugin; } } } qCritical() << "Could not load static plug-in:" << objectName; return 0; } #ifdef WITH_PDF #ifdef STATIC_PDF_PLUGIN Q_IMPORT_PLUGIN(qpdfview_pdf) #endif // STATIC_PDF_PLUGIN void PluginHandler::loadPdfPlugin() { if(s_pdfPlugin == 0) { #ifndef STATIC_PDF_PLUGIN Plugin* pdfPlugin = loadPlugin(PDF_PLUGIN_NAME); #else Plugin* pdfPlugin = loadStaticPlugin("PdfPlugin"); #endif // STATIC_PDF_PLUGIN if(pdfPlugin != 0) { s_pdfPlugin = pdfPlugin; } else { QMessageBox::critical(0, tr("Critical"), tr("Could not load PDF plug-in!")); } } } #endif // WITH_PDF #ifdef WITH_PS #ifdef STATIC_PS_PLUGIN Q_IMPORT_PLUGIN(qpdfview_ps) #endif // STATIC_PS_PLUGIN void PluginHandler::loadPsPlugin() { if(s_psPlugin == 0) { #ifndef STATIC_PS_PLUGIN Plugin* psPlugin = loadPlugin(PS_PLUGIN_NAME); #else Plugin* psPlugin = loadStaticPlugin("PsPlugin"); #endif // STATIC_PS_PLUGIN if(psPlugin != 0) { s_psPlugin = psPlugin; } else { QMessageBox::critical(0, tr("Critical"), tr("Could not load PS plug-in!")); } } } #endif // WITH_PS #ifdef WITH_DJVU #ifdef STATIC_DJVU_PLUGIN Q_IMPORT_PLUGIN(qpdfview_djvu) #endif // STATIC_DJVU_PLUGIN void PluginHandler::loadDjVuPlugin() { if(s_djvuPlugin == 0) { #ifndef STATIC_DJVU_PLUGIN Plugin* djvuPlugin = loadPlugin(DJVU_PLUGIN_NAME); #else Plugin* djvuPlugin = loadStaticPlugin("DjVuPlugin"); #endif // STATIC_DJVU_PLUGIN if(djvuPlugin != 0) { s_djvuPlugin = djvuPlugin; } else { QMessageBox::critical(0, tr("Critical"), tr("Could not load DjVu plug-in!")); } } } #endif // WITH_DJVU qpdfview-0.4.7/sources/pluginhandler.h0000644000000000000000000000326412246606025016175 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PLUGINHANDLER_H #define PLUGINHANDLER_H #include class QString; class QWidget; namespace Model { class Document; } class SettingsWidget; class Plugin; class PluginHandler { Q_DECLARE_TR_FUNCTIONS(PluginHandler) public: static Model::Document* loadDocument(const QString& filePath); #ifdef WITH_PDF static SettingsWidget* createPdfSettingsWidget(QWidget* parent = 0); #endif // WITH_PDF #ifdef WITH_PS static SettingsWidget* createPsSettingsWidget(QWidget* parent = 0); #endif // WITH_PS private: PluginHandler() {} static Plugin* loadPlugin(const QString& fileName); static Plugin* loadStaticPlugin(const QString& objectName); #ifdef WITH_PDF static Plugin* s_pdfPlugin; static void loadPdfPlugin(); #endif // WITH_PDF #ifdef WITH_PS static Plugin* s_psPlugin; static void loadPsPlugin(); #endif // WITH_PS #ifdef WITH_DJVU static Plugin* s_djvuPlugin; static void loadDjVuPlugin(); #endif // WITH_DJVU }; #endif // PLUGINHANDLER_H qpdfview-0.4.7/sources/presentationview.cpp0000644000000000000000000002412012246606025017274 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "presentationview.h" #include #include #include #include "settings.h" #include "model.h" #include "pageitem.h" #include "documentview.h" Settings* PresentationView::s_settings = 0; PresentationView::PresentationView(const QList< Model::Page* >& pages, QWidget* parent) : QGraphicsView(parent), m_prefetchTimer(0), m_pages(pages), m_currentPage(1), m_past(), m_future(), m_rotation(RotateBy0), m_invertColors(false), m_pageItems() { if(s_settings == 0) { s_settings = Settings::instance(); } setWindowFlags(windowFlags() | Qt::FramelessWindowHint); setWindowState(windowState() | Qt::WindowFullScreen); setFrameShape(QFrame::NoFrame); setAcceptDrops(false); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setScene(new QGraphicsScene(this)); preparePages(); prepareBackground(); // prefetch m_prefetchTimer = new QTimer(this); m_prefetchTimer->setInterval(250); m_prefetchTimer->setSingleShot(true); connect(this, SIGNAL(currentPageChanged(int)), m_prefetchTimer, SLOT(start())); connect(this, SIGNAL(rotationChanged(Rotation)), m_prefetchTimer, SLOT(start())); connect(m_prefetchTimer, SIGNAL(timeout()), SLOT(on_prefetch_timeout())); if(s_settings->documentView().prefetch()) { m_prefetchTimer->blockSignals(false); m_prefetchTimer->start(); } else { m_prefetchTimer->blockSignals(true); m_prefetchTimer->stop(); } prepareScene(); prepareView(); } PresentationView::~PresentationView() { qDeleteAll(m_pageItems); } int PresentationView::numberOfPages() const { return m_pages.count(); } int PresentationView::currentPage() const { return m_currentPage; } Rotation PresentationView::rotation() const { return m_rotation; } void PresentationView::setRotation(Rotation rotation) { if(m_rotation != rotation) { m_rotation = rotation; prepareScene(); prepareView(); emit rotationChanged(m_rotation); } } bool PresentationView::invertColors() const { return m_invertColors; } void PresentationView::setInvertColors(bool invertColors) { if(m_invertColors != invertColors) { m_invertColors = invertColors; foreach(PageItem* page, m_pageItems) { page->setInvertColors(m_invertColors); } prepareBackground(); emit invertColorsChanged(m_invertColors); } } void PresentationView::show() { QWidget::show(); prepareView(); } void PresentationView::previousPage() { jumpToPage(m_currentPage - 1); } void PresentationView::nextPage() { jumpToPage(m_currentPage + 1); } void PresentationView::firstPage() { jumpToPage(1); } void PresentationView::lastPage() { jumpToPage(m_pages.count()); } void PresentationView::jumpToPage(int page, bool trackChange) { if(m_currentPage != page && page >= 1 && page <= m_pages.count()) { if(trackChange) { m_past.append(m_currentPage); } m_currentPage = page; prepareView(); emit currentPageChanged(m_currentPage, trackChange); } } void PresentationView::jumpBackward() { if(!m_past.isEmpty()) { m_future.prepend(m_currentPage); jumpToPage(m_past.takeLast(), false); } } void PresentationView::jumpForward() { if(!m_future.isEmpty()) { m_past.append(m_currentPage); jumpToPage(m_future.takeFirst(), false); } } void PresentationView::rotateLeft() { switch(m_rotation) { default: case RotateBy0: setRotation(RotateBy270); break; case RotateBy90: setRotation(RotateBy0); break; case RotateBy180: setRotation(RotateBy90); break; case RotateBy270: setRotation(RotateBy180); break; } } void PresentationView::rotateRight() { switch(m_rotation) { default: case RotateBy0: setRotation(RotateBy90); break; case RotateBy90: setRotation(RotateBy180); break; case RotateBy180: setRotation(RotateBy270); break; case RotateBy270: setRotation(RotateBy0); break; } } void PresentationView::on_prefetch_timeout() { int fromPage = m_currentPage, toPage = m_currentPage; fromPage -= s_settings->documentView().prefetchDistance() / 2; toPage += s_settings->documentView().prefetchDistance(); fromPage = qMax(fromPage, 1); toPage = qMin(toPage, m_pages.count()); for(int index = fromPage - 1; index <= toPage - 1; ++index) { m_pageItems.at(index)->startRender(true); } } void PresentationView::on_pages_linkClicked(int page, qreal left, qreal top) { Q_UNUSED(left); Q_UNUSED(top); page = qMax(page, 1); page = qMin(page, m_pages.count()); jumpToPage(page, true); } void PresentationView::resizeEvent(QResizeEvent* event) { QGraphicsView::resizeEvent(event); prepareScene(); prepareView(); } void PresentationView::keyPressEvent(QKeyEvent* event) { switch(event->modifiers() + event->key()) { case Qt::Key_PageUp: case Qt::Key_Up: case Qt::Key_Left: case Qt::Key_Backspace: previousPage(); event->accept(); return; case Qt::Key_PageDown: case Qt::Key_Down: case Qt::Key_Right: case Qt::Key_Space: nextPage(); event->accept(); return; case Qt::Key_Home: firstPage(); event->accept(); return; case Qt::Key_End: lastPage(); event->accept(); return; case Qt::CTRL + Qt::Key_Return: jumpBackward(); event->accept(); return; case Qt::CTRL + Qt::SHIFT + Qt::Key_Return: jumpForward(); event->accept(); return; case Qt::CTRL + Qt::Key_Left: rotateLeft(); event->accept(); return; case Qt::CTRL + Qt::Key_Right: rotateRight(); event->accept(); return; case Qt::CTRL + Qt::Key_I: setInvertColors(!invertColors()); event->accept(); return; case Qt::Key_F12: case Qt::Key_Escape: close(); event->accept(); return; } QWidget::keyPressEvent(event); } void PresentationView::wheelEvent(QWheelEvent* event) { if(event->modifiers() == s_settings->documentView().rotateModifiers()) { if(event->delta() > 0) { rotateLeft(); } else { rotateRight(); } event->accept(); return; } else if(event->modifiers() == Qt::NoModifier) { if(event->delta() > 0 && m_currentPage != 1) { previousPage(); event->accept(); return; } else if(event->delta() < 0 && m_currentPage != m_pages.count()) { nextPage(); event->accept(); return; } } QGraphicsView::wheelEvent(event); } void PresentationView::preparePages() { for(int index = 0; index < m_pages.count(); ++index) { PageItem* page = new PageItem(m_pages.at(index), index, true); page->setInvertColors(m_invertColors); scene()->addItem(page); m_pageItems.append(page); connect(page, SIGNAL(linkClicked(int,qreal,qreal)), SLOT(on_pages_linkClicked(int,qreal,qreal))); } } void PresentationView::prepareBackground() { QColor backgroundColor = s_settings->presentationView().backgroundColor(); if(!backgroundColor.isValid()) { backgroundColor = s_settings->pageItem().paperColor(); } if(m_invertColors) { backgroundColor.setRgb(~backgroundColor.rgb()); } scene()->setBackgroundBrush(QBrush(backgroundColor)); } void PresentationView::prepareScene() { for(int index = 0; index < m_pageItems.count(); ++index) { PageItem* page = m_pageItems.at(index); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) page->setDevicePixelRatio(devicePixelRatio()); #endif // QT_VERSION page->setResolution(logicalDpiX(), logicalDpiY()); const qreal visibleWidth = viewport()->width(); const qreal visibleHeight = viewport()->height(); qreal pageWidth = 0.0; qreal pageHeight = 0.0; switch(m_rotation) { default: case RotateBy0: case RotateBy180: pageWidth = logicalDpiX() / 72.0 * page->size().width(); pageHeight = logicalDpiY() / 72.0 * page->size().height(); break; case RotateBy90: case RotateBy270: pageWidth = logicalDpiX() / 72.0 * page->size().height(); pageHeight = logicalDpiY() / 72.0 * page->size().width(); break; } const qreal scaleFactor = qMin(visibleWidth / pageWidth, visibleHeight / pageHeight); page->setScaleFactor(scaleFactor); page->setRotation(m_rotation); } } void PresentationView::prepareView() { for(int index = 0; index < m_pageItems.count(); ++index) { PageItem* page = m_pageItems.at(index); if(index == m_currentPage - 1) { page->setVisible(true); setSceneRect(page->boundingRect().translated(page->pos())); } else { page->setVisible(false); page->cancelRender(); } } viewport()->update(); } qpdfview-0.4.7/sources/presentationview.h0000644000000000000000000000454112246606025016746 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PRESENTATIONVIEW_H #define PRESENTATIONVIEW_H #include #include "global.h" namespace Model { class Page; } class Settings; class PageItem; class PresentationView : public QGraphicsView { Q_OBJECT public: PresentationView(const QList< Model::Page* >& pages, QWidget* parent = 0); ~PresentationView(); int numberOfPages() const; int currentPage() const; Rotation rotation() const; void setRotation(Rotation rotation); bool invertColors() const; void setInvertColors(bool invertColors); signals: void currentPageChanged(int currentPage, bool trackChange = false); void rotationChanged(Rotation rotation); void invertColorsChanged(bool invertColors); public slots: void show(); void previousPage(); void nextPage(); void firstPage(); void lastPage(); void jumpToPage(int page, bool trackChange = true); void jumpBackward(); void jumpForward(); void rotateLeft(); void rotateRight(); protected slots: void on_prefetch_timeout(); void on_pages_linkClicked(int page, qreal left, qreal top); protected: void resizeEvent(QResizeEvent* event); void keyPressEvent(QKeyEvent* event); void wheelEvent(QWheelEvent* event); private: Q_DISABLE_COPY(PresentationView) static Settings* s_settings; QTimer* m_prefetchTimer; QList< Model::Page* > m_pages; int m_currentPage; QList< int > m_past; QList< int > m_future; Rotation m_rotation; bool m_invertColors; QVector< PageItem* > m_pageItems; void preparePages(); void prepareBackground(); void prepareScene(); void prepareView(); }; #endif // PRESENTATIONVIEW_H qpdfview-0.4.7/sources/printdialog.cpp0000644000000000000000000001452512246606025016212 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "printdialog.h" #include #include #include #include #include "settings.h" Settings* PrintDialog::s_settings = 0; QPrinter* PrintDialog::createPrinter() { QPrinter* printer = new QPrinter(); printer->setCollateCopies(Settings::instance()->printDialog().collateCopies()); printer->setPageOrder(Settings::instance()->printDialog().pageOrder()); printer->setOrientation(Settings::instance()->printDialog().orientation()); printer->setColorMode(Settings::instance()->printDialog().colorMode()); printer->setDuplex(Settings::instance()->printDialog().duplex()); return printer; } PrintDialog::PrintDialog(QPrinter* printer, QWidget* parent) : QPrintDialog(printer, parent) { if(s_settings == 0) { s_settings = Settings::instance(); } // print options m_printOptionsWidget = new QWidget(this); m_printOptionsLayout = new QFormLayout(m_printOptionsWidget); m_fitToPageCheckBox = new QCheckBox(this); m_fitToPageCheckBox->setChecked(s_settings->printDialog().fitToPage()); m_printOptionsLayout->addRow(tr("Fit to page:"), m_fitToPageCheckBox); m_pageRangesLineEdit = new QLineEdit(this); m_printOptionsLayout->addRow(tr("Page ranges:"), m_pageRangesLineEdit); m_pageSetComboBox = new QComboBox(this); m_pageSetComboBox->addItem(tr("All pages"), static_cast< uint >(PrintOptions::AllPages)); m_pageSetComboBox->addItem(tr("Even pages"), static_cast< uint >(PrintOptions::EvenPages)); m_pageSetComboBox->addItem(tr("Odd pages"), static_cast< uint >(PrintOptions::OddPages)); m_pageSetComboBox->setCurrentIndex(m_pageSetComboBox->findData(static_cast< uint >(s_settings->printDialog().pageSet()))); m_printOptionsLayout->addRow(tr("Page set:"), m_pageSetComboBox); m_numberUpComboBox = new QComboBox(this); m_numberUpComboBox->addItem(tr("Single page"), static_cast< uint >(PrintOptions::SinglePage)); m_numberUpComboBox->addItem(tr("Two pages"), static_cast< uint >(PrintOptions::TwoPages)); m_numberUpComboBox->addItem(tr("Four pages"), static_cast< uint >(PrintOptions::FourPages)); m_numberUpComboBox->addItem(tr("Six pages"), static_cast< uint >(PrintOptions::SixPages)); m_numberUpComboBox->addItem(tr("Nine pages"), static_cast< uint >(PrintOptions::NinePages)); m_numberUpComboBox->addItem(tr("Sixteen pages"), static_cast< uint >(PrintOptions::SixteenPages)); m_numberUpComboBox->setCurrentIndex(m_numberUpComboBox->findData(static_cast< uint >(s_settings->printDialog().numberUp()))); m_printOptionsLayout->addRow(tr("Number-up:"), m_numberUpComboBox); m_numberUpLayoutComboBox = new QComboBox(this); m_numberUpLayoutComboBox->addItem(tr("Bottom to top and left to right"), static_cast< uint >(PrintOptions::BottomTopLeftRight)); m_numberUpLayoutComboBox->addItem(tr("Bottom to top and right to left"), static_cast< uint >(PrintOptions::BottomTopRightLeft)); m_numberUpLayoutComboBox->addItem(tr("Left to right and bottom to top"), static_cast< uint >(PrintOptions::LeftRightBottomTop)); m_numberUpLayoutComboBox->addItem(tr("Left to right and top to bottom"), static_cast< uint >(PrintOptions::LeftRightTopBottom)); m_numberUpLayoutComboBox->addItem(tr("Right to left and bottom to top"), static_cast< uint >(PrintOptions::RightLeftBottomTop)); m_numberUpLayoutComboBox->addItem(tr("Right to left and top to bottom"), static_cast< uint >(PrintOptions::RightLeftTopBottom)); m_numberUpLayoutComboBox->addItem(tr("Top to bottom and left to right"), static_cast< uint >(PrintOptions::TopBottomLeftRight)); m_numberUpLayoutComboBox->addItem(tr("Top to bottom and right to left"), static_cast< uint >(PrintOptions::TopBottomRightLeft)); m_numberUpLayoutComboBox->setCurrentIndex(m_numberUpLayoutComboBox->findData(static_cast< uint >(s_settings->printDialog().numberUpLayout()))); m_printOptionsLayout->addRow(tr("Number-up layout:"), m_numberUpLayoutComboBox); m_printOptionsWidget->setWindowTitle(tr("Extended options")); setOptionTabs(QList< QWidget* >() << m_printOptionsWidget); } PrintOptions PrintDialog::printOptions() const { PrintOptions printOptions; printOptions.fitToPage = m_fitToPageCheckBox->isChecked(); printOptions.pageRanges = m_pageRangesLineEdit->text(); printOptions.pageSet = static_cast< PrintOptions::PageSet >(m_pageSetComboBox->itemData(m_pageSetComboBox->currentIndex()).toUInt()); printOptions.numberUp = static_cast< PrintOptions::NumberUp >(m_numberUpComboBox->itemData(m_numberUpComboBox->currentIndex()).toUInt()); printOptions.numberUpLayout = static_cast< PrintOptions::NumberUpLayout >(m_numberUpLayoutComboBox->itemData(m_numberUpLayoutComboBox->currentIndex()).toUInt()); return printOptions; } void PrintDialog::accept() { QPrintDialog::accept(); s_settings->printDialog().setCollateCopies(printer()->collateCopies()); s_settings->printDialog().setPageOrder(printer()->pageOrder()); s_settings->printDialog().setOrientation(printer()->orientation()); s_settings->printDialog().setColorMode(printer()->colorMode()); s_settings->printDialog().setDuplex(printer()->duplex()); s_settings->printDialog().setFitToPage(m_fitToPageCheckBox->isChecked()); s_settings->printDialog().setPageSet(static_cast< PrintOptions::PageSet >(m_pageSetComboBox->itemData(m_pageSetComboBox->currentIndex()).toUInt())); s_settings->printDialog().setNumberUp(static_cast< PrintOptions::NumberUp >(m_numberUpComboBox->itemData(m_numberUpComboBox->currentIndex()).toUInt())); s_settings->printDialog().setNumberUpLayout(static_cast< PrintOptions::NumberUpLayout >(m_numberUpLayoutComboBox->itemData(m_numberUpLayoutComboBox->currentIndex()).toUInt())); } qpdfview-0.4.7/sources/printdialog.h0000644000000000000000000000267712246606025015664 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PRINTDIALOG_H #define PRINTDIALOG_H #include class QCheckBox; class QComboBox; class QFormLayout; class QLineEdit; class QPrinter; struct PrintOptions; class Settings; class PrintDialog : public QPrintDialog { Q_OBJECT public: static QPrinter* createPrinter(); PrintDialog(QPrinter* printer, QWidget* parent = 0); PrintOptions printOptions() const; public slots: void accept(); private: Q_DISABLE_COPY(PrintDialog) static Settings* s_settings; QWidget* m_printOptionsWidget; QFormLayout* m_printOptionsLayout; QCheckBox* m_fitToPageCheckBox; QLineEdit* m_pageRangesLineEdit; QComboBox* m_pageSetComboBox; QComboBox* m_numberUpComboBox; QComboBox* m_numberUpLayoutComboBox; }; #endif // PRINTDIALOG_H qpdfview-0.4.7/sources/printoptions.h0000644000000000000000000000312712246606025016107 0ustar 00000000000000/* Copyright 2013 Adam Reichold Copyright 2013 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PRINTOPTIONS_H #define PRINTOPTIONS_H struct PrintOptions { bool fitToPage; QString pageRanges; enum PageSet { AllPages = 0, EvenPages = 1, OddPages = 2 }; PageSet pageSet; enum NumberUp { SinglePage = 0, TwoPages = 1, FourPages = 2, SixPages = 3, NinePages = 4, SixteenPages = 5 }; NumberUp numberUp; enum NumberUpLayout { BottomTopLeftRight = 0, BottomTopRightLeft = 1, LeftRightBottomTop = 2, LeftRightTopBottom = 3, RightLeftBottomTop = 4, RightLeftTopBottom = 5, TopBottomLeftRight = 6, TopBottomRightLeft = 7 }; NumberUpLayout numberUpLayout; PrintOptions() : fitToPage(false), pageRanges(), pageSet(AllPages), numberUp(SinglePage), numberUpLayout(LeftRightTopBottom) {} }; #endif // PRINTOPTIONS_H qpdfview-0.4.7/sources/psmodel.cpp0000644000000000000000000002033112246606025015331 0ustar 00000000000000/* Copyright 2013 Alexander Volkov Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "psmodel.h" #include #include #include #include #include #include Model::PsPage::PsPage(QMutex* mutex, SpectrePage* page, SpectreRenderContext* renderContext) : m_mutex(mutex), m_page(page), m_renderContext(renderContext) { } Model::PsPage::~PsPage() { spectre_page_free(m_page); m_page = 0; } QSizeF Model::PsPage::size() const { QMutexLocker mutexLocker(m_mutex); int w; int h; spectre_page_get_size(m_page, &w, &h); return QSizeF(w, h); } QImage Model::PsPage::render(qreal horizontalResolution, qreal verticalResolution, Rotation rotation, const QRect& boundingRect) const { QMutexLocker mutexLocker(m_mutex); double xscale; double yscale; switch(rotation) { default: case RotateBy0: case RotateBy180: xscale = horizontalResolution / 72.0; yscale = verticalResolution / 72.0; break; case RotateBy90: case RotateBy270: xscale = verticalResolution / 72.0; yscale = horizontalResolution / 72.0; break; } spectre_render_context_set_scale(m_renderContext, xscale, yscale); switch(rotation) { default: case RotateBy0: spectre_render_context_set_rotation(m_renderContext, 0); break; case RotateBy90: spectre_render_context_set_rotation(m_renderContext, 90); break; case RotateBy180: spectre_render_context_set_rotation(m_renderContext, 180); break; case RotateBy270: spectre_render_context_set_rotation(m_renderContext, 270); break; } int w; int h; spectre_page_get_size(m_page, &w, &h); w = qRound(w * xscale); h = qRound(h * yscale); if(rotation == RotateBy90 || rotation == RotateBy270) { qSwap(w, h); } unsigned char* pageData = 0; int rowLength = 0; spectre_page_render(m_page, m_renderContext, &pageData, &rowLength); if (spectre_page_status(m_page) != SPECTRE_STATUS_SUCCESS) { free(pageData); pageData = 0; return QImage(); } QImage auxiliaryImage(pageData, rowLength / 4, h, QImage::Format_RGB32); QImage image(boundingRect.isNull() ? auxiliaryImage.copy(0, 0, w, h) : auxiliaryImage.copy(boundingRect)); free(pageData); pageData = 0; return image; } Model::PsDocument::PsDocument(SpectreDocument* document, SpectreRenderContext* renderContext) : m_mutex(), m_document(document), m_renderContext(renderContext) { } Model::PsDocument::~PsDocument() { spectre_render_context_free(m_renderContext); m_renderContext = 0; spectre_document_free(m_document); m_document = 0; } int Model::PsDocument::numberOfPages() const { QMutexLocker mutexLocker(&m_mutex); return spectre_document_get_n_pages(m_document); } Model::Page* Model::PsDocument::page(int index) const { QMutexLocker mutexLocker(&m_mutex); SpectrePage* page = spectre_document_get_page(m_document, index); return page != 0 ? new PsPage(&m_mutex, page, m_renderContext) : 0; } QStringList Model::PsDocument::saveFilter() const { QMutexLocker mutexLocker(&m_mutex); if(spectre_document_is_eps(m_document)) { return QStringList() << "Encapsulated PostScript (*.eps)"; } else { return QStringList() << "PostScript (*.ps)"; } } bool Model::PsDocument::canSave() const { return true; } bool Model::PsDocument::save(const QString& filePath, bool withChanges) const { Q_UNUSED(withChanges) QMutexLocker mutexLocker(&m_mutex); spectre_document_save(m_document, QFile::encodeName(filePath)); return (spectre_document_status(m_document) == SPECTRE_STATUS_SUCCESS); } bool Model::PsDocument::canBePrintedUsingCUPS() const { return true; } void Model::PsDocument::loadProperties(QStandardItemModel* propertiesModel) const { Document::loadProperties(propertiesModel); QMutexLocker mutexLocker(&m_mutex); const QString title = QString::fromLocal8Bit(spectre_document_get_title(m_document)); const QString createdFor = QString::fromLocal8Bit(spectre_document_get_for(m_document)); const QString creator = QString::fromLocal8Bit(spectre_document_get_creator(m_document)); const QString creationDate = QString::fromLocal8Bit(spectre_document_get_creation_date(m_document)); const QString format = QString::fromLocal8Bit(spectre_document_get_format(m_document)); const QString languageLevel = QString::number(spectre_document_get_language_level(m_document)); propertiesModel->setColumnCount(2); propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(tr("Title")) << new QStandardItem(title)); propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(tr("Created for")) << new QStandardItem(createdFor)); propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(tr("Creator")) << new QStandardItem(creator)); propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(tr("Creation date")) << new QStandardItem(creationDate)); propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(tr("Format")) << new QStandardItem(format)); propertiesModel->appendRow(QList< QStandardItem* >() << new QStandardItem(tr("Language level")) << new QStandardItem(languageLevel)); } PsSettingsWidget::PsSettingsWidget(QSettings* settings, QWidget* parent) : SettingsWidget(parent), m_settings(settings) { m_layout = new QFormLayout(this); // graphics antialias bits m_graphicsAntialiasBitsSpinBox = new QSpinBox(this); m_graphicsAntialiasBitsSpinBox->setRange(1, 4); m_graphicsAntialiasBitsSpinBox->setValue(m_settings->value("graphicsAntialiasBits", 4).toInt()); m_layout->addRow(tr("Graphics antialias bits:"), m_graphicsAntialiasBitsSpinBox); // text antialias bits m_textAntialisBitsSpinBox = new QSpinBox(this); m_textAntialisBitsSpinBox->setRange(1, 2); m_textAntialisBitsSpinBox->setValue(m_settings->value("textAntialiasBits", 2).toInt()); m_layout->addRow(tr("Text antialias bits:"), m_textAntialisBitsSpinBox); } void PsSettingsWidget::accept() { m_settings->setValue("graphicsAntialiasBits", m_graphicsAntialiasBitsSpinBox->value()); m_settings->setValue("textAntialiasBits", m_textAntialisBitsSpinBox->value()); } void PsSettingsWidget::reset() { m_graphicsAntialiasBitsSpinBox->setValue(4); m_textAntialisBitsSpinBox->setValue(2); } PsPlugin::PsPlugin(QObject* parent) : QObject(parent) { setObjectName("PsPlugin"); m_settings = new QSettings("qpdfview", "ps-plugin", this); } Model::Document* PsPlugin::loadDocument(const QString& filePath) const { SpectreDocument* document = spectre_document_new(); spectre_document_load(document, QFile::encodeName(filePath)); if (spectre_document_status(document) != SPECTRE_STATUS_SUCCESS) { spectre_document_free(document); return 0; } SpectreRenderContext* renderContext = spectre_render_context_new(); spectre_render_context_set_antialias_bits(renderContext, m_settings->value("graphicsAntialiasBits", 4).toInt(), m_settings->value("textAntialiasBits", 2).toInt()); return new Model::PsDocument(document, renderContext); } SettingsWidget* PsPlugin::createSettingsWidget(QWidget* parent) const { return new PsSettingsWidget(m_settings, parent); } #if QT_VERSION < QT_VERSION_CHECK(5,0,0) Q_EXPORT_PLUGIN2(qpdfview_ps, PsPlugin) #endif // QT_VERSION qpdfview-0.4.7/sources/psmodel.h0000644000000000000000000000600512246606025015000 0ustar 00000000000000/* Copyright 2013 Alexander Volkov Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef PSMODEL_H #define PSMODEL_H #include #include class QFormLayout; class QSettings; class QSpinBox; struct SpectrePage; struct SpectreDocument; struct SpectreRenderContext; #include "model.h" class PsPlugin; namespace Model { class PsPage : public Page { friend class PsDocument; public: ~PsPage(); QSizeF size() const; QImage render(qreal horizontalResolution, qreal verticalResolution, Rotation rotation, const QRect& boundingRect) const; private: Q_DISABLE_COPY(PsPage) PsPage(QMutex* mutex, SpectrePage* page, SpectreRenderContext* renderContext); mutable QMutex* m_mutex; SpectrePage* m_page; SpectreRenderContext* m_renderContext; }; class PsDocument : public Document { Q_DECLARE_TR_FUNCTIONS(Model::PsDocument) friend class ::PsPlugin; public: ~PsDocument(); int numberOfPages() const; Page* page(int index) const; QStringList saveFilter() const; bool canSave() const; bool save(const QString& filePath, bool withChanges) const; bool canBePrintedUsingCUPS() const; void loadProperties(QStandardItemModel* propertiesModel) const; private: Q_DISABLE_COPY(PsDocument) PsDocument(SpectreDocument* document, SpectreRenderContext* renderContext); mutable QMutex m_mutex; SpectreDocument* m_document; SpectreRenderContext* m_renderContext; }; } class PsSettingsWidget : public SettingsWidget { Q_OBJECT public: PsSettingsWidget(QSettings* settings, QWidget* parent = 0); void accept(); void reset(); private: Q_DISABLE_COPY(PsSettingsWidget) QSettings* m_settings; QFormLayout* m_layout; QSpinBox* m_graphicsAntialiasBitsSpinBox; QSpinBox* m_textAntialisBitsSpinBox; }; class PsPlugin : public QObject, Plugin { Q_OBJECT Q_INTERFACES(Plugin) #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) Q_PLUGIN_METADATA(IID "local.qpdfview.Plugin") #endif // QT_VERSION public: PsPlugin(QObject* parent = 0); Model::Document* loadDocument(const QString& filePath) const; SettingsWidget* createSettingsWidget(QWidget* parent) const; private: Q_DISABLE_COPY(PsPlugin) QSettings* m_settings; }; #endif // PSMODEL_H qpdfview-0.4.7/sources/recentlyusedmenu.cpp0000644000000000000000000000574312246606025017273 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "recentlyusedmenu.h" #include RecentlyUsedMenu::RecentlyUsedMenu(int count, QWidget* parent) : QMenu(parent), m_count(count) { menuAction()->setText(tr("Recently &used")); menuAction()->setIcon(QIcon::fromTheme("document-open-recent")); menuAction()->setIconVisibleInMenu(true); m_openActionGroup = new QActionGroup(this); connect(m_openActionGroup, SIGNAL(triggered(QAction*)), SLOT(on_open_triggered(QAction*))); m_separatorAction = addSeparator(); m_clearListAction = addAction(tr("&Clear list")); connect(m_clearListAction, SIGNAL(triggered()), SLOT(on_clearList_triggered())); } void RecentlyUsedMenu::addOpenAction(const QString& filePath) { foreach(QAction* action, m_openActionGroup->actions()) { if(action->data().toString() == QFileInfo(filePath).absoluteFilePath()) { removeAction(action); m_openActionGroup->removeAction(action); insertAction(actions().first(), action); m_openActionGroup->addAction(action); return; } } if(m_openActionGroup->actions().count() >= m_count) { QAction* first = m_openActionGroup->actions().first(); removeAction(first); m_openActionGroup->removeAction(first); delete first; } const QFileInfo fileInfo(filePath); QAction* action = new QAction(fileInfo.completeBaseName(), this); action->setToolTip(fileInfo.absoluteFilePath()); action->setData(fileInfo.absoluteFilePath()); insertAction(actions().first(), action); m_openActionGroup->addAction(action); } void RecentlyUsedMenu::removeOpenAction(const QString& filePath) { foreach(QAction* action, m_openActionGroup->actions()) { if(action->data().toString() == QFileInfo(filePath).absoluteFilePath()) { delete action; break; } } } QStringList RecentlyUsedMenu::filePaths() const { QStringList filePaths; foreach(const QAction* action, m_openActionGroup->actions()) { filePaths.append(action->data().toString()); } return filePaths; } void RecentlyUsedMenu::on_open_triggered(QAction* action) { emit openTriggered(action->data().toString()); } void RecentlyUsedMenu::on_clearList_triggered() { qDeleteAll(m_openActionGroup->actions()); } qpdfview-0.4.7/sources/recentlyusedmenu.h0000644000000000000000000000253212246606025016731 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef RECENTLYUSEDMENU_H #define RECENTLYUSEDMENU_H #include class RecentlyUsedMenu : public QMenu { Q_OBJECT public: explicit RecentlyUsedMenu(int count, QWidget* parent = 0); void addOpenAction(const QString& filePath); void removeOpenAction(const QString& filePath); QStringList filePaths() const; signals: void openTriggered(const QString& filePath); protected slots: void on_open_triggered(QAction* action); void on_clearList_triggered(); private: Q_DISABLE_COPY(RecentlyUsedMenu) int m_count; QActionGroup* m_openActionGroup; QAction* m_separatorAction; QAction* m_clearListAction; }; #endif // RECENTLYUSEDMENU_H qpdfview-0.4.7/sources/rendertask.cpp0000644000000000000000000000640512246606025016036 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "rendertask.h" #include #include "model.h" RenderTask::RenderTask(QObject* parent) : QObject(parent), QRunnable(), m_isRunning(false), m_wasCanceled(false), m_page(0), m_resolutionX(72), m_resolutionY(72), m_devicePixelRatio(1.0), m_scaleFactor(1.0), m_rotation(RotateBy0), m_invertColors(false), m_prefetch(false) { setAutoDelete(false); } void RenderTask::wait() { QMutexLocker mutexLocker(&m_mutex); while(m_isRunning) { m_waitCondition.wait(&m_mutex); } } bool RenderTask::isRunning() const { QMutexLocker mutexLocker(&m_mutex); return m_isRunning; } bool RenderTask::wasCanceled() const { return m_wasCanceled; } void RenderTask::run() { if(m_wasCanceled && !m_prefetch) { finish(); return; } qreal resolutionX; qreal resolutionY; switch(m_rotation) { default: case RotateBy0: case RotateBy180: resolutionX = m_resolutionX * m_scaleFactor; resolutionY = m_resolutionY * m_scaleFactor; break; case RotateBy90: case RotateBy270: resolutionX = m_resolutionY * m_scaleFactor; resolutionY = m_resolutionX * m_scaleFactor; break; } #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) QImage image = m_page->render(m_devicePixelRatio * resolutionX, m_devicePixelRatio * resolutionY, m_rotation); image.setDevicePixelRatio(m_devicePixelRatio); #else QImage image = m_page->render(resolutionX, resolutionY, m_rotation); #endif // QT_VERSION if(m_wasCanceled && !m_prefetch) { finish(); return; } if(m_invertColors) { image.invertPixels(); } emit imageReady(m_resolutionX, m_resolutionY, m_devicePixelRatio, m_scaleFactor, m_rotation, m_invertColors, m_prefetch, image); finish(); } void RenderTask::start(Model::Page* page, int resolutionX, int resolutionY, qreal devicePixelRatio, qreal scaleFactor, Rotation rotation, bool invertColors, bool prefetch) { m_page = page; m_resolutionX = resolutionX; m_resolutionY = resolutionY; m_devicePixelRatio = devicePixelRatio; m_scaleFactor = scaleFactor; m_rotation = rotation; m_invertColors = invertColors; m_prefetch = prefetch; m_mutex.lock(); m_isRunning = true; m_mutex.unlock(); m_wasCanceled = false; QThreadPool::globalInstance()->start(this); } void RenderTask::cancel() { m_wasCanceled = true; } void RenderTask::finish() { m_mutex.lock(); m_isRunning = false; m_mutex.unlock(); m_waitCondition.wakeAll(); emit finished(); } qpdfview-0.4.7/sources/rendertask.h0000644000000000000000000000350412246606025015500 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef RENDERTASK_H #define RENDERTASK_H #include #include #include #include #include "global.h" namespace Model { class Page; } class RenderTask : public QObject, QRunnable { Q_OBJECT public: explicit RenderTask(QObject* parent = 0); void wait(); bool isRunning() const; bool wasCanceled() const; void run(); signals: void finished(); void imageReady(int resolutionX, int resolutionY, qreal devicePixelRatio, qreal scaleFactor, Rotation rotation, bool invertColors, bool prefetch, QImage image); public slots: void start(Model::Page* page, int resolutionX, int resolutionY, qreal devicePixelRatio, qreal scaleFactor, Rotation rotation, bool invertColors, bool prefetch); void cancel(); private: Q_DISABLE_COPY(RenderTask) mutable QMutex m_mutex; QWaitCondition m_waitCondition; void finish(); bool m_isRunning; bool m_wasCanceled; Model::Page* m_page; int m_resolutionX; int m_resolutionY; qreal m_devicePixelRatio; qreal m_scaleFactor; Rotation m_rotation; bool m_invertColors; bool m_prefetch; }; #endif // RENDERTASK_H qpdfview-0.4.7/sources/searchtask.cpp0000644000000000000000000000357012246606025016024 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "searchtask.h" #include "model.h" SearchTask::SearchTask(QObject* parent) : QThread(parent), m_wasCanceled(false), m_progress(0), m_pages(), m_text(), m_matchCase(false), m_beginAtPage(1) { } bool SearchTask::wasCanceled() const { return m_wasCanceled; } int SearchTask::progress() const { return m_progress; } void SearchTask::run() { for(int index = m_beginAtPage - 1; index < m_pages.count() + m_beginAtPage - 1; ++index) { if(m_wasCanceled) { m_progress = 0; return; } const QList< QRectF > results = m_pages.at(index % m_pages.count())->search(m_text, m_matchCase); emit resultsReady(index % m_pages.count(), results); m_progress = 100 * (index - m_beginAtPage)/ m_pages.count(); emit progressChanged(m_progress); } m_progress = 0; } void SearchTask::start(const QList< Model::Page* >& pages, const QString& text, bool matchCase, int beginAtPage) { m_pages = pages; m_text = text; m_matchCase = matchCase; m_beginAtPage = beginAtPage; m_wasCanceled = false; m_progress = 0; QThread::start(); } void SearchTask::cancel() { m_wasCanceled = true; } qpdfview-0.4.7/sources/searchtask.h0000644000000000000000000000264212246606025015470 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef SEARCHTASK_H #define SEARCHTASK_H #include #include namespace Model { class Page; } class SearchTask : public QThread { Q_OBJECT public: explicit SearchTask(QObject* parent = 0); bool wasCanceled() const; int progress() const; void run(); signals: void progressChanged(int progress); void resultsReady(int index, QList< QRectF > results); public slots: void start(const QList< Model::Page* >& pages, const QString& text, bool matchCase, int beginAtPage = 1); void cancel(); private: Q_DISABLE_COPY(SearchTask) bool m_wasCanceled; int m_progress; QList< Model::Page* > m_pages; QString m_text; bool m_matchCase; int m_beginAtPage; }; #endif // SEARCHTHREAD_H qpdfview-0.4.7/sources/settings.cpp0000644000000000000000000007007212246606025015535 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "settings.h" #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include #else #include #endif // QT_VERSION Settings* Settings::s_instance = 0; Settings* Settings::instance() { if(s_instance == 0) { s_instance = new Settings(qApp); } return s_instance; } Settings::~Settings() { s_instance = 0; } // page item void Settings::PageItem::sync() { m_cacheSize = m_settings->value("pageItem/cacheSize", Defaults::PageItem::cacheSize()).toInt(); m_progressIcon = QIcon::fromTheme("image-loading", QIcon(":/icons/image-loading.svg")); m_errorIcon = QIcon::fromTheme("image-missing", QIcon(":icons/image-missing.svg")); m_keepObsoletePixmaps = m_settings->value("pageItem/keepObsoletePixmaps", Defaults::PageItem::keepObsoletePixmaps()).toBool(); m_useDevicePixelRatio = m_settings->value("pageItem/useDevicePixelRatio", Defaults::PageItem::useDevicePixelRatio()).toBool(); m_decoratePages = m_settings->value("pageItem/decoratePages", Defaults::PageItem::decoratePages()).toBool(); m_decorateLinks = m_settings->value("pageItem/decorateLinks", Defaults::PageItem::decorateLinks()).toBool(); m_decorateFormFields = m_settings->value("pageItem/decorateFormFields", Defaults::PageItem::decorateFormFields()).toBool(); m_backgroundColor = m_settings->value("pageItem/backgroundColor", Defaults::PageItem::backgroundColor()).value< QColor >(); m_paperColor = m_settings->value("pageItem/paperColor", Defaults::PageItem::paperColor()).value< QColor >(); m_highlightColor = m_settings->value("pageItem/highlightColor", Defaults::PageItem::highlightColor()).value< QColor >(); } void Settings::PageItem::setCacheSize(int cacheSize) { if(cacheSize >= 0) { m_cacheSize = cacheSize; m_settings->setValue("pageItem/cacheSize", cacheSize); } } void Settings::PageItem::setKeepObsoletePixmaps(bool keepObsoletePixmaps) { m_keepObsoletePixmaps = keepObsoletePixmaps; m_settings->setValue("pageItem/keepObsoletePixmaps", keepObsoletePixmaps); } void Settings::PageItem::setUseDevicePixelRatio(bool useDevicePixelRatio) { m_useDevicePixelRatio = useDevicePixelRatio; m_settings->setValue("pageItem/useDevicePixelRatio", useDevicePixelRatio); } void Settings::PageItem::setDecoratePages(bool decorate) { m_decoratePages = decorate; m_settings->setValue("pageItem/decoratePages", decorate); } void Settings::PageItem::setDecorateLinks(bool decorate) { m_decorateLinks = decorate; m_settings->setValue("pageItem/decorateLinks", decorate); } void Settings::PageItem::setDecorateFormFields(bool decorate) { m_decorateFormFields = decorate; m_settings->setValue("pageItem/decorateFormFields", decorate); } void Settings::PageItem::setBackgroundColor(const QColor &color) { m_backgroundColor = color; m_settings->setValue("pageItem/backgroundColor", color); } void Settings::PageItem::setPaperColor(const QColor& color) { m_paperColor = color; m_settings->setValue("pageItem/paperColor", color); } void Settings::PageItem::setHighlightColor(const QColor& color) { m_highlightColor = color; m_settings->setValue("pageItem/highlightColor", color); } QColor Settings::PageItem::annotationColor() const { return m_settings->value("pageItem/annotationColor", Defaults::PageItem::annotationColor()).value< QColor >(); } void Settings::PageItem::setAnnotationColor(const QColor &color) { m_settings->setValue("pageItem/annotationColor", color); } Qt::KeyboardModifiers Settings::PageItem::copyToClipboardModifiers() const { return static_cast< Qt::KeyboardModifiers >(m_settings->value("pageItem/copyToClipboardModifiers", static_cast< int >(Defaults::PageItem::copyToClipboardModifiers())).toInt()); } void Settings::PageItem::setCopyToClipboardModifiers(const Qt::KeyboardModifiers& modifiers) { m_settings->setValue("pageItem/copyToClipboardModifiers", static_cast< int >(modifiers)); } Qt::KeyboardModifiers Settings::PageItem::addAnnotationModifiers() const { return static_cast< Qt::KeyboardModifiers >(m_settings->value("pageItem/addAnnotationModifiers", static_cast< int >(Defaults::PageItem::addAnnotationModifiers())).toInt()); } void Settings::PageItem::setAddAnnotationModifiers(const Qt::KeyboardModifiers& modifiers) { m_settings->setValue("pageItem/addAnnotationModifiers", static_cast< int >(modifiers)); } bool Settings::PageItem::annotationOverlay() const { return m_settings->value("pageItem/annotationOverlay", Defaults::PageItem::annotationOverlay()).toBool(); } void Settings::PageItem::setAnnotationOverlay(bool overlay) { m_settings->setValue("pageItem/annotationOverlay", overlay); } bool Settings::PageItem::formFieldOverlay() const { return m_settings->value("pageItem/formFieldOverlay", Defaults::PageItem::formFieldOverlay()).toBool(); } void Settings::PageItem::setFormFieldOverlay(bool overlay) { m_settings->setValue("pageItem/formFieldOverlay", overlay); } Settings::PageItem::PageItem(QSettings* settings) : m_settings(settings), m_cacheSize(Defaults::PageItem::cacheSize()), m_progressIcon(), m_errorIcon(), m_keepObsoletePixmaps(Defaults::PageItem::keepObsoletePixmaps()), m_decoratePages(Defaults::PageItem::decoratePages()), m_decorateLinks(Defaults::PageItem::decorateLinks()), m_decorateFormFields(Defaults::PageItem::decorateFormFields()), m_backgroundColor(Defaults::PageItem::backgroundColor()), m_paperColor(Defaults::PageItem::paperColor()), m_highlightColor(Defaults::PageItem::highlightColor()) { } // presentation view bool Settings::PresentationView::sync() const { return m_settings->value("presentationView/sync", Defaults::PresentationView::sync()).toBool(); } void Settings::PresentationView::setSync(bool sync) { m_settings->setValue("presentationView/sync", sync); } int Settings::PresentationView::screen() const { int screen = m_settings->value("presentationView/screen", Defaults::PresentationView::screen()).toInt(); if(screen < -1 || screen >= QApplication::desktop()->screenCount()) { screen = -1; } return screen; } void Settings::PresentationView::setScreen(int screen) { m_settings->setValue("presentationView/screen", screen); } QColor Settings::PresentationView::backgroundColor() const { return m_settings->value("presentationView/backgroundColor", Defaults::PresentationView::backgroundColor()).value< QColor >(); } void Settings::PresentationView::setBackgroundColor(const QColor& backgroundColor) { m_settings->setValue("presentationView/backgroundColor", backgroundColor); } Settings::PresentationView::PresentationView(QSettings* settings) : m_settings(settings) { } // document view void Settings::DocumentView::sync() { m_prefetch = m_settings->value("documentView/prefetch", Defaults::DocumentView::prefetch()).toBool(); m_prefetchDistance = m_settings->value("documentView/prefetchDistance", Defaults::DocumentView::prefetchDistance()).toInt(); m_pagesPerRow = m_settings->value("documentView/pagesPerRow", Defaults::DocumentView::pagesPerRow()).toInt(); m_highlightCurrentThumbnail = m_settings->value("documentView/highlightCurrentThumbnail", Defaults::DocumentView::highlightCurrentThumbnail()).toBool(); m_limitThumbnailsToResults = m_settings->value("documentView/limitThumbnailsToResults", Defaults::DocumentView::limitThumbnailsToResults()).toBool(); m_pageSpacing = m_settings->value("documentView/pageSpacing", Defaults::DocumentView::pageSpacing()).toReal(); m_thumbnailSpacing = m_settings->value("documentView/thumbnailSpacing", Defaults::DocumentView::thumbnailSpacing()).toReal(); m_thumbnailSize = m_settings->value("documentView/thumbnailSize", Defaults::DocumentView::thumbnailSize()).toReal(); } bool Settings::DocumentView::openUrl() const { return m_settings->value("documentView/openUrl", Defaults::DocumentView::openUrl()).toBool(); } void Settings::DocumentView::setOpenUrl(bool openUrl) { m_settings->setValue("documentView/openUrl", openUrl); } bool Settings::DocumentView::autoRefresh() const { return m_settings->value("documentView/autoRefresh", Defaults::DocumentView::autoRefresh()).toBool(); } void Settings::DocumentView::setAutoRefresh(bool autoRefresh) { m_settings->setValue("documentView/autoRefresh", autoRefresh); } void Settings::DocumentView::setPrefetch(bool prefetch) { m_prefetch = prefetch; m_settings->setValue("documentView/prefetch", prefetch); } void Settings::DocumentView::setPrefetchDistance(int prefetchDistance) { if(prefetchDistance > 0) { m_prefetchDistance = prefetchDistance; m_settings->setValue("documentView/prefetchDistance", prefetchDistance); } } int Settings::DocumentView::autoRefreshTimeout() const { return m_settings->value("documentView/autoRefreshTimeout", Defaults::DocumentView::autoRefreshTimeout()).toInt(); } int Settings::DocumentView::prefetchTimeout() const { return m_settings->value("documentView/prefetchTimeout", Defaults::DocumentView::prefetchTimeout()).toInt(); } void Settings::DocumentView::setPagesPerRow(int pagesPerRow) { if(pagesPerRow > 0) { m_pagesPerRow = pagesPerRow; m_settings->setValue("documentView/pagesPerRow", pagesPerRow); } } void Settings::DocumentView::setHighlightCurrentThumbnail(bool highlightCurrentThumbnail) { m_highlightCurrentThumbnail = highlightCurrentThumbnail; m_settings->setValue("documentView/highlightCurrentThumbnail", highlightCurrentThumbnail); } void Settings::DocumentView::setLimitThumbnailsToResults(bool limitThumbnailsToResults) { m_limitThumbnailsToResults = limitThumbnailsToResults; m_settings->setValue("documentView/limitThumbnailsToResults", limitThumbnailsToResults); } void Settings::DocumentView::setPageSpacing(qreal pageSpacing) { if(pageSpacing >= 0.0) { m_pageSpacing = pageSpacing; m_settings->setValue("documentView/pageSpacing", pageSpacing); } } void Settings::DocumentView::setThumbnailSpacing(qreal thumbnailSpacing) { if(thumbnailSpacing >= 0.0) { m_thumbnailSpacing = thumbnailSpacing; m_settings->setValue("documentView/thumbnailSpacing", thumbnailSpacing); } } void Settings::DocumentView::setThumbnailSize(qreal thumbnailSize) { if(thumbnailSize > 0.0) { m_thumbnailSize = thumbnailSize; m_settings->setValue("documentView/thumbnailSize", thumbnailSize); } } bool Settings::DocumentView::matchCase() const { return m_settings->value("documentView/matchCase", Defaults::DocumentView::matchCase()).toBool(); } void Settings::DocumentView::setMatchCase(bool matchCase) { m_settings->setValue("documentView/matchCase", matchCase); } int Settings::DocumentView::highlightDuration() const { return m_settings->value("documentView/highlightDuration", Defaults::DocumentView::highlightDuration()).toInt(); } void Settings::DocumentView::setHighlightDuration(int highlightDuration) { if(highlightDuration >= 0) { m_settings->setValue("documentView/highlightDuration", highlightDuration); } } QString Settings::DocumentView::sourceEditor() const { return m_settings->value("documentView/sourceEditor", Defaults::DocumentView::sourceEditor()).toString(); } void Settings::DocumentView::setSourceEditor(const QString& sourceEditor) { m_settings->setValue("documentView/sourceEditor", sourceEditor); } Qt::KeyboardModifiers Settings::DocumentView::zoomModifiers() const { return static_cast< Qt::KeyboardModifiers >(m_settings->value("documentView/zoomModifiers", static_cast< int >(Defaults::DocumentView::zoomModifiers())).toInt()); } void Settings::DocumentView::setZoomModifiers(const Qt::KeyboardModifiers& zoomModifiers) { m_settings->setValue("documentView/zoomModifiers", static_cast< int >(zoomModifiers)); } Qt::KeyboardModifiers Settings::DocumentView::rotateModifiers() const { return static_cast< Qt::KeyboardModifiers >(m_settings->value("documentView/rotateModifiers", static_cast< int >(Defaults::DocumentView::rotateModifiers())).toInt()); } void Settings::DocumentView::setRotateModifiers(const Qt::KeyboardModifiers& rotateModifiers) { m_settings->setValue("documentView/rotateModifiers", static_cast< int >(rotateModifiers)); } Qt::KeyboardModifiers Settings::DocumentView::scrollModifiers() const { return static_cast< Qt::KeyboardModifiers >(m_settings->value("documentView/scrollModifiers", static_cast< int >(Defaults::DocumentView::scrollModifiers())).toInt()); } void Settings::DocumentView::setScrollModifiers(const Qt::KeyboardModifiers& scrollModifiers) { m_settings->setValue("documentView/scrollModifiers", static_cast< int >(scrollModifiers)); } // per-tab settings bool Settings::DocumentView::continuousMode() const { return m_settings->value("documentView/continuousMode", Defaults::DocumentView::continuousMode()).toBool(); } void Settings::DocumentView::setContinuousMode(bool continuousMode) { m_settings->setValue("documentView/continuousMode", continuousMode); } LayoutMode Settings::DocumentView::layoutMode() const { return static_cast< LayoutMode >(m_settings->value("documentView/layoutMode", static_cast< uint >(Defaults::DocumentView::layoutMode())).toUInt()); } void Settings::DocumentView::setLayoutMode(LayoutMode layoutMode) { m_settings->setValue("documentView/layoutMode", static_cast< uint >(layoutMode)); } ScaleMode Settings::DocumentView::scaleMode() const { return static_cast< ScaleMode >(m_settings->value("documentView/scaleMode", static_cast< uint >(Defaults::DocumentView::scaleMode())).toUInt()); } void Settings::DocumentView::setScaleMode(ScaleMode scaleMode) { m_settings->setValue("documentView/scaleMode", static_cast< uint >(scaleMode)); } qreal Settings::DocumentView::scaleFactor() const { return m_settings->value("documentView/scaleFactor", Defaults::DocumentView::scaleFactor()).toReal(); } void Settings::DocumentView::setScaleFactor(qreal scaleFactor) { m_settings->setValue("documentView/scaleFactor", scaleFactor); } Rotation Settings::DocumentView::rotation() const { return static_cast< Rotation >(m_settings->value("documentView/rotation", static_cast< uint >(Defaults::DocumentView::rotation())).toUInt()); } void Settings::DocumentView::setRotation(Rotation rotation) { m_settings->setValue("documentView/rotation", static_cast< uint >(rotation)); } bool Settings::DocumentView::invertColors() const { return m_settings->value("documentView/invertColors", Defaults::DocumentView::invertColors()).toBool(); } void Settings::DocumentView::setInvertColors(bool invertColors) { m_settings->setValue("documentView/invertColors", invertColors); } bool Settings::DocumentView::highlightAll() const { return m_settings->value("documentView/highlightAll", Defaults::DocumentView::highlightAll()).toBool(); } void Settings::DocumentView::setHighlightAll(bool highlightAll) { m_settings->setValue("documentView/highlightAll", highlightAll); } Settings::DocumentView::DocumentView(QSettings *settings) : m_settings(settings), m_prefetch(Defaults::DocumentView::prefetch()), m_prefetchDistance(Defaults::DocumentView::prefetchDistance()), m_pagesPerRow(Defaults::DocumentView::pagesPerRow()), m_highlightCurrentThumbnail(Defaults::DocumentView::highlightCurrentThumbnail()), m_limitThumbnailsToResults(Defaults::DocumentView::limitThumbnailsToResults()), m_pageSpacing(Defaults::DocumentView::pageSpacing()), m_thumbnailSpacing(Defaults::DocumentView::thumbnailSpacing()), m_thumbnailSize(Defaults::DocumentView::thumbnailSize()) { } // main window bool Settings::MainWindow::trackRecentlyUsed() const { return m_settings->value("mainWindow/trackRecentlyUsed", Defaults::MainWindow::trackRecentlyUsed()).toBool(); } void Settings::MainWindow::setTrackRecentlyUsed(bool on) { m_settings->setValue("mainWindow/trackRecentlyUsed", on); } int Settings::MainWindow::recentlyUsedCount() const { return m_settings->value("mainWindow/recentlyUsedCount", Defaults::MainWindow::recentlyUsedCount()).toInt(); } void Settings::MainWindow::setRecentlyUsedCount(int recentlyUsedCount) { m_settings->setValue("mainWindow/recentlyUsedCount", recentlyUsedCount); } QStringList Settings::MainWindow::recentlyUsed() const { return m_settings->value("mainWindow/recentlyUsed").toStringList(); } void Settings::MainWindow::setRecentlyUsed(const QStringList& recentlyUsed) { m_settings->setValue("mainWindow/recentlyUsed", recentlyUsed); } bool Settings::MainWindow::restoreTabs() const { return m_settings->value("mainWindow/restoreTabs", Defaults::MainWindow::restoreTabs()).toBool(); } void Settings::MainWindow::setRestoreTabs(bool on) { m_settings->setValue("mainWindow/restoreTabs", on); } bool Settings::MainWindow::restoreBookmarks() const { return m_settings->value("mainWindow/restoreBookmarks", Defaults::MainWindow::restoreBookmarks()).toBool(); } void Settings::MainWindow::setRestoreBookmarks(bool on) { m_settings->setValue("mainWindow/restoreBookmarks", on); } bool Settings::MainWindow::restorePerFileSettings() const { return m_settings->value("mainWindow/restorePerFileSettings", Defaults::MainWindow::restorePerFileSettings()).toBool(); } void Settings::MainWindow::setRestorePerFileSettings(bool on) { m_settings->setValue("mainWindow/restorePerFileSettings", on); } int Settings::MainWindow::tabPosition() const { return m_settings->value("mainWindow/tabPosition", Defaults::MainWindow::tabPosition()).toInt(); } void Settings::MainWindow::setTabPosition(int tabPosition) { if(tabPosition >= 0 && tabPosition < 4) { m_settings->setValue("mainWindow/tabPosition", tabPosition); } } int Settings::MainWindow::tabVisibility() const { return m_settings->value("mainWindow/tabVisibility", Defaults::MainWindow::tabVisibility()).toInt(); } void Settings::MainWindow::setTabVisibility(int tabVisibility) { if(tabVisibility >= 0 && tabVisibility < 3) { m_settings->setValue("mainWindow/tabVisibility", tabVisibility); } } bool Settings::MainWindow::newTabNextToCurrentTab() const { return m_settings->value("mainWindow/newTabNextToCurrentTab", Defaults::MainWindow::newTabNextToCurrentTab()).toBool(); } void Settings::MainWindow::setNewTabNextToCurrentTab(bool newTabNextToCurrentTab) { m_settings->setValue("mainWindow/newTabNextToCurrentTab", newTabNextToCurrentTab); } bool Settings::MainWindow::currentPageInWindowTitle() const { return m_settings->value("mainWindow/currentPageInWindowTitle", Defaults::MainWindow::currentPageInWindowTitle()).toBool(); } void Settings::MainWindow::setCurrentPageInWindowTitle(bool currentPageInTabText) { m_settings->setValue("mainWindow/currentPageInWindowTitle", currentPageInTabText); } bool Settings::MainWindow::instanceNameInWindowTitle() const { return m_settings->value("mainWindow/instanceNameInWindowTitle", Defaults::MainWindow::instancfeNameInWindowTitle()).toBool(); } void Settings::MainWindow::setInstanceNameInWindowTitle(bool instanceNameInWindowTitle) { m_settings->setValue("mainWindow/instanceNameInWindowTitle", instanceNameInWindowTitle); } bool Settings::MainWindow::synchronizeOutlineView() const { return m_settings->value("mainWindow/synchronizeOutlineView", Defaults::MainWindow::synchronizeOutlineView()).toBool(); } void Settings::MainWindow::setSynchronizeOutlineView(bool synchronizeOutlineView) { m_settings->setValue("mainWindow/synchronizeOutlineView", synchronizeOutlineView); } static QStringList trimmed(const QStringList& list) { QStringList trimmedList; foreach(const QString& item, list) { trimmedList.append(item.trimmed()); } return trimmedList; } QStringList Settings::MainWindow::fileToolBar() const { return m_settings->value("mainWindow/fileToolBar", Defaults::MainWindow::fileToolBar()).toStringList(); } void Settings::MainWindow::setFileToolBar(const QStringList& fileToolBar) { m_settings->setValue("mainWindow/fileToolBar", trimmed(fileToolBar)); } QStringList Settings::MainWindow::editToolBar() const { return m_settings->value("mainWindow/editToolBar", Defaults::MainWindow::editToolBar()).toStringList(); } void Settings::MainWindow::setEditToolBar(const QStringList& editToolBar) { m_settings->setValue("mainWindow/editToolBar", trimmed(editToolBar)); } QStringList Settings::MainWindow::viewToolBar() const { return m_settings->value("mainWindow/viewToolBar", Defaults::MainWindow::viewToolBar()).toStringList(); } void Settings::MainWindow::setViewToolBar(const QStringList& viewToolBar) { m_settings->setValue("mainWindow/viewToolBar", trimmed(viewToolBar)); } bool Settings::MainWindow::hasIconTheme() const { return m_settings->contains("mainWindow/iconTheme"); } QString Settings::MainWindow::iconTheme() const { return m_settings->value("mainWindow/iconTheme").toString(); } bool Settings::MainWindow::hasStyleSheet() const { return m_settings->contains("mainWindow/styleSheet"); } QString Settings::MainWindow::styleSheet() const { return m_settings->value("mainWindow/styleSheet").toString(); } QByteArray Settings::MainWindow::geometry() const { return m_settings->value("mainWindow/geometry").toByteArray(); } void Settings::MainWindow::setGeometry(const QByteArray& geometry) { m_settings->setValue("mainWindow/geometry", geometry); } QByteArray Settings::MainWindow::state() const { return m_settings->value("mainWindow/state").toByteArray(); } void Settings::MainWindow::setState(const QByteArray& state) { m_settings->setValue("mainWindow/state", state); } QString Settings::MainWindow::openPath() const { return m_settings->value("mainWindow/openPath", Defaults::MainWindow::path()).toString(); } void Settings::MainWindow::setOpenPath(const QString& openPath) { m_settings->setValue("mainWindow/openPath", openPath); } QString Settings::MainWindow::savePath() const { return m_settings->value("mainWindow/savePath", Defaults::MainWindow::path()).toString(); } void Settings::MainWindow::setSavePath(const QString& savePath) { m_settings->setValue("mainWindow/savePath", savePath); } QSize Settings::MainWindow::settingsDialogSize(const QSize& sizeHint) const { return m_settings->value("mainWindow/settingsDialogSize", sizeHint).toSize(); } void Settings::MainWindow::setSettingsDialogSize(const QSize& settingsDialogSize) { m_settings->setValue("mainWindow/settingsDialogSize", settingsDialogSize); } QSize Settings::MainWindow::fontsDialogSize(const QSize& sizeHint) const { return m_settings->value("mainWindow/fontsDialogSize", sizeHint).toSize(); } void Settings::MainWindow::setFontsDialogSize(const QSize& fontsDialogSize) { m_settings->setValue("mainWindow/fontsDialogSize", fontsDialogSize); } QSize Settings::MainWindow::contentsDialogSize(const QSize& sizeHint) const { return m_settings->value("mainWindow/contentsDialogSize", sizeHint).toSize(); } void Settings::MainWindow::setContentsDialogSize(const QSize& contentsDialogSize) { m_settings->setValue("mainWindow/contentsDialogSize", contentsDialogSize); } Settings::MainWindow::MainWindow(QSettings* settings) : m_settings(settings) { } // print dialog Settings::PrintDialog::PrintDialog(QSettings* settings) : m_settings(settings) { } bool Settings::PrintDialog::collateCopies() const { return m_settings->value("printDialog/collateCopies", Defaults::PrintDialog::collateCopies()).toBool(); } void Settings::PrintDialog::setCollateCopies(bool collateCopies) { m_settings->setValue("printDialog/collateCopies", collateCopies); } QPrinter::PageOrder Settings::PrintDialog::pageOrder() const { return static_cast< QPrinter::PageOrder >(m_settings->value("printDialog/pageOrder", static_cast< int >(Defaults::PrintDialog::pageOrder())).toInt()); } void Settings::PrintDialog::setPageOrder(QPrinter::PageOrder pageOrder) { m_settings->setValue("printDialog/pageOrder", static_cast< int >(pageOrder)); } QPrinter::Orientation Settings::PrintDialog::orientation() const { return static_cast< QPrinter::Orientation >(m_settings->value("printDialog/orientation", static_cast< int >(Defaults::PrintDialog::orientation())).toInt()); } void Settings::PrintDialog::setOrientation(QPrinter::Orientation orientation) { m_settings->setValue("printDialog/orientation", static_cast< int >(orientation)); } QPrinter::ColorMode Settings::PrintDialog::colorMode() const { return static_cast< QPrinter::ColorMode >(m_settings->value("printDialog/colorMode", static_cast< int >(Defaults::PrintDialog::colorMode())).toInt()); } void Settings::PrintDialog::setColorMode(QPrinter::ColorMode colorMode) { m_settings->setValue("printDialog/colorMode", static_cast< int >(colorMode)); } QPrinter::DuplexMode Settings::PrintDialog::duplex() const { return static_cast< QPrinter::DuplexMode >(m_settings->value("printDialog/duplex", static_cast< int >(Defaults::PrintDialog::duplex())).toInt()); } void Settings::PrintDialog::setDuplex(QPrinter::DuplexMode duplex) { m_settings->setValue("printDialog/duplex", static_cast< int >(duplex)); } bool Settings::PrintDialog::fitToPage() const { return m_settings->value("printDialog/fitToPage", Defaults::PrintDialog::fitToPage()).toBool(); } void Settings::PrintDialog::setFitToPage(bool fitToPage) { m_settings->setValue("printDialog/fitToPage", fitToPage); } PrintOptions::PageSet Settings::PrintDialog::pageSet() const { return static_cast< PrintOptions::PageSet >(m_settings->value("printDialog/pageSet", static_cast< uint >(Defaults::PrintDialog::pageSet())).toUInt()); } void Settings::PrintDialog::setPageSet(PrintOptions::PageSet pageSet) { m_settings->setValue("printDialog/pageSet", static_cast< uint >(pageSet)); } PrintOptions::NumberUp Settings::PrintDialog::numberUp() const { return static_cast< PrintOptions::NumberUp >(m_settings->value("printDialog/numberUp", static_cast< uint >(Defaults::PrintDialog::numberUp())).toUInt()); } void Settings::PrintDialog::setNumberUp(PrintOptions::NumberUp numberUp) { m_settings->setValue("printDialog/numberUp", static_cast< uint >(numberUp)); } PrintOptions::NumberUpLayout Settings::PrintDialog::numberUpLayout() const { return static_cast< PrintOptions::NumberUpLayout >(m_settings->value("printDialog/numberUpLayout", static_cast< uint >(Defaults::PrintDialog::numberUpLayout())).toUInt()); } void Settings::PrintDialog::setNumberUpLayout(PrintOptions::NumberUpLayout numberUpLayout) { m_settings->setValue("printDialog/numberUpLayout", static_cast< uint >(numberUpLayout)); } void Settings::sync() { m_settings->sync(); m_pageItem.sync(); m_documentView.sync(); } Settings::PageItem& Settings::pageItem() { return m_pageItem; } Settings::PresentationView& Settings::presentationView() { return m_presentationView; } Settings::DocumentView& Settings::documentView() { return m_documentView; } Settings::MainWindow& Settings::mainWindow() { return m_mainWindow; } Settings::PrintDialog& Settings::printDialog() { return m_printDialog; } Settings::Settings(QObject* parent) : QObject(parent), m_settings(new QSettings("qpdfview", "qpdfview", this)), m_pageItem(m_settings), m_presentationView(m_settings), m_documentView(m_settings), m_mainWindow(m_settings), m_printDialog(m_settings) { } // defaults QString Defaults::MainWindow::path() { #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); #else return QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); #endif // QT_VERSION } qpdfview-0.4.7/sources/settings.h0000644000000000000000000004025312246606025015200 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef SETTINGS_H #define SETTINGS_H #include #include #include #include #include class QSettings; #include "global.h" #include "printoptions.h" class Settings : public QObject { Q_OBJECT public: static Settings* instance(); ~Settings(); // page item class PageItem { public: void sync(); inline int cacheSize() const { return m_cacheSize; } void setCacheSize(int cacheSize); inline const QIcon& progressIcon() const { return m_progressIcon; } inline const QIcon& errorIcon() const { return m_errorIcon; } inline bool keepObsoletePixmaps() const { return m_keepObsoletePixmaps; } void setKeepObsoletePixmaps(bool keepObsoletePixmaps); inline bool useDevicePixelRatio() const { return m_useDevicePixelRatio; } void setUseDevicePixelRatio(bool useDevicePixelRatio); inline bool decoratePages() const { return m_decoratePages; } void setDecoratePages(bool decorate); inline bool decorateLinks() const { return m_decorateLinks; } void setDecorateLinks(bool decorate); inline bool decorateFormFields() const { return m_decorateFormFields; } void setDecorateFormFields(bool decorate); inline const QColor& backgroundColor() const { return m_backgroundColor; } void setBackgroundColor(const QColor& color); inline const QColor& paperColor() const { return m_paperColor; } void setPaperColor(const QColor& color); inline const QColor& highlightColor() const { return m_highlightColor; } void setHighlightColor(const QColor& color); QColor annotationColor() const; void setAnnotationColor(const QColor& color); Qt::KeyboardModifiers copyToClipboardModifiers() const; void setCopyToClipboardModifiers(const Qt::KeyboardModifiers& modifiers); Qt::KeyboardModifiers addAnnotationModifiers() const; void setAddAnnotationModifiers(const Qt::KeyboardModifiers& modifiers); bool annotationOverlay() const; void setAnnotationOverlay(bool overlay); bool formFieldOverlay() const; void setFormFieldOverlay(bool overlay); private: PageItem(QSettings* settings); friend class Settings; QSettings* m_settings; int m_cacheSize; QIcon m_progressIcon; QIcon m_errorIcon; bool m_keepObsoletePixmaps; bool m_useDevicePixelRatio; bool m_decoratePages; bool m_decorateLinks; bool m_decorateFormFields; QColor m_backgroundColor; QColor m_paperColor; QColor m_highlightColor; }; // presentation view class PresentationView { public: bool sync() const; void setSync(bool sync); int screen() const; void setScreen(int screen); QColor backgroundColor() const; void setBackgroundColor(const QColor& backgroundColor); private: PresentationView(QSettings* settings); friend class Settings; QSettings* m_settings; }; // document view class DocumentView { public: void sync(); bool openUrl() const; void setOpenUrl(bool openUrl); bool autoRefresh() const; void setAutoRefresh(bool autoRefresh); inline bool prefetch() const { return m_prefetch; } void setPrefetch(bool prefetch); inline int prefetchDistance() const { return m_prefetchDistance; } void setPrefetchDistance(int prefetchDistance); int autoRefreshTimeout() const; int prefetchTimeout() const; inline int pagesPerRow() const { return m_pagesPerRow; } void setPagesPerRow(int pagesPerRow); inline bool highlightCurrentThumbnail() const { return m_highlightCurrentThumbnail; } void setHighlightCurrentThumbnail(bool highlightCurrentThumbnail); inline bool limitThumbnailsToResults() const { return m_limitThumbnailsToResults; } void setLimitThumbnailsToResults(bool limitThumbnailsToResults); inline qreal pageSpacing() const { return m_pageSpacing; } void setPageSpacing(qreal pageSpacing); inline qreal thumbnailSpacing() const { return m_thumbnailSpacing; } void setThumbnailSpacing(qreal thumbnailSpacing); inline qreal thumbnailSize() const { return m_thumbnailSize; } void setThumbnailSize(qreal thumbnailSize); bool matchCase() const; void setMatchCase(bool matchCase); int highlightDuration() const; void setHighlightDuration(int highlightDuration); QString sourceEditor() const; void setSourceEditor(const QString& sourceEditor); Qt::KeyboardModifiers zoomModifiers() const; void setZoomModifiers(const Qt::KeyboardModifiers& zoomModifiers); Qt::KeyboardModifiers rotateModifiers() const; void setRotateModifiers(const Qt::KeyboardModifiers& rotateModifiers); Qt::KeyboardModifiers scrollModifiers() const; void setScrollModifiers(const Qt::KeyboardModifiers& scrollModifiers); // per-tab settings bool continuousMode() const; void setContinuousMode(bool continuousMode); LayoutMode layoutMode() const; void setLayoutMode(LayoutMode layoutMode); ScaleMode scaleMode() const; void setScaleMode(ScaleMode scaleMode); qreal scaleFactor() const; void setScaleFactor(qreal scaleFactor); Rotation rotation() const; void setRotation(Rotation rotation); bool invertColors() const; void setInvertColors(bool invertColors); bool highlightAll() const; void setHighlightAll(bool highlightAll); private: DocumentView(QSettings* settings); friend class Settings; QSettings* m_settings; bool m_prefetch; int m_prefetchDistance; int m_pagesPerRow; bool m_highlightCurrentThumbnail; bool m_limitThumbnailsToResults; qreal m_pageSpacing; qreal m_thumbnailSpacing; qreal m_thumbnailSize; }; // main window class MainWindow { public: bool trackRecentlyUsed() const; void setTrackRecentlyUsed(bool on); int recentlyUsedCount() const; void setRecentlyUsedCount(int recentlyUsedCount); QStringList recentlyUsed() const; void setRecentlyUsed(const QStringList& recentlyUsed); bool restoreTabs() const; void setRestoreTabs(bool on); bool restoreBookmarks() const; void setRestoreBookmarks(bool on); bool restorePerFileSettings() const; void setRestorePerFileSettings(bool on); int tabPosition() const; void setTabPosition(int tabPosition); int tabVisibility() const; void setTabVisibility(int tabVisibility); bool newTabNextToCurrentTab() const; void setNewTabNextToCurrentTab(bool newTabNextToCurrentTab); bool currentPageInWindowTitle() const; void setCurrentPageInWindowTitle(bool currentPageInWindowTitle); bool instanceNameInWindowTitle() const; void setInstanceNameInWindowTitle(bool instanceNameInWindowTitle); bool synchronizeOutlineView() const; void setSynchronizeOutlineView(bool synchronizeOutlineView); QStringList fileToolBar() const; void setFileToolBar(const QStringList& fileToolBar); QStringList editToolBar() const; void setEditToolBar(const QStringList& editToolBar); QStringList viewToolBar() const; void setViewToolBar(const QStringList& viewToolBar); bool hasIconTheme() const; QString iconTheme() const; bool hasStyleSheet() const; QString styleSheet() const; QByteArray geometry() const; void setGeometry(const QByteArray& geometry); QByteArray state() const; void setState(const QByteArray& state); QString openPath() const; void setOpenPath(const QString& openPath); QString savePath() const; void setSavePath(const QString& savePath); QSize settingsDialogSize(const QSize& sizeHint) const; void setSettingsDialogSize(const QSize& settingsDialogSize); QSize fontsDialogSize(const QSize& sizeHint) const; void setFontsDialogSize(const QSize& fontsDialogSize); QSize contentsDialogSize(const QSize& sizeHint) const; void setContentsDialogSize(const QSize& contentsDialogSize); private: MainWindow(QSettings* settings); friend class Settings; QSettings* m_settings; }; // print dialog class PrintDialog { public: bool collateCopies() const; void setCollateCopies(bool collateCopies); QPrinter::PageOrder pageOrder() const; void setPageOrder(QPrinter::PageOrder pageOrder); QPrinter::Orientation orientation() const; void setOrientation(QPrinter::Orientation orientation); QPrinter::ColorMode colorMode() const; void setColorMode(QPrinter::ColorMode colorMode); QPrinter::DuplexMode duplex() const; void setDuplex(QPrinter::DuplexMode duplex); bool fitToPage() const; void setFitToPage(bool fitToPage); PrintOptions::PageSet pageSet() const; void setPageSet(PrintOptions::PageSet pageSet); PrintOptions::NumberUp numberUp() const; void setNumberUp(PrintOptions::NumberUp numberUp); PrintOptions::NumberUpLayout numberUpLayout() const; void setNumberUpLayout(PrintOptions::NumberUpLayout numberUpLayout); private: PrintDialog(QSettings* settings); friend class Settings; QSettings* m_settings; }; void sync(); PageItem& pageItem(); PresentationView& presentationView(); DocumentView& documentView(); MainWindow& mainWindow(); PrintDialog& printDialog(); private: Q_DISABLE_COPY(Settings) static Settings* s_instance; Settings(QObject* parent = 0); QSettings* m_settings; PageItem m_pageItem; PresentationView m_presentationView; DocumentView m_documentView; MainWindow m_mainWindow; PrintDialog m_printDialog; }; // defaults class Defaults { public: class PageItem { public: static inline int cacheSize() { return 32 * 1024 * 1024; } static inline bool keepObsoletePixmaps() { return false; } static inline bool useDevicePixelRatio() { return false; } static inline bool decoratePages() { return true; } static inline bool decorateLinks() { return true; } static inline bool decorateFormFields() { return true; } static inline QColor backgroundColor() { return Qt::darkGray; } static inline QColor paperColor() { return Qt::white; } static inline QColor highlightColor() { return Qt::yellow; } static inline QColor annotationColor() { return Qt::yellow; } static inline Qt::KeyboardModifiers copyToClipboardModifiers() { return Qt::ShiftModifier; } static inline Qt::KeyboardModifiers addAnnotationModifiers() { return Qt::ControlModifier; } static inline bool annotationOverlay() { return false; } static inline bool formFieldOverlay() { return true; } private: PageItem() {} }; class PresentationView { public: static inline bool sync() { return false; } static inline int screen() { return -1; } static inline QColor backgroundColor() { return QColor(); } private: PresentationView() {} }; class DocumentView { public: static inline bool openUrl() { return false; } static inline bool autoRefresh() { return false; } static inline bool prefetch() { return false; } static inline int prefetchDistance() { return 1; } static inline int autoRefreshTimeout() { return 750; } static inline int prefetchTimeout() { return 250; } static inline int pagesPerRow() { return 3; } static inline bool highlightCurrentThumbnail() { return false; } static inline bool limitThumbnailsToResults() { return false; } static inline qreal minimumScaleFactor() { return 0.1; } static inline qreal maximumScaleFactor() { return 10.0; } static inline qreal zoomBy() { return 0.1; } static inline qreal pageSpacing() { return 5.0; } static inline qreal thumbnailSpacing() { return 3.0; } static inline qreal thumbnailSize() { return 150.0; } static inline bool matchCase() { return false; } static inline int highlightDuration() { return 5000; } static inline QString sourceEditor() { return QString(); } static inline Qt::KeyboardModifiers zoomModifiers() { return Qt::ControlModifier; } static inline Qt::KeyboardModifiers rotateModifiers() { return Qt::ShiftModifier; } static inline Qt::KeyboardModifiers scrollModifiers() { return Qt::AltModifier; } // per-tab defaults static inline bool continuousMode() { return false; } static inline LayoutMode layoutMode() { return SinglePageMode; } static inline ScaleMode scaleMode() { return ScaleFactorMode; } static inline qreal scaleFactor() { return 1.0; } static inline Rotation rotation() { return RotateBy0; } static inline bool invertColors() { return false; } static inline bool highlightAll() { return false; } private: DocumentView() {} }; class MainWindow { public: static inline bool trackRecentlyUsed() { return false; } static inline int recentlyUsedCount() { return 10; } static inline bool restoreTabs() { return false; } static inline bool restoreBookmarks() { return false; } static inline bool restorePerFileSettings() { return false; } static inline int tabPosition() { return 0; } static inline int tabVisibility() { return 0; } static inline bool newTabNextToCurrentTab() { return true; } static inline bool currentPageInWindowTitle() { return false; } static inline bool instancfeNameInWindowTitle() { return false; } static inline bool synchronizeOutlineView() { return false; } static inline QStringList fileToolBar() { return QStringList() << "openInNewTab" << "refresh"; } static inline QStringList editToolBar() { return QStringList() << "currentPage" << "previousPage" << "nextPage"; } static inline QStringList viewToolBar() { return QStringList() << "scaleFactor" << "zoomIn" << "zoomOut"; } static QString path(); private: MainWindow() {} }; class PrintDialog { public: static inline bool collateCopies() { return false; } static inline QPrinter::PageOrder pageOrder() { return QPrinter::FirstPageFirst; } static inline QPrinter::Orientation orientation() { return QPrinter::Portrait; } static inline QPrinter::ColorMode colorMode() { return QPrinter::Color; } static inline QPrinter::DuplexMode duplex() { return QPrinter::DuplexNone; } static inline bool fitToPage() { return false; } static inline PrintOptions::PageSet pageSet() { return PrintOptions::AllPages; } static inline PrintOptions::NumberUp numberUp() { return PrintOptions::SinglePage; } static inline PrintOptions::NumberUpLayout numberUpLayout() { return PrintOptions::LeftRightTopBottom; } private: PrintDialog() {} }; private: Defaults() {} }; #endif // SETTINGS_H qpdfview-0.4.7/sources/settingsdialog.cpp0000644000000000000000000007512412246606025016720 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "settingsdialog.h" #include #include #include #include #include #include #include #include #include #include "settings.h" #include "model.h" #include "pluginhandler.h" #include "shortcuthandler.h" #include "documentview.h" #include "miscellaneous.h" static void setCurrentTextToColorName(QComboBox* comboBox, const QColor& color) { comboBox->lineEdit()->setText(color.isValid() ? color.name() : QString()); } static QColor getValidColorFromCurrentText(QComboBox* comboBox, const QColor& defaultColor) { const QColor color(comboBox->currentText()); return color.isValid() ? color : defaultColor; } Settings* SettingsDialog::s_settings = 0; SettingsDialog::SettingsDialog(QWidget* parent) : QDialog(parent) { if(s_settings == 0) { s_settings = Settings::instance(); } m_graphicsTabWidget = new QTabWidget(this); m_graphicsTabWidget->addTab(new QWidget(this), tr("General")); #ifdef WITH_PDF m_pdfSettingsWidget = PluginHandler::createPdfSettingsWidget(this); if(m_pdfSettingsWidget != 0) { m_graphicsTabWidget->addTab(m_pdfSettingsWidget, "PDF"); } #endif // WITH_PDF #ifdef WITH_PS m_psSettingsWidget = PluginHandler::createPsSettingsWidget(this); if(m_psSettingsWidget != 0) { m_graphicsTabWidget->addTab(m_psSettingsWidget, "PS"); } #endif // WITH_PS m_graphicsLayout = new QFormLayout(m_graphicsTabWidget->widget(0)); m_shortcutsTableView = new QTableView(this); m_shortcutsTableView->setModel(ShortcutHandler::instance()); connect(this, SIGNAL(accepted()), ShortcutHandler::instance(), SLOT(submit())); connect(this, SIGNAL(rejected()), ShortcutHandler::instance(), SLOT(revert())); m_shortcutsTableView->setFrameShape(QFrame::NoFrame); m_shortcutsTableView->setAlternatingRowColors(true); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) m_shortcutsTableView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents); m_shortcutsTableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); #else m_shortcutsTableView->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents); m_shortcutsTableView->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch); #endif // QT_VERSION m_shortcutsTableView->verticalHeader()->setVisible(false); m_tabWidget = new QTabWidget(this); m_tabWidget->addTab(new QWidget(this), tr("&Behavior")); m_tabWidget->addTab(m_graphicsTabWidget, tr("&Graphics")); m_tabWidget->addTab(new QWidget(this), tr("&Interface")); m_tabWidget->addTab(m_shortcutsTableView, tr("&Shortcuts")); m_tabWidget->addTab(new QWidget(this), tr("&Modifiers")); m_dialogButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); connect(m_dialogButtonBox, SIGNAL(accepted()), SLOT(accept())); connect(m_dialogButtonBox, SIGNAL(rejected()), SLOT(reject())); m_defaultsButton = m_dialogButtonBox->addButton(tr("Defaults"), QDialogButtonBox::ResetRole); connect(m_defaultsButton, SIGNAL(clicked()), SLOT(reset())); m_defaultsOnCurrentTabButton = m_dialogButtonBox->addButton(tr("Defaults on current tab"), QDialogButtonBox::ResetRole); connect(m_defaultsOnCurrentTabButton, SIGNAL(clicked()), SLOT(resetCurrentTab())); m_behaviorLayout = new QFormLayout(m_tabWidget->widget(0)); m_interfaceLayout = new QFormLayout(m_tabWidget->widget(2)); m_modifiersLayout = new QFormLayout(m_tabWidget->widget(4)); setLayout(new QVBoxLayout(this)); layout()->addWidget(m_tabWidget); layout()->addWidget(m_dialogButtonBox); createBehaviorTab(); createGraphicsTab(); createInterfaceTab(); createModifiersTab(); } void SettingsDialog::accept() { QDialog::accept(); #ifdef WITH_PDF if(m_pdfSettingsWidget != 0) { m_pdfSettingsWidget->accept(); } #endif // WITH_PDF #ifdef WITH_PS if(m_psSettingsWidget != 0) { m_psSettingsWidget->accept(); } #endif // WITH_PS // behavior s_settings->documentView().setOpenUrl(m_openUrlCheckBox->isChecked()); s_settings->documentView().setAutoRefresh(m_autoRefreshCheckBox->isChecked()); s_settings->mainWindow().setTrackRecentlyUsed(m_trackRecentlyUsedCheckBox->isChecked()); s_settings->mainWindow().setRestoreTabs(m_restoreTabsCheckBox->isChecked()); s_settings->mainWindow().setRestoreBookmarks(m_restoreBookmarksCheckBox->isChecked()); s_settings->mainWindow().setRestorePerFileSettings(m_restorePerFileSettingsCheckBox->isChecked()); s_settings->presentationView().setSync(m_presentationSyncCheckBox->isChecked()); s_settings->presentationView().setScreen(m_presentationScreenSpinBox->value()); s_settings->documentView().setHighlightDuration(m_highlightDurationSpinBox->value()); s_settings->pageItem().setHighlightColor(getValidColorFromCurrentText(m_highlightColorComboBox, Defaults::PageItem::highlightColor())); s_settings->pageItem().setAnnotationColor(getValidColorFromCurrentText(m_annotationColorComboBox, Defaults::PageItem::annotationColor())); s_settings->documentView().setSourceEditor(m_sourceEditorLineEdit->text()); // graphics s_settings->pageItem().setKeepObsoletePixmaps(m_keepObsoletePixmapsCheckBox->isChecked()); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) s_settings->pageItem().setUseDevicePixelRatio(m_useDevicePixelRatioCheckBox->isChecked()); #endif // QT_VERSION s_settings->pageItem().setDecoratePages(m_decoratePagesCheckBox->isChecked()); s_settings->pageItem().setDecorateLinks(m_decorateLinksCheckBox->isChecked()); s_settings->pageItem().setDecorateFormFields(m_decorateFormFieldsCheckBox->isChecked()); s_settings->pageItem().setBackgroundColor(getValidColorFromCurrentText(m_backgroundColorComboBox, Defaults::PageItem::backgroundColor())); s_settings->pageItem().setPaperColor(getValidColorFromCurrentText(m_paperColorComboBox, Defaults::PageItem::paperColor())); s_settings->presentationView().setBackgroundColor(getValidColorFromCurrentText(m_presentationBackgroundColorComboBox, Defaults::PresentationView::backgroundColor())); s_settings->documentView().setPagesPerRow(m_pagesPerRowSpinBox->value()); s_settings->documentView().setPageSpacing(m_pageSpacingSpinBox->value()); s_settings->documentView().setThumbnailSpacing(m_thumbnailSpacingSpinBox->value()); s_settings->documentView().setThumbnailSize(m_thumbnailSizeSpinBox->value()); s_settings->pageItem().setCacheSize(m_cacheSizeComboBox->itemData(m_cacheSizeComboBox->currentIndex()).toInt()); s_settings->documentView().setPrefetch(m_prefetchCheckBox->isChecked()); s_settings->documentView().setPrefetchDistance(m_prefetchDistanceSpinBox->value()); // interface s_settings->mainWindow().setTabPosition(m_tabPositionComboBox->itemData(m_tabPositionComboBox->currentIndex()).toInt()); s_settings->mainWindow().setTabVisibility(m_tabVisibilityComboBox->itemData(m_tabVisibilityComboBox->currentIndex()).toInt()); s_settings->mainWindow().setNewTabNextToCurrentTab(m_newTabNextToCurrentTabCheckBox->isChecked()); s_settings->mainWindow().setRecentlyUsedCount(m_recentlyUsedCountSpinBox->value()); s_settings->mainWindow().setFileToolBar(m_fileToolBarLineEdit->text().split(",", QString::SkipEmptyParts)); s_settings->mainWindow().setEditToolBar(m_editToolBarLineEdit->text().split(",", QString::SkipEmptyParts)); s_settings->mainWindow().setViewToolBar(m_viewToolBarLineEdit->text().split(",", QString::SkipEmptyParts)); s_settings->mainWindow().setCurrentPageInWindowTitle(m_currentPageInWindowTitleCheckBox->isChecked()); s_settings->mainWindow().setInstanceNameInWindowTitle(m_instanceNameInWindowTitleCheckBox->isChecked()); s_settings->mainWindow().setSynchronizeOutlineView(m_synchronizeOutlineViewCheckBox->isChecked()); s_settings->documentView().setHighlightCurrentThumbnail(m_highlightCurrentThumbnailCheckBox->isChecked()); s_settings->documentView().setLimitThumbnailsToResults(m_limitThumbnailsToResultsCheckBox->isChecked()); s_settings->pageItem().setAnnotationOverlay(m_annotationOverlayCheckBox->isChecked()); s_settings->pageItem().setFormFieldOverlay(m_formFieldOverlayCheckBox); // modifiers s_settings->documentView().setZoomModifiers(static_cast(m_zoomModifiersComboBox->itemData(m_zoomModifiersComboBox->currentIndex()).toInt())); s_settings->documentView().setRotateModifiers(static_cast(m_rotateModifiersComboBox->itemData(m_rotateModifiersComboBox->currentIndex()).toInt())); s_settings->documentView().setScrollModifiers(static_cast(m_scrollModifiersComboBox->itemData(m_scrollModifiersComboBox->currentIndex()).toInt())); s_settings->pageItem().setCopyToClipboardModifiers(static_cast(m_copyToClipboardModifiersComboBox->itemData(m_copyToClipboardModifiersComboBox->currentIndex()).toInt())); s_settings->pageItem().setAddAnnotationModifiers(static_cast(m_addAnnotationModifiersComboBox->itemData(m_addAnnotationModifiersComboBox->currentIndex()).toInt())); } void SettingsDialog::reset() { resetBehaviorTab(); resetGraphicsTab(); resetInterfaceTab(); ShortcutHandler::instance()->reset(); resetModifiersTab(); } void SettingsDialog::resetCurrentTab() { switch(m_tabWidget->currentIndex()) { default: reset(); break; case 0: resetBehaviorTab(); break; case 1: resetGraphicsTab(); break; case 2: resetInterfaceTab(); break; case 3: ShortcutHandler::instance()->reset(); break; case 4: resetModifiersTab(); break; } } void SettingsDialog::createBehaviorTab() { // open URL m_openUrlCheckBox = new QCheckBox(this); m_openUrlCheckBox->setChecked(s_settings->documentView().openUrl()); m_behaviorLayout->addRow(tr("Open URL:"), m_openUrlCheckBox); // auto-refresh m_autoRefreshCheckBox = new QCheckBox(this); m_autoRefreshCheckBox->setChecked(s_settings->documentView().autoRefresh()); m_behaviorLayout->addRow(tr("Auto-refresh:"), m_autoRefreshCheckBox); // track recently used m_trackRecentlyUsedCheckBox = new QCheckBox(this); m_trackRecentlyUsedCheckBox->setChecked(s_settings->mainWindow().trackRecentlyUsed()); m_trackRecentlyUsedCheckBox->setToolTip(tr("Effective after restart.")); m_behaviorLayout->addRow(tr("Track recently used:"), m_trackRecentlyUsedCheckBox); // restore tabs m_restoreTabsCheckBox = new QCheckBox(this); m_restoreTabsCheckBox->setChecked(s_settings->mainWindow().restoreTabs()); m_behaviorLayout->addRow(tr("Restore tabs:"), m_restoreTabsCheckBox); // restore bookmarks m_restoreBookmarksCheckBox = new QCheckBox(this); m_restoreBookmarksCheckBox->setChecked(s_settings->mainWindow().restoreBookmarks()); m_behaviorLayout->addRow(tr("Restore bookmarks:"), m_restoreBookmarksCheckBox); // restore per-file settings m_restorePerFileSettingsCheckBox = new QCheckBox(this); m_restorePerFileSettingsCheckBox->setChecked(s_settings->mainWindow().restorePerFileSettings()); m_behaviorLayout->addRow(tr("Restore per-file settings:"), m_restorePerFileSettingsCheckBox); #ifndef WITH_SQL m_restoreTabsCheckBox->setEnabled(false); m_restoreBookmarksCheckBox->setEnabled(false); m_restorePerFileSettingsCheckBox->setEnabled(false); #endif // WITH_SQL // presentation sync m_presentationSyncCheckBox = new QCheckBox(this); m_presentationSyncCheckBox->setChecked(s_settings->presentationView().sync()); m_behaviorLayout->addRow(tr("Synchronize presentation:"), m_presentationSyncCheckBox); // presentation screen m_presentationScreenSpinBox = new QSpinBox(this); m_presentationScreenSpinBox->setRange(-1, QApplication::desktop()->screenCount() - 1); m_presentationScreenSpinBox->setSpecialValueText(tr("Default")); m_presentationScreenSpinBox->setValue(s_settings->presentationView().screen()); m_behaviorLayout->addRow(tr("Presentation screen:"), m_presentationScreenSpinBox); // highlight duration m_highlightDurationSpinBox = new QSpinBox(this); m_highlightDurationSpinBox->setSuffix(" ms"); m_highlightDurationSpinBox->setRange(0, 60000); m_highlightDurationSpinBox->setSingleStep(500); m_highlightDurationSpinBox->setSpecialValueText(tr("None")); m_highlightDurationSpinBox->setValue(s_settings->documentView().highlightDuration()); m_behaviorLayout->addRow(tr("Highlight duration:"), m_highlightDurationSpinBox); // highlight color createColorComboBox(m_highlightColorComboBox, s_settings->pageItem().highlightColor()); m_behaviorLayout->addRow(tr("Highlight color:"), m_highlightColorComboBox); // annotation color createColorComboBox(m_annotationColorComboBox, s_settings->pageItem().annotationColor()); m_behaviorLayout->addRow(tr("Annotation color:"), m_annotationColorComboBox); // source editor m_sourceEditorLineEdit = new QLineEdit(this); m_sourceEditorLineEdit->setText(s_settings->documentView().sourceEditor()); m_sourceEditorLineEdit->setToolTip(tr("'%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number.")); m_behaviorLayout->addRow(tr("Source editor:"), m_sourceEditorLineEdit); } void SettingsDialog::resetBehaviorTab() { m_openUrlCheckBox->setChecked(Defaults::DocumentView::openUrl()); m_autoRefreshCheckBox->setChecked(Defaults::DocumentView::autoRefresh()); m_trackRecentlyUsedCheckBox->setChecked(Defaults::MainWindow::trackRecentlyUsed()); m_restoreTabsCheckBox->setChecked(Defaults::MainWindow::restoreTabs()); m_restoreBookmarksCheckBox->setChecked(Defaults::MainWindow::restoreBookmarks()); m_restorePerFileSettingsCheckBox->setChecked(Defaults::MainWindow::restorePerFileSettings()); m_presentationSyncCheckBox->setChecked(Defaults::PresentationView::sync()); m_presentationScreenSpinBox->setValue(Defaults::PresentationView::screen()); m_highlightDurationSpinBox->setValue(Defaults::DocumentView::highlightDuration()); setCurrentTextToColorName(m_highlightColorComboBox, Defaults::PageItem::highlightColor()); setCurrentTextToColorName(m_annotationColorComboBox, Defaults::PageItem::annotationColor()); m_sourceEditorLineEdit->clear(); } void SettingsDialog::createGraphicsTab() { // keep obsolete pixmaps m_keepObsoletePixmapsCheckBox = new QCheckBox(this); m_keepObsoletePixmapsCheckBox->setChecked(s_settings->pageItem().keepObsoletePixmaps()); m_graphicsLayout->addRow(tr("Keep obsolete pixmaps:"), m_keepObsoletePixmapsCheckBox); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) // use device pixel ratio m_useDevicePixelRatioCheckBox = new QCheckBox(this); m_useDevicePixelRatioCheckBox->setChecked(s_settings->pageItem().useDevicePixelRatio()); m_graphicsLayout->addRow(tr("Use device pixel ratio:"), m_useDevicePixelRatioCheckBox); #endif // QT_VERSION // decorate pages m_decoratePagesCheckBox = new QCheckBox(this); m_decoratePagesCheckBox->setChecked(s_settings->pageItem().decoratePages()); m_graphicsLayout->addRow(tr("Decorate pages:"), m_decoratePagesCheckBox); // decorate links m_decorateLinksCheckBox = new QCheckBox(this); m_decorateLinksCheckBox->setChecked(s_settings->pageItem().decorateLinks()); m_graphicsLayout->addRow(tr("Decorate links:"), m_decorateLinksCheckBox); // decorate form fields m_decorateFormFieldsCheckBox = new QCheckBox(this); m_decorateFormFieldsCheckBox->setChecked(s_settings->pageItem().decorateFormFields()); m_graphicsLayout->addRow(tr("Decorate form fields:"), m_decorateFormFieldsCheckBox); // background color createColorComboBox(m_backgroundColorComboBox, s_settings->pageItem().backgroundColor()); m_graphicsLayout->addRow(tr("Background color:"), m_backgroundColorComboBox); // paper color createColorComboBox(m_paperColorComboBox, s_settings->pageItem().paperColor()); m_graphicsLayout->addRow(tr("Paper color:"), m_paperColorComboBox); // presentation background color createColorComboBox(m_presentationBackgroundColorComboBox, s_settings->presentationView().backgroundColor()); m_graphicsLayout->addRow(tr("Presentation background color:"), m_presentationBackgroundColorComboBox); // pages per row m_pagesPerRowSpinBox = new QSpinBox(this); m_pagesPerRowSpinBox->setRange(1, 10); m_pagesPerRowSpinBox->setValue(s_settings->documentView().pagesPerRow()); m_graphicsLayout->addRow(tr("Pages per row:"), m_pagesPerRowSpinBox); // page spacing m_pageSpacingSpinBox = new QDoubleSpinBox(this); m_pageSpacingSpinBox->setSuffix(" px"); m_pageSpacingSpinBox->setRange(0.0, 25.0); m_pageSpacingSpinBox->setSingleStep(0.25); m_pageSpacingSpinBox->setValue(s_settings->documentView().pageSpacing()); m_graphicsLayout->addRow(tr("Page spacing:"), m_pageSpacingSpinBox); // thumbnail spacing m_thumbnailSpacingSpinBox = new QDoubleSpinBox(this); m_thumbnailSpacingSpinBox->setSuffix(" px"); m_thumbnailSpacingSpinBox->setRange(0.0, 25.0); m_thumbnailSpacingSpinBox->setSingleStep(0.25); m_thumbnailSpacingSpinBox->setValue(s_settings->documentView().thumbnailSpacing()); m_graphicsLayout->addRow(tr("Thumbnail spacing:"), m_thumbnailSpacingSpinBox); // thumbnail size m_thumbnailSizeSpinBox = new QDoubleSpinBox(this); m_thumbnailSizeSpinBox->setSuffix(" px"); m_thumbnailSizeSpinBox->setRange(30.0, 300.0); m_thumbnailSizeSpinBox->setSingleStep(10.0); m_thumbnailSizeSpinBox->setValue(s_settings->documentView().thumbnailSize()); m_graphicsLayout->addRow(tr("Thumbnail size:"), m_thumbnailSizeSpinBox); // cache size m_cacheSizeComboBox = new QComboBox(this); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(0), 0); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(8), 8 * 1024 * 1024); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(16), 16 * 1024 * 1024); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(32), 32 * 1024 * 1024); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(64), 64 * 1024 * 1024); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(128), 128 * 1024 * 1024); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(256), 256 * 1024 * 1024); m_cacheSizeComboBox->addItem(tr("%1 MB").arg(512), 512 * 1024 * 1024); m_cacheSizeComboBox->setCurrentIndex(m_cacheSizeComboBox->findData(s_settings->pageItem().cacheSize())); m_graphicsLayout->addRow(tr("Cache size:"), m_cacheSizeComboBox); // prefetch m_prefetchCheckBox = new QCheckBox(this); m_prefetchCheckBox->setChecked(s_settings->documentView().prefetch()); m_graphicsLayout->addRow(tr("Prefetch:"), m_prefetchCheckBox); // prefetch distance m_prefetchDistanceSpinBox = new QSpinBox(this); m_prefetchDistanceSpinBox->setRange(1, 10); m_prefetchDistanceSpinBox->setValue(s_settings->documentView().prefetchDistance()); m_graphicsLayout->addRow(tr("Prefetch distance:"), m_prefetchDistanceSpinBox); } void SettingsDialog::resetGraphicsTab() { #ifdef WITH_PDF if(m_pdfSettingsWidget != 0) { m_pdfSettingsWidget->reset(); } #endif // WITH_PDF #ifdef WITH_PS if(m_psSettingsWidget != 0) { m_psSettingsWidget->reset(); } #endif // WITH_PS m_keepObsoletePixmapsCheckBox->setChecked(Defaults::PageItem::keepObsoletePixmaps()); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) m_useDevicePixelRatioCheckBox->setChecked(Defaults::PageItem::useDevicePixelRatio()); #endif // QT_VERSION m_decoratePagesCheckBox->setChecked(Defaults::PageItem::decoratePages()); m_decorateLinksCheckBox->setChecked(Defaults::PageItem::decorateLinks()); m_decorateFormFieldsCheckBox->setChecked(Defaults::PageItem::decorateFormFields()); setCurrentTextToColorName(m_backgroundColorComboBox, Defaults::PageItem::backgroundColor()); setCurrentTextToColorName(m_paperColorComboBox, Defaults::PageItem::paperColor()); setCurrentTextToColorName(m_presentationBackgroundColorComboBox, Defaults::PresentationView::backgroundColor()); m_pagesPerRowSpinBox->setValue(Defaults::DocumentView::pagesPerRow()); m_pageSpacingSpinBox->setValue(Defaults::DocumentView::pageSpacing()); m_thumbnailSpacingSpinBox->setValue(Defaults::DocumentView::thumbnailSpacing()); m_thumbnailSizeSpinBox->setValue(Defaults::DocumentView::thumbnailSize()); m_cacheSizeComboBox->setCurrentIndex(m_cacheSizeComboBox->findData(Defaults::PageItem::cacheSize())); m_prefetchCheckBox->setChecked(Defaults::DocumentView::prefetch()); m_prefetchDistanceSpinBox->setValue(Defaults::DocumentView::prefetchDistance()); } void SettingsDialog::createInterfaceTab() { // tab position m_tabPositionComboBox = new QComboBox(this); m_tabPositionComboBox->addItem(tr("Top"), static_cast< uint >(QTabWidget::North)); m_tabPositionComboBox->addItem(tr("Bottom"), static_cast< uint >(QTabWidget::South)); m_tabPositionComboBox->addItem(tr("Left"), static_cast< uint >(QTabWidget::West)); m_tabPositionComboBox->addItem(tr("Right"), static_cast< uint >(QTabWidget::East)); m_tabPositionComboBox->setCurrentIndex(m_tabPositionComboBox->findData(s_settings->mainWindow().tabPosition())); m_interfaceLayout->addRow(tr("Tab position:"), m_tabPositionComboBox); // tab visibility m_tabVisibilityComboBox = new QComboBox(this); m_tabVisibilityComboBox->addItem(tr("As needed"), static_cast< uint >(TabWidget::TabBarAsNeeded)); m_tabVisibilityComboBox->addItem(tr("Always"), static_cast< uint >(TabWidget::TabBarAlwaysOn)); m_tabVisibilityComboBox->addItem(tr("Never"), static_cast< uint >(TabWidget::TabBarAlwaysOff)); m_tabVisibilityComboBox->setCurrentIndex(m_tabVisibilityComboBox->findData(s_settings->mainWindow().tabVisibility())); m_interfaceLayout->addRow(tr("Tab visibility:"), m_tabVisibilityComboBox); // new tab next to current tab m_newTabNextToCurrentTabCheckBox = new QCheckBox(this); m_newTabNextToCurrentTabCheckBox->setChecked(s_settings->mainWindow().newTabNextToCurrentTab()); m_interfaceLayout->addRow(tr("New tab next to current tab:"), m_newTabNextToCurrentTabCheckBox); // recently used count m_recentlyUsedCountSpinBox = new QSpinBox(this); m_recentlyUsedCountSpinBox->setRange(1, 50); m_recentlyUsedCountSpinBox->setValue(s_settings->mainWindow().recentlyUsedCount()); m_recentlyUsedCountSpinBox->setToolTip(tr("Effective after restart.")); m_interfaceLayout->addRow(tr("Recently used count:"), m_recentlyUsedCountSpinBox); // file tool bar m_fileToolBarLineEdit = new QLineEdit(this); m_fileToolBarLineEdit->setText(s_settings->mainWindow().fileToolBar().join(",")); m_fileToolBarLineEdit->setToolTip(tr("Effective after restart.")); m_interfaceLayout->addRow(tr("File tool bar:"), m_fileToolBarLineEdit); // edit tool bar m_editToolBarLineEdit = new QLineEdit(this); m_editToolBarLineEdit->setText(s_settings->mainWindow().editToolBar().join(",")); m_editToolBarLineEdit->setToolTip(tr("Effective after restart.")); m_interfaceLayout->addRow(tr("Edit tool bar:"), m_editToolBarLineEdit); // view tool bar m_viewToolBarLineEdit = new QLineEdit(this); m_viewToolBarLineEdit->setText(s_settings->mainWindow().viewToolBar().join(",")); m_viewToolBarLineEdit->setToolTip(tr("Effective after restart.")); m_interfaceLayout->addRow(tr("View tool bar:"), m_viewToolBarLineEdit); // current page in window title m_currentPageInWindowTitleCheckBox = new QCheckBox(this); m_currentPageInWindowTitleCheckBox->setChecked(s_settings->mainWindow().currentPageInWindowTitle()); m_interfaceLayout->addRow(tr("Current page in window title:"), m_currentPageInWindowTitleCheckBox); // instance name in window title m_instanceNameInWindowTitleCheckBox = new QCheckBox(this); m_instanceNameInWindowTitleCheckBox->setChecked(s_settings->mainWindow().instanceNameInWindowTitle()); m_interfaceLayout->addRow(tr("Instance name in window title:"), m_instanceNameInWindowTitleCheckBox); // synchronize outline view m_synchronizeOutlineViewCheckBox = new QCheckBox(this); m_synchronizeOutlineViewCheckBox->setChecked(s_settings->mainWindow().synchronizeOutlineView()); m_interfaceLayout->addRow(tr("Synchronize outline view:"), m_synchronizeOutlineViewCheckBox); // highlight current thumbnail m_highlightCurrentThumbnailCheckBox = new QCheckBox(this); m_highlightCurrentThumbnailCheckBox->setChecked(s_settings->documentView().highlightCurrentThumbnail()); m_interfaceLayout->addRow(tr("Highlight current thumbnail:"), m_highlightCurrentThumbnailCheckBox); // limit thumbnails to results m_limitThumbnailsToResultsCheckBox = new QCheckBox(this); m_limitThumbnailsToResultsCheckBox->setChecked(s_settings->documentView().limitThumbnailsToResults()); m_interfaceLayout->addRow(tr("Limit thumbnails to results:"), m_limitThumbnailsToResultsCheckBox); // annotation overlay m_annotationOverlayCheckBox = new QCheckBox(this); m_annotationOverlayCheckBox->setChecked(s_settings->pageItem().annotationOverlay()); m_interfaceLayout->addRow(tr("Annotation overlay:"), m_annotationOverlayCheckBox); // form field overlay m_formFieldOverlayCheckBox = new QCheckBox(this); m_formFieldOverlayCheckBox->setChecked(s_settings->pageItem().formFieldOverlay()); m_interfaceLayout->addRow(tr("Form field overlay:"), m_formFieldOverlayCheckBox); } void SettingsDialog::resetInterfaceTab() { m_tabPositionComboBox->setCurrentIndex(m_tabPositionComboBox->findData(static_cast< uint >(Defaults::MainWindow::tabPosition()))); m_tabVisibilityComboBox->setCurrentIndex(m_tabVisibilityComboBox->findData(static_cast< uint >(Defaults::MainWindow::tabVisibility()))); m_newTabNextToCurrentTabCheckBox->setChecked(Defaults::MainWindow::newTabNextToCurrentTab()); m_recentlyUsedCountSpinBox->setValue(Defaults::MainWindow::recentlyUsedCount()); m_fileToolBarLineEdit->setText(Defaults::MainWindow::fileToolBar().join(",")); m_editToolBarLineEdit->setText(Defaults::MainWindow::editToolBar().join(",")); m_viewToolBarLineEdit->setText(Defaults::MainWindow::viewToolBar().join(",")); m_currentPageInWindowTitleCheckBox->setChecked(Defaults::MainWindow::currentPageInWindowTitle()); m_instanceNameInWindowTitleCheckBox->setChecked(Defaults::MainWindow::instancfeNameInWindowTitle()); m_synchronizeOutlineViewCheckBox->setChecked(Defaults::MainWindow::synchronizeOutlineView()); m_highlightCurrentThumbnailCheckBox->setChecked(Defaults::DocumentView::highlightCurrentThumbnail()); m_limitThumbnailsToResultsCheckBox->setChecked(Defaults::DocumentView::limitThumbnailsToResults()); m_annotationOverlayCheckBox->setChecked(Defaults::PageItem::annotationOverlay()); m_formFieldOverlayCheckBox->setChecked(Defaults::PageItem::formFieldOverlay()); } void SettingsDialog::createModifiersTab() { // zoom modifiers createModifiersComboBox(m_zoomModifiersComboBox, s_settings->documentView().zoomModifiers()); m_modifiersLayout->addRow(tr("Zoom:"), m_zoomModifiersComboBox); // rototate modifiers createModifiersComboBox(m_rotateModifiersComboBox, s_settings->documentView().rotateModifiers()); m_modifiersLayout->addRow(tr("Rotate:"), m_rotateModifiersComboBox); // scroll modifiers createModifiersComboBox(m_scrollModifiersComboBox, s_settings->documentView().scrollModifiers()); m_modifiersLayout->addRow(tr("Scroll:"), m_scrollModifiersComboBox); // copy to clipboard modifiers createModifiersComboBox(m_copyToClipboardModifiersComboBox, s_settings->pageItem().copyToClipboardModifiers()); m_modifiersLayout->addRow(tr("Copy to clipboard:"), m_copyToClipboardModifiersComboBox); // add annotation modifiers createModifiersComboBox(m_addAnnotationModifiersComboBox, s_settings->pageItem().addAnnotationModifiers()); m_modifiersLayout->addRow(tr("Add annotation:"), m_addAnnotationModifiersComboBox); } void SettingsDialog::resetModifiersTab() { m_zoomModifiersComboBox->setCurrentIndex(m_zoomModifiersComboBox->findData(static_cast< int >(Defaults::DocumentView::zoomModifiers()))); m_rotateModifiersComboBox->setCurrentIndex(m_rotateModifiersComboBox->findData(static_cast< int >(Defaults::DocumentView::rotateModifiers()))); m_scrollModifiersComboBox->setCurrentIndex(m_scrollModifiersComboBox->findData(static_cast< int >(Defaults::DocumentView::scrollModifiers()))); m_copyToClipboardModifiersComboBox->setCurrentIndex(m_copyToClipboardModifiersComboBox->findData(static_cast< int >(Defaults::PageItem::copyToClipboardModifiers()))); m_addAnnotationModifiersComboBox->setCurrentIndex(m_addAnnotationModifiersComboBox->findData(static_cast< int >(Defaults::PageItem::addAnnotationModifiers()))); } void SettingsDialog::createColorComboBox(QComboBox*& comboBox, const QColor& color) { comboBox = new QComboBox(this); comboBox->setEditable(true); comboBox->setInsertPolicy(QComboBox::NoInsert); comboBox->addItems(QColor::colorNames()); setCurrentTextToColorName(comboBox, color); } void SettingsDialog::createModifiersComboBox(QComboBox*& comboBox, const Qt::KeyboardModifiers& modifiers) { comboBox = new QComboBox(this); comboBox->addItem(QShortcut::tr("Shift"), static_cast< int >(Qt::ShiftModifier)); comboBox->addItem(QShortcut::tr("Ctrl"), static_cast< int >(Qt::ControlModifier)); comboBox->addItem(QShortcut::tr("Alt"), static_cast< int >(Qt::AltModifier)); comboBox->addItem(QShortcut::tr("Shift and Ctrl"), static_cast< int >(Qt::ShiftModifier | Qt::ControlModifier)); comboBox->addItem(QShortcut::tr("Shift and Alt"), static_cast< int >(Qt::ShiftModifier | Qt::AltModifier)); comboBox->addItem(QShortcut::tr("Ctrl and Alt"), static_cast< int >(Qt::ControlModifier | Qt::AltModifier)); comboBox->setCurrentIndex(comboBox->findData(static_cast< int >(modifiers))); } qpdfview-0.4.7/sources/settingsdialog.h0000644000000000000000000001043612246606025016360 0ustar 00000000000000/* Copyright 2012-2013 Adam Reichold Copyright 2012 Alexander Volkov This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef SETTINGSDIALOG_H #define SETTINGSDIALOG_H #include class QCheckBox; class QComboBox; class QDialogButtonBox; class QDoubleSpinBox; class QFormLayout; class QLineEdit; class QSpinBox; class QTableView; class QTabWidget; class Settings; class SettingsWidget; class SettingsDialog : public QDialog { Q_OBJECT public: SettingsDialog(QWidget* parent = 0); public slots: void accept(); void reset(); void resetCurrentTab(); private: Q_DISABLE_COPY(SettingsDialog) static Settings* s_settings; QTabWidget* m_graphicsTabWidget; QFormLayout* m_graphicsLayout; #ifdef WITH_PDF SettingsWidget* m_pdfSettingsWidget; #endif // WITH_PDF #ifdef WITH_PS SettingsWidget* m_psSettingsWidget; #endif // WITH_PS QTableView* m_shortcutsTableView; QTabWidget* m_tabWidget; QDialogButtonBox* m_dialogButtonBox; QPushButton* m_defaultsButton; QPushButton* m_defaultsOnCurrentTabButton; QFormLayout* m_behaviorLayout; QFormLayout* m_interfaceLayout; QFormLayout* m_modifiersLayout; // behavior QCheckBox* m_openUrlCheckBox; QCheckBox* m_autoRefreshCheckBox; QCheckBox* m_trackRecentlyUsedCheckBox; QCheckBox* m_restoreTabsCheckBox; QCheckBox* m_restoreBookmarksCheckBox; QCheckBox* m_restorePerFileSettingsCheckBox; QCheckBox* m_presentationSyncCheckBox; QSpinBox* m_presentationScreenSpinBox; QSpinBox* m_highlightDurationSpinBox; QComboBox* m_highlightColorComboBox; QComboBox* m_annotationColorComboBox; QLineEdit* m_sourceEditorLineEdit; void createBehaviorTab(); void resetBehaviorTab(); // graphics QCheckBox* m_keepObsoletePixmapsCheckBox; #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) QCheckBox* m_useDevicePixelRatioCheckBox; #endif // QT_VERSION QCheckBox* m_decoratePagesCheckBox; QCheckBox* m_decorateLinksCheckBox; QCheckBox* m_decorateFormFieldsCheckBox; QComboBox* m_backgroundColorComboBox; QComboBox* m_paperColorComboBox; QComboBox* m_presentationBackgroundColorComboBox; QSpinBox* m_pagesPerRowSpinBox; QDoubleSpinBox* m_pageSpacingSpinBox; QDoubleSpinBox* m_thumbnailSpacingSpinBox; QDoubleSpinBox* m_thumbnailSizeSpinBox; QComboBox* m_cacheSizeComboBox; QCheckBox* m_prefetchCheckBox; QSpinBox* m_prefetchDistanceSpinBox; void createGraphicsTab(); void resetGraphicsTab(); // interface QComboBox* m_tabPositionComboBox; QComboBox* m_tabVisibilityComboBox; QCheckBox* m_newTabNextToCurrentTabCheckBox; QSpinBox* m_recentlyUsedCountSpinBox; QLineEdit* m_fileToolBarLineEdit; QLineEdit* m_editToolBarLineEdit; QLineEdit* m_viewToolBarLineEdit; QCheckBox* m_currentPageInWindowTitleCheckBox; QCheckBox* m_instanceNameInWindowTitleCheckBox; QCheckBox* m_synchronizeOutlineViewCheckBox; QCheckBox* m_highlightCurrentThumbnailCheckBox; QCheckBox* m_limitThumbnailsToResultsCheckBox; QCheckBox* m_annotationOverlayCheckBox; QCheckBox* m_formFieldOverlayCheckBox; void createInterfaceTab(); void resetInterfaceTab(); // modifiers QComboBox* m_zoomModifiersComboBox; QComboBox* m_rotateModifiersComboBox; QComboBox* m_scrollModifiersComboBox; QComboBox* m_copyToClipboardModifiersComboBox; QComboBox* m_addAnnotationModifiersComboBox; void createModifiersTab(); void resetModifiersTab(); // helper methods void createColorComboBox(QComboBox*& comboBox, const QColor& color); void createModifiersComboBox(QComboBox*& comboBox, const Qt::KeyboardModifiers& modifiers); }; #endif // SETTINGSDIALOG_H qpdfview-0.4.7/sources/shortcuthandler.cpp0000644000000000000000000001770512246606025017112 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "shortcuthandler.h" #include #include #include "documentview.h" static QList< QKeySequence > toShortcuts(const QStringList& stringList) { QList< QKeySequence > shortcuts; foreach(const QString& string, stringList) { QKeySequence shortcut(string.trimmed()); if(!shortcut.isEmpty()) { shortcuts.append(shortcut); } } return shortcuts; } static QStringList toStringList(const QList< QKeySequence >& shortcuts, QKeySequence::SequenceFormat format = QKeySequence::PortableText) { QStringList stringList; foreach(const QKeySequence& shortcut, shortcuts) { stringList.append(shortcut.toString(format)); } return stringList; } static bool matches(const QKeySequence& keySequence, const QList< QKeySequence >& shortcuts) { foreach(const QKeySequence& shortcut, shortcuts) { if(keySequence.matches(shortcut) == QKeySequence::ExactMatch) { return true; } } return false; } ShortcutHandler* ShortcutHandler::s_instance = 0; ShortcutHandler* ShortcutHandler::instance() { if(s_instance == 0) { s_instance = new ShortcutHandler(qApp); } return s_instance; } ShortcutHandler::~ShortcutHandler() { s_instance = 0; } void ShortcutHandler::registerAction(QAction* action) { Q_ASSERT(!action->objectName().isEmpty()); const QList< QKeySequence > defaultShortcuts = action->shortcuts(); const QList< QKeySequence > shortcuts = toShortcuts(m_settings->value(action->objectName(), toStringList(defaultShortcuts)).toStringList()); action->setShortcuts(shortcuts); m_actions.append(action); m_shortcuts.insert(action, shortcuts); m_defaultShortcuts.insert(action, defaultShortcuts); } int ShortcutHandler::columnCount(const QModelIndex& parent) const { Q_UNUSED(parent); return 2; } int ShortcutHandler::rowCount(const QModelIndex& parent) const { Q_UNUSED(parent); return m_actions.count(); } Qt::ItemFlags ShortcutHandler::flags(const QModelIndex& index) const { switch(index.column()) { case 0: return Qt::ItemIsEnabled; break; case 1: return Qt::ItemIsEnabled | Qt::ItemIsEditable; break; } return Qt::NoItemFlags; } QVariant ShortcutHandler::headerData(int section, Qt::Orientation orientation, int role) const { Q_UNUSED(orientation); if(role == Qt::DisplayRole) { switch(section) { case 0: return tr("Action"); break; case 1: return tr("Key sequence"); break; } } return QVariant(); } QVariant ShortcutHandler::data(const QModelIndex& index, int role) const { if((role == Qt::DisplayRole || role == Qt::EditRole) && index.row() >= 0 && index.row() < m_actions.count()) { QAction* action = m_actions.at(index.row()); switch(index.column()) { case 0: return action->text().remove(QLatin1Char('&')); break; case 1: return toStringList(m_shortcuts.value(action), QKeySequence::NativeText).join(";"); break; } } return QVariant(); } bool ShortcutHandler::setData(const QModelIndex& index, const QVariant& value, int role) { if(role == Qt::EditRole && index.column() == 1 && index.row() >= 0 && index.row() < m_actions.count()) { QList< QKeySequence > shortcuts = toShortcuts(value.toString().split(";", QString::SkipEmptyParts)); if(!shortcuts.isEmpty() || value.toString().isEmpty()) { m_shortcuts.insert(m_actions.at(index.row()), shortcuts); emit dataChanged(index, index); return true; } } return false; } bool ShortcutHandler::matchesSkipBackward(const QKeySequence& keySequence) const { return matches(keySequence, m_skipBackwardAction->shortcuts()); } bool ShortcutHandler::matchesSkipForward(const QKeySequence& keySequence) const { return matches(keySequence, m_skipForwardAction->shortcuts()); } bool ShortcutHandler::matchesMoveUp(const QKeySequence& keySequence) const { return matches(keySequence, m_moveUpAction->shortcuts()); } bool ShortcutHandler::matchesMoveDown(const QKeySequence& keySequence) const { return matches(keySequence, m_moveDownAction->shortcuts()); } bool ShortcutHandler::matchesMoveLeft(const QKeySequence& keySequence) const { return matches(keySequence, m_moveLeftAction->shortcuts()); } bool ShortcutHandler::matchesMoveRight(const QKeySequence& keySequence) const { return matches(keySequence, m_moveRightAction->shortcuts()); } bool ShortcutHandler::submit() { for(QMap< QAction*, QList< QKeySequence > >::iterator iterator = m_shortcuts.begin(); iterator != m_shortcuts.end(); ++iterator) { iterator.key()->setShortcuts(iterator.value()); } foreach(const QAction* action, m_actions) { m_settings->setValue(action->objectName(), toStringList(action->shortcuts())); } return true; } void ShortcutHandler::revert() { for(QMap< QAction*, QList< QKeySequence > >::iterator iterator = m_shortcuts.begin(); iterator != m_shortcuts.end(); ++iterator) { iterator.value() = iterator.key()->shortcuts(); } } void ShortcutHandler::reset() { for(QMap< QAction*, QList< QKeySequence > >::iterator iterator = m_defaultShortcuts.begin(); iterator != m_defaultShortcuts.end(); ++iterator) { m_shortcuts.insert(iterator.key(), iterator.value()); } emit dataChanged(createIndex(0, 1), createIndex(m_actions.count(), 1)); } ShortcutHandler::ShortcutHandler(QObject* parent) : QAbstractTableModel(parent), m_settings(new QSettings("qpdfview", "shortcuts", this)), m_actions(), m_shortcuts(), m_defaultShortcuts() { // skip backward shortcut m_skipBackwardAction = new QAction(tr("Skip backward"), this); m_skipBackwardAction->setObjectName(QLatin1String("skipBackward")); m_skipBackwardAction->setShortcut(QKeySequence(Qt::Key_PageUp)); registerAction(m_skipBackwardAction); // skip forward shortcut m_skipForwardAction = new QAction(tr("Skip forward"), this); m_skipForwardAction->setObjectName(QLatin1String("skipForward")); m_skipForwardAction->setShortcut(QKeySequence(Qt::Key_PageDown)); registerAction(m_skipForwardAction); // move up shortcut m_moveUpAction = new QAction(tr("Move up"), this); m_moveUpAction->setObjectName(QLatin1String("moveUp")); m_moveUpAction->setShortcut(QKeySequence(Qt::Key_Up)); registerAction(m_moveUpAction); // move down shortcut m_moveDownAction = new QAction(tr("Move down"), this); m_moveDownAction->setObjectName(QLatin1String("moveDown")); m_moveDownAction->setShortcut(QKeySequence(Qt::Key_Down)); registerAction(m_moveDownAction); // move left shortcut m_moveLeftAction = new QAction(tr("Move left"), this); m_moveLeftAction->setObjectName(QLatin1String("moveLeft")); m_moveLeftAction->setShortcut(QKeySequence(Qt::Key_Left)); registerAction(m_moveLeftAction); // move right shortcut m_moveRightAction = new QAction(tr("Move right"), this); m_moveRightAction->setObjectName(QLatin1String("moveRight")); m_moveRightAction->setShortcut(QKeySequence(Qt::Key_Right)); registerAction(m_moveRightAction); } qpdfview-0.4.7/sources/shortcuthandler.h0000644000000000000000000000453412246606025016553 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef SHORTCUTHANDLER_H #define SHORTCUTHANDLER_H #include #include #include class QSettings; class ShortcutHandler : public QAbstractTableModel { Q_OBJECT public: static ShortcutHandler* instance(); ~ShortcutHandler(); void registerAction(QAction* action); int columnCount(const QModelIndex& parent) const; int rowCount(const QModelIndex& parent) const; Qt::ItemFlags flags(const QModelIndex& index) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant data(const QModelIndex& index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role); bool matchesSkipBackward(const QKeySequence& keySequence) const; bool matchesSkipForward(const QKeySequence& keySequence) const; bool matchesMoveUp(const QKeySequence& keySequence) const; bool matchesMoveDown(const QKeySequence& keySequence) const; bool matchesMoveLeft(const QKeySequence& keySequence) const; bool matchesMoveRight(const QKeySequence& keySequence) const; public slots: bool submit(); void revert(); void reset(); private: Q_DISABLE_COPY(ShortcutHandler) static ShortcutHandler* s_instance; ShortcutHandler(QObject* parent = 0); QSettings* m_settings; QList< QAction* > m_actions; QMap< QAction*, QList< QKeySequence > > m_shortcuts; QMap< QAction*, QList< QKeySequence > > m_defaultShortcuts; QAction* m_skipBackwardAction; QAction* m_skipForwardAction; QAction* m_moveUpAction; QAction* m_moveDownAction; QAction* m_moveLeftAction; QAction* m_moveRightAction; }; #endif // SHORTCUTHANDLER_H qpdfview-0.4.7/sources/signalhandler.cpp0000644000000000000000000000421712246606025016506 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #include "signalhandler.h" #include #include #include #include int SignalHandler::s_sockets[2]; bool SignalHandler::prepareSignals() { if(socketpair(AF_UNIX, SOCK_STREAM, 0, s_sockets) != 0) { return false; } struct sigaction sigAction; sigAction.sa_handler = SignalHandler::handleSignals; sigemptyset(&sigAction.sa_mask); sigAction.sa_flags = SA_RESTART; if(sigaction(SIGINT, &sigAction, 0) != 0) { close(s_sockets[0]); close(s_sockets[1]); return false; } if(sigaction(SIGTERM, &sigAction, 0) != 0) { close(s_sockets[0]); close(s_sockets[1]); return false; } return true; } SignalHandler::SignalHandler(QObject* parent) : QObject(parent), m_socketNotifier(0) { m_socketNotifier = new QSocketNotifier(s_sockets[1], QSocketNotifier::Read, this); connect(m_socketNotifier, SIGNAL(activated(int)), SLOT(on_socketNotifier_activated())); } void SignalHandler::on_socketNotifier_activated() { m_socketNotifier->setEnabled(false); int sigNumber; Q_UNUSED(read(s_sockets[1], &sigNumber, sizeof(int))); switch(sigNumber) { case SIGINT: emit sigIntReceived(); break; case SIGTERM: emit sigTermReceived(); break; } m_socketNotifier->setEnabled(true); } void SignalHandler::handleSignals(int sigNumber) { Q_UNUSED(write(s_sockets[0], &sigNumber, sizeof(int))); } qpdfview-0.4.7/sources/signalhandler.h0000644000000000000000000000230612246606025016150 0ustar 00000000000000/* Copyright 2013 Adam Reichold This file is part of qpdfview. qpdfview 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. qpdfview 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 qpdfview. If not, see . */ #ifndef SIGNALHANDLER_H #define SIGNALHANDLER_H #include class QSocketNotifier; class SignalHandler : public QObject { Q_OBJECT public: static bool prepareSignals(); explicit SignalHandler(QObject* parent = 0); signals: void sigIntReceived(); void sigTermReceived(); private slots: void on_socketNotifier_activated(); private: Q_DISABLE_COPY(SignalHandler) static int s_sockets[2]; static void handleSignals(int sigNumber); QSocketNotifier* m_socketNotifier; }; #endif // SIGNALHANDLER_H qpdfview-0.4.7/synctex/synctex_parser.c0000644000000000000000000050431712246606025016424 0ustar 00000000000000/* Copyright (c) 2008, 2009, 2010 , 2011 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 Version: 1.17 See synctex_parser_readme.txt for more details License: -------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder. Acknowledgments: ---------------- The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh, and significant help from XeTeX developer Jonathan Kew Nota Bene: ---------- If you include or use a significant part of the synctex package into a software, I would appreciate to be listed as contributor and see "SyncTeX" highlighted. Version 1 Thu Jun 19 09:39:21 UTC 2008 */ /* We assume that high level application like pdf viewers will want * to embed this code as is. We assume that they also have locale.h and setlocale. * For other tools such as TeXLive tools, you must define SYNCTEX_USE_LOCAL_HEADER, * when building. You also have to create and customize synctex_parser_local.h to fit your system. * In particular, the HAVE_LOCALE_H and HAVE_SETLOCALE macros should be properly defined. * With this design, you should not need to edit this file. */ # if defined(SYNCTEX_USE_LOCAL_HEADER) # include "synctex_parser_local.h" # else # define HAVE_LOCALE_H 1 # define HAVE_SETLOCALE 1 # if defined(_MSC_VER) # define SYNCTEX_INLINE __inline # else # define SYNCTEX_INLINE inline # endif # endif #include #include #include #include #include #if defined(HAVE_LOCALE_H) #include #endif /* The data is organized in a graph with multiple entries. * The root object is a scanner, it is created with the contents on a synctex file. * Each leaf of the tree is a synctex_node_t object. * There are 3 subtrees, two of them sharing the same leaves. * The first tree is the list of input records, where input file names are associated with tags. * The second tree is the box tree as given by TeX when shipping pages out. * First level objects are sheets, containing boxes, glues, kerns... * The third tree allows to browse leaves according to tag and line. */ #include "synctex_parser.h" #include "synctex_parser_utils.h" /* These are the possible extensions of the synctex file */ const char * synctex_suffix = ".synctex"; const char * synctex_suffix_gz = ".gz"; /* each synctex node has a class */ typedef struct __synctex_class_t _synctex_class_t; typedef _synctex_class_t * synctex_class_t; /* synctex_node_t is a pointer to a node * _synctex_node is the target of the synctex_node_t pointer * It is a pseudo object oriented program. * class is a pointer to the class object the node belongs to. * implementation is meant to contain the private data of the node * basically, there are 2 kinds of information: navigation information and * synctex information. Both will depend on the type of the node, * thus different nodes will have different private data. * There is no inheritancy overhead. */ typedef union _synctex_info_t { int INT; char * PTR; } synctex_info_t; # if defined(SYNCTEX_USE_CHARINDEX) # define SYNCTEX_DECLARE_CHARINDEX synctex_charindex_t char_index; # define SYNCTEX_CHARINDEX(NODE) (NODE->char_index) # define SYNCTEX_PRINT_CHARINDEX printf("#%i\n",SYNCTEX_CHARINDEX(node)) # define SYNCTEX_DECLARE_CHAR_OFFSET synctex_charindex_t charindex_offset # define SYNCTEX_IMPLEMENT_CHARINDEX(NODE,CORRECTION) NODE->char_index = (synctex_charindex_t)(scanner->charindex_offset+SYNCTEX_CUR-SYNCTEX_START+(CORRECTION)); # else # define SYNCTEX_DECLARE_CHARINDEX # define SYNCTEX_CHARINDEX(NODE) 0 # define SYNCTEX_PRINT_CHARINDEX printf("\n") # define SYNCTEX_DECLARE_CHAR_OFFSET synctex_charindex_t charindex_offset # define SYNCTEX_IMPLEMENT_CHARINDEX(NODE,CORRECTION) # endif struct _synctex_node { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t * implementation; }; /* Each node of the tree, except the scanner itself belongs to a class. * The class object is just a struct declaring the owning scanner * This is a pointer to the scanner as root of the tree. * The type is used to identify the kind of node. * The class declares pointers to a creator and a destructor method. * The log and display fields are used to log and display the node. * display will also display the child, sibling and parent sibling. * parent, child and sibling are used to navigate the tree, * from TeX box hierarchy point of view. * The friend field points to a method which allows to navigate from friend to friend. * A friend is a node with very close tag and line numbers. * Finally, the info field point to a method giving the private node info offset. */ typedef synctex_node_t *(*_synctex_node_getter_t)(synctex_node_t); typedef synctex_info_t *(*_synctex_info_getter_t)(synctex_node_t); struct __synctex_class_t { synctex_scanner_t scanner; int type; synctex_node_t (*new)(synctex_scanner_t scanner); void (*free)(synctex_node_t); void (*log)(synctex_node_t); void (*display)(synctex_node_t); _synctex_node_getter_t parent; _synctex_node_getter_t child; _synctex_node_getter_t sibling; _synctex_node_getter_t friend; _synctex_node_getter_t next_hbox; _synctex_info_getter_t info; }; # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Abstract OBJECTS and METHODS # endif /* These macros are shortcuts * This macro checks if a message can be sent. */ # define SYNCTEX_CAN_PERFORM(NODE,SELECTOR)\ (NULL!=((((NODE)->class))->SELECTOR)) /* This macro is some kind of objc_msg_send. * It takes care of sending the proper message if possible. */ # define SYNCTEX_MSG_SEND(NODE,SELECTOR) if (NODE && SYNCTEX_CAN_PERFORM(NODE,SELECTOR)) {\ (*((((NODE)->class))->SELECTOR))(NODE);\ } /* read only safe getter */ # define SYNCTEX_GET(NODE,SELECTOR)((NODE && SYNCTEX_CAN_PERFORM(NODE,SELECTOR))?SYNCTEX_GETTER(NODE,SELECTOR)[0]:(NULL)) /* read/write getter */ # define SYNCTEX_GETTER(NODE,SELECTOR)\ ((synctex_node_t *)((*((((NODE)->class))->SELECTOR))(NODE))) # define SYNCTEX_FREE(NODE) SYNCTEX_MSG_SEND(NODE,free); /* Parent getter and setter */ # define SYNCTEX_PARENT(NODE) SYNCTEX_GET(NODE,parent) # define SYNCTEX_SET_PARENT(NODE,NEW_PARENT) if (NODE && NEW_PARENT && SYNCTEX_CAN_PERFORM(NODE,parent)){\ SYNCTEX_GETTER(NODE,parent)[0]=NEW_PARENT;\ } /* Child getter and setter */ # define SYNCTEX_CHILD(NODE) SYNCTEX_GET(NODE,child) # define SYNCTEX_SET_CHILD(NODE,NEW_CHILD) if (NODE && NEW_CHILD){\ SYNCTEX_GETTER(NODE,child)[0]=NEW_CHILD;\ SYNCTEX_GETTER(NEW_CHILD,parent)[0]=NODE;\ } /* Sibling getter and setter */ # define SYNCTEX_SIBLING(NODE) SYNCTEX_GET(NODE,sibling) # define SYNCTEX_SET_SIBLING(NODE,NEW_SIBLING) if (NODE && NEW_SIBLING) {\ SYNCTEX_GETTER(NODE,sibling)[0]=NEW_SIBLING;\ if (SYNCTEX_CAN_PERFORM(NEW_SIBLING,parent) && SYNCTEX_CAN_PERFORM(NODE,parent)) {\ SYNCTEX_GETTER(NEW_SIBLING,parent)[0]=SYNCTEX_GETTER(NODE,parent)[0];\ }\ } /* Friend getter and setter. A friend is a kern, math, glue or void box node which tag and line numbers are similar. * This is a first filter on the nodes that avoids testing all of them. * Friends are used mainly in forward synchronization aka from source to output. */ # define SYNCTEX_FRIEND(NODE) SYNCTEX_GET(NODE,friend) # define SYNCTEX_SET_FRIEND(NODE,NEW_FRIEND) if (NODE && NEW_FRIEND){\ SYNCTEX_GETTER(NODE,friend)[0]=NEW_FRIEND;\ } /* Next box getter and setter. The box tree can be traversed from one horizontal box to the other. * Navigation starts with the deeper boxes. */ # define SYNCTEX_NEXT_hbox(NODE) SYNCTEX_GET(NODE,next_hbox) # define SYNCTEX_SET_NEXT_hbox(NODE,NEXT_HBOX) if (NODE && NEXT_HBOX){\ SYNCTEX_GETTER(NODE,next_hbox)[0]=NEXT_HBOX;\ } void _synctex_free_node(synctex_node_t node); void _synctex_free_leaf(synctex_node_t node); /* A node is meant to own its child and sibling. * It is not owned by its parent, unless it is its first child. * This destructor is for all nodes with children. */ void _synctex_free_node(synctex_node_t node) { if (node) { (*((node->class)->sibling))(node); SYNCTEX_FREE(SYNCTEX_SIBLING(node)); SYNCTEX_FREE(SYNCTEX_CHILD(node)); free(node); } return; } /* A node is meant to own its child and sibling. * It is not owned by its parent, unless it is its first child. * This destructor is for nodes with no child. * The first sheet is onwned by the scanner. */ void _synctex_free_leaf(synctex_node_t node) { if (node) { SYNCTEX_FREE(SYNCTEX_SIBLING(node)); free(node); } return; } # ifdef __SYNCTEX_WORK__ # include "/usr/include/zlib.h" # else # include # endif /* The synctex scanner is the root object. * Is is initialized with the contents of a text file or a gzipped file. * The buffer_? are first used to parse the text. */ struct __synctex_scanner_t { gzFile file; /* The (possibly compressed) file */ SYNCTEX_DECLARE_CHAR_OFFSET; char * buffer_cur; /* current location in the buffer */ char * buffer_start; /* start of the buffer */ char * buffer_end; /* end of the buffer */ char * output_fmt; /* dvi or pdf, not yet used */ char * output; /* the output name used to create the scanner */ char * synctex; /* the .synctex or .synctex.gz name used to create the scanner */ int version; /* 1, not yet used */ struct { unsigned has_parsed:1; /* Whether the scanner has parsed its underlying synctex file. */ unsigned reserved:sizeof(unsigned)-1; /* alignment */ } flags; int pre_magnification; /* magnification from the synctex preamble */ int pre_unit; /* unit from the synctex preamble */ int pre_x_offset; /* X offste from the synctex preamble */ int pre_y_offset; /* Y offset from the synctex preamble */ int count; /* Number of records, from the synctex postamble */ float unit; /* real unit, from synctex preamble or post scriptum */ float x_offset; /* X offset, from synctex preamble or post scriptum */ float y_offset; /* Y Offset, from synctex preamble or post scriptum */ synctex_node_t sheet; /* The first sheet node, its siblings are the other sheet nodes */ synctex_node_t input; /* The first input node, its siblings are the other input nodes */ int number_of_lists; /* The number of friend lists */ synctex_node_t * lists_of_friends;/* The friend lists */ _synctex_class_t class[synctex_node_number_of_types]; /* The classes of the nodes of the scanner */ }; /* SYNCTEX_CUR, SYNCTEX_START and SYNCTEX_END are convenient shortcuts */ # define SYNCTEX_CUR (scanner->buffer_cur) # define SYNCTEX_START (scanner->buffer_start) # define SYNCTEX_END (scanner->buffer_end) # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark OBJECTS, their creators and destructors. # endif /* Here, we define the indices for the different informations. * They are used to declare the size of the implementation. * For example, if one object uses SYNCTEX_HORIZ_IDX is its size, * then its info will contain a tag, line, column, horiz but no width nor height nor depth */ /* The sheet is a first level node. * It has no parent (the parent is the scanner itself) * Its sibling points to another sheet. * Its child points to its first child, in general a box. * A sheet node contains only one synctex information: the page. * This is the 1 based page index as given by TeX. */ /* The next macros are used to access the node info * SYNCTEX_INFO(node) points to the first synctex integer or pointer data of node * SYNCTEX_INFO(node)[index] is the information at index * for example, the page of a sheet is stored in SYNCTEX_INFO(sheet)[SYNCTEX_PAGE_IDX] */ # define SYNCTEX_INFO(NODE) ((*((((NODE)->class))->info))(NODE)) # define SYNCTEX_PAGE_IDX 0 # define SYNCTEX_PAGE(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_PAGE_IDX].INT /* This macro defines implementation offsets * It is only used for pointer values */ # define SYNCTEX_MAKE_GET(SYNCTEX_GETTER,OFFSET)\ synctex_node_t * SYNCTEX_GETTER (synctex_node_t node);\ synctex_node_t * SYNCTEX_GETTER (synctex_node_t node) {\ return node?(synctex_node_t *)((&((node)->implementation))+OFFSET):NULL;\ } SYNCTEX_MAKE_GET(_synctex_implementation_0,0) SYNCTEX_MAKE_GET(_synctex_implementation_1,1) SYNCTEX_MAKE_GET(_synctex_implementation_2,2) SYNCTEX_MAKE_GET(_synctex_implementation_3,3) SYNCTEX_MAKE_GET(_synctex_implementation_4,4) SYNCTEX_MAKE_GET(_synctex_implementation_5,5) typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[3+SYNCTEX_PAGE_IDX+1];/* child, sibling, next box, * SYNCTEX_PAGE_IDX */ } synctex_node_sheet_t; synctex_node_t _synctex_new_sheet(synctex_scanner_t scanner); void _synctex_display_sheet(synctex_node_t node); void _synctex_log_sheet(synctex_node_t node); static _synctex_class_t synctex_class_sheet = { NULL, /* No scanner yet */ synctex_node_type_sheet, /* Node type */ &_synctex_new_sheet, /* creator */ &_synctex_free_node, /* destructor */ &_synctex_log_sheet, /* log */ &_synctex_display_sheet, /* display */ NULL, /* No parent */ &_synctex_implementation_0, /* child */ &_synctex_implementation_1, /* sibling */ NULL, /* No friend */ &_synctex_implementation_2, /* Next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 /* info */ }; /* sheet node creator */ #define DEFINE_synctex_new_NODE(NAME)\ synctex_node_t _synctex_new_##NAME(synctex_scanner_t scanner) {\ if (scanner) {\ synctex_node_t node = _synctex_malloc(sizeof(synctex_node_##NAME##_t));\ if (node) {\ SYNCTEX_IMPLEMENT_CHARINDEX(node,0);\ ++SYNCTEX_CUR;\ node->class = scanner->class+synctex_node_type_##NAME;\ }\ return node;\ }\ return NULL;\ } DEFINE_synctex_new_NODE(sheet) /* A box node contains navigation and synctex information * There are different kind of boxes. * Only horizontal boxes are treated differently because of their visible size. */ # define SYNCTEX_TAG_IDX 0 # define SYNCTEX_LINE_IDX (SYNCTEX_TAG_IDX+1) # define SYNCTEX_COLUMN_IDX (SYNCTEX_LINE_IDX+1) # define SYNCTEX_HORIZ_IDX (SYNCTEX_COLUMN_IDX+1) # define SYNCTEX_VERT_IDX (SYNCTEX_HORIZ_IDX+1) # define SYNCTEX_WIDTH_IDX (SYNCTEX_VERT_IDX+1) # define SYNCTEX_HEIGHT_IDX (SYNCTEX_WIDTH_IDX+1) # define SYNCTEX_DEPTH_IDX (SYNCTEX_HEIGHT_IDX+1) /* the corresponding info accessors */ # define SYNCTEX_TAG(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_TAG_IDX].INT # define SYNCTEX_LINE(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_LINE_IDX].INT # define SYNCTEX_COLUMN(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_COLUMN_IDX].INT # define SYNCTEX_HORIZ(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_HORIZ_IDX].INT # define SYNCTEX_VERT(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_VERT_IDX].INT # define SYNCTEX_WIDTH(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_WIDTH_IDX].INT # define SYNCTEX_HEIGHT(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_HEIGHT_IDX].INT # define SYNCTEX_DEPTH(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_DEPTH_IDX].INT # define SYNCTEX_ABS_WIDTH(NODE) ((SYNCTEX_WIDTH(NODE)>0?SYNCTEX_WIDTH(NODE):-SYNCTEX_WIDTH(NODE))) # define SYNCTEX_ABS_HEIGHT(NODE) ((SYNCTEX_HEIGHT(NODE)>0?SYNCTEX_HEIGHT(NODE):-SYNCTEX_HEIGHT(NODE))) # define SYNCTEX_ABS_DEPTH(NODE) ((SYNCTEX_DEPTH(NODE)>0?SYNCTEX_DEPTH(NODE):-SYNCTEX_DEPTH(NODE))) typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[5+SYNCTEX_DEPTH_IDX+1]; /* parent,child,sibling,friend,next box, * SYNCTEX_TAG,SYNCTEX_LINE,SYNCTEX_COLUMN, * SYNCTEX_HORIZ,SYNCTEX_VERT,SYNCTEX_WIDTH,SYNCTEX_HEIGHT,SYNCTEX_DEPTH */ } synctex_node_vbox_t; synctex_node_t _synctex_new_vbox(synctex_scanner_t scanner); void _synctex_log_vbox(synctex_node_t node); void _synctex_display_vbox(synctex_node_t node); /* These are static class objects, each scanner will make a copy of them and setup the scanner field. */ static _synctex_class_t synctex_class_vbox = { NULL, /* No scanner yet */ synctex_node_type_vbox, /* Node type */ &_synctex_new_vbox, /* creator */ &_synctex_free_node, /* destructor */ &_synctex_log_vbox, /* log */ &_synctex_display_vbox, /* display */ &_synctex_implementation_0, /* parent */ &_synctex_implementation_1, /* child */ &_synctex_implementation_2, /* sibling */ &_synctex_implementation_3, /* friend */ &_synctex_implementation_4, /* next hbox */ (_synctex_info_getter_t)&_synctex_implementation_5 }; /* vertical box node creator */ DEFINE_synctex_new_NODE(vbox) /* Horizontal boxes must contain visible size, because 0 width does not mean emptiness. * They also contain an average of the line numbers of the containing nodes. */ # define SYNCTEX_MEAN_LINE_IDX (SYNCTEX_DEPTH_IDX+1) # define SYNCTEX_NODE_WEIGHT_IDX (SYNCTEX_MEAN_LINE_IDX+1) # define SYNCTEX_HORIZ_V_IDX (SYNCTEX_NODE_WEIGHT_IDX+1) # define SYNCTEX_VERT_V_IDX (SYNCTEX_HORIZ_V_IDX+1) # define SYNCTEX_WIDTH_V_IDX (SYNCTEX_VERT_V_IDX+1) # define SYNCTEX_HEIGHT_V_IDX (SYNCTEX_WIDTH_V_IDX+1) # define SYNCTEX_DEPTH_V_IDX (SYNCTEX_HEIGHT_V_IDX+1) /* the corresponding info accessors */ # define SYNCTEX_MEAN_LINE(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_MEAN_LINE_IDX].INT # define SYNCTEX_NODE_WEIGHT(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_NODE_WEIGHT_IDX].INT # define SYNCTEX_HORIZ_V(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_HORIZ_V_IDX].INT # define SYNCTEX_VERT_V(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_VERT_V_IDX].INT # define SYNCTEX_WIDTH_V(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_WIDTH_V_IDX].INT # define SYNCTEX_HEIGHT_V(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_HEIGHT_V_IDX].INT # define SYNCTEX_DEPTH_V(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_DEPTH_V_IDX].INT # define SYNCTEX_ABS_WIDTH_V(NODE) ((SYNCTEX_WIDTH_V(NODE)>0?SYNCTEX_WIDTH_V(NODE):-SYNCTEX_WIDTH_V(NODE))) # define SYNCTEX_ABS_HEIGHT_V(NODE) ((SYNCTEX_HEIGHT_V(NODE)>0?SYNCTEX_HEIGHT_V(NODE):-SYNCTEX_HEIGHT_V(NODE))) # define SYNCTEX_ABS_DEPTH_V(NODE) ((SYNCTEX_DEPTH_V(NODE)>0?SYNCTEX_DEPTH_V(NODE):-SYNCTEX_DEPTH_V(NODE))) typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[5+SYNCTEX_DEPTH_V_IDX+1]; /*parent,child,sibling,friend,next box, * SYNCTEX_TAG,SYNCTEX_LINE,SYNCTEX_COLUMN, * SYNCTEX_HORIZ,SYNCTEX_VERT,SYNCTEX_WIDTH,SYNCTEX_HEIGHT,SYNCTEX_DEPTH, * SYNCTEX_MEAN_LINE,SYNCTEX_NODE_WEIGHT, * SYNCTEX_HORIZ_V,SYNCTEX_VERT_V,SYNCTEX_WIDTH_V,SYNCTEX_HEIGHT_V,SYNCTEX_DEPTH_V*/ } synctex_node_hbox_t; synctex_node_t _synctex_new_hbox(synctex_scanner_t scanner); void _synctex_display_hbox(synctex_node_t node); void _synctex_log_hbox(synctex_node_t node); static _synctex_class_t synctex_class_hbox = { NULL, /* No scanner yet */ synctex_node_type_hbox, /* Node type */ &_synctex_new_hbox, /* creator */ &_synctex_free_node, /* destructor */ &_synctex_log_hbox, /* log */ &_synctex_display_hbox, /* display */ &_synctex_implementation_0, /* parent */ &_synctex_implementation_1, /* child */ &_synctex_implementation_2, /* sibling */ &_synctex_implementation_3, /* friend */ &_synctex_implementation_4, /* next hbox */ (_synctex_info_getter_t)&_synctex_implementation_5 }; /* horizontal box node creator */ DEFINE_synctex_new_NODE(hbox) /* This void box node implementation is either horizontal or vertical * It does not contain a child field. */ typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[3+SYNCTEX_DEPTH_IDX+1]; /* parent,sibling,friend, * SYNCTEX_TAG,SYNCTEX_LINE,SYNCTEX_COLUMN, * SYNCTEX_HORIZ,SYNCTEX_VERT,SYNCTEX_WIDTH,SYNCTEX_HEIGHT,SYNCTEX_DEPTH*/ } synctex_node_void_vbox_t; synctex_node_t _synctex_new_void_vbox(synctex_scanner_t scanner); void _synctex_log_void_box(synctex_node_t node); void _synctex_display_void_vbox(synctex_node_t node); static _synctex_class_t synctex_class_void_vbox = { NULL, /* No scanner yet */ synctex_node_type_void_vbox,/* Node type */ &_synctex_new_void_vbox, /* creator */ &_synctex_free_node, /* destructor */ &_synctex_log_void_box, /* log */ &_synctex_display_void_vbox,/* display */ &_synctex_implementation_0, /* parent */ NULL, /* No child */ &_synctex_implementation_1, /* sibling */ &_synctex_implementation_2, /* friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; /* vertical void box node creator */ DEFINE_synctex_new_NODE(void_vbox) typedef synctex_node_void_vbox_t synctex_node_void_hbox_t; synctex_node_t _synctex_new_void_hbox(synctex_scanner_t scanner); void _synctex_display_void_hbox(synctex_node_t node); static _synctex_class_t synctex_class_void_hbox = { NULL, /* No scanner yet */ synctex_node_type_void_hbox,/* Node type */ &_synctex_new_void_hbox, /* creator */ &_synctex_free_node, /* destructor */ &_synctex_log_void_box, /* log */ &_synctex_display_void_hbox,/* display */ &_synctex_implementation_0, /* parent */ NULL, /* No child */ &_synctex_implementation_1, /* sibling */ &_synctex_implementation_2, /* friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; /* horizontal void box node creator */ DEFINE_synctex_new_NODE(void_hbox) /* The medium nodes correspond to kern, glue, penalty and math nodes. * In LuaTeX, the size of the nodes may have changed. */ typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[3+SYNCTEX_WIDTH_IDX+1]; /* parent,sibling,friend, * SYNCTEX_TAG,SYNCTEX_LINE,SYNCTEX_COLUMN, * SYNCTEX_HORIZ,SYNCTEX_VERT,SYNCTEX_WIDTH */ } synctex_node_medium_t; #define SYNCTEX_IS_BOX(NODE)\ ((NODE->class->type == synctex_node_type_vbox)\ || (NODE->class->type == synctex_node_type_void_vbox)\ || (NODE->class->type == synctex_node_type_hbox)\ || (NODE->class->type == synctex_node_type_void_hbox)) #define SYNCTEX_HAS_CHILDREN(NODE) (NODE && SYNCTEX_CHILD(NODE)) void _synctex_log_medium_node(synctex_node_t node); typedef synctex_node_medium_t synctex_node_math_t; /* math node creator */ synctex_node_t _synctex_new_math(synctex_scanner_t scanner); void _synctex_display_math(synctex_node_t node); static _synctex_class_t synctex_class_math = { NULL, /* No scanner yet */ synctex_node_type_math, /* Node type */ &_synctex_new_math, /* creator */ &_synctex_free_leaf, /* destructor */ &_synctex_log_medium_node, /* log */ &_synctex_display_math, /* display */ &_synctex_implementation_0, /* parent */ NULL, /* No child */ &_synctex_implementation_1, /* sibling */ &_synctex_implementation_2, /* friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; DEFINE_synctex_new_NODE(math) typedef synctex_node_medium_t synctex_node_kern_t; /* kern node creator */ synctex_node_t _synctex_new_kern(synctex_scanner_t scanner); void _synctex_display_kern(synctex_node_t node); static _synctex_class_t synctex_class_kern = { NULL, /* No scanner yet */ synctex_node_type_kern, /* Node type */ &_synctex_new_kern, /* creator */ &_synctex_free_leaf, /* destructor */ &_synctex_log_medium_node, /* log */ &_synctex_display_kern, /* display */ &_synctex_implementation_0, /* parent */ NULL, /* No child */ &_synctex_implementation_1, /* sibling */ &_synctex_implementation_2, /* friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; DEFINE_synctex_new_NODE(kern) /* The small nodes correspond to glue and boundary nodes. */ typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[3+SYNCTEX_VERT_IDX+1]; /* parent,sibling,friend, * SYNCTEX_TAG,SYNCTEX_LINE,SYNCTEX_COLUMN, * SYNCTEX_HORIZ,SYNCTEX_VERT */ } synctex_node_small_t; void _synctex_log_small_node(synctex_node_t node); /* glue node creator */ typedef synctex_node_small_t synctex_node_glue_t; synctex_node_t _synctex_new_glue(synctex_scanner_t scanner); void _synctex_display_glue(synctex_node_t node); static _synctex_class_t synctex_class_glue = { NULL, /* No scanner yet */ synctex_node_type_glue, /* Node type */ &_synctex_new_glue, /* creator */ &_synctex_free_leaf, /* destructor */ &_synctex_log_medium_node, /* log */ &_synctex_display_glue, /* display */ &_synctex_implementation_0, /* parent */ NULL, /* No child */ &_synctex_implementation_1, /* sibling */ &_synctex_implementation_2, /* friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; DEFINE_synctex_new_NODE(glue) /* boundary node creator */ typedef synctex_node_small_t synctex_node_boundary_t; synctex_node_t _synctex_new_boundary(synctex_scanner_t scanner); void _synctex_display_boundary(synctex_node_t node); static _synctex_class_t synctex_class_boundary = { NULL, /* No scanner yet */ synctex_node_type_boundary, /* Node type */ &_synctex_new_boundary, /* creator */ &_synctex_free_leaf, /* destructor */ &_synctex_log_small_node, /* log */ &_synctex_display_boundary, /* display */ &_synctex_implementation_0, /* parent */ NULL, /* No child */ &_synctex_implementation_1, /* sibling */ &_synctex_implementation_2, /* friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; DEFINE_synctex_new_NODE(boundary) # define SYNCTEX_NAME_IDX (SYNCTEX_TAG_IDX+1) # define SYNCTEX_NAME(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_NAME_IDX].PTR /* Input nodes only know about their sibling, which is another input node. * The synctex information is the SYNCTEX_TAG and SYNCTEX_NAME*/ typedef struct { SYNCTEX_DECLARE_CHARINDEX synctex_class_t class; synctex_info_t implementation[1+SYNCTEX_NAME_IDX+1]; /* sibling, * SYNCTEX_TAG,SYNCTEX_NAME */ } synctex_input_t; synctex_node_t _synctex_new_input(synctex_scanner_t scanner); void _synctex_free_input(synctex_node_t node); void _synctex_display_input(synctex_node_t node); void _synctex_log_input(synctex_node_t node); static _synctex_class_t synctex_class_input = { NULL, /* No scanner yet */ synctex_node_type_input, /* Node type */ &_synctex_new_input, /* creator */ &_synctex_free_input, /* destructor */ &_synctex_log_input, /* log */ &_synctex_display_input, /* display */ NULL, /* No parent */ NULL, /* No child */ &_synctex_implementation_0, /* sibling */ NULL, /* No friend */ NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_1 }; # define SYNCTEX_INPUT_MARK "Input:" synctex_node_t _synctex_new_input(synctex_scanner_t scanner) { if (scanner) { synctex_node_t node = _synctex_malloc(sizeof(synctex_input_t)); if (node) { SYNCTEX_IMPLEMENT_CHARINDEX(node,strlen(SYNCTEX_INPUT_MARK)); node->class = scanner->class+synctex_node_type_input; } return node; } return NULL; } void _synctex_free_input(synctex_node_t node){ if (node) { SYNCTEX_FREE(SYNCTEX_SIBLING(node)); free(SYNCTEX_NAME(node)); free(node); } } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Navigation # endif synctex_node_t synctex_node_parent(synctex_node_t node) { return SYNCTEX_PARENT(node); } synctex_node_t synctex_node_sheet(synctex_node_t node) { while(node && node->class->type != synctex_node_type_sheet) { node = SYNCTEX_PARENT(node); } /* exit the while loop either when node is NULL or node is a sheet */ return node; } synctex_node_t synctex_node_child(synctex_node_t node) { return SYNCTEX_CHILD(node); } synctex_node_t synctex_node_sibling(synctex_node_t node) { return SYNCTEX_SIBLING(node); } synctex_node_t synctex_node_next(synctex_node_t node) { if (SYNCTEX_CHILD(node)) { return SYNCTEX_CHILD(node); } sibling: if (SYNCTEX_SIBLING(node)) { return SYNCTEX_SIBLING(node); } if ((node = SYNCTEX_PARENT(node))) { if (node->class->type == synctex_node_type_sheet) {/* EXC_BAD_ACCESS? */ return NULL; } goto sibling; } return NULL; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark CLASS # endif /* Public node accessor: the type */ synctex_node_type_t synctex_node_type(synctex_node_t node) { if (node) { return (((node)->class))->type; } return synctex_node_type_error; } /* Public node accessor: the human readable type */ const char * synctex_node_isa(synctex_node_t node) { static const char * isa[synctex_node_number_of_types] = {"Not a node","input","sheet","vbox","void vbox","hbox","void hbox","kern","glue","math","boundary"}; return isa[synctex_node_type(node)]; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark SYNCTEX_LOG # endif # define SYNCTEX_LOG(NODE) SYNCTEX_MSG_SEND(NODE,log) /* Public node logger */ void synctex_node_log(synctex_node_t node) { SYNCTEX_LOG(node); } void _synctex_log_input(synctex_node_t node) { if (node) { printf("%s:%i,%s",synctex_node_isa(node),SYNCTEX_TAG(node),SYNCTEX_NAME(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); } } void _synctex_log_sheet(synctex_node_t node) { if (node) { printf("%s:%i",synctex_node_isa(node),SYNCTEX_PAGE(node)); SYNCTEX_PRINT_CHARINDEX; printf("SELF:%p",(void *)node); printf(" SYNCTEX_PARENT:%p",(void *)SYNCTEX_PARENT(node)); printf(" SYNCTEX_CHILD:%p",(void *)SYNCTEX_CHILD(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); printf(" SYNCTEX_FRIEND:%p",(void *)SYNCTEX_FRIEND(node)); printf(" SYNCTEX_NEXT_hbox:%p\n",(void *)SYNCTEX_NEXT_hbox(node)); } } void _synctex_log_small_node(synctex_node_t node) { if (node) { printf("%s:%i,%i:%i,%i", synctex_node_isa(node), SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node)); SYNCTEX_PRINT_CHARINDEX; printf("SELF:%p",(void *)node); printf(" SYNCTEX_PARENT:%p",(void *)SYNCTEX_PARENT(node)); printf(" SYNCTEX_CHILD:%p",(void *)SYNCTEX_CHILD(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); printf(" SYNCTEX_FRIEND:%p\n",(void *)SYNCTEX_FRIEND(node)); } } void _synctex_log_medium_node(synctex_node_t node) { if (node) { printf("%s:%i,%i:%i,%i:%i", synctex_node_isa(node), SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node), SYNCTEX_WIDTH(node)); SYNCTEX_PRINT_CHARINDEX; printf("SELF:%p",(void *)node); printf(" SYNCTEX_PARENT:%p",(void *)SYNCTEX_PARENT(node)); printf(" SYNCTEX_CHILD:%p",(void *)SYNCTEX_CHILD(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); printf(" SYNCTEX_FRIEND:%p\n",(void *)SYNCTEX_FRIEND(node)); } } void _synctex_log_void_box(synctex_node_t node) { if (node) { printf("%s",synctex_node_isa(node)); printf(":%i",SYNCTEX_TAG(node)); printf(",%i",SYNCTEX_LINE(node)); printf(",%i",0); printf(":%i",SYNCTEX_HORIZ(node)); printf(",%i",SYNCTEX_VERT(node)); printf(":%i",SYNCTEX_WIDTH(node)); printf(",%i",SYNCTEX_HEIGHT(node)); printf(",%i",SYNCTEX_DEPTH(node)); SYNCTEX_PRINT_CHARINDEX; printf("SELF:%p",(void *)node); printf(" SYNCTEX_PARENT:%p",(void *)SYNCTEX_PARENT(node)); printf(" SYNCTEX_CHILD:%p",(void *)SYNCTEX_CHILD(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); printf(" SYNCTEX_FRIEND:%p\n",(void *)SYNCTEX_FRIEND(node)); } } void _synctex_log_vbox(synctex_node_t node) { if (node) { printf("%s",synctex_node_isa(node)); printf(":%i",SYNCTEX_TAG(node)); printf(",%i",SYNCTEX_LINE(node)); printf(",%i",0); printf(":%i",SYNCTEX_HORIZ(node)); printf(",%i",SYNCTEX_VERT(node)); printf(":%i",SYNCTEX_WIDTH(node)); printf(",%i",SYNCTEX_HEIGHT(node)); printf(",%i",SYNCTEX_DEPTH(node)); SYNCTEX_PRINT_CHARINDEX; printf("SELF:%p",(void *)node); printf(" SYNCTEX_PARENT:%p",(void *)SYNCTEX_PARENT(node)); printf(" SYNCTEX_CHILD:%p",(void *)SYNCTEX_CHILD(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); printf(" SYNCTEX_FRIEND:%p",(void *)SYNCTEX_FRIEND(node)); printf(" SYNCTEX_NEXT_hbox:%p\n",(void *)SYNCTEX_NEXT_hbox(node)); } } void _synctex_log_hbox(synctex_node_t node) { if (node) { printf("%s",synctex_node_isa(node)); printf(":%i",SYNCTEX_TAG(node)); printf(",%i~%i*%i",SYNCTEX_LINE(node),SYNCTEX_MEAN_LINE(node),SYNCTEX_NODE_WEIGHT(node)); printf(",%i",0); printf(":%i",SYNCTEX_HORIZ(node)); printf(",%i",SYNCTEX_VERT(node)); printf(":%i",SYNCTEX_WIDTH(node)); printf(",%i",SYNCTEX_HEIGHT(node)); printf(",%i",SYNCTEX_DEPTH(node)); printf("/%i",SYNCTEX_HORIZ_V(node)); printf(",%i",SYNCTEX_VERT_V(node)); printf(":%i",SYNCTEX_WIDTH_V(node)); printf(",%i",SYNCTEX_HEIGHT_V(node)); printf(",%i",SYNCTEX_DEPTH_V(node)); SYNCTEX_PRINT_CHARINDEX; printf("SELF:%p",(void *)node); printf(" SYNCTEX_PARENT:%p",(void *)SYNCTEX_PARENT(node)); printf(" SYNCTEX_CHILD:%p",(void *)SYNCTEX_CHILD(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); printf(" SYNCTEX_FRIEND:%p",(void *)SYNCTEX_FRIEND(node)); printf(" SYNCTEX_NEXT_hbox:%p\n",(void *)SYNCTEX_NEXT_hbox(node)); } } # define SYNCTEX_DISPLAY(NODE) SYNCTEX_MSG_SEND(NODE,display) void synctex_node_display(synctex_node_t node) { SYNCTEX_DISPLAY(node); } void _synctex_display_input(synctex_node_t node) { if (node) { printf("....Input:%i:%s", SYNCTEX_TAG(node), SYNCTEX_NAME(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_sheet(synctex_node_t node) { if (node) { printf("....{%i",SYNCTEX_PAGE(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_CHILD(node)); printf("....}\n"); SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_vbox(synctex_node_t node) { if (node) { printf("....[%i,%i:%i,%i:%i,%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node), SYNCTEX_WIDTH(node), SYNCTEX_HEIGHT(node), SYNCTEX_DEPTH(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_CHILD(node)); printf("....]\n"); SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_hbox(synctex_node_t node) { if (node) { printf("....(%i,%i~%i*%i:%i,%i:%i,%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_MEAN_LINE(node), SYNCTEX_NODE_WEIGHT(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node), SYNCTEX_WIDTH(node), SYNCTEX_HEIGHT(node), SYNCTEX_DEPTH(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_CHILD(node)); printf("....)\n"); SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_void_vbox(synctex_node_t node) { if (node) { printf("....v%i,%i;%i,%i:%i,%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node), SYNCTEX_WIDTH(node), SYNCTEX_HEIGHT(node), SYNCTEX_DEPTH(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_void_hbox(synctex_node_t node) { if (node) { printf("....h%i,%i:%i,%i:%i,%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node), SYNCTEX_WIDTH(node), SYNCTEX_HEIGHT(node), SYNCTEX_DEPTH(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_glue(synctex_node_t node) { if (node) { printf("....glue:%i,%i:%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_math(synctex_node_t node) { if (node) { printf("....math:%i,%i:%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_kern(synctex_node_t node) { if (node) { printf("....kern:%i,%i:%i,%i:%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node), SYNCTEX_WIDTH(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } void _synctex_display_boundary(synctex_node_t node) { if (node) { printf("....boundary:%i,%i:%i,%i", SYNCTEX_TAG(node), SYNCTEX_LINE(node), SYNCTEX_HORIZ(node), SYNCTEX_VERT(node)); SYNCTEX_PRINT_CHARINDEX; SYNCTEX_DISPLAY(SYNCTEX_SIBLING(node)); } } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark SCANNER # endif /* Here are gathered all the possible status that the next scanning functions will return. * All these functions return a status, and pass their result through pointers. * Negative values correspond to errors. * The management of the buffer is causing some significant overhead. * Every function that may access the buffer returns a status related to the buffer and file state. * status >= SYNCTEX_STATUS_OK means the function worked as expected * status < SYNCTEX_STATUS_OK means the function did not work as expected * status == SYNCTEX_STATUS_NOT_OK means the function did not work as expected but there is still some material to parse. * status == SYNCTEX_STATUS_EOF means the function did not work as expected and there is no more material. * statusfile) /* Actually, the minimum buffer size is driven by integer and float parsing. * 0.123456789e123 */ # define SYNCTEX_BUFFER_MIN_SIZE 16 # define SYNCTEX_BUFFER_SIZE 32768 # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Prototypes # endif synctex_status_t _synctex_buffer_get_available_size(synctex_scanner_t scanner, size_t * size_ptr); synctex_status_t _synctex_next_line(synctex_scanner_t scanner); synctex_status_t _synctex_match_string(synctex_scanner_t scanner, const char * the_string); synctex_status_t _synctex_decode_int(synctex_scanner_t scanner, int* value_ref); synctex_status_t _synctex_decode_string(synctex_scanner_t scanner, char ** value_ref); synctex_status_t _synctex_scan_input(synctex_scanner_t scanner); synctex_status_t _synctex_scan_preamble(synctex_scanner_t scanner); synctex_status_t _synctex_scan_float_and_dimension(synctex_scanner_t scanner, float * value_ref); synctex_status_t _synctex_scan_post_scriptum(synctex_scanner_t scanner); int _synctex_scan_postamble(synctex_scanner_t scanner); synctex_status_t _synctex_setup_visible_box(synctex_node_t box); synctex_status_t _synctex_hbox_setup_visible(synctex_node_t node,int h, int v); synctex_status_t _synctex_scan_sheet(synctex_scanner_t scanner, synctex_node_t parent); synctex_status_t _synctex_scan_nested_sheet(synctex_scanner_t scanner); synctex_status_t _synctex_scan_content(synctex_scanner_t scanner); int synctex_scanner_pre_x_offset(synctex_scanner_t scanner); int synctex_scanner_pre_y_offset(synctex_scanner_t scanner); const char * synctex_scanner_get_output_fmt(synctex_scanner_t scanner); int _synctex_node_is_box(synctex_node_t node); int _synctex_bail(void); /* Try to ensure that the buffer contains at least size bytes. * Passing a huge size argument means the whole buffer length. * Passing a null size argument means return the available buffer length, without reading the file. * In that case, the return status is always SYNCTEX_STATUS_OK unless the given scanner is NULL, * in which case, SYNCTEX_STATUS_BAD_ARGUMENT is returned. * The value returned in size_ptr is the number of bytes now available in the buffer. * This is a nonnegative integer, it may take the value 0. * It is the responsibility of the caller to test whether this size is conforming to its needs. * Negative values may return in case of error, actually * when there was an error reading the synctex file. */ synctex_status_t _synctex_buffer_get_available_size(synctex_scanner_t scanner, size_t * size_ptr) { size_t available = 0; if (NULL == scanner || NULL == size_ptr) { return SYNCTEX_STATUS_BAD_ARGUMENT; } # define size (* size_ptr) if (size>SYNCTEX_BUFFER_SIZE){ size = SYNCTEX_BUFFER_SIZE; } available = SYNCTEX_END - SYNCTEX_CUR; /* available is the number of unparsed chars in the buffer */ if (size<=available) { /* There are already sufficiently many characters in the buffer */ size = available; return SYNCTEX_STATUS_OK; } if (SYNCTEX_FILE) { /* Copy the remaining part of the buffer to the beginning, * then read the next part of the file */ int already_read = 0; # if defined(SYNCTEX_USE_CHARINDEX) scanner->charindex_offset += SYNCTEX_CUR - SYNCTEX_START; # endif if (available) { memmove(SYNCTEX_START, SYNCTEX_CUR, available); } SYNCTEX_CUR = SYNCTEX_START + available; /* the next character after the move, will change. */ /* Fill the buffer up to its end */ already_read = gzread(SYNCTEX_FILE,(void *)SYNCTEX_CUR,SYNCTEX_BUFFER_SIZE - available); if (already_read>0) { /* We assume that 0already_read) { /* There is a possible error in reading the file */ int errnum = 0; const char * error_string = gzerror(SYNCTEX_FILE, &errnum); if (Z_ERRNO == errnum) { /* There is an error in zlib caused by the file system */ _synctex_error("gzread error from the file system (%i)",errno); return SYNCTEX_STATUS_ERROR; } else if (errnum) { _synctex_error("gzread error (%i:%i,%s)",already_read,errnum,error_string); return SYNCTEX_STATUS_ERROR; } } /* Nothing was read, we are at the end of the file. */ gzclose(SYNCTEX_FILE); SYNCTEX_FILE = NULL; SYNCTEX_END = SYNCTEX_CUR; SYNCTEX_CUR = SYNCTEX_START; * SYNCTEX_END = '\0';/* Terminate the string properly.*/ size = SYNCTEX_END - SYNCTEX_CUR; return SYNCTEX_STATUS_EOF; /* there might be a bit of text left */ } /* We cannot enlarge the buffer because the end of the file was reached. */ size = available; return SYNCTEX_STATUS_EOF; # undef size } /* Used when parsing the synctex file. * Advance to the next character starting a line. * Actually, only '\n' is recognized as end of line marker. * On normal completion, the returned value is the number of unparsed characters available in the buffer. * In general, it is a positive value, 0 meaning that the end of file was reached. * -1 is returned in case of error, actually because there was an error while feeding the buffer. * When the function returns with no error, SYNCTEX_CUR points to the first character of the next line, if any. * J. Laurens: Sat May 10 07:52:31 UTC 2008 */ synctex_status_t _synctex_next_line(synctex_scanner_t scanner) { synctex_status_t status = SYNCTEX_STATUS_OK; size_t available = 0; if (NULL == scanner) { return SYNCTEX_STATUS_BAD_ARGUMENT; } infinite_loop: while(SYNCTEX_CUR=remaining_len) { /* The buffer is sufficiently big to hold the expected number of characters. */ if (strncmp((char *)SYNCTEX_CUR,the_string,remaining_len)) { return SYNCTEX_STATUS_NOT_OK; } return_OK: /* Advance SYNCTEX_CUR to the next character after the_string. */ SYNCTEX_CUR += remaining_len; return SYNCTEX_STATUS_OK; } else if (strncmp((char *)SYNCTEX_CUR,the_string,available)) { /* No need to go further, this is not the expected string in the buffer. */ return SYNCTEX_STATUS_NOT_OK; } else if (SYNCTEX_FILE) { /* The buffer was too small to contain remaining_len characters. * We have to cut the string into pieces. */ z_off_t offset = 0L; /* the first part of the string is found, advance the_string to the next untested character. */ the_string += available; /* update the remaining length and the parsed length. */ remaining_len -= available; tested_len += available; SYNCTEX_CUR += available; /* We validate the tested characters. */ if (0 == remaining_len) { /* Nothing left to test, we have found the given string, we return the length. */ return tested_len; } /* We also have to record the current state of the file cursor because * if the_string does not match, all this should be a totally blank operation, * for which the file and buffer states should not be modified at all. * In fact, the states of the buffer before and after this function are in general different * but they are totally equivalent as long as the values of the buffer before SYNCTEX_CUR * can be safely discarded. */ offset = gztell(SYNCTEX_FILE); /* offset now corresponds to the first character of the file that was not buffered. */ available = SYNCTEX_CUR - SYNCTEX_START; /* available can be used as temporary placeholder. */ /* available now corresponds to the number of chars that where already buffered and * that match the head of the_string. If in fine the_string does not match, all these chars must be recovered * because the buffer contents is completely replaced by _synctex_buffer_get_available_size. * They were buffered from offset-len location in the file. */ offset -= available; more_characters: /* There is still some work to be done, so read another bunch of file. * This is the second call to _synctex_buffer_get_available_size, * which means that the actual contents of the buffer will be discarded. * We will definitely have to recover the previous state in case we do not find the expected string. */ available = remaining_len; status = _synctex_buffer_get_available_size(scanner,&available); if (statusptr) { SYNCTEX_CUR = end; if (value_ref) { * value_ref = result; } return SYNCTEX_STATUS_OK;/* Successfully scanned an int */ } return SYNCTEX_STATUS_NOT_OK;/* Could not scan an int */ } /* The purpose of this function is to read a string. * A string is an array of characters from the current parser location * and before the next '\n' character. * If a string was properly decoded, it is returned in value_ref and * the cursor points to the new line marker. * The returned string was alloced on the heap, the caller is the owner and * is responsible to free it in due time. * If no string is parsed, * value_ref is undefined. * The maximum length of a string that a scanner can decode is platform dependent, namely UINT_MAX. * If you just want to blindly parse the file up to the end of the current line, * use _synctex_next_line instead. * On return, the scanner cursor is unchanged if a string could not be scanned or * points to the terminating '\n' character otherwise. As a consequence, * _synctex_next_line is necessary after. * If either scanner or value_ref is NULL, it is considered as an error and * SYNCTEX_STATUS_BAD_ARGUMENT is returned. */ synctex_status_t _synctex_decode_string(synctex_scanner_t scanner, char ** value_ref) { char * end = NULL; size_t current_size = 0; size_t new_size = 0; size_t len = 0;/* The number of bytes to copy */ size_t available = 0; synctex_status_t status = 0; if (NULL == scanner || NULL == value_ref) { return SYNCTEX_STATUS_BAD_ARGUMENT; } /* The buffer must at least contain one character: the '\n' end of line marker */ if (SYNCTEX_CUR>=SYNCTEX_END) { available = 1; status = _synctex_buffer_get_available_size(scanner,&available); if (status < 0) { return status; } if (0 == available) { return SYNCTEX_STATUS_EOF; } } /* Now we are sure that there is at least one available character, either because * SYNCTEX_CUR was already < SYNCTEX_END, or because the buffer has been properly filled. */ /* end will point to the next unparsed '\n' character in the file, when mapped to the buffer. */ end = SYNCTEX_CUR; * value_ref = NULL;/* Initialize, it will be realloc'ed */ /* We scan all the characters up to the next '\n' */ next_character: if (endUINT_MAX-len-1) { /* But we have reached the limit: we do not have current_size+len+1>UINT_MAX. * We return the missing amount of memory. * This will never occur in practice. */ return UINT_MAX-len-1 - current_size; } new_size = current_size+len; /* We have current_size+len+1<=UINT_MAX * or equivalently new_sizeUINT_MAX-len-1) { /* We have reached the limit. */ _synctex_error("limit reached (missing %i).",current_size-(UINT_MAX-len-1)); return SYNCTEX_STATUS_ERROR; } new_size = current_size+len; if ((* value_ref = realloc(* value_ref,new_size+1)) != NULL) { if (memcpy((*value_ref)+current_size,SYNCTEX_CUR,len)) { (* value_ref)[new_size]='\0'; /* Terminate the string */ SYNCTEX_CUR = SYNCTEX_END;/* Advance the cursor to the end of the bufer */ return SYNCTEX_STATUS_OK; } free(* value_ref); * value_ref = NULL; _synctex_error("could not copy memory (2)."); return SYNCTEX_STATUS_ERROR; } /* Huge memory problem */ _synctex_error("could not allocate memory (2)."); return SYNCTEX_STATUS_ERROR; } } /* Used when parsing the synctex file. * Read an Input record. */ synctex_status_t _synctex_scan_input(synctex_scanner_t scanner) { synctex_status_t status = 0; size_t available = 0; synctex_node_t input = NULL; if (NULL == scanner) { return SYNCTEX_STATUS_BAD_ARGUMENT; } status = _synctex_match_string(scanner,SYNCTEX_INPUT_MARK); if (statusinput); scanner->input = input; # if SYNCTEX_VERBOSE synctex_node_log(input); # endif return _synctex_next_line(scanner);/* read the line termination character, if any */ /* Now, set up the path */ } typedef synctex_status_t (*synctex_decoder_t)(synctex_scanner_t,void *); synctex_status_t _synctex_scan_named(synctex_scanner_t scanner,const char * name,void * value_ref,synctex_decoder_t decoder); /* Used when parsing the synctex file. * Read one of the settings. * On normal completion, returns SYNCTEX_STATUS_OK. * On error, returns SYNCTEX_STATUS_ERROR. * Both arguments must not be NULL. * On return, the scanner points to the next character after the decoded object whatever it is. * It is the responsibility of the caller to prepare the scanner for the next line. */ synctex_status_t _synctex_scan_named(synctex_scanner_t scanner,const char * name,void * value_ref,synctex_decoder_t decoder) { synctex_status_t status = 0; if (NULL == scanner || NULL == name || NULL == value_ref || NULL == decoder) { return SYNCTEX_STATUS_BAD_ARGUMENT; } not_found: status = _synctex_match_string(scanner,name); if (statusversion),(synctex_decoder_t)&_synctex_decode_int); if (statusoutput_fmt),(synctex_decoder_t)&_synctex_decode_string); if (statuspre_magnification),(synctex_decoder_t)&_synctex_decode_int); if (statuspre_unit),(synctex_decoder_t)&_synctex_decode_int); if (statuspre_x_offset),(synctex_decoder_t)&_synctex_decode_int); if (statuspre_y_offset),(synctex_decoder_t)&_synctex_decode_int); if (status= SYNCTEX_STATUS_OK) { f *= 72.27f*65536; } else if (status= SYNCTEX_STATUS_OK) { f *= 72.27f*65536/2.54f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"mm")) >= SYNCTEX_STATUS_OK) { f *= 72.27f*65536/25.4f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"pt")) >= SYNCTEX_STATUS_OK) { f *= 65536.0f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"bp")) >= SYNCTEX_STATUS_OK) { f *= 72.27f/72*65536.0f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"pc")) >= SYNCTEX_STATUS_OK) { f *= 12.0*65536.0f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"sp")) >= SYNCTEX_STATUS_OK) { f *= 1.0f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"dd")) >= SYNCTEX_STATUS_OK) { f *= 1238.0f/1157*65536.0f; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"cc")) >= SYNCTEX_STATUS_OK) { f *= 14856.0f/1157*65536; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"nd")) >= SYNCTEX_STATUS_OK) { f *= 685.0f/642*65536; } else if (status<0) { goto report_unit_error; } else if ((status = _synctex_match_string(scanner,"nc")) >= SYNCTEX_STATUS_OK) { f *= 1370.0f/107*65536; } else if (status<0) { goto report_unit_error; } *value_ref = f; return SYNCTEX_STATUS_OK; } /* parse the post scriptum * SYNCTEX_STATUS_OK is returned on completion * a negative error is returned otherwise */ synctex_status_t _synctex_scan_post_scriptum(synctex_scanner_t scanner) { synctex_status_t status = 0; char * endptr = NULL; #ifdef HAVE_SETLOCALE char * loc = setlocale(LC_NUMERIC, NULL); #endif if (NULL == scanner) { return SYNCTEX_STATUS_BAD_ARGUMENT; } /* Scan the file until a post scriptum line is found */ post_scriptum_not_found: status = _synctex_match_string(scanner,"Post scriptum:"); if (statusunit = strtod(SYNCTEX_CUR,&endptr); #ifdef HAVE_SETLOCALE setlocale(LC_NUMERIC, loc); #endif if (endptr == SYNCTEX_CUR) { _synctex_error("bad magnification in the post scriptum, a float was expected."); return SYNCTEX_STATUS_ERROR; } if (scanner->unit<=0) { _synctex_error("bad magnification in the post scriptum, a positive float was expected."); return SYNCTEX_STATUS_ERROR; } SYNCTEX_CUR = endptr; goto next_line; } if (statusx_offset)); if (statusy_offset)); if (statuscount),(synctex_decoder_t)&_synctex_decode_int); if (status < SYNCTEX_STATUS_EOF) { return status; /* forward the error */ } else if (status < SYNCTEX_STATUS_OK) { /* No Count record found */ status = _synctex_next_line(scanner); /* Advance one more line */ if (statusclass->type) { case synctex_node_type_hbox: if (SYNCTEX_INFO(box) != NULL) { SYNCTEX_HORIZ_V(box) = SYNCTEX_HORIZ(box); SYNCTEX_VERT_V(box) = SYNCTEX_VERT(box); SYNCTEX_WIDTH_V(box) = SYNCTEX_WIDTH(box); SYNCTEX_HEIGHT_V(box) = SYNCTEX_HEIGHT(box); SYNCTEX_DEPTH_V(box) = SYNCTEX_DEPTH(box); return SYNCTEX_STATUS_OK; } return SYNCTEX_STATUS_ERROR; } } return SYNCTEX_STATUS_BAD_ARGUMENT; } /* This method is sent to an horizontal box to setup the visible size * Some box have 0 width but do contain text material. * With this method, one can enlarge the box to contain the given point (h,v). */ synctex_status_t _synctex_hbox_setup_visible(synctex_node_t node,int h, int v) { # ifdef __DARWIN_UNIX03 # pragma unused(v) # endif int itsBtm, itsTop; if (NULL == node || node->class->type != synctex_node_type_hbox) { return SYNCTEX_STATUS_BAD_ARGUMENT; } if (SYNCTEX_WIDTH_V(node)<0) { itsBtm = SYNCTEX_HORIZ_V(node); itsTop = SYNCTEX_HORIZ_V(node)-SYNCTEX_WIDTH_V(node); if (hitsTop) { SYNCTEX_WIDTH_V(node) = SYNCTEX_HORIZ_V(node) - h; } } else { itsBtm = SYNCTEX_HORIZ_V(node); itsTop = SYNCTEX_HORIZ_V(node)+SYNCTEX_WIDTH_V(node); if (hitsTop) { SYNCTEX_WIDTH_V(node) = h - SYNCTEX_HORIZ_V(node); } } return SYNCTEX_STATUS_OK; } /* Here are the control characters that strat each line of the synctex output file. * Their values define the meaning of the line. */ # define SYNCTEX_CHAR_BEGIN_SHEET '{' # define SYNCTEX_CHAR_END_SHEET '}' # define SYNCTEX_CHAR_BEGIN_VBOX '[' # define SYNCTEX_CHAR_END_VBOX ']' # define SYNCTEX_CHAR_BEGIN_HBOX '(' # define SYNCTEX_CHAR_END_HBOX ')' # define SYNCTEX_CHAR_ANCHOR '!' # define SYNCTEX_CHAR_VOID_VBOX 'v' # define SYNCTEX_CHAR_VOID_HBOX 'h' # define SYNCTEX_CHAR_KERN 'k' # define SYNCTEX_CHAR_GLUE 'g' # define SYNCTEX_CHAR_MATH '$' # define SYNCTEX_CHAR_BOUNDARY 'x' # define SYNCTEX_RETURN(STATUS) return STATUS; /* Used when parsing the synctex file. A '{' character has just been parsed. * The purpose is to gobble everything until the closing '}'. * Actually only one nesting depth has been observed when using the clip option * of \includegraphics option. Here we use arbitrary level of depth. */ synctex_status_t _synctex_scan_nested_sheet(synctex_scanner_t scanner) { unsigned int depth = 0; deeper: ++depth; if (_synctex_next_line(scanner)0) { goto scan_next_line; } else { SYNCTEX_RETURN(SYNCTEX_STATUS_OK); } } else if (*SYNCTEX_CUR == SYNCTEX_CHAR_BEGIN_SHEET) { ++SYNCTEX_CUR; goto deeper; } else if (_synctex_next_line(scanner)class->type != synctex_node_type_sheet || _synctex_next_line(scanner)0){ _synctex_error("Uncomplete sheet(0)"); SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR); } goto prepare_loop; } _synctex_bail(); /* The child loop means that we go down one level, when we just created a box node, * the next node created is a child of this box. */ child_loop: if (SYNCTEX_CURclass->type == synctex_node_type_vbox) { #define SYNCTEX_UPDATE_BOX_FRIEND(NODE)\ friend_index = ((SYNCTEX_INFO(NODE))[SYNCTEX_TAG_IDX].INT+(SYNCTEX_INFO(NODE))[SYNCTEX_LINE_IDX].INT)%(scanner->number_of_lists);\ SYNCTEX_SET_FRIEND(NODE,(scanner->lists_of_friends)[friend_index]);\ (scanner->lists_of_friends)[friend_index] = NODE; if (NULL == SYNCTEX_CHILD(parent)) { /* only void boxes are friends */ SYNCTEX_UPDATE_BOX_FRIEND(parent); } child = parent; parent = SYNCTEX_PARENT(child); } else { _synctex_error("Unexpected end of vbox, ignored."); } if (_synctex_next_line(scanner)class->type == synctex_node_type_hbox) { /* Update the mean line number */ synctex_node_t node = SYNCTEX_CHILD(parent); if (node) { unsigned int node_weight = 0; unsigned int cumulated_line_numbers = 0; do { if (synctex_node_type(node)==synctex_node_type_hbox) { if (SYNCTEX_NODE_WEIGHT(node)) { node_weight += SYNCTEX_NODE_WEIGHT(node); cumulated_line_numbers += SYNCTEX_MEAN_LINE(node)*SYNCTEX_NODE_WEIGHT(node); } else { ++node_weight; cumulated_line_numbers += SYNCTEX_MEAN_LINE(node); } } else { ++node_weight; cumulated_line_numbers += SYNCTEX_LINE(node); } } while ((node = SYNCTEX_SIBLING(node))); SYNCTEX_MEAN_LINE(parent)=(cumulated_line_numbers + node_weight/2)/node_weight; SYNCTEX_NODE_WEIGHT(parent)=node_weight; } else { SYNCTEX_MEAN_LINE(parent)=SYNCTEX_LINE(parent); SYNCTEX_NODE_WEIGHT(parent)=1; } if (NULL == child) { /* Only boxes with no children are friends, * boxes with children are indirectly friends through one of their contained nodes. */ SYNCTEX_UPDATE_BOX_FRIEND(parent); } /* setting the next horizontal box at the end ensures that a child is recorded before any of its ancestors. */ SYNCTEX_SET_NEXT_hbox(box,parent); box = parent; child = parent; parent = SYNCTEX_PARENT(child); } else { _synctex_error("Unexpected end of hbox, ignored."); } if (_synctex_next_line(scanner)number_of_lists);\ SYNCTEX_SET_FRIEND(NODE,(scanner->lists_of_friends)[friend_index]);\ (scanner->lists_of_friends)[friend_index] = NODE; SYNCTEX_UPDATE_FRIEND(child); # if SYNCTEX_VERBOSE synctex_node_log(child); # endif goto sibling_loop; } else { _synctex_error("Can't create vbox record."); SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR); } } else if (*SYNCTEX_CUR == SYNCTEX_CHAR_VOID_HBOX) { if (NULL != (child = _synctex_new_void_hbox(scanner)) && NULL != (info = SYNCTEX_INFO(child))) { if (SYNCTEX_DECODE_FAILED(SYNCTEX_TAG_IDX) || SYNCTEX_DECODE_FAILED(SYNCTEX_LINE_IDX) || SYNCTEX_DECODE_FAILED(SYNCTEX_HORIZ_IDX) || SYNCTEX_DECODE_FAILED(SYNCTEX_VERT_IDX) || SYNCTEX_DECODE_FAILED(SYNCTEX_WIDTH_IDX) || SYNCTEX_DECODE_FAILED(SYNCTEX_HEIGHT_IDX) || SYNCTEX_DECODE_FAILED(SYNCTEX_DEPTH_IDX) || _synctex_next_line(scanner)0){ _synctex_error("Uncomplete sheet(0)"); SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR); } else { goto child_loop; } } _synctex_bail(); /* The vertical loop means that we are on the same level, for example when we just ended a box. * If a node is created now, it will be a sibling of the current node, sharing the same parent. */ sibling_loop: if (SYNCTEX_CUR0){ goto sibling_loop; } else { _synctex_error("Uncomplete sheet(2)"); SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR); } } # undef SYNCTEX_DECODE_FAILED } # define SYNCTEX_APPEND_SHEET(SCANNER,SHEET) if (SCANNER->sheet) {\ synctex_node_t last_sheet = SCANNER->sheet;\ synctex_node_t next_sheet = NULL;\ while ((next_sheet = SYNCTEX_SIBLING(last_sheet))) {\ last_sheet = next_sheet;\ }\ SYNCTEX_SET_SIBLING(last_sheet,SHEET);\ } else {\ SCANNER->sheet = SHEET;\ } /* Used when parsing the synctex file */ synctex_status_t _synctex_scan_content(synctex_scanner_t scanner) { synctex_node_t sheet = NULL; synctex_status_t status = 0; if (NULL == scanner) { return SYNCTEX_STATUS_BAD_ARGUMENT; } /* set up the lists of friends */ if (NULL == scanner->lists_of_friends) { scanner->number_of_lists = 1024; scanner->lists_of_friends = (synctex_node_t *)_synctex_malloc(scanner->number_of_lists*sizeof(synctex_node_t)); if (NULL == scanner->lists_of_friends) { _synctex_error("malloc:2"); return SYNCTEX_STATUS_ERROR; } } /* Find where this section starts */ content_not_found: status = _synctex_match_string(scanner,"Content:"); if (status= SYNCTEX_STATUS_OK); goto next_sheet; } int _synctex_open(const char * output, const char * build_directory, char ** synctex_name_ref, gzFile * file_ref, synctex_bool_t add_quotes, synctex_io_mode_t * io_modeRef); /* Where the synctex scanner is created. */ synctex_scanner_t synctex_scanner_new_with_output_file(const char * output, const char * build_directory, int parse) { gzFile file = NULL; char * synctex = NULL; synctex_scanner_t scanner = NULL; synctex_io_mode_t io_mode = 0; /* Here we assume that int are smaller than void * */ if (sizeof(int)>sizeof(void*)) { _synctex_error("INTERNAL INCONSISTENCY: int's are unexpectedly bigger than pointers, bailing out."); return NULL; } /* We ensure that SYNCTEX_BUFFER_SIZE < UINT_MAX, I don't know if it makes sense... */ if (SYNCTEX_BUFFER_SIZE >= UINT_MAX) { _synctex_error("Internal inconsistency, bad SYNCTEX_BUFFER_SIZE (1)"); return NULL; } /* for integers: */ if (SYNCTEX_BUFFER_SIZE < SYNCTEX_BUFFER_MIN_SIZE) { _synctex_error("Internal inconsistency, bad SYNCTEX_BUFFER_SIZE (2)"); return NULL; } /* now open the synctex file */ if (_synctex_open(output,build_directory,&synctex,&file,synctex_ADD_QUOTES,&io_mode) || !file) { if (_synctex_open(output,build_directory,&synctex,&file,synctex_DONT_ADD_QUOTES,&io_mode) || !file) { return NULL; } } scanner = (synctex_scanner_t)_synctex_malloc(sizeof(_synctex_scanner_t)); if (NULL == scanner) { _synctex_error("malloc problem"); free(synctex); gzclose(file); return NULL; } /* make a private copy of output for the scanner */ if (NULL == (scanner->output = (char *)malloc(strlen(output)+1))){ _synctex_error("! synctex_scanner_new_with_output_file: Memory problem (2), scanner's output is not reliable."); } else if (scanner->output != strcpy(scanner->output,output)) { _synctex_error("! synctex_scanner_new_with_output_file: Copy problem, scanner's output is not reliable."); } scanner->synctex = synctex;/* Now the scanner owns synctex */ SYNCTEX_FILE = file; return parse? synctex_scanner_parse(scanner):scanner; } int __synctex_open(const char * output, char ** synctex_name_ref, gzFile * file_ref, synctex_bool_t add_quotes, synctex_io_mode_t * io_mode_ref); /* This functions opens the file at the "output" given location. * It manages the problem of quoted filenames that appear with pdftex and filenames containing the space character. * In TeXLive 2008, the synctex file created with pdftex did contain unexpected quotes. * This function will remove them if possible. * All the reference arguments will take a value on return. They must be non NULL. * 0 on success, non 0 on error. */ int __synctex_open(const char * output, char ** synctex_name_ref, gzFile * file_ref, synctex_bool_t add_quotes, synctex_io_mode_t * io_mode_ref) { if (synctex_name_ref && file_ref && io_mode_ref) { /* 1 local variables that uses dynamic memory */ char * synctex_name = NULL; gzFile the_file = NULL; char * quoteless_synctex_name = NULL; size_t size = 0; synctex_io_mode_t io_mode = *io_mode_ref; const char * mode = _synctex_get_io_mode_name(io_mode); /* now create the synctex file name */ size = strlen(output)+strlen(synctex_suffix)+strlen(synctex_suffix_gz)+1; synctex_name = (char *)malloc(size); if (NULL == synctex_name) { _synctex_error("! __synctex_open: Memory problem (1)\n"); return 1; } /* we have reserved for synctex enough memory to copy output (including its 2 eventual quotes), both suffices, * including the terminating character. size is free now. */ if (synctex_name != strcpy(synctex_name,output)) { _synctex_error("! __synctex_open: Copy problem\n"); return_on_error: free(synctex_name); free(quoteless_synctex_name); return 2; } /* remove the last path extension if any */ _synctex_strip_last_path_extension(synctex_name); if (!strlen(synctex_name)) { goto return_on_error; } /* now insert quotes. */ if (add_quotes) { char * quoted = NULL; if (_synctex_copy_with_quoting_last_path_component(synctex_name,"ed,size) || (NULL == quoted)) { /* There was an error or quoting does not make sense: */ goto return_on_error; } quoteless_synctex_name = synctex_name; synctex_name = quoted; } /* Now add to synctex_name the first path extension. */ if (synctex_name != strcat(synctex_name,synctex_suffix)){ _synctex_error("! __synctex_open: Concatenation problem (can't add suffix '%s')\n",synctex_suffix); goto return_on_error; } /* Add to quoteless_synctex_name as well, if relevant. */ if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name,synctex_suffix))){ free(quoteless_synctex_name); quoteless_synctex_name = NULL; } if (NULL == (the_file = gzopen(synctex_name,mode))) { /* Could not open this file */ if (errno != ENOENT) { /* The file does exist, this is a lower level error, I can't do anything. */ _synctex_error("could not open %s, error %i\n",synctex_name,errno); goto return_on_error; } /* Apparently, there is no uncompressed synctex file. Try the compressed version */ if (synctex_name != strcat(synctex_name,synctex_suffix_gz)){ _synctex_error("! __synctex_open: Concatenation problem (can't add suffix '%s')\n",synctex_suffix_gz); goto return_on_error; } io_mode |= synctex_io_gz_mask; mode = _synctex_get_io_mode_name(io_mode); /* the file is a compressed and is a binary file, this caused errors on Windows */ /* Add the suffix to the quoteless_synctex_name as well. */ if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name,synctex_suffix_gz))){ free(quoteless_synctex_name); quoteless_synctex_name = NULL; } if (NULL == (the_file = gzopen(synctex_name,mode))) { /* Could not open this file */ if (errno != ENOENT) { /* The file does exist, this is a lower level error, I can't do anything. */ _synctex_error("Could not open %s, error %i\n",synctex_name,errno); } goto return_on_error; } } /* At this point, the file is properly open. * If we are in the add_quotes mode, we change the file name by removing the quotes. */ if (quoteless_synctex_name) { gzclose(the_file); if (rename(synctex_name,quoteless_synctex_name)) { _synctex_error("Could not rename %s to %s, error %i\n",synctex_name,quoteless_synctex_name,errno); /* We could not rename, reopen the file with the quoted name. */ if (NULL == (the_file = gzopen(synctex_name,mode))) { /* No luck, could not re open this file, something has happened meanwhile */ if (errno != ENOENT) { /* The file does not exist any more, it has certainly be removed somehow * this is a lower level error, I can't do anything. */ _synctex_error("Could not open again %s, error %i\n",synctex_name,errno); } goto return_on_error; } } else { /* The file has been successfully renamed */ if (NULL == (the_file = gzopen(quoteless_synctex_name,mode))) { /* Could not open this file */ if (errno != ENOENT) { /* The file does exist, this is a lower level error, I can't do anything. */ _synctex_error("Could not open renamed %s, error %i\n",quoteless_synctex_name,errno); } goto return_on_error; } /* The quote free file name should replace the old one:*/ free(synctex_name); synctex_name = quoteless_synctex_name; quoteless_synctex_name = NULL; } } /* The operation is successfull, return the arguments by value. */ * file_ref = the_file; * io_mode_ref = io_mode; * synctex_name_ref = synctex_name; return 0; } return 3; /* Bad parameter. */ } /* Opens the ouput file, taking into account the eventual build_directory. * 0 on success, non 0 on error. */ int _synctex_open(const char * output, const char * build_directory, char ** synctex_name_ref, gzFile * file_ref, synctex_bool_t add_quotes, synctex_io_mode_t * io_mode_ref) { # define synctex_name (*synctex_name_ref) # define the_file (*file_ref) int result = __synctex_open(output,synctex_name_ref,file_ref,add_quotes,io_mode_ref); if ((result || !*file_ref) && build_directory && strlen(build_directory)) { char * build_output; const char *lpc; size_t size; synctex_bool_t is_absolute; build_output = NULL; lpc = _synctex_last_path_component(output); size = strlen(build_directory)+strlen(lpc)+2; /* One for the '/' and one for the '\0'. */ is_absolute = _synctex_path_is_absolute(build_directory); if (!is_absolute) { size += strlen(output); } if ((build_output = (char *)malloc(size))) { if (is_absolute) { build_output[0] = '\0'; } else { if (build_output != strcpy(build_output,output)) { return -4; } build_output[lpc-output]='\0'; } if (build_output == strcat(build_output,build_directory)) { /* Append a path separator if necessary. */ if (!SYNCTEX_IS_PATH_SEPARATOR(build_output[strlen(build_directory)-1])) { if (build_output != strcat(build_output,"/")) { return -2; } } /* Append the last path component of the output. */ if (build_output != strcat(build_output,lpc)) { return -3; } return __synctex_open(build_output,synctex_name_ref,file_ref,add_quotes,io_mode_ref); } } return -1; } return result; # undef synctex_name # undef the_file } /* The scanner destructor */ void synctex_scanner_free(synctex_scanner_t scanner) { if (NULL == scanner) { return; } if (SYNCTEX_FILE) { gzclose(SYNCTEX_FILE); SYNCTEX_FILE = NULL; } SYNCTEX_FREE(scanner->sheet); SYNCTEX_FREE(scanner->input); free(SYNCTEX_START); free(scanner->output_fmt); free(scanner->output); free(scanner->synctex); free(scanner->lists_of_friends); free(scanner); } /* Where the synctex scanner parses the contents of the file. */ synctex_scanner_t synctex_scanner_parse(synctex_scanner_t scanner) { synctex_status_t status = 0; if (!scanner || scanner->flags.has_parsed) { return scanner; } scanner->flags.has_parsed=1; scanner->pre_magnification = 1000; scanner->pre_unit = 8192; scanner->pre_x_offset = scanner->pre_y_offset = 578; /* initialize the offset with a fake unprobable value, * If there is a post scriptum section, this value will be overriden by the real life value */ scanner->x_offset = scanner->y_offset = 6.027e23f; # define DEFINE_synctex_scanner_class(NAME)\ scanner->class[synctex_node_type_##NAME] = synctex_class_##NAME;\ (scanner->class[synctex_node_type_##NAME]).scanner = scanner DEFINE_synctex_scanner_class(sheet); DEFINE_synctex_scanner_class(input); DEFINE_synctex_scanner_class(hbox); DEFINE_synctex_scanner_class(void_hbox); DEFINE_synctex_scanner_class(vbox); DEFINE_synctex_scanner_class(void_vbox); DEFINE_synctex_scanner_class(kern); DEFINE_synctex_scanner_class(glue); DEFINE_synctex_scanner_class(math); DEFINE_synctex_scanner_class(boundary); SYNCTEX_START = (char *)malloc(SYNCTEX_BUFFER_SIZE+1); /* one more character for null termination */ if (NULL == SYNCTEX_START) { _synctex_error("malloc error"); synctex_scanner_free(scanner); return NULL; } SYNCTEX_END = SYNCTEX_START+SYNCTEX_BUFFER_SIZE; /* SYNCTEX_END always points to a null terminating character. * Maybe there is another null terminating character between SYNCTEX_CUR and SYNCTEX_END-1. * At least, we are sure that SYNCTEX_CUR points to a string covering a valid part of the memory. */ *SYNCTEX_END = '\0'; SYNCTEX_CUR = SYNCTEX_END; # if defined(SYNCTEX_USE_CHARINDEX) scanner->charindex_offset = -SYNCTEX_BUFFER_SIZE; # endif status = _synctex_scan_preamble(scanner); if (statuspre_unit)/65536 pt = (scanner->pre_unit)/65781.76 bp * 1 pt = 65536 sp */ if (scanner->pre_unit<=0) { scanner->pre_unit = 8192; } if (scanner->pre_magnification<=0) { scanner->pre_magnification = 1000; } if (scanner->unit <= 0) { /* no post magnification */ scanner->unit = scanner->pre_unit / 65781.76;/* 65781.76 or 65536.0*/ } else { /* post magnification */ scanner->unit *= scanner->pre_unit / 65781.76; } scanner->unit *= scanner->pre_magnification / 1000.0; if (scanner->x_offset > 6e23) { /* no post offset */ scanner->x_offset = scanner->pre_x_offset * (scanner->pre_unit / 65781.76); scanner->y_offset = scanner->pre_y_offset * (scanner->pre_unit / 65781.76); } else { /* post offset */ scanner->x_offset /= 65781.76f; scanner->y_offset /= 65781.76f; } return scanner; #undef SYNCTEX_FILE } /* Scanner accessors. */ int synctex_scanner_pre_x_offset(synctex_scanner_t scanner){ return scanner?scanner->pre_x_offset:0; } int synctex_scanner_pre_y_offset(synctex_scanner_t scanner){ return scanner?scanner->pre_y_offset:0; } int synctex_scanner_x_offset(synctex_scanner_t scanner){ return scanner?scanner->x_offset:0; } int synctex_scanner_y_offset(synctex_scanner_t scanner){ return scanner?scanner->y_offset:0; } float synctex_scanner_magnification(synctex_scanner_t scanner){ return scanner?scanner->unit:1; } void synctex_scanner_display(synctex_scanner_t scanner) { if (NULL == scanner) { return; } printf("The scanner:\noutput:%s\noutput_fmt:%s\nversion:%i\n",scanner->output,scanner->output_fmt,scanner->version); printf("pre_unit:%i\nx_offset:%i\ny_offset:%i\n",scanner->pre_unit,scanner->pre_x_offset,scanner->pre_y_offset); printf("count:%i\npost_magnification:%f\npost_x_offset:%f\npost_y_offset:%f\n", scanner->count,scanner->unit,scanner->x_offset,scanner->y_offset); printf("The input:\n"); SYNCTEX_DISPLAY(scanner->input); if (scanner->count<1000) { printf("The sheets:\n"); SYNCTEX_DISPLAY(scanner->sheet); printf("The friends:\n"); if (scanner->lists_of_friends) { int i = scanner->number_of_lists; synctex_node_t node; while(i--) { printf("Friend index:%i\n",i); node = (scanner->lists_of_friends)[i]; while(node) { printf("%s:%i,%i\n", synctex_node_isa(node), SYNCTEX_TAG(node), SYNCTEX_LINE(node) ); node = SYNCTEX_FRIEND(node); } } } } else { printf("SyncTeX Warning: Too many objects\n"); } } /* Public*/ const char * synctex_scanner_get_name(synctex_scanner_t scanner,int tag) { synctex_node_t input = NULL; if (NULL == scanner) { return NULL; } input = scanner->input; do { if (tag == SYNCTEX_TAG(input)) { return (SYNCTEX_NAME(input)); } } while((input = SYNCTEX_SIBLING(input)) != NULL); return NULL; } int _synctex_scanner_get_tag(synctex_scanner_t scanner,const char * name); int _synctex_scanner_get_tag(synctex_scanner_t scanner,const char * name) { synctex_node_t input = NULL; if (NULL == scanner) { return 0; } input = scanner->input; do { if (_synctex_is_equivalent_file_name(name,(SYNCTEX_NAME(input)))) { return SYNCTEX_TAG(input); } } while((input = SYNCTEX_SIBLING(input)) != NULL); // 2011 version name = _synctex_base_name(name); input = scanner->input; do { if (_synctex_is_equivalent_file_name(name,_synctex_base_name(SYNCTEX_NAME(input)))) { synctex_node_t other_input = input; while((other_input = SYNCTEX_SIBLING(other_input)) != NULL) { if (_synctex_is_equivalent_file_name(name,_synctex_base_name(SYNCTEX_NAME(other_input))) && (strlen(SYNCTEX_NAME(input))!=strlen(SYNCTEX_NAME(other_input)) || strncmp(SYNCTEX_NAME(other_input),SYNCTEX_NAME(input),strlen(SYNCTEX_NAME(input))))) { // There is a second possible candidate return 0; } } return SYNCTEX_TAG(input); } } while((input = SYNCTEX_SIBLING(input)) != NULL); return 0; } int synctex_scanner_get_tag(synctex_scanner_t scanner,const char * name) { size_t char_index = strlen(name); if ((scanner = synctex_scanner_parse(scanner)) && (0 < char_index)) { /* the name is not void */ char_index -= 1; if (!SYNCTEX_IS_PATH_SEPARATOR(name[char_index])) { /* the last character of name is not a path separator */ int result = _synctex_scanner_get_tag(scanner,name); if (result) { return result; } else { /* the given name was not the one known by TeX * try a name relative to the enclosing directory of the scanner->output file */ const char * relative = name; const char * ptr = scanner->output; while((strlen(relative) > 0) && (strlen(ptr) > 0) && (*relative == *ptr)) { relative += 1; ptr += 1; } /* Find the last path separator before relative */ while(relative > name) { if (SYNCTEX_IS_PATH_SEPARATOR(*(relative-1))) { break; } relative -= 1; } if ((relative > name) && (result = _synctex_scanner_get_tag(scanner,relative))) { return result; } if (SYNCTEX_IS_PATH_SEPARATOR(name[0])) { /* No tag found for the given absolute name, * Try each relative path starting from the shortest one */ while(0input:NULL; } const char * synctex_scanner_get_output_fmt(synctex_scanner_t scanner) { return NULL != scanner && scanner->output_fmt?scanner->output_fmt:""; } const char * synctex_scanner_get_output(synctex_scanner_t scanner) { return NULL != scanner && scanner->output?scanner->output:""; } const char * synctex_scanner_get_synctex(synctex_scanner_t scanner) { return NULL != scanner && scanner->synctex?scanner->synctex:""; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Public node attributes # endif int synctex_node_h(synctex_node_t node){ if (!node) { return 0; } return SYNCTEX_HORIZ(node); } int synctex_node_v(synctex_node_t node){ if (!node) { return 0; } return SYNCTEX_VERT(node); } int synctex_node_width(synctex_node_t node){ if (!node) { return 0; } return SYNCTEX_WIDTH(node); } int synctex_node_box_h(synctex_node_t node){ if (!node) { return 0; } if (SYNCTEX_IS_BOX(node)) { result: return SYNCTEX_HORIZ(node); } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } int synctex_node_box_v(synctex_node_t node){ if (!node) { return 0; } if (SYNCTEX_IS_BOX(node)) { result: return SYNCTEX_VERT(node); } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } int synctex_node_box_width(synctex_node_t node){ if (!node) { return 0; } if (SYNCTEX_IS_BOX(node)) { result: return SYNCTEX_WIDTH(node); } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } int synctex_node_box_height(synctex_node_t node){ if (!node) { return 0; } if (SYNCTEX_IS_BOX(node)) { result: return SYNCTEX_HEIGHT(node); } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } int synctex_node_box_depth(synctex_node_t node){ if (!node) { return 0; } if (SYNCTEX_IS_BOX(node)) { result: return SYNCTEX_DEPTH(node); } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Public node visible attributes # endif float synctex_node_visible_h(synctex_node_t node){ if (!node) { return 0; } return SYNCTEX_HORIZ(node)*node->class->scanner->unit+node->class->scanner->x_offset; } float synctex_node_visible_v(synctex_node_t node){ if (!node) { return 0; } return SYNCTEX_VERT(node)*node->class->scanner->unit+node->class->scanner->y_offset; } float synctex_node_visible_width(synctex_node_t node){ if (!node) { return 0; } return SYNCTEX_WIDTH(node)*node->class->scanner->unit; } float synctex_node_box_visible_h(synctex_node_t node){ if (!node) { return 0; } switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: return SYNCTEX_HORIZ(node)*node->class->scanner->unit+node->class->scanner->x_offset; case synctex_node_type_hbox: result: return SYNCTEX_HORIZ_V(node)*node->class->scanner->unit+node->class->scanner->x_offset; } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } float synctex_node_box_visible_v(synctex_node_t node){ if (!node) { return 0; } switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: return SYNCTEX_VERT(node)*node->class->scanner->unit+node->class->scanner->y_offset; case synctex_node_type_hbox: result: return SYNCTEX_VERT_V(node)*node->class->scanner->unit+node->class->scanner->y_offset; } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } float synctex_node_box_visible_width(synctex_node_t node){ if (!node) { return 0; } switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: return SYNCTEX_WIDTH(node)*node->class->scanner->unit; case synctex_node_type_hbox: result: return SYNCTEX_WIDTH_V(node)*node->class->scanner->unit; } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } float synctex_node_box_visible_height(synctex_node_t node){ if (!node) { return 0; } switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: return SYNCTEX_HEIGHT(node)*node->class->scanner->unit; case synctex_node_type_hbox: result: return SYNCTEX_HEIGHT_V(node)*node->class->scanner->unit; } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } float synctex_node_box_visible_depth(synctex_node_t node){ if (!node) { return 0; } switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: return SYNCTEX_DEPTH(node)*node->class->scanner->unit; case synctex_node_type_hbox: result: return SYNCTEX_DEPTH_V(node)*node->class->scanner->unit; } if ((node = SYNCTEX_PARENT(node)) && (node->class->type != synctex_node_type_sheet)) { goto result; } return 0; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Other public node attributes # endif int synctex_node_page(synctex_node_t node){ synctex_node_t parent = NULL; if (!node) { return -1; } parent = SYNCTEX_PARENT(node); while(parent) { node = parent; parent = SYNCTEX_PARENT(node); } if (node->class->type == synctex_node_type_sheet) { return SYNCTEX_PAGE(node); } return -1; } synctex_charindex_t synctex_node_charindex(synctex_node_t node) { return node?SYNCTEX_CHARINDEX(node):0; } int synctex_node_tag(synctex_node_t node) { return node?SYNCTEX_TAG(node):-1; } int synctex_node_line(synctex_node_t node) { return node?SYNCTEX_LINE(node):-1; } int synctex_node_mean_line(synctex_node_t node) { return node?(node->class->type==synctex_node_type_hbox?SYNCTEX_MEAN_LINE(node):SYNCTEX_LINE(node)):-1; } int synctex_node_child_count(synctex_node_t node) { return node?(node->class->type==synctex_node_type_hbox?SYNCTEX_NODE_WEIGHT(node):0):-1; } int synctex_node_column(synctex_node_t node) { # ifdef __DARWIN_UNIX03 # pragma unused(node) # endif return -1; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Sheet # endif synctex_node_t synctex_sheet(synctex_scanner_t scanner,int page) { if (scanner) { synctex_node_t sheet = scanner->sheet; while(sheet) { if (page == SYNCTEX_PAGE(sheet)) { return sheet; } sheet = SYNCTEX_SIBLING(sheet); } } return NULL; } synctex_node_t synctex_sheet_content(synctex_scanner_t scanner,int page) { if (scanner) { return SYNCTEX_CHILD(synctex_sheet(scanner,page)); } return NULL; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Query # endif int synctex_display_query(synctex_scanner_t scanner,const char * name,int line,int column) { # ifdef __DARWIN_UNIX03 # pragma unused(column) # endif int tag = synctex_scanner_get_tag(scanner,name); size_t size = 0; int friend_index = 0; int max_line = 0; synctex_node_t node = NULL; if (tag == 0) { printf("SyncTeX Warning: No tag for %s\n",name); return -1; } free(SYNCTEX_START); SYNCTEX_CUR = SYNCTEX_END = SYNCTEX_START = NULL; max_line = line < INT_MAX-scanner->number_of_lists ? line+scanner->number_of_lists:INT_MAX; while(linenumber_of_lists); if ((node = (scanner->lists_of_friends)[friend_index])) { do { if ((synctex_node_type(node)>=synctex_node_type_boundary) && (tag == SYNCTEX_TAG(node)) && (line == SYNCTEX_LINE(node))) { if (SYNCTEX_CUR == SYNCTEX_END) { size += 16; SYNCTEX_END = realloc(SYNCTEX_START,size*sizeof(synctex_node_t *)); SYNCTEX_CUR += SYNCTEX_END - SYNCTEX_START; SYNCTEX_START = SYNCTEX_END; SYNCTEX_END = SYNCTEX_START + size*sizeof(synctex_node_t *); } *(synctex_node_t *)SYNCTEX_CUR = node; SYNCTEX_CUR += sizeof(synctex_node_t); } } while ((node = SYNCTEX_FRIEND(node))); if (SYNCTEX_START == NULL) { /* We did not find any matching boundary, retry with glue or kern */ node = (scanner->lists_of_friends)[friend_index];/* no need to test it again, already done */ do { if ((synctex_node_type(node)>=synctex_node_type_kern) && (tag == SYNCTEX_TAG(node)) && (line == SYNCTEX_LINE(node))) { if (SYNCTEX_CUR == SYNCTEX_END) { size += 16; SYNCTEX_END = realloc(SYNCTEX_START,size*sizeof(synctex_node_t *)); SYNCTEX_CUR += SYNCTEX_END - SYNCTEX_START; SYNCTEX_START = SYNCTEX_END; SYNCTEX_END = SYNCTEX_START + size*sizeof(synctex_node_t *); } *(synctex_node_t *)SYNCTEX_CUR = node; SYNCTEX_CUR += sizeof(synctex_node_t); } } while ((node = SYNCTEX_FRIEND(node))); if (SYNCTEX_START == NULL) { /* We did not find any matching glue or kern, retry with boxes */ node = (scanner->lists_of_friends)[friend_index];/* no need to test it again, already done */ do { if ((tag == SYNCTEX_TAG(node)) && (line == SYNCTEX_LINE(node))) { if (SYNCTEX_CUR == SYNCTEX_END) { size += 16; SYNCTEX_END = realloc(SYNCTEX_START,size*sizeof(synctex_node_t *)); SYNCTEX_CUR += SYNCTEX_END - SYNCTEX_START; SYNCTEX_START = SYNCTEX_END; SYNCTEX_END = SYNCTEX_START + size*sizeof(synctex_node_t *); } *(synctex_node_t *)SYNCTEX_CUR = node; SYNCTEX_CUR += sizeof(synctex_node_t); } } while((node = SYNCTEX_FRIEND(node))); } } SYNCTEX_END = SYNCTEX_CUR; /* Now reverse the order to have nodes in display order, and then keep just a few nodes. * Order first the best node. */ if ((SYNCTEX_START) && (SYNCTEX_END)) { unsigned int best_match = -1; unsigned int next_match = -1; unsigned int best_weight = 0; synctex_node_t * best_ref = NULL; synctex_node_t * start_ref = (synctex_node_t *)SYNCTEX_START; synctex_node_t * end_ref = (synctex_node_t *)SYNCTEX_END; --end_ref; while (start_ref < end_ref) { node = *start_ref; *start_ref = *end_ref; *end_ref = node; ++start_ref; --end_ref; } /* Now reorder the nodes to put first the one which fits best. * The idea is to walk along the list of nodes and pick up the first one * which line info is exactly the mean line of its parent, or at least very close. * Then we choose among all such node the one with the maximum number of child nodes. * Then we switch with the first node. */ best_ref = start_ref = (synctex_node_t *)SYNCTEX_START; node = *start_ref; best_match = abs(SYNCTEX_LINE(node)-SYNCTEX_MEAN_LINE(SYNCTEX_PARENT(node))); end_ref = (synctex_node_t *)SYNCTEX_END; while (++start_refbest_weight)) { best_match = next_match; best_ref = start_ref; best_weight = SYNCTEX_NODE_WEIGHT(parent); } } node = *best_ref; *best_ref = *(synctex_node_t *)SYNCTEX_START; *(synctex_node_t *)SYNCTEX_START = node; /* Basically, we keep the first node for each parent. * More precisely, we keep only nodes that are not children of * their predecessor's parent. */ start_ref = (synctex_node_t *)SYNCTEX_START; end_ref = (synctex_node_t *)SYNCTEX_START; next_end: end_ref += 1; /* we allways have start_ref<= end_ref*/ if (end_ref < (synctex_node_t *)SYNCTEX_END) { node = *end_ref; while ((node = SYNCTEX_PARENT(node))) { if (SYNCTEX_PARENT(*start_ref) == node) { goto next_end; } } start_ref += 1; *start_ref = *end_ref; goto next_end; } start_ref += 1; SYNCTEX_END = (char *)start_ref; SYNCTEX_CUR = NULL;// added on behalf of Jose Alliste return (SYNCTEX_END-SYNCTEX_START)/sizeof(synctex_node_t);// added on behalf Jan Sundermeyer } SYNCTEX_CUR = NULL; // return (SYNCTEX_END-SYNCTEX_START)/sizeof(synctex_node_t); removed on behalf Jan Sundermeyer } # if defined(__SYNCTEX_STRONG_DISPLAY_QUERY__) break; # else ++line; # endif } return 0; } synctex_node_t synctex_next_result(synctex_scanner_t scanner) { if (NULL == SYNCTEX_CUR) { SYNCTEX_CUR = SYNCTEX_START; } else { SYNCTEX_CUR+=sizeof(synctex_node_t); } if (SYNCTEX_CUR= scanner->unit) {/* scanner->unit must be >0 */ return 0; } /* Convert the given point to scanner integer coordinates */ hitPoint.h = (h-scanner->x_offset)/scanner->unit; hitPoint.v = (v-scanner->y_offset)/scanner->unit; /* We will store in the scanner's buffer the result of the query. */ free(SYNCTEX_START); SYNCTEX_START = SYNCTEX_END = SYNCTEX_CUR = NULL; /* Find the proper sheet */ sheet = scanner->sheet; while((sheet) && SYNCTEX_PAGE(sheet) != page) { sheet = SYNCTEX_SIBLING(sheet); } if (NULL == sheet) { return -1; } /* Now sheet points to the sheet node with proper page number */ /* Here is how we work: * At first we do not consider the visible box dimensions. This will cover the most frequent cases. * Then we try with the visible box dimensions. * We try to find a non void box containing the hit point. * We browse all the horizontal boxes until we find one containing the hit point. */ if ((node = SYNCTEX_NEXT_hbox(sheet))) { do { if (_synctex_point_in_box(hitPoint,node,synctex_YES)) { /* Maybe the hitPoint belongs to a contained vertical box. */ end: /* This trick is for catching overlapping boxes */ if ((other_node = SYNCTEX_NEXT_hbox(node))) { do { if (_synctex_point_in_box(hitPoint,other_node,synctex_YES)) { node = _synctex_smallest_container(other_node,node); } } while((other_node = SYNCTEX_NEXT_hbox(other_node))); } /* node is the smallest horizontal box that contains hitPoint. */ if ((bestContainer = _synctex_eq_deepest_container(hitPoint,node,synctex_YES))) { node = bestContainer; } _synctex_eq_get_closest_children_in_box(hitPoint,node,&bestNodes,&bestDistances,synctex_YES); if (bestNodes.right && bestNodes.left) { if ((SYNCTEX_TAG(bestNodes.right)!=SYNCTEX_TAG(bestNodes.left)) || (SYNCTEX_LINE(bestNodes.right)!=SYNCTEX_LINE(bestNodes.left)) || (SYNCTEX_COLUMN(bestNodes.right)!=SYNCTEX_COLUMN(bestNodes.left))) { if ((SYNCTEX_START = malloc(2*sizeof(synctex_node_t)))) { if (bestDistances.left>bestDistances.right) { ((synctex_node_t *)SYNCTEX_START)[0] = bestNodes.right; ((synctex_node_t *)SYNCTEX_START)[1] = bestNodes.left; } else { ((synctex_node_t *)SYNCTEX_START)[0] = bestNodes.left; ((synctex_node_t *)SYNCTEX_START)[1] = bestNodes.right; } SYNCTEX_END = SYNCTEX_START + 2*sizeof(synctex_node_t); SYNCTEX_CUR = NULL; return (SYNCTEX_END-SYNCTEX_START)/sizeof(synctex_node_t); } return SYNCTEX_STATUS_ERROR; } /* both nodes have the same input coordinates * We choose the one closest to the hit point */ if (bestDistances.left>bestDistances.right) { bestNodes.left = bestNodes.right; } bestNodes.right = NULL; } else if (bestNodes.right) { bestNodes.left = bestNodes.right; } else if (!bestNodes.left){ bestNodes.left = node; } if ((SYNCTEX_START = malloc(sizeof(synctex_node_t)))) { * (synctex_node_t *)SYNCTEX_START = bestNodes.left; SYNCTEX_END = SYNCTEX_START + sizeof(synctex_node_t); SYNCTEX_CUR = NULL; return (SYNCTEX_END-SYNCTEX_START)/sizeof(synctex_node_t); } return SYNCTEX_STATUS_ERROR; } } while ((node = SYNCTEX_NEXT_hbox(node))); /* All the horizontal boxes have been tested, * None of them contains the hit point. */ } /* We are not lucky */ if ((node = SYNCTEX_CHILD(sheet))) { goto end; } return 0; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Utilities # endif int _synctex_bail(void) { _synctex_error("SyncTeX ERROR\n"); return -1; } /* Rougly speaking, this is: * node's h coordinate - hitPoint's h coordinate. * If node is to the right of the hit point, then this distance is positive, * if node is to the left of the hit point, this distance is negative.*/ int _synctex_point_h_distance(synctex_point_t hitPoint, synctex_node_t node, synctex_bool_t visible); int _synctex_point_h_distance(synctex_point_t hitPoint, synctex_node_t node, synctex_bool_t visible) { if (node) { int min,med,max; switch(node->class->type) { /* The distance between a point and a box is special. * It is not the euclidian distance, nor something similar. * We have to take into account the particular layout, * and the box hierarchy. * Given a box, there are 9 regions delimited by the lines of the edges of the box. * The origin being at the top left corner of the page, * we also give names to the vertices of the box. * * 1 | 2 | 3 * ---A---B---> * 4 | 5 | 6 * ---C---D---> * 7 | 8 | 9 * v v */ case synctex_node_type_hbox: /* getting the box bounds, taking into account negative width, height and depth. */ min = visible?SYNCTEX_HORIZ_V(node):SYNCTEX_HORIZ(node); max = min + (visible?SYNCTEX_ABS_WIDTH_V(node):SYNCTEX_ABS_WIDTH(node)); /* We allways have min <= max */ if (hitPoint.h 0 */ } else if (hitPoint.h>max) { return max - hitPoint.h; /* regions 3+6+9, result is < 0 */ } else { return 0; /* regions 2+5+8, inside the box, except for vertical coordinates */ } break; case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: /* getting the box bounds, taking into account negative width, height and depth. * For these boxes, no visible dimension available */ min = SYNCTEX_HORIZ(node); max = min + SYNCTEX_ABS_WIDTH(node); /* We allways have min <= max */ if (hitPoint.h 0 */ } else if (hitPoint.h>max) { return max - hitPoint.h; /* regions 3+6+9, result is < 0 */ } else { return 0; /* regions 2+5+8, inside the box, except for vertical coordinates */ } break; case synctex_node_type_kern: /* IMPORTANT NOTICE: the location of the kern is recorded AFTER the move. * The distance to the kern is very special, * in general, there is no text material in the kern, * this is why we compute the offset relative to the closest edge of the kern.*/ max = SYNCTEX_WIDTH(node); if (max<0) { min = SYNCTEX_HORIZ(node); max = min - max; } else { min = -max; max = SYNCTEX_HORIZ(node); min += max; } med = (min+max)/2; /* positive kern: '.' means text, '>' means kern offset * ............. * min>>>>med>>>>max * ............... * negative kern: '.' means text, '<' means kern offset * ............................ * min<<<max) { return max - hitPoint.h - 1; /* same kind of penalty */ } else if (hitPoint.h>med) { /* do things like if the node had 0 width and was placed at the max edge + 1*/ return max - hitPoint.h + 1; /* positive, the kern is to the right of the hitPoint */ } else { return min - hitPoint.h - 1; /* negative, the kern is to the left of the hitPoint */ } case synctex_node_type_glue: case synctex_node_type_math: return SYNCTEX_HORIZ(node) - hitPoint.h; } } return INT_MAX;/* We always assume that the node is faraway to the right*/ } /* Rougly speaking, this is: * node's v coordinate - hitPoint's v coordinate. * If node is at the top of the hit point, then this distance is positive, * if node is at the bottom of the hit point, this distance is negative.*/ int _synctex_point_v_distance(synctex_point_t hitPoint, synctex_node_t node,synctex_bool_t visible); int _synctex_point_v_distance(synctex_point_t hitPoint, synctex_node_t node,synctex_bool_t visible) { # ifdef __DARWIN_UNIX03 # pragma unused(visible) # endif if (node) { int min,max; switch(node->class->type) { /* The distance between a point and a box is special. * It is not the euclidian distance, nor something similar. * We have to take into account the particular layout, * and the box hierarchy. * Given a box, there are 9 regions delimited by the lines of the edges of the box. * The origin being at the top left corner of the page, * we also give names to the vertices of the box. * * 1 | 2 | 3 * ---A---B---> * 4 | 5 | 6 * ---C---D---> * 7 | 8 | 9 * v v */ case synctex_node_type_hbox: /* getting the box bounds, taking into account negative width, height and depth. */ min = SYNCTEX_VERT_V(node); max = min + SYNCTEX_ABS_DEPTH_V(node); min -= SYNCTEX_ABS_HEIGHT_V(node); /* We allways have min <= max */ if (hitPoint.v 0 */ } else if (hitPoint.v>max) { return max - hitPoint.v; /* regions 7+8+9, result is < 0 */ } else { return 0; /* regions 4.5.6, inside the box, except for horizontal coordinates */ } break; case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_void_hbox: /* getting the box bounds, taking into account negative width, height and depth. */ min = SYNCTEX_VERT(node); max = min + SYNCTEX_ABS_DEPTH(node); min -= SYNCTEX_ABS_HEIGHT(node); /* We allways have min <= max */ if (hitPoint.v 0 */ } else if (hitPoint.v>max) { return max - hitPoint.v; /* regions 7+8+9, result is < 0 */ } else { return 0; /* regions 4.5.6, inside the box, except for horizontal coordinates */ } break; case synctex_node_type_kern: case synctex_node_type_glue: case synctex_node_type_math: return SYNCTEX_VERT(node) - hitPoint.v; } } return INT_MAX;/* We always assume that the node is faraway to the top*/ } SYNCTEX_INLINE static synctex_node_t _synctex_smallest_container(synctex_node_t node, synctex_node_t other_node) { float height, other_height; if (SYNCTEX_ABS_WIDTH(node)SYNCTEX_ABS_WIDTH(other_node)) { return other_node; } height = SYNCTEX_ABS_DEPTH(node) + SYNCTEX_ABS_HEIGHT(node); other_height = SYNCTEX_ABS_DEPTH(other_node) + SYNCTEX_ABS_HEIGHT(other_node); if (heightother_height) { return other_node; } return node; } synctex_bool_t _synctex_point_in_box(synctex_point_t hitPoint, synctex_node_t node, synctex_bool_t visible) { if (node) { if (0 == _synctex_point_h_distance(hitPoint,node,visible) && 0 == _synctex_point_v_distance(hitPoint,node,visible)) { return synctex_YES; } } return synctex_NO; } int _synctex_node_distance_to_point(synctex_point_t hitPoint, synctex_node_t node, synctex_bool_t visible) { # ifdef __DARWIN_UNIX03 # pragma unused(visible) # endif int result = INT_MAX; /* when the distance is meaning less (sheet, input...) */ if (node) { int minH,maxH,minV,maxV; switch(node->class->type) { /* The distance between a point and a box is special. * It is not the euclidian distance, nor something similar. * We have to take into account the particular layout, * and the box hierarchy. * Given a box, there are 9 regions delimited by the lines of the edges of the box. * The origin being at the top left corner of the page, * we also give names to the vertices of the box. * * 1 | 2 | 3 * ---A---B---> * 4 | 5 | 6 * ---C---D---> * 7 | 8 | 9 * v v * In each region, there is a different formula. * In the end we have a continuous distance which may not be a mathematical distance but who cares. */ case synctex_node_type_vbox: case synctex_node_type_void_vbox: case synctex_node_type_hbox: case synctex_node_type_void_hbox: /* getting the box bounds, taking into account negative widths. */ minH = SYNCTEX_HORIZ(node); maxH = minH + SYNCTEX_ABS_WIDTH(node); minV = SYNCTEX_VERT(node); maxV = minV + SYNCTEX_ABS_DEPTH(node); minV -= SYNCTEX_ABS_HEIGHT(node); /* In what region is the point hitPoint=(H,V) ? */ if (hitPoint.vminV) { result = hitPoint.v - minV + minH - hitPoint.h; } else { result = minV - hitPoint.v + minH - hitPoint.h; } } else if (hitPoint.h>maxH) { if (hitPoint.v>minV) { result = hitPoint.v - minV + hitPoint.h - maxH; } else { result = minV - hitPoint.v + hitPoint.h - maxH; } } else if (hitPoint.v>minV) { result = hitPoint.v - minV; } else { result = minV - hitPoint.v; } break; case synctex_node_type_glue: case synctex_node_type_math: minH = SYNCTEX_HORIZ(node); minV = SYNCTEX_VERT(node); if (hitPoint.hminV) { result = hitPoint.v - minV + minH - hitPoint.h; } else { result = minV - hitPoint.v + minH - hitPoint.h; } } else if (hitPoint.v>minV) { result = hitPoint.v - minV + hitPoint.h - minH; } else { result = minV - hitPoint.v + hitPoint.h - minH; } break; } } return result; } static synctex_node_t _synctex_eq_deepest_container(synctex_point_t hitPoint,synctex_node_t node, synctex_bool_t visible) { if (node) { synctex_node_t result = NULL; synctex_node_t child = NULL; switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_hbox: /* test the deep nodes first */ if ((child = SYNCTEX_CHILD(node))) { do { if ((result = _synctex_eq_deepest_container(hitPoint,child,visible))) { return result; } } while((child = SYNCTEX_SIBLING(child))); } /* is the hit point inside the box? */ if (_synctex_point_in_box(hitPoint,node,visible)) { /* for vboxes we try to use some node inside. * Walk through the list of siblings until we find the closest one. * Only consider siblings with children. */ if ((node->class->type == synctex_node_type_vbox) && (child = SYNCTEX_CHILD(node))) { int bestDistance = INT_MAX; do { if (SYNCTEX_CHILD(child)) { int distance = _synctex_node_distance_to_point(hitPoint,child,visible); if (distance < bestDistance) { bestDistance = distance; node = child; } } } while((child = SYNCTEX_SIBLING(child))); } return node; } } } return NULL; } /* Compares the locations of the hitPoint with the locations of the various nodes contained in the box. * As it is an horizontal box, we only compare horizontal coordinates. */ SYNCTEX_INLINE static int __synctex_eq_get_closest_children_in_hbox(synctex_point_t hitPoint, synctex_node_t node, synctex_node_set_t* bestNodesRef,synctex_distances_t* bestDistancesRef, synctex_bool_t visible); SYNCTEX_INLINE static int __synctex_eq_get_closest_children_in_hbox(synctex_point_t hitPoint, synctex_node_t node, synctex_node_set_t* bestNodesRef,synctex_distances_t* bestDistancesRef, synctex_bool_t visible) { int result = 0; if ((node = SYNCTEX_CHILD(node))) { do { int off7 = _synctex_point_h_distance(hitPoint,node,visible); if (off7 > 0) { /* node is to the right of the hit point. * We compare node and the previously recorded one, through the recorded distance. * If the nodes have the same tag, prefer the one with the smallest line number, * if the nodes also have the same line number, prefer the one with the smallest column. */ if (bestDistancesRef->right > off7) { bestDistancesRef->right = off7; bestNodesRef->right = node; result |= SYNCTEX_MASK_RIGHT; } else if (bestDistancesRef->right == off7 && bestNodesRef->right) { if (SYNCTEX_TAG(bestNodesRef->right) == SYNCTEX_TAG(node) && (SYNCTEX_LINE(bestNodesRef->right) > SYNCTEX_LINE(node) || (SYNCTEX_LINE(bestNodesRef->right) == SYNCTEX_LINE(node) && SYNCTEX_COLUMN(bestNodesRef->right) > SYNCTEX_COLUMN(node)))) { bestNodesRef->right = node; result |= SYNCTEX_MASK_RIGHT; } } } else if (off7 == 0) { /* hitPoint is inside node. */ bestDistancesRef->left = bestDistancesRef->right = 0; bestNodesRef->left = node; bestNodesRef->right = NULL; result |= SYNCTEX_MASK_LEFT; } else { /* here off7 < 0, hitPoint is to the right of node */ off7 = -off7; if (bestDistancesRef->left > off7) { bestDistancesRef->left = off7; bestNodesRef->left = node; result |= SYNCTEX_MASK_LEFT; } else if (bestDistancesRef->left == off7 && bestNodesRef->left) { if (SYNCTEX_TAG(bestNodesRef->left) == SYNCTEX_TAG(node) && (SYNCTEX_LINE(bestNodesRef->left) > SYNCTEX_LINE(node) || (SYNCTEX_LINE(bestNodesRef->left) == SYNCTEX_LINE(node) && SYNCTEX_COLUMN(bestNodesRef->left) > SYNCTEX_COLUMN(node)))) { bestNodesRef->left = node; result |= SYNCTEX_MASK_LEFT; } } } } while((node = SYNCTEX_SIBLING(node))); if (result & SYNCTEX_MASK_LEFT) { /* the left node is new, try to narrow the result */ if ((node = _synctex_eq_deepest_container(hitPoint,bestNodesRef->left,visible))) { bestNodesRef->left = node; } if ((node = _synctex_eq_closest_child(hitPoint,bestNodesRef->left,visible))) { bestNodesRef->left = node; } } if (result & SYNCTEX_MASK_RIGHT) { /* the right node is new, try to narrow the result */ if ((node = _synctex_eq_deepest_container(hitPoint,bestNodesRef->right,visible))) { bestNodesRef->right = node; } if ((node = _synctex_eq_closest_child(hitPoint,bestNodesRef->right,visible))) { bestNodesRef->right = node; } } } return result; } SYNCTEX_INLINE static int __synctex_eq_get_closest_children_in_vbox(synctex_point_t hitPoint, synctex_node_t node, synctex_node_set_t* bestNodesRef,synctex_distances_t* bestDistancesRef,synctex_bool_t visible); SYNCTEX_INLINE static int __synctex_eq_get_closest_children_in_vbox(synctex_point_t hitPoint, synctex_node_t node, synctex_node_set_t* bestNodesRef,synctex_distances_t* bestDistancesRef,synctex_bool_t visible) { int result = 0; if ((node = SYNCTEX_CHILD(node))) { do { int off7 = _synctex_point_v_distance(hitPoint,node,visible);/* this is what makes the difference with the h version above */ if (off7 > 0) { /* node is to the top of the hit point (below because TeX is oriented from top to bottom. * We compare node and the previously recorded one, through the recorded distance. * If the nodes have the same tag, prefer the one with the smallest line number, * if the nodes also have the same line number, prefer the one with the smallest column. */ if (bestDistancesRef->right > off7) { bestDistancesRef->right = off7; bestNodesRef->right = node; result |= SYNCTEX_MASK_RIGHT; } else if (bestDistancesRef->right == off7 && bestNodesRef->right) { if (SYNCTEX_TAG(bestNodesRef->right) == SYNCTEX_TAG(node) && (SYNCTEX_LINE(bestNodesRef->right) > SYNCTEX_LINE(node) || (SYNCTEX_LINE(bestNodesRef->right) == SYNCTEX_LINE(node) && SYNCTEX_COLUMN(bestNodesRef->right) > SYNCTEX_COLUMN(node)))) { bestNodesRef->right = node; result |= SYNCTEX_MASK_RIGHT; } } } else if (off7 == 0) { bestDistancesRef->left = bestDistancesRef->right = 0; bestNodesRef->left = node; bestNodesRef->right = NULL; result |= SYNCTEX_MASK_LEFT; } else { /* here off7 < 0 */ off7 = -off7; if (bestDistancesRef->left > off7) { bestDistancesRef->left = off7; bestNodesRef->left = node; result |= SYNCTEX_MASK_LEFT; } else if (bestDistancesRef->left == off7 && bestNodesRef->left) { if (SYNCTEX_TAG(bestNodesRef->left) == SYNCTEX_TAG(node) && (SYNCTEX_LINE(bestNodesRef->left) > SYNCTEX_LINE(node) || (SYNCTEX_LINE(bestNodesRef->left) == SYNCTEX_LINE(node) && SYNCTEX_COLUMN(bestNodesRef->left) > SYNCTEX_COLUMN(node)))) { bestNodesRef->left = node; result |= SYNCTEX_MASK_LEFT; } } } } while((node = SYNCTEX_SIBLING(node))); if (result & SYNCTEX_MASK_LEFT) { /* the left node is new, try to narrow the result */ if ((node = _synctex_eq_deepest_container(hitPoint,bestNodesRef->left,visible))) { bestNodesRef->left = node; } if ((node = _synctex_eq_closest_child(hitPoint,bestNodesRef->left,visible))) { bestNodesRef->left = node; } } if (result & SYNCTEX_MASK_RIGHT) { /* the right node is new, try to narrow the result */ if ((node = _synctex_eq_deepest_container(hitPoint,bestNodesRef->right,visible))) { bestNodesRef->right = node; } if ((node = _synctex_eq_closest_child(hitPoint,bestNodesRef->right,visible))) { bestNodesRef->right = node; } } } return result; } SYNCTEX_INLINE static int _synctex_eq_get_closest_children_in_box(synctex_point_t hitPoint, synctex_node_t node, synctex_node_set_t* bestNodesRef,synctex_distances_t* bestDistancesRef,synctex_bool_t visible) { if (node) { switch(node->class->type) { case synctex_node_type_hbox: return __synctex_eq_get_closest_children_in_hbox(hitPoint, node, bestNodesRef, bestDistancesRef,visible); case synctex_node_type_vbox: return __synctex_eq_get_closest_children_in_vbox(hitPoint, node, bestNodesRef, bestDistancesRef,visible); } } return 0; } SYNCTEX_INLINE static synctex_node_t __synctex_eq_closest_child(synctex_point_t hitPoint, synctex_node_t node,int* distanceRef, synctex_bool_t visible); SYNCTEX_INLINE static synctex_node_t __synctex_eq_closest_child(synctex_point_t hitPoint, synctex_node_t node,int* distanceRef, synctex_bool_t visible) { synctex_node_t best_node = NULL; if ((node = SYNCTEX_CHILD(node))) { do { int distance = _synctex_node_distance_to_point(hitPoint,node,visible); synctex_node_t candidate = NULL; if (distance<=*distanceRef) { *distanceRef = distance; best_node = node; } switch(node->class->type) { case synctex_node_type_vbox: case synctex_node_type_hbox: if ((candidate = __synctex_eq_closest_child(hitPoint,node,distanceRef,visible))) { best_node = candidate; } } } while((node = SYNCTEX_SIBLING(node))); } return best_node; } SYNCTEX_INLINE static synctex_node_t _synctex_eq_closest_child(synctex_point_t hitPoint,synctex_node_t node, synctex_bool_t visible) { if (node) { switch(node->class->type) { case synctex_node_type_hbox: case synctex_node_type_vbox: { int best_distance = INT_MAX; synctex_node_t best_node = __synctex_eq_closest_child(hitPoint,node,&best_distance,visible); if ((best_node)) { synctex_node_t child = NULL; switch(best_node->class->type) { case synctex_node_type_vbox: case synctex_node_type_hbox: if ((child = SYNCTEX_CHILD(best_node))) { best_distance = _synctex_node_distance_to_point(hitPoint,child,visible); while((child = SYNCTEX_SIBLING(child))) { int distance = _synctex_node_distance_to_point(hitPoint,child,visible); if (distance<=best_distance) { best_distance = distance; best_node = child; } } } } } return best_node; } } } return NULL; } # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Updater # endif typedef int (*synctex_fprintf_t)(void *, const char * , ...); /* print formatted to either FILE * or gzFile */ # define SYNCTEX_BITS_PER_BYTE 8 struct __synctex_updater_t { gzFile file; /* the foo.synctex or foo.synctex.gz I/O identifier */ synctex_fprintf_t fprintf; /* either fprintf or gzprintf */ int length; /* the number of chars appended */ struct _flags { unsigned int no_gz:1; /* Whether zlib is used or not */ unsigned int reserved:SYNCTEX_BITS_PER_BYTE*sizeof(int)-1; /* Align */ } flags; }; # define SYNCTEX_FILE updater->file # define SYNCTEX_NO_GZ ((updater->flags).no_gz) # define SYNCTEX_fprintf (*(updater->fprintf)) synctex_updater_t synctex_updater_new_with_output_file(const char * output, const char * build_directory) { synctex_updater_t updater = NULL; char * synctex = NULL; synctex_io_mode_t io_mode = 0; const char * mode = NULL; /* prepare the updater, the memory is the only one dynamically allocated */ updater = (synctex_updater_t)_synctex_malloc(sizeof(synctex_updater_t)); if (NULL == updater) { _synctex_error("! synctex_updater_new_with_file: malloc problem"); return NULL; } if (_synctex_open(output,build_directory,&synctex,&SYNCTEX_FILE,synctex_ADD_QUOTES,&io_mode) && _synctex_open(output,build_directory,&synctex,&SYNCTEX_FILE,synctex_DONT_ADD_QUOTES,&io_mode)) { return_on_error: free(updater); updater = NULL; return NULL; } /* OK, the file exists, we close it and reopen it with the correct mode. * The receiver is now the owner of the "synctex" variable. */ gzclose(SYNCTEX_FILE); SYNCTEX_FILE = NULL; SYNCTEX_NO_GZ = (io_mode&synctex_io_gz_mask)?synctex_NO:synctex_YES; mode = _synctex_get_io_mode_name(io_mode|synctex_io_append_mask);/* either "a" or "ab", depending on the file extension */ if (SYNCTEX_NO_GZ) { if (NULL == (SYNCTEX_FILE = (void *)fopen(synctex,mode))) { no_write_error: _synctex_error("! synctex_updater_new_with_file: Can't append to %s",synctex); free(synctex); goto return_on_error; } updater->fprintf = (synctex_fprintf_t)(&fprintf); } else { if (NULL == (SYNCTEX_FILE = (void *)gzopen(synctex,mode))) { goto no_write_error; } updater->fprintf = (synctex_fprintf_t)(&gzprintf); } printf("SyncTeX: updating %s...",synctex); free(synctex); return updater; } void synctex_updater_append_magnification(synctex_updater_t updater, char * magnification){ if (NULL==updater) { return; } if (magnification && strlen(magnification)) { updater->length += SYNCTEX_fprintf(SYNCTEX_FILE,"Magnification:%s\n",magnification); } } void synctex_updater_append_x_offset(synctex_updater_t updater, char * x_offset){ if (NULL==updater) { return; } if (x_offset && strlen(x_offset)) { updater->length += SYNCTEX_fprintf(SYNCTEX_FILE,"X Offset:%s\n",x_offset); } } void synctex_updater_append_y_offset(synctex_updater_t updater, char * y_offset){ if (NULL==updater) { return; } if (y_offset && strlen(y_offset)) { updater->length += SYNCTEX_fprintf(SYNCTEX_FILE,"Y Offset:%s\n",y_offset); } } void synctex_updater_free(synctex_updater_t updater){ if (NULL==updater) { return; } if (updater->length>0) { SYNCTEX_fprintf(SYNCTEX_FILE,"!%i\n",updater->length); } if (SYNCTEX_NO_GZ) { fclose((FILE *)SYNCTEX_FILE); } else { gzclose((gzFile)SYNCTEX_FILE); } free(updater); printf("... done.\n"); return; } qpdfview-0.4.7/synctex/synctex_parser.h0000644000000000000000000003675112246606025016433 0ustar 00000000000000/* Copyright (c) 2008, 2009, 2010 , 2011 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 Version: 1.17 See synctex_parser_readme.txt for more details License: -------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder. Acknowledgments: ---------------- The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh, and significant help from XeTeX developer Jonathan Kew Nota Bene: ---------- If you include or use a significant part of the synctex package into a software, I would appreciate to be listed as contributor and see "SyncTeX" highlighted. Version 1 Thu Jun 19 09:39:21 UTC 2008 */ #ifndef __SYNCTEX_PARSER__ # define __SYNCTEX_PARSER__ #ifdef __cplusplus extern "C" { #endif /* synctex_node_t is the type for all synctex nodes. * The synctex file is parsed into a tree of nodes, either sheet, boxes, math nodes... */ typedef struct _synctex_node * synctex_node_t; /* The main synctex object is a scanner * Its implementation is considered private. * The basic workflow is * - create a "synctex scanner" with the contents of a file * - perform actions on that scanner like display or edit queries * - free the scanner when the work is done */ typedef struct __synctex_scanner_t _synctex_scanner_t; typedef _synctex_scanner_t * synctex_scanner_t; /* This is the designated method to create a new synctex scanner object. * output is the pdf/dvi/xdv file associated to the synctex file. * If necessary, it can be the tex file that originated the synctex file * but this might cause problems if the \jobname has a custom value. * Despite this method can accept a relative path in practice, * you should only pass a full path name. * The path should be encoded by the underlying file system, * assuming that it is based on 8 bits characters, including UTF8, * not 16 bits nor 32 bits. * The last file extension is removed and replaced by the proper extension. * Then the private method _synctex_scanner_new_with_contents_of_file is called. * NULL is returned in case of an error or non existent file. * Once you have a scanner, use the synctex_display_query and synctex_edit_query below. * The new "build_directory" argument is available since version 1.5. * It is the directory where all the auxiliary stuff is created. * Sometimes, the synctex output file and the pdf, dvi or xdv files are not created in the same directory. * This is the case in MikTeX (I will include this into TeX Live). * This directory path can be nil, it will be ignored then. * It can be either absolute or relative to the directory of the output pdf (dvi or xdv) file. * If no synctex file is found in the same directory as the output file, then we try to find one in the build directory. * Please note that this new "build_directory" is provided as a convenient argument but should not be used. * In fact, this is implempented as a work around of a bug in MikTeX where the synctex file does not follow the pdf file. * The new "parse" argument is available since version 1.5. In general, use 1. * Use 0 only if you do not want to parse the content but just check the existence. */ synctex_scanner_t synctex_scanner_new_with_output_file(const char * output, const char * build_directory, int parse); /* This is the designated method to delete a synctex scanner object. * Frees all the memory, you must call it when you are finished with the scanner. */ void synctex_scanner_free(synctex_scanner_t scanner); /* Send this message to force the scanner to parse the contents of the synctex output file. * Nothing is performed if the file was already parsed. * In each query below, this message is sent, but if you need to access information more directly, * you must be sure that the parsing did occur. * Usage: * if((my_scanner = synctex_scanner_parse(my_scanner))) { * continue with my_scanner... * } else { * there was a problem * } */ synctex_scanner_t synctex_scanner_parse(synctex_scanner_t scanner); /* The main entry points. * Given the file name, a line and a column number, synctex_display_query returns the number of nodes * satisfying the contrain. Use code like * * if(synctex_display_query(scanner,name,line,column)>0) { * synctex_node_t node; * while((node = synctex_next_result(scanner))) { * // do something with node * ... * } * } * * For example, one can * - highlight each resulting node in the output, using synctex_node_h and synctex_node_v * - highlight all the rectangles enclosing those nodes, using synctex_box_... functions * - highlight just the character using that information * * Given the page and the position in the page, synctex_edit_query returns the number of nodes * satisfying the contrain. Use code like * * if(synctex_edit_query(scanner,page,h,v)>0) { * synctex_node_t node; * while(node = synctex_next_result(scanner)) { * // do something with node * ... * } * } * * For example, one can * - highlight each resulting line in the input, * - highlight just the character using that information * * page is 1 based * h and v are coordinates in 72 dpi unit, relative to the top left corner of the page. * If you make a new query, the result of the previous one is discarded. * If one of this function returns a non positive integer, * it means that an error occurred. * * Both methods are conservative, in the sense that matching is weak. * If the exact column number is not found, there will be an answer with the whole line. * * Sumatra-PDF, Skim, iTeXMac2 and Texworks are examples of open source software that use this library. * You can browse their code for a concrete implementation. */ int synctex_display_query(synctex_scanner_t scanner,const char * name,int line,int column); int synctex_edit_query(synctex_scanner_t scanner,int page,float h,float v); synctex_node_t synctex_next_result(synctex_scanner_t scanner); /* Display all the information contained in the scanner object. * If the records are too numerous, only the first ones are displayed. * This is mainly for informatinal purpose to help developers. */ void synctex_scanner_display(synctex_scanner_t scanner); /* The x and y offset of the origin in TeX coordinates. The magnification These are used by pdf viewers that want to display the real box size. For example, getting the horizontal coordinates of a node would require synctex_node_box_h(node)*synctex_scanner_magnification(scanner)+synctex_scanner_x_offset(scanner) Getting its TeX width would simply require synctex_node_box_width(node)*synctex_scanner_magnification(scanner) but direct methods are available for that below. */ int synctex_scanner_x_offset(synctex_scanner_t scanner); int synctex_scanner_y_offset(synctex_scanner_t scanner); float synctex_scanner_magnification(synctex_scanner_t scanner); /* Managing the input file names. * Given a tag, synctex_scanner_get_name will return the corresponding file name. * Conversely, given a file name, synctex_scanner_get_tag will retur, the corresponding tag. * The file name must be the very same as understood by TeX. * For example, if you \input myDir/foo.tex, the file name is myDir/foo.tex. * No automatic path expansion is performed. * Finally, synctex_scanner_input is the first input node of the scanner. * To browse all the input node, use a loop like * * if((input_node = synctex_scanner_input(scanner))){ * do { * blah * } while((input_node=synctex_node_sibling(input_node))); * } * * The output is the name that was used to create the scanner. * The synctex is the real name of the synctex file, * it was obtained from output by setting the proper file extension. */ const char * synctex_scanner_get_name(synctex_scanner_t scanner,int tag); int synctex_scanner_get_tag(synctex_scanner_t scanner,const char * name); synctex_node_t synctex_scanner_input(synctex_scanner_t scanner); const char * synctex_scanner_get_output(synctex_scanner_t scanner); const char * synctex_scanner_get_synctex(synctex_scanner_t scanner); /* Browsing the nodes * parent, child and sibling are standard names for tree nodes. * The parent is one level higher, the child is one level deeper, * and the sibling is at the same level. * The sheet of a node is the first ancestor, it is of type sheet. * A node and its sibling have the same parent. * A node is the parent of its child. * A node is either the child of its parent, * or belongs to the sibling chain of its parent's child. * The next node is either the child, the sibling or the parent's sibling, * unless the parent is a sheet. * This allows to navigate through all the nodes of a given sheet node: * * synctex_node_t node = sheet; * while((node = synctex_node_next(node))) { * // do something with node * } * * With synctex_sheet_content, you can retrieve the sheet node given the page. * The page is 1 based, according to TeX standards. * Conversely synctex_node_sheet allows to retrieve the sheet containing a given node. */ synctex_node_t synctex_node_parent(synctex_node_t node); synctex_node_t synctex_node_sheet(synctex_node_t node); synctex_node_t synctex_node_child(synctex_node_t node); synctex_node_t synctex_node_sibling(synctex_node_t node); synctex_node_t synctex_node_next(synctex_node_t node); synctex_node_t synctex_sheet(synctex_scanner_t scanner,int page); synctex_node_t synctex_sheet_content(synctex_scanner_t scanner,int page); /* These are the types of the synctex nodes */ typedef enum { synctex_node_type_error = 0, synctex_node_type_input, synctex_node_type_sheet, synctex_node_type_vbox, synctex_node_type_void_vbox, synctex_node_type_hbox, synctex_node_type_void_hbox, synctex_node_type_kern, synctex_node_type_glue, synctex_node_type_math, synctex_node_type_boundary, synctex_node_number_of_types } synctex_node_type_t; /* synctex_node_type gives the type of a given node, * synctex_node_isa gives the same information as a human readable text. */ synctex_node_type_t synctex_node_type(synctex_node_t node); const char * synctex_node_isa(synctex_node_t node); /* This is primarily used for debugging purpose. * The second one logs information for the node and recursively displays information for its next node */ void synctex_node_log(synctex_node_t node); void synctex_node_display(synctex_node_t node); /* Given a node, access to the location in the synctex file where it is defined. */ typedef unsigned int synctex_charindex_t; synctex_charindex_t synctex_node_charindex(synctex_node_t node); /* Given a node, access to its tag, line and column. * The line and column numbers are 1 based. * The latter is not yet fully supported in TeX, the default implementation returns 0 which means the whole line. * When the tag is known, the scanner of the node will give the corresponding file name. * When the tag is known, the scanner of the node will give the name. */ int synctex_node_tag(synctex_node_t node); int synctex_node_line(synctex_node_t node); int synctex_node_column(synctex_node_t node); /* In order to enhance forward synchronization, * non void horizontal boxes have supplemental cached information. * The mean line is the average of the line numbers of the included nodes. * The child count is the number of chidren. */ int synctex_node_mean_line(synctex_node_t node); int synctex_node_child_count(synctex_node_t node); /* This is the page where the node appears. * This is a 1 based index as given by TeX. */ int synctex_node_page(synctex_node_t node); /* For quite all nodes, horizontal, vertical coordinates, and width. * These are expressed in TeX small points coordinates, with origin at the top left corner. */ int synctex_node_h(synctex_node_t node); int synctex_node_v(synctex_node_t node); int synctex_node_width(synctex_node_t node); /* For all nodes, dimensions of the enclosing box. * These are expressed in TeX small points coordinates, with origin at the top left corner. * A box is enclosing itself. */ int synctex_node_box_h(synctex_node_t node); int synctex_node_box_v(synctex_node_t node); int synctex_node_box_width(synctex_node_t node); int synctex_node_box_height(synctex_node_t node); int synctex_node_box_depth(synctex_node_t node); /* For quite all nodes, horizontal, vertical coordinates, and width. * The visible dimensions are bigger than real ones to compensate 0 width boxes * that do contain nodes. * These are expressed in page coordinates, with origin at the top left corner. * A box is enclosing itself. */ float synctex_node_visible_h(synctex_node_t node); float synctex_node_visible_v(synctex_node_t node); float synctex_node_visible_width(synctex_node_t node); /* For all nodes, visible dimensions of the enclosing box. * A box is enclosing itself. * The visible dimensions are bigger than real ones to compensate 0 width boxes * that do contain nodes. */ float synctex_node_box_visible_h(synctex_node_t node); float synctex_node_box_visible_v(synctex_node_t node); float synctex_node_box_visible_width(synctex_node_t node); float synctex_node_box_visible_height(synctex_node_t node); float synctex_node_box_visible_depth(synctex_node_t node); /* The main synctex updater object. * This object is used to append information to the synctex file. * Its implementation is considered private. * It is used by the synctex command line tool to take into account modifications * that could occur while postprocessing files by dvipdf like filters. */ typedef struct __synctex_updater_t _synctex_updater_t; typedef _synctex_updater_t * synctex_updater_t; /* Designated initializer. * Once you are done with your whole job, * free the updater */ synctex_updater_t synctex_updater_new_with_output_file(const char * output, const char * directory); /* Use the next functions to append records to the synctex file, * no consistency tests made on the arguments */ void synctex_updater_append_magnification(synctex_updater_t updater, char * magnification); void synctex_updater_append_x_offset(synctex_updater_t updater, char * x_offset); void synctex_updater_append_y_offset(synctex_updater_t updater, char * y_offset); /* You MUST free the updater, once everything is properly appended */ void synctex_updater_free(synctex_updater_t updater); #ifdef __cplusplus } #endif #endif qpdfview-0.4.7/synctex/synctex_parser_local.h0000644000000000000000000000331212246606025017570 0ustar 00000000000000/* Copyright (c) 2008, 2009, 2010 , 2011 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 Version: 1.17 See synctex_parser_readme.txt for more details License: -------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder. */ /* This local header file is for TEXLIVE, use your own header to fit your system */ # include /* for inline && HAVE_xxx */ /* No inlining for synctex tool in texlive. */ # define SYNCTEX_INLINE qpdfview-0.4.7/synctex/synctex_parser_readme.txt0000644000000000000000000001766412246606025020342 0ustar 00000000000000This file is part of the SyncTeX package. The Synchronization TeXnology named SyncTeX is a new feature of recent TeX engines designed by Jerome Laurens. It allows to synchronize between input and output, which means to navigate from the source document to the typeset material and vice versa. More informations on http://itexmac2.sourceforge.net/SyncTeX.html This package is mainly for developers, it mainly contains the following files: synctex_parser_readme.txt synctex_parser_version.txt synctex_parser_utils.c synctex_parser_utils.h synctex_parser_local.h synctex_parser.h synctex_parser.c The file you are reading contains more informations about the SyncTeX parser history. In order to support SyncTeX in a viewer, it is sufficient to include in the source the files synctex_parser.h and synctex_parser.c. The synctex parser usage is described in synctex_parser.h header file. The other files are used by tex engines or by the synctex command line utility: ChangeLog README.txt am man1 man5 synctex-common.h synctex-convert.sh synctex-e-mem.ch0 synctex-e-mem.ch1 synctex-e-rec.ch0 synctex-e-rec.ch1 synctex-etex.h synctex-mem.ch0 synctex-mem.ch1 synctex-mem.ch2 synctex-pdf-rec.ch2 synctex-pdftex.h synctex-rec.ch0 synctex-rec.ch1 synctex-rec.ch2 synctex-tex.h synctex-xe-mem.ch2 synctex-xe-rec.ch2 synctex-xe-rec.ch3 synctex-xetex.h synctex.c synctex.defines synctex.h synctex_main.c tests Version: -------- This is version 1, which refers to the synctex output file format. The files are identified by a build number. In order to help developers to automatically manage the version and build numbers and download the parser only when necessary, the synctex_parser.version is an ASCII text file just containing the current version and build numbers. History: -------- 1.1: Thu Jul 17 09:28:13 UTC 2008 - First official version available in TeXLive 2008 DVD. Unfortunately, the backwards synchronization is not working properly mainly for ConTeXt users, see below. 1.2: Tue Sep 2 10:28:32 UTC 2008 - Correction for ConTeXt support in the edit query. The previous method was assuming that TeX boxes do not overlap, which is reasonable for LaTeX but not for ConTeXt. This assumption is no longer considered. 1.3: Fri Sep 5 09:39:57 UTC 2008 - Local variable "read" renamed to "already_read" to avoid conflicts. - "inline" compiler directive renamed to "SYNCTEX_INLINE" for code support and maintenance - _synctex_error cannot be inlined due to variable arguments (thanks Christiaan Hofman) - Correction in the display query, extra boundary nodes are used for a more precise forwards synchronization 1.4: Fri Sep 12 08:12:34 UTC 2008 - For an unknown reason, the previous version was not the real 1.3 (as used in iTeXMac2 build 747). As a consequence, a crash was observed. - Some typos are fixed. 1.6: Mon Nov 3 20:20:02 UTC 2008 - The bug that prevented synchronization with compressed files on windows has been fixed. - New interface to allow system specific customization. - Note that some APIs have changed. 1.8: Mer 8 jul 2009 11:32:38 UTC Note that version 1.7 was delivered privately. - bug fix: synctex was causing a memory leak in pdftex and xetex, thus some processing speed degradation - bug fix: the synctex command line tool was broken when updating a .synctex file - enhancement: better accuracy of the synchronization process - enhancement: the pdf output file and the associated .synctex file no longer need to live in the same directory. The new -d option of the synctex command line tool manages this situation. This is handy when using something like tex -output-directory=DIR ... 1.9: Wed Nov 4 11:52:35 UTC 2009 - Various typo fixed - OutputDebugString replaced by OutputDebugStringA to deliberately disable unicode preprocessing - New conditional created because OutputDebugStringA is only available since Windows 2K professional 1.10: Sun Jan 10 10:12:32 UTC 2010 - Bug fix in synctex_parser.c to solve a synchronization problem with amsmath's gather environment. Concerns the synctex tool. 1.11: Sun Jan 17 09:12:31 UTC 2010 - Bug fix in synctex_parser.c, function synctex_node_box_visible_v: 'x' replaced by 'y'. Only 3rd party tools are concerned. 1.12: Mon Jul 19 21:52:10 UTC 2010 - Bug fix in synctex_parser.c, function __synctex_open: the io_mode was modified even in case of a non zero return, causing a void .synctex.gz file to be created even if it was not expected. Reported by Marek Kasik concerning a bug on evince. 1.13: Fri Mar 11 07:39:12 UTC 2011 - Bug fix in synctex_parser.c, better synchronization as suggested by Jan Sundermeyer (near line 3388). - Stronger code design in synctex_parser_utils.c, function _synctex_get_name (really neutral behavior). Only 3rd party tools are concerned. 1.14: Fri Apr 15 19:10:57 UTC 2011 - taking output_directory into account - Replaced FOPEN_WBIN_MODE by FOPEN_W_MODE when opening the text version of the .synctex file. - Merging with LuaTeX's version of synctex.c 1.15: Fri Jun 10 14:10:17 UTC 2011 This concerns the synctex command line tool and 3rd party developers. TeX and friends are not concerned by these changes. - Bug fixed in _synctex_get_io_mode_name, sometimes the wrong mode was returned - Support for LuaTeX convention of './' file prefixing 1.16: Tue Jun 14 08:23:30 UTC 2011 This concerns the synctex command line tool and 3rd party developers. TeX and friends are not concerned by these changes. - Better forward search (thanks Jose Alliste) - Support for LuaTeX convention of './' file prefixing now for everyone, not only for Windows 1.17: Fri Oct 14 08:15:16 UTC 2011 This concerns the synctex command line tool and 3rd party developers. TeX and friends are not concerned by these changes. - synctex_parser.c: cosmetic changes to enhance code readability - Better forward synchronization. The problem occurs for example with LaTeX \item command. The fact is that this command creates nodes at parse time but these nodes are used only after the text material of the \item is displayed on the page. The consequence is that sometimes, forward synchronization spots an irrelevant point from the point of view of the editing process. This was due to some very basic filtering policy, where a somehow arbitrary choice was made when many different possibilities where offered for synchronisation. Now, forward synchronization prefers nodes inside an hbox with as many acceptable spots as possible. This is achieved with the notion of mean line and node weight. - Adding support for the new file naming convention with './' + function synctex_ignore_leading_dot_slash_in_path replaces synctex_ignore_leading_dot_slash + function _synctex_is_equivalent_file_name is more permissive Previously, the function synctex_scanner_get_tag would give an answer only when the given file name was EXACTLY one of the file names listed in the synctex file. The we added some changes accepting for example 'foo.tex' instead of './foo.tex'. Now we have an even looser policy for dealing with file names. If the given file name does not match exactly one the file names of the synctex file, then we try to match the base names. If there is only one match of the base names, then it is taken as a match for the whole names. The base name is defined as following: ./foo => foo /my///.////foo => foo /foo => /foo /my//.foo => /my//.foo 1.17: Tue Mar 13 10:10:03 UTC 2012 - minor changes, no version changes - syntax man pages are fixed as suggested by M. Shimata see mail to tex-live@tug.org titled "syntax.5 has many warnings from groff" and "syntax.1 use invalid macro for mdoc" Acknowledgments: ---------------- The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh, and significant help from XeTeX developer Jonathan Kew Nota Bene: ---------- If you include or use a significant part of the synctex package into a software, I would appreciate to be listed as contributor and see "SyncTeX" highlighted. Copyright (c) 2008-2011 jerome DOT laurens AT u-bourgogne DOT fr qpdfview-0.4.7/synctex/synctex_parser_utils.c0000644000000000000000000004121212246606025017632 0ustar 00000000000000/* Copyright (c) 2008, 2009, 2010 , 2011 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 Version: 1.17 See synctex_parser_readme.txt for more details License: -------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder. */ /* In this file, we find all the functions that may depend on the operating system. */ #include #include #include #include #include #include #include #include #include #if defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__) #define SYNCTEX_WINDOWS 1 #endif #ifdef _WIN32_WINNT_WINXP #define SYNCTEX_RECENT_WINDOWS 1 #endif #ifdef SYNCTEX_WINDOWS #include #endif void *_synctex_malloc(size_t size) { void * ptr = malloc(size); if(ptr) { /* There used to be a switch to use bzero because it is more secure. JL */ memset(ptr,0, size); } return (void *)ptr; } int _synctex_error(const char * reason,...) { va_list arg; int result; va_start (arg, reason); # ifdef SYNCTEX_RECENT_WINDOWS {/* This code is contributed by William Blum. As it does not work on some older computers, the _WIN32 conditional here is replaced with a SYNCTEX_RECENT_WINDOWS one. According to http://msdn.microsoft.com/en-us/library/aa363362(VS.85).aspx Minimum supported client Windows 2000 Professional Minimum supported server Windows 2000 Server People running Windows 2K standard edition will not have OutputDebugStringA. JL.*/ char *buff; size_t len; OutputDebugStringA("SyncTeX ERROR: "); len = _vscprintf(reason, arg) + 1; buff = (char*)malloc( len * sizeof(char) ); result = vsprintf(buff, reason, arg) +strlen("SyncTeX ERROR: "); OutputDebugStringA(buff); OutputDebugStringA("\n"); free(buff); } # else result = fprintf(stderr,"SyncTeX ERROR: "); result += vfprintf(stderr, reason, arg); result += fprintf(stderr,"\n"); # endif va_end (arg); return result; } /* strip the last extension of the given string, this string is modified! */ void _synctex_strip_last_path_extension(char * string) { if(NULL != string){ char * last_component = NULL; char * last_extension = NULL; char * next = NULL; /* first we find the last path component */ if(NULL == (last_component = strstr(string,"/"))){ last_component = string; } else { ++last_component; while((next = strstr(last_component,"/"))){ last_component = next+1; } } # ifdef SYNCTEX_WINDOWS /* On Windows, the '\' is also a path separator. */ while((next = strstr(last_component,"\\"))){ last_component = next+1; } # endif /* then we find the last path extension */ if((last_extension = strstr(last_component,"."))){ ++last_extension; while((next = strstr(last_extension,"."))){ last_extension = next+1; } --last_extension;/* back to the "." */ if(last_extension>last_component){/* filter out paths like ....my/dir/.hidden"*/ last_extension[0] = '\0'; } } } } synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name_ref) { if (SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])) { do { (*name_ref) += 2; while (SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])) { ++(*name_ref); } } while(SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])); return synctex_YES; } return synctex_NO; } /* The base name is necessary to deal with the 2011 file naming convention... * path is a '\0' terminated string * The return value is the trailing part of the argument, * just following the first occurrence of the regexp pattern "[^|/|\].[\|/]+".*/ const char * _synctex_base_name(const char *path) { const char * ptr = path; do { if (synctex_ignore_leading_dot_slash_in_path(&ptr)) { return ptr; } do { if (!*(++ptr)) { return path; } } while (!SYNCTEX_IS_PATH_SEPARATOR(*ptr)); } while (*(++ptr)); return path; } /* Compare two file names, windows is sometimes case insensitive... */ synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs) { /* Remove the leading regex '(\./+)*' in both rhs and lhs */ synctex_ignore_leading_dot_slash_in_path(&lhs); synctex_ignore_leading_dot_slash_in_path(&rhs); next_character: if (SYNCTEX_IS_PATH_SEPARATOR(*lhs)) {/* lhs points to a path separator */ if (!SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* but not rhs */ return synctex_NO; } ++lhs; ++rhs; synctex_ignore_leading_dot_slash_in_path(&lhs); synctex_ignore_leading_dot_slash_in_path(&rhs); goto next_character; } else if (SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* rhs points to a path separator but not lhs */ return synctex_NO; } else if (SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(*lhs,*rhs)){/* uppercase do not match */ return synctex_NO; } else if (!*lhs) {/* lhs is at the end of the string */ return *rhs ? synctex_NO : synctex_YES; } else if(!*rhs) {/* rhs is at the end of the string but not lhs */ return synctex_NO; } ++lhs; ++rhs; goto next_character; } synctex_bool_t _synctex_path_is_absolute(const char * name) { if(!strlen(name)) { return synctex_NO; } # if SYNCTEX_WINDOWS if(strlen(name)>2) { return (name[1]==':' && SYNCTEX_IS_PATH_SEPARATOR(name[2]))?synctex_YES:synctex_NO; } return synctex_NO; # else return SYNCTEX_IS_PATH_SEPARATOR(name[0])?synctex_YES:synctex_NO; # endif } /* We do not take care of UTF-8 */ const char * _synctex_last_path_component(const char * name) { const char * c = name+strlen(name); if(c>name) { if(!SYNCTEX_IS_PATH_SEPARATOR(*c)) { do { --c; if(SYNCTEX_IS_PATH_SEPARATOR(*c)) { return c+1; } } while(c>name); } return c;/* the last path component is the void string*/ } return c; } int _synctex_copy_with_quoting_last_path_component(const char * src, char ** dest_ref, size_t size) { const char * lpc; if(src && dest_ref) { # define dest (*dest_ref) dest = NULL; /* Default behavior: no change and sucess. */ lpc = _synctex_last_path_component(src); if(strlen(lpc)) { if(strchr(lpc,' ') && lpc[0]!='"' && lpc[strlen(lpc)-1]!='"') { /* We are in the situation where adding the quotes is allowed. */ /* Time to add the quotes. */ /* Consistency test: we must have dest+size>dest+strlen(dest)+2 * or equivalently: strlen(dest)+20) { char * result = NULL; ++size; /* Create the memory storage */ if(NULL!=(result = (char *)malloc(size))) { char * dest = result; va_start (arg, first); temp = first; do { if((size = strlen(temp))>0) { /* There is something to merge */ if(dest != strncpy(dest,temp,size)) { _synctex_error("! _synctex_merge_strings: Copy problem"); free(result); result = NULL; return NULL; } dest += size; } } while( (temp = va_arg(arg, const char *)) != NULL); va_end(arg); dest[0]='\0';/* Terminate the merged string */ return result; } _synctex_error("! _synctex_merge_strings: Memory problem"); return NULL; } return NULL; } /* The purpose of _synctex_get_name is to find the name of the synctex file. * There is a list of possible filenames from which we return the most recent one and try to remove all the others. * With two runs of pdftex or xetex we are sure the the synctex file is really the most appropriate. */ int _synctex_get_name(const char * output, const char * build_directory, char ** synctex_name_ref, synctex_io_mode_t * io_mode_ref) { if(output && synctex_name_ref && io_mode_ref) { /* If output is already absolute, we just have to manage the quotes and the compress mode */ size_t size = 0; char * synctex_name = NULL; synctex_io_mode_t io_mode = *io_mode_ref; const char * base_name = _synctex_last_path_component(output); /* do not free, output is the owner. base name of output*/ /* Do we have a real base name ? */ if(strlen(base_name)>0) { /* Yes, we do. */ const char * temp = NULL; char * core_name = NULL; /* base name of output without path extension. */ char * dir_name = NULL; /* dir name of output */ char * quoted_core_name = NULL; char * basic_name = NULL; char * gz_name = NULL; char * quoted_name = NULL; char * quoted_gz_name = NULL; char * build_name = NULL; char * build_gz_name = NULL; char * build_quoted_name = NULL; char * build_quoted_gz_name = NULL; struct stat buf; time_t the_time = 0; /* Create core_name: let temp point to the dot before the path extension of base_name; * We start form the \0 terminating character and scan the string upward until we find a dot. * The leading dot is not accepted. */ if((temp = strrchr(base_name,'.')) && (size = temp - base_name)>0) { /* There is a dot and it is not at the leading position */ if(NULL == (core_name = (char *)malloc(size+1))) { _synctex_error("! _synctex_get_name: Memory problem 1"); return -1; } if(core_name != strncpy(core_name,base_name,size)) { _synctex_error("! _synctex_get_name: Copy problem 1"); free(core_name); dir_name = NULL; return -2; } core_name[size] = '\0'; } else { /* There is no path extension, * Just make a copy of base_name */ core_name = _synctex_merge_strings(base_name); } /* core_name is properly set up, owned by "self". */ /* creating dir_name. */ size = strlen(output)-strlen(base_name); if(size>0) { /* output contains more than one path component */ if(NULL == (dir_name = (char *)malloc(size+1))) { _synctex_error("! _synctex_get_name: Memory problem"); free(core_name); dir_name = NULL; return -1; } if(dir_name != strncpy(dir_name,output,size)) { _synctex_error("! _synctex_get_name: Copy problem"); free(dir_name); dir_name = NULL; free(core_name); dir_name = NULL; return -2; } dir_name[size] = '\0'; } /* dir_name is properly set up. It ends with a path separator, if non void. */ /* creating quoted_core_name. */ if(strchr(core_name,' ')) { quoted_core_name = _synctex_merge_strings("\"",core_name,"\""); } /* quoted_core_name is properly set up. */ if(dir_name &&strlen(dir_name)>0) { basic_name = _synctex_merge_strings(dir_name,core_name,synctex_suffix,NULL); if(quoted_core_name && strlen(quoted_core_name)>0) { quoted_name = _synctex_merge_strings(dir_name,quoted_core_name,synctex_suffix,NULL); } } else { basic_name = _synctex_merge_strings(core_name,synctex_suffix,NULL); if(quoted_core_name && strlen(quoted_core_name)>0) { quoted_name = _synctex_merge_strings(quoted_core_name,synctex_suffix,NULL); } } if(!_synctex_path_is_absolute(output) && build_directory && (size = strlen(build_directory))) { temp = build_directory + size - 1; if(_synctex_path_is_absolute(temp)) { build_name = _synctex_merge_strings(build_directory,basic_name,NULL); if(quoted_core_name && strlen(quoted_core_name)>0) { build_quoted_name = _synctex_merge_strings(build_directory,quoted_name,NULL); } } else { build_name = _synctex_merge_strings(build_directory,"/",basic_name,NULL); if(quoted_core_name && strlen(quoted_core_name)>0) { build_quoted_name = _synctex_merge_strings(build_directory,"/",quoted_name,NULL); } } } if(basic_name) { gz_name = _synctex_merge_strings(basic_name,synctex_suffix_gz,NULL); } if(quoted_name) { quoted_gz_name = _synctex_merge_strings(quoted_name,synctex_suffix_gz,NULL); } if(build_name) { build_gz_name = _synctex_merge_strings(build_name,synctex_suffix_gz,NULL); } if(build_quoted_name) { build_quoted_gz_name = _synctex_merge_strings(build_quoted_name,synctex_suffix_gz,NULL); } /* All the others names are properly set up... */ /* retain the most recently modified file */ # define TEST(FILENAME,COMPRESS_MODE) \ if(FILENAME) {\ if (stat(FILENAME, &buf)) { \ free(FILENAME);\ FILENAME = NULL;\ } else if (buf.st_mtime>the_time) { \ the_time=buf.st_mtime; \ synctex_name = FILENAME; \ if (COMPRESS_MODE) { \ io_mode |= synctex_io_gz_mask; \ } else { \ io_mode &= ~synctex_io_gz_mask; \ } \ } \ } TEST(basic_name,synctex_DONT_COMPRESS); TEST(gz_name,synctex_COMPRESS); TEST(quoted_name,synctex_DONT_COMPRESS); TEST(quoted_gz_name,synctex_COMPRESS); TEST(build_name,synctex_DONT_COMPRESS); TEST(build_gz_name,synctex_COMPRESS); TEST(build_quoted_name,synctex_DONT_COMPRESS); TEST(build_quoted_gz_name,synctex_COMPRESS); # undef TEST /* Free all the intermediate filenames, except the one that will be used as returned value. */ # define CLEAN_AND_REMOVE(FILENAME) \ if(FILENAME && (FILENAME!=synctex_name)) {\ remove(FILENAME);\ printf("synctex tool info: %s removed\n",FILENAME);\ free(FILENAME);\ FILENAME = NULL;\ } CLEAN_AND_REMOVE(basic_name); CLEAN_AND_REMOVE(gz_name); CLEAN_AND_REMOVE(quoted_name); CLEAN_AND_REMOVE(quoted_gz_name); CLEAN_AND_REMOVE(build_name); CLEAN_AND_REMOVE(build_gz_name); CLEAN_AND_REMOVE(build_quoted_name); CLEAN_AND_REMOVE(build_quoted_gz_name); # undef CLEAN_AND_REMOVE /* set up the returned values */ * synctex_name_ref = synctex_name; * io_mode_ref = io_mode; return 0; } return -1;/* bad argument */ } return -2; } const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode) { static const char * synctex_io_modes[4] = {"r","rb","a","ab"}; unsigned index = ((io_mode & synctex_io_gz_mask)?1:0) + ((io_mode & synctex_io_append_mask)?2:0);// bug pointed out by Jose Alliste return synctex_io_modes[index]; } qpdfview-0.4.7/synctex/synctex_parser_utils.h0000644000000000000000000001317712246606025017650 0ustar 00000000000000/* Copyright (c) 2008, 2009, 2010, 2011 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 Version: 1.17 See synctex_parser_readme.txt for more details License: -------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder. */ /* The utilities declared here are subject to conditional implementation. * All the operating system special stuff goes here. * The problem mainly comes from file name management: path separator, encoding... */ # define synctex_bool_t int # define synctex_YES -1 # define synctex_ADD_QUOTES -1 # define synctex_COMPRESS -1 # define synctex_NO 0 # define synctex_DONT_ADD_QUOTES 0 # define synctex_DONT_COMPRESS 0 #ifndef __SYNCTEX_PARSER_UTILS__ # define __SYNCTEX_PARSER_UTILS__ #include #ifdef __cplusplus extern "C" { #endif #define FALSE 0 #define TRUE !FALSE # if _WIN32 # define SYNCTEX_CASE_SENSITIVE_PATH FALSE # define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c) # else # define SYNCTEX_CASE_SENSITIVE_PATH TRUE # define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c) # endif # if _WIN32 # define SYNCTEX_IS_DOT(c) ('.' == c) # else # define SYNCTEX_IS_DOT(c) ('.' == c) # endif # if SYNCTEX_CASE_SENSITIVE_PATH # define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (left != right) # else # define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (toupper(left) != toupper(right)) # endif /* This custom malloc functions initializes to 0 the newly allocated memory. * There is no bzero function on windows. */ void *_synctex_malloc(size_t size); /* This is used to log some informational message to the standard error stream. * On Windows, the stderr stream is not exposed and another method is used. * The return value is the number of characters printed. */ int _synctex_error(const char * reason,...); /* strip the last extension of the given string, this string is modified! * This function depends on the OS because the path separator may differ. * This should be discussed more precisely. */ void _synctex_strip_last_path_extension(char * string); /* Compare two file names, windows is sometimes case insensitive... * The given strings may differ stricto sensu, but represent the same file name. * It might not be the real way of doing things. * The return value is an undefined non 0 value when the two file names are equivalent. * It is 0 otherwise. */ synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs); /* Description forthcoming.*/ synctex_bool_t _synctex_path_is_absolute(const char * name); /* Description forthcoming...*/ const char * _synctex_last_path_component(const char * name); /* Description forthcoming...*/ const char * _synctex_base_name(const char *path); /* If the core of the last path component of src is not already enclosed with double quotes ('"') * and contains a space character (' '), then a new buffer is created, the src is copied and quotes are added. * In all other cases, no destination buffer is created and the src is not copied. * 0 on success, which means no error, something non 0 means error, mainly due to memory allocation failure, or bad parameter. * This is used to fix a bug in the first version of pdftex with synctex (1.40.9) for which names with spaces * were not managed in a standard way. * On success, the caller owns the buffer pointed to by dest_ref (is any) and * is responsible of freeing the memory when done. * The size argument is the size of the src buffer. On return the dest_ref points to a buffer sized size+2.*/ int _synctex_copy_with_quoting_last_path_component(const char * src, char ** dest_ref, size_t size); /* These are the possible extensions of the synctex file */ extern const char * synctex_suffix; extern const char * synctex_suffix_gz; typedef unsigned int synctex_io_mode_t; typedef enum { synctex_io_append_mask = 1, synctex_io_gz_mask = synctex_io_append_mask<<1 } synctex_io_mode_masks_t; typedef enum { synctex_compress_mode_none = 0, synctex_compress_mode_gz = 1 } synctex_compress_mode_t; int _synctex_get_name(const char * output, const char * build_directory, char ** synctex_name_ref, synctex_io_mode_t * io_mode_ref); /* returns the correct mode required by fopen and gzopen from the given io_mode */ const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode); synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name); #ifdef __cplusplus } #endif #endif qpdfview-0.4.7/synctex/synctex_parser_version.txt0000644000000000000000000000000412246606025020546 0ustar 000000000000001.17qpdfview-0.4.7/translations/qpdfview_ast.ts0000644000000000000000000017416212246606025017300 0ustar 00000000000000 BookmarkMenu &Open &Abrir Open in new &tab Abrir n'otra llingüe&ta &Remove bookmark Desanicia&r marcador Database Jump to page %1 Saltar a páxina %1 DocumentView Supported formats (%1) Formatos sofitaos (%1) Unlock %1 Desbloquiar %1 Password: Contraseña: Information Información Opening URL is disabled in the settings. Abrir URLs ta desactivao na configuración. Warning Avisu SyncTeX data for '%1' could not be found. Nun s'alcontraron datos SyncTeX pa «%1». Printing '%1'... Imprentando «%1»... Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Avisu Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Alcontrar anterior Find next Alcontrar siguiente MainWindow Warning Avisu Could not open '%1'. Nun se pudo abrir «%1». Open containing folder Open Abrir Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Abrir nuna llingüeta nueva Could not refresh '%1'. Nun se pudo anovar «%1». Save copy Guardar una copia Could not save copy at '%1'. Nun se pudo guardar una copia en «%1». Save as Guardar como Could not save as '%1'. Nun se pudo guardar como «%1». Could not print '%1'. Nun se pudo imprentar «%1». Jump to page Saltar a páxina Page: Páxina: Add bookmark Label Jump to page %1 Saltar a páxina %1 About qpdfview Tocante a qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview ye un visor de documentos con llingüetes qu'usa Qt.</p><p>Esta versión incluye:<ul> <li>PDF support using Poppler</li> <li>Sofitu pa PDF usando Poppler</li> <li>PS support using libspectre</li> <li>Sofitu pa PS usando libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Sofitu pa DjVu usando DjVuLibre</li> <li>Printing support using CUPS</li> <li>Sofitu pa impresión usando CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Vea <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> pa más información.</p><p>&copy; 2012-2013 Los desendolcadores de qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Page width Anchor de páxina Page size Tamañu de páxina Match &case Distinguir mayús&cules/minúscules Highlight &all Rescampl&ar too &Open... &Abrir... Open in new &tab... Abrir en llingüe&ta nueva... &Refresh Anova&r &Save copy... &Guardar copia... Save &as... Gu&ardar como… &Print... Im&prentar... E&xit Co&lar &Previous page &Páxina anterior &Next page Páxina siguie&nte &First page Pri&mera páxina &Last page Ú&ltima páxina &Jump to page... &Saltar a páxina... Jump &backward Saltar &atrás Jump for&ward Saltar alan&tre &Search... &Guetar Find previous Alcontrar anterior Find next Alcontrar siguiente Cancel search Encaboxar gueta &Copy to clipboard &Copiar al cartafueyu &Add annotation &Amestar anotación Settings... Preferencies... &Continuous &Continuu &Two pages &Dos páxines Two pages &with cover page Dos páxines con por&tada &Multiple pages Páxines &múltiples Zoom &in A&umentar Zoom &out Ame&norgar Original &size Tamañu ori&xinal Fit to page width Axustar a anchor de páxina Fit to page size Axustar a tamañu de páxina Rotate &left Xirar a la i&zquierda Rotate &right Xirar a la d&recha Invert colors Invertir colores Fonts... Fontes... &Fullscreen &Pantalla completa &Presentation... &Presentación... &Previous tab Llingüeta an&terior &Next tab Llingüeta siguie&nte &Close tab &Zarrar llingüeta Close &all tabs Z&arrar toles llingüetes Close all tabs &but current tab Zarrar toles llingüetes menos la a&bierta &Previous bookmark Marcador an&terior &Next bookmark Marcador siguie&nte &Add bookmark &Amestar marcador &Remove bookmark Desanicia&r marcador Remove all bookmarks Desaniciar tolos marcadores &Contents &Conteníu &About Tocante &a &File &Ficheru &Edit &Editar &View &Ver &Search &Guetar &Outline C&ontornu &Properties &Propiedaes &Thumbnails Minia&tures &Tool bars Barres de ferramien&tes &Docks &Puertos &Tabs Llingüe&tes &Bookmarks &Marcadores &Help A&yuda Model::PdfDocument Name Nome Type Triba Embedded Incrustáu Subset Subconxuntu File Ficheru Yes No Non Model::PdfPage Information Información Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Necesitase la versión 2.20 o superior de la biblioteca Poppler p'amestar o desaniciar anotaciones. Model::PsDocument Title Títulu Created for Creáu pa Creator Creador Creation date Data de creación Format Formatu Language level Nivel de llinguax PageItem Go to page %1. Dir a páxina %1. Go to page %1 of file '%2'. Dir a la páxina %1 del ficheru '%2'. Open '%1'. Abrir '%1'. Edit form field '%1'. Editar el campu de formulariu «%1». Copy &text Copiar &testu Copy &image Copiar &imaxe Save image to &file... Guardar imaxe en &ficheru Save image to file Guardar imaxe en ficheru Warning Avisu Could not save image to file '%1'. Nun se pudo guardar la imaxe nel ficheru «%1». Add &text Amestar &testu Add &highlight Amestar &rescampláu &Remove annotation Desanicia&r anotación PdfSettingsWidget Antialiasing: Antialias: Text antialiasing: Antialias de testu: None Dengún Full Completu Reduced Reducíu Text hinting: Aproximación tipográfica de testu: Overprint preview: Vista previa de sobreimpresión: Solid Sólidu Shaped Con forma Thin line mode: Mou de llinia fina: PluginHandler Critical Críticu Could not load PDF plug-in! ¡Nun pudo cargase'l complementu de PDF! Could not load PS plug-in! ¡Nun pudo cargase'l complementu de PS! Could not load DjVu plug-in! ¡Nun pudo cargase'l complementu de DjVu! PrintDialog Fit to page: Axustar a la páxina: Page ranges: Intervalu de páxines: All pages Toles páxines Even pages Páxines pares Odd pages Páxines impares Page set: Conxuntu de páxines: Single page Namái una páxina Two pages Dos páxines Four pages Cuatro páxines Six pages Seyes páxines Nine pages Nueve páxines Sixteen pages Dieciséis páxines Number-up: Aumentar númberu: Bottom to top and left to right D'abaxo a arriba y d'izquierda a drecha Bottom to top and right to left D'abaxo a arriba y de drecha a izquierda Left to right and bottom to top D'izquierda a drecha y d'abaxo a arriba Left to right and top to bottom D'izquierda a drecha y d'arriba a abaxo Right to left and bottom to top De drecha a izquierda y d'abaxo a arriba Right to left and top to bottom De drecha a izquierda y d'arriba a abaxo Top to bottom and left to right D'arriba a abaxo y d'izquierda a drecha Top to bottom and right to left D'arriba a abaxo y de drecha a izquierda Number-up layout: Diseñu de numberación: Extended options Opciones estendíes PsSettingsWidget Graphics antialias bits: Bits del antialias de gráficos: Text antialias bits: Bits del antialias de testu: QObject An empty instance name is not allowed. Nun se permite un nome d'instancia baleru. An empty search text is not allowed. Nun se permite una cadena de gueta balera. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Pa usar '--instance' fai falta un nome d'instancia. Using '--instance' is not allowed without using '--unique'. Nun se permite usar '--instance' ensin usar '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. L'usu de '--search' necesita un testu de gueta. SyncTeX data for '%1' could not be found. Nun s'alcontraron datos SyncTeX pa «%1». Could not prepare signal handler. Nun se pudo preparar el xestor de señales. QShortcut Shift Mayús. Ctrl Ctrl Alt Alt Shift and Ctrl Mayús y Ctrl Shift and Alt Mayús y Alt Ctrl and Alt Ctrl y Alt RecentlyUsedMenu Recently &used &Usaos de recién &Clear list &Llimpiar la llista SettingsDialog General Xeneral &Behavior &Comportamientu &Graphics &Gràficos &Interface &Interfaz &Shortcuts Atayo&s &Modifiers &Modificadores Defaults Predeterminaos Defaults on current tab Open URL: Abrir URL: Auto-refresh: Anovamientu automáticu: Effective after restart. Efectivu dempués de reaniciar. Track recently used: Rastrar usaos de recién: Restore tabs: Restaurar llingüetes: Restore bookmarks: Restaurar marcadores: Restore per-file settings: Restaurar preferencies por ficheru: Synchronize presentation: Sincronizar presentación: Default Predetermináu Presentation screen: Pantalla de presentación: Highlight color: Color de rescampláu: None Dengún Highlight duration: Rescamplar la duración: Annotation color: Color d'anotación: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' se camudará pol camín absolutu al ficheru. '%2' resp. '%3' se camudará pol númberu de llinia resp. de columna. Source editor: Editor de códigu: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorar páxines: Decorate links: Decorar enllaces: Decorate form fields: Decorar campos del formulariu: Background color: Color del fondu: Paper color: Color del papel: Presentation background color: Pages per row: Páxines per filera: Page spacing: Espaciáu de páxina: Thumbnail spacing: Espaciáu de miniatures: Thumbnail size: Tamañu de miniatures: %1 MB %1 MB Cache size: Tamañu de la caché: Prefetch: Precarga: Prefetch distance: Distancia de precarga: Top Arriba Bottom Abaxo Left Izquierda Right Drecha Tab position: Posición de llingüeta: As needed Cuando faiga falta Always Siempres Never Nunca Tab visibility: Visibilidá de la llingüeta: New tab next to current tab: Nueva llingüeta xunto a la actual: Recently used count: File tool bar: Barra de ferramientes ficheros: Edit tool bar: Barra de ferramientes edición: View tool bar: Barra de ferramientes vista: Current page in window title: Paxina actual nel títulu de ventana: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Rescamplar la miniatura actual: Limit thumbnails to results: Llendar les miniatures a los resultaos: Annotation overlay: Form field overlay: Zoom: Ampliación: Rotate: Xirar: Scroll: Desplazamientu: Copy to clipboard: Copiar al cartafueyu: Add annotation: Amestar anotación: ShortcutHandler Action Aición Key sequence Secuencia de tecles Skip backward Saltar atrás Skip forward Saltar alantre Move up Mover arriba Move down Mover abaxo Move left Mover a la izquierda Move right Mover a la drecha TreeView &Expand all &Espander too &Collapse all &Colapsar too qpdfview-0.4.7/translations/qpdfview_az.ts0000644000000000000000000017565512246606025017133 0ustar 00000000000000 BookmarkMenu &Open &Aç Open in new &tab Yeni &İçlikdə aç &Remove bookmark &Əlfəcindən çlxar Database Jump to page %1 %1 səhifəsinə keç DocumentView Supported formats (%1) Dəstəklənən formatlar (%1) Unlock %1 %1 aç Password: Şifrə: Information Məlumat Opening URL is disabled in the settings. URL-lərin açılması seçənklərdən bağlıdır Warning Xəbərdarlıq SyncTeX data for '%1' could not be found. '%1' üçün SyncTeX verilənləri yüklənmədi. Printing '%1'... '%1' çap olunur... Page %1 Səhifə %1 FileAttachmentAnnotationWidget Save... Yaddaşa al Save and open... Yaddaşa al və aç… Save file attachment Əlavədəki faylı saxla Warning Xəbərdarlıq Could not save file attachment to '%1'. Əlavədəki faylı '%1' yaddaça almaq mümkün deyil HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Öncəkini tap Find next Sonrakını tap MainWindow Warning Xəbərdarlıq Could not open '%1'. '%1' açmaq mümkün deyil. Close all tabs but this one Bu siğmədən başqa hamısını bağla Close all tabs to the left Solda olan bütün siğmələri bağla Close all tabs to the right Sağda olan bütün siğmələri bağla Open Open in new tab Yeni İçlikdə aç Could not refresh '%1'. '%1' yüniləmək mümkün deyil. Save copy Nüsxəsini yadda saxla Could not save copy at '%1'. Kopyanı '%1' saxlamaq mümkün deyil. Save as Fərqli adla yaddaşda saxla Could not save as '%1'. '%1' kimi yadda saxlamaq mümkün deyil. Could not print '%1'. '%1' çap etmək mümkün deyil. Jump to page Səhifəyə keç Page: Səhifə: Add bookmark Əfləcin əlavə et Label Nişan Jump to page %1 %1 səhifəsinə keç About qpdfview qpdfview haqda <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview Qt-dən istifadə edən səkməli sənəd baxıcısıdır.</p><p>Bu versiyaya daxildir:<ul> <li>PDF support using Poppler</li> <li>PDF dəstəyi Poppler vasitəsilədir</li> <li>PS support using libspectre</li> <li>PS libspectre vasitəsi ilə dəstəklənir</li> <li>DjVu support using DjVuLibre</li> <li>DjVu - DjVuLibre vasitəsi ilə dəstəklənir</li> <li>Printing support using CUPS</li> <li>Printing - CUPS vasitəsi ilə dəstəklənir</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Əlavə məlumat üçün <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a>-i ziyarət edin.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? '%1' sənədi dəyişdirilmişdir. Dəyişiklikləri yadda saxlamaq istəyirsiniz mi? Page width Səhifənin eni Page size Səhifənin ölçüsü Match &case Reqistr nəzərə alınmaqla Highlight &all H&amısını seç &Open... &Aç... Open in new &tab... Yeni İçlikdə aç... Open containing folder Yerləşdiyi qovluğu aç &Refresh &Yenilə &Save copy... Nüsxəsini yaddaşda saxla... Save &as... Başqa cür yadda saxla... &Print... Ça&p Et... E&xit Çı&xış &Previous page Əlvəlki səhifə &Next page Növbəti səhifə &First page Öncəki səhifə &Last page Sonuncu səhifə &Jump to page... Səhifəyə keç… Jump &backward Geri qayıt Jump for&ward İrəli keç &Search... Axtarış Find previous Öncəkini tap Find next Sonrakını tap Cancel search Axtarışdan imtina &Copy to clipboard Yaddaşa kopyala &Add annotation Qeydlər əlavə et Settings... Seçənəklər… &Continuous Davamlı &Two pages İki səhifə Two pages &with cover page Başlıqla &birgə iki səhifə &Multiple pages Bir neçə səhifə Zoom &in Böyüt Zoom &out Kiçild Original &size Oriqinal ölçü Fit to page width Səhifə eninə uyğunlaşdır Fit to page size Səhifə ölçüsünə uyğunlaşdır Rotate &left Sola çevir Rotate &right Sağa çevir Invert colors Rəngləri çevir Fonts... Şriftlər… &Fullscreen &Tam ekran &Presentation... Nümayiş… &Previous tab Öncəki səkmə &Next tab Sonrakı səkmə &Close tab Səməni bağla Close &all tabs Bütün səkmələri bağla Close all tabs &but current tab Hazırkı səkmədən başqa, qalan səkmələri bağla &Previous bookmark Öncəki əıfəcin &Next bookmark Sonrakı əlfəcin &Add bookmark Əlfəcin əlavə et &Remove bookmark Əlfəcini siı Remove all bookmarks Bütün əlfəcinləri sil &Contents &Məzmun &About &Haqqında &File &Fayl &Edit Redaktə et &View &Görünüş &Outline Altdan xətli &Properties Xüsusiyyətlər &Thumbnails Mİnatur görüntü &Search A&xtar &Tool bars Alətlər paneli &Docks Doklar &Tabs Səkmələr &Bookmarks Əlfəcinlər &Help &Yardım Model::PdfDocument Name Ad Type Növ Embedded İçərisinə yerləşdirilib Subset Alt qrup File Fayl Yes Bəli No Xeyr Model::PdfPage Information Mə'lumat Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Əlfəcinlərin alavə edilməsi və ya silinməsi üçün Popler 0.20.1 və ya daha yüksək versiya kitabxana tələb edir. Model::PsDocument Title Başlıq Created for Kimin üçün yaradılıb Creator Yaradan Creation date Yaradılma tarixi Format Format Language level Dil səviyyəsi PageItem Go to page %1. %1 səhifəsinə keç. Go to page %1 of file '%2'. '%2' faylının %1 səhifəsinə keç Open '%1'. '%1' aç. Edit form field '%1'. '%1' xanasından redaktə et. Copy &text Mə&tni kopyala Copy &image Şəkl&i kopyala Save image to &file... Şəkli &fayla yaz… Save image to file Şəkli fayla yaz Warning Xəbərdarlıq Could not save image to file '%1'. Şəkli '%1' faylına yazmaq mümkün deyil. Add &text Mətn əlavə e&t Add &highlight Seçim əlavə et &Remove annotation Qeydlə&ri sil PdfSettingsWidget Antialiasing: Hamarlama: Text antialiasing: Mətnin görünüşünün hamarlanması: None Heç Biri Full Tam Reduced Azaldılmış Text hinting: Mətn bildirişi Overprint preview: Çap həddini aşma ön baxışı Solid Tam Shaped Fromalı Thin line mode: Xəttin nazikliyi: PluginHandler Critical Kritik Could not load PDF plug-in! PDF qoşmasını yükləmək mümkün deyil! Could not load PS plug-in! PS qoşmasını yükləmək olmadı! Could not load DjVu plug-in! DjVu qoşması yüklənmədi! PrintDialog Fit to page: Səhifəyə uyğunlaşdır: Page ranges: Səhifə aralığı: All pages Bütün səhifələr Even pages Cüt səhifələr Odd pages Tək səhifələr Page set: Səhifələr: Single page Bir səhifə Two pages İki səhifə Four pages Dörd səhifə Six pages Altı səhifə Nine pages Doqquz səhifə Sixteen pages 16 səhifə Number-up: Bir rəqəm yuxarı: Bottom to top and left to right Aşağıdan yixarı və soldan sağa Bottom to top and right to left Aşağıdan yuxarı və sağdan sola Left to right and bottom to top Soldan sağa və aşağıdan yuxarı Left to right and top to bottom Soldan sağa və yuxarıdan aşağı Right to left and bottom to top Sağdan sola və aşağıdan yuxarı Right to left and top to bottom Sağdan sola və yuxarıdan aşağı Top to bottom and left to right Yuxarıdan aşağı və soldan sağa Top to bottom and right to left Yuxarıdan aşağı və sağdan sola Number-up layout: Nömrələr-üstə düzümü: Extended options Geniş seçənəklər PsSettingsWidget Graphics antialias bits: Qrafikanın bitlərinin hamarlanması: Text antialias bits: Mətn bitlərinin hamarlanması: QObject An empty instance name is not allowed. Boş instansiya adına icazə yoxdur. An empty search text is not allowed. Axtarış mətni boşdur. Choose instance Nüsxəni bağla Instance: Nüsxə Unknown command-line option '%1'. Naməlum əmr-sətri opsiyası '%1'. Using '--instance' requires an instance name. '--instance' istifadə etdikdə instansiya adı mütləq göstərilməlidir. Using '--instance' is not allowed without using '--unique'. '--instance' -dən istifadə '--unique' istifadə etmədən mümkün deyil. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Nüsxənin adında yalnız "[A-Z][a-z][0-9]_" işarələri olmalı və rəqəmlə başlamamalıdır. Using '--search' requires a search text. '--search' istifadə etdikdə axtarılan mətn daxil edilməlidir. SyncTeX data for '%1' could not be found. '%1' üçün SyncTeX verilənləri yüklənmədi. Could not prepare signal handler. Siqnal başlığını hazırlamaq mümkün deyil. QShortcut Shift Şift Ctrl Ctrl Alt Alt Shift and Ctrl Şift və Ctrl Shift and Alt Şift və Alt Ctrl and Alt Ctrl və Alt RecentlyUsedMenu Recently &used Son istifadə edilənlər &Clear list Siyahını təmizlə SettingsDialog General Ümumi &Behavior Davranış &Graphics Qrafiklər &Interface &İnterfeys &Shortcuts Qısa yollar &Modifiers Dəyişdiricilər Defaults Susmaya görə Defaults on current tab Bu sekmeni susmaya görə istifadə et Open URL: URL aç: Auto-refresh: Avto-yeniləmə: Effective after restart. Yenidən başlatdıqda təsirlidir. Track recently used: Son istifadə edilmişləri izlə: Restore tabs: Səkmələri bərpa et: Restore bookmarks: Əlfəcinləri bərpa et Restore per-file settings: ön-fayl seçənəklərini bərpa et: Synchronize presentation: Nümaişin sinxronizasiyası: Default Susmaya görə Presentation screen: Nümayiş ekranı: None Heç Biri Highlight duration: Sayrışma müddəri: Highlight color: Seçilmə rəngi: Annotation color: Qeydlərin rəngi: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' tam fayl ünvanı ilə əvəz olunacaq. . '%2' resp. '%3' is replaced by line resp. column number. Source editor: Mənbə redaktoru: Keep obsolete pixmaps: Köhnə pixmasp-ı saxla Use device pixel ratio: Cihazın piksel nisbətindən istifadə et: Decorate pages: Səhifələri dekorasiyala: Decorate links: Linkləri dekorasiyala: Decorate form fields: Xanadan dekorasiyala: Background color: Arxa fon rəngi: Paper color: Səhifənin rəngi: Presentation background color: Təqdimatın fon rəngi: Pages per row: Sətrdəki səhifələrin sayı: Page spacing: Səhifələr arası məsafə: Thumbnail spacing: Miniaturlar arası məsafə: Thumbnail size: Cəld baxış şəkilinin ölçüsü: %1 MB %1 MB Cache size: Keşin ölçüsü: Prefetch: Öncədən yükləmə: Prefetch distance: Öncədən yükəmə məsafəsi: Top Yuxarı Bottom Aşağı Left Sol Right Sağ Tab position: Səkmə pozisiyası: As needed Lazım olduqda Always Həmişə Never Heç vaxt Tab visibility: Səkmənin görünməsi: New tab next to current tab: Yeni səkmə hazırkının dalınca: Recently used count: İstifadə sayı: File tool bar: Fayl alətlər paneli: Edit tool bar: Alətlər panelini redaktə et: View tool bar: Alətlər panelinə bax: Current page in window title: Hazırkı səhifə pəncərənin başlığında: Instance name in window title: Pəncərənin başlığında nüsxənin adı: Synchronize outline view: Xətlər görüntüsünü sinxrolaşdır: Highlight current thumbnail: Hazırkı görüntünü seç% Limit thumbnails to results: Görüntüləri axtarış sayı ilə limitlə: Annotation overlay: Form field overlay: Zoom: Böyüklük Rotate: Dönüş: Scroll: SkrolI Copy to clipboard: Yaddaşa kopyala Add annotation: Qeyd əlavə et: ShortcutHandler Action Davranış Key sequence Açar sırası Skip backward Geri ötür Skip forward İrəli ötür Move up Yuxarı daşı Move down Aşağı daşı Move left Sola daşı Move right Sağa daşı TreeView &Expand all Hamısını aç &Collapse all Hamısını bağla qpdfview-0.4.7/translations/qpdfview_bg.ts0000644000000000000000000017726112246606025017104 0ustar 00000000000000 BookmarkMenu &Open &Отваряне Open in new &tab Отваряне в нов &раздел &Remove bookmark &Премахване на отметка Database Jump to page %1 DocumentView Supported formats (%1) Поддържани формати (%1) Unlock %1 Отключване %1 Password: Парола: Information Информация Opening URL is disabled in the settings. Отварянето на URL е изключено от настройките. Warning Предупреждение SyncTeX data for '%1' could not be found. Не са открити данните SyncTeX за '%1'. Printing '%1'... Принтиране на '%1'... Page %1 Страница %1 FileAttachmentAnnotationWidget Save... Съхраняване... Save and open... Save file attachment Warning Предупреждение Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Намери предишния Find next Намери следващия MainWindow Warning Предупреждение Could not open '%1'. Не може да се отвори '%1'. Close all tabs but this one Close all tabs to the left Close all tabs to the right Open Отваряне Open in new tab Отваряне в нов раздел Could not refresh '%1'. Не може да се презареди '%1'. Save copy Запазване на копие Could not save copy at '%1'. Не може да се запази копие в '%1'. Save as Запазване като Could not save as '%1'. Не може да се запази като '%1'. Could not print '%1'. Не може да се отпечата '%1'. Jump to page Преход към страница Page: Страница: Add bookmark Label Jump to page %1 About qpdfview Относно qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview e четец на PDF документи, използващ раздели, базиран на Qt.</p><p>Тази версия съдържа:<ul> <li>PDF support using Poppler</li> <li>PDF поддръжка чрез Poppler</li> <li>PS support using libspectre</li> <li>PS поддръжка чрез libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu поддръжка чрез DjVuLibre</li> <li>Printing support using CUPS</li> <li>Поддръжка на отпечатване чрез CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>За повече информация погледнете <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a>.</p><p>&copy; 2012-2013 Разработчиците на qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Page width Ширина на страницата Page size Размер на страницата Match &case Съвпадение на &регистъра Highlight &all Избери &всички &Open... &Отваряне... Open in new &tab... Отваряне в нов &раздел... Open containing folder &Refresh &Опресняване &Save copy... &Запазване на копие... Save &as... Записване &като... &Print... &Печат... E&xit &Изход &Previous page &Предишна Страница &Next page &Следваща страница &First page &Първа страница &Last page &Последна страница &Jump to page... П&рескачане към страница... Jump &backward Прескачане на&зад Jump for&ward Прескачане на&пред &Search... &Търсене... Find previous Търсене на предишен Find next Търсене на следващ Cancel search Отказ от търсене &Copy to clipboard &Копиране в системния буфер &Add annotation &Добавяне на анотация Settings... Настройки... &Continuous Б&ез прекъсване между страниците &Two pages &Две страници Two pages &with cover page Две страници и &обложка &Multiple pages &Множество страници Zoom &in У&величи Zoom &out Н&амали Original &size &Оригинален размер Fit to page width По ширина Fit to page size Мащабиране до размера на страницата Rotate &left Завъртане на&ляво Rotate &right Завъртане на&дясно Invert colors Обръщане на цветовете Fonts... Шрифтове... &Fullscreen Цял &екран &Presentation... &Презентация... &Previous tab &Предишен раздел &Next tab &Следващ раздел &Close tab &Затваряне на раздел Close &all tabs Затваряне на в&сички раздели Close all tabs &but current tab Затваряне на всички раздели б&ез настоящия &Previous bookmark &Предишна отметка &Next bookmark &Следваща отметка &Add bookmark &Добавяне на отметка &Remove bookmark &Премахване на отметка Remove all bookmarks Премахване на всички отметки &Contents &Съдържание &About &Относно програмата &File &Файл &Edit &Редактиране &View &Изглед &Outline &Съдържание &Properties &Свойства &Thumbnails &Умалени снимки &Search &Търсене &Tool bars Ленти с &инструменти &Docks &Tabs Подпрозор&ци &Bookmarks &Отметки &Help &Помощ Model::PdfDocument Name Име Type Вид Embedded Вграден Subset File Файл Yes Да No Не Model::PdfPage Information Информация Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Нужна е версия 0.20.1 или по- висока на библиотеката Poppler, за да се добавят или премахват анотации. Model::PsDocument Title Заглавие Created for Създадено за Creator Създател Creation date Дата на създаване Format Формат Language level Ниво на език PageItem Go to page %1. Към страница %1. Go to page %1 of file '%2'. Към страница %1 от файл '%2'. Open '%1'. Отваряне на '%1'. Edit form field '%1'. Промяна от поле '%1'. Copy &text Копиране на &текст Copy &image Копиране на &снимка Save image to &file... Запазвнане на снимка в &file... Save image to file Запазване на снимка във файл Warning Предупреждение Could not save image to file '%1'. Не може да се запази снимка във файл '%1'. Add &text Добавяне на &текст Add &highlight Добавяне на п&одчертаване &Remove annotation П&ремахване на анотация PdfSettingsWidget Antialiasing: Изглаждане: Text antialiasing: Изглаждане на текст: None Без Full Пълно Reduced Намален Text hinting: Overprint preview: Solid Плътно Shaped Оформено Thin line mode: Режим на тънка линия: PluginHandler Critical Критично Could not load PDF plug-in! Не може да се зареди добавка за PDF! Could not load PS plug-in! Не може да се зареди добавка за PS! Could not load DjVu plug-in! Не може да се зареди добавка за DjVu! PrintDialog Fit to page: Побиране в страницата: Page ranges: Обхват на печата: All pages Всички страници Even pages Дори страниците Odd pages Нечетни страници Page set: Набор от страници: Single page Единична страница Two pages Две страници Four pages Четири страници Six pages Шест страници Nine pages Девет страници Sixteen pages Шестнадесет страници Number-up: Номер нагоре: Bottom to top and left to right Отдолу нагоре и отляво надясно Bottom to top and right to left Отдолу нагоре и отдясно наляво Left to right and bottom to top Отляво на дясно и отдолу нагоре Left to right and top to bottom Отляво надясно и отгоре надолу Right to left and bottom to top Отдясно наляво и отдолу нагоре Right to left and top to bottom Отдясно наляво и отгоре надолу Top to bottom and left to right Отгоре надолу и отляво надясно Top to bottom and right to left Отгоре надолу и от дясно на ляво Number-up layout: Extended options Разширени опции PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Не е позволен празен текст за търсене. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Използването на '--instance' изисква име на инстанция. Using '--instance' is not allowed without using '--unique'. Използването на '--instance' не е разрешено без използване на '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. Използването на '--search' изисква текст за търсене. SyncTeX data for '%1' could not be found. Не са открити данните SyncTeX за '%1'. Could not prepare signal handler. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift и Ctrl Shift and Alt Shift и Alt Ctrl and Alt Ctrl и Alt RecentlyUsedMenu Recently &used Последно &използвани &Clear list &Изчистване на лист SettingsDialog General Основни &Behavior Пов&едение &Graphics &Графека &Interface &Shortcuts Б&ързи клавиши &Modifiers Defaults Стандартни Defaults on current tab Open URL: Отваряне на URL: Auto-refresh: Автоматично опресняване: Effective after restart. Ефективно след рестартиране. Track recently used: Проследяване на последно използвани: Restore tabs: Възстановяване на раздели: Restore bookmarks: Възстановяване на отметки: Restore per-file settings: Възстановяване на настройки според файл: Synchronize presentation: Синхронизация на презентация: Default По подразбиране Presentation screen: Презентационен екран: None Без Highlight duration: Highlight color: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Редактор на източник: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: Background color: Paper color: Presentation background color: Pages per row: Page spacing: Thumbnail spacing: Thumbnail size: %1 MB Cache size: Prefetch: Prefetch distance: Top Bottom Left Right Tab position: As needed Always Never Tab visibility: New tab next to current tab: Recently used count: File tool bar: Edit tool bar: View tool bar: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Action Key sequence Skip backward Skip forward Move up Move down Move left Move right TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_bs.ts0000644000000000000000000017121212246606025017106 0ustar 00000000000000 BookmarkMenu &Open &Otvori Open in new &tab Otvori u novom &tabu &Remove bookmark &Ukloni zabilješku Database Jump to page %1 Idi na stranicu %1 DocumentView Supported formats (%1) Podržani formati (%1) Unlock %1 Otključaj %1 Password: Šifra: Information Informacije Opening URL is disabled in the settings. Otvaranje URL-a je onemogućeno u postavkama. Warning Upozorenje SyncTeX data for '%1' could not be found. SyncTeX podaci za '%1' nisu pronađeni. Printing '%1'... Štampam '%1'... Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Upozorenje Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Pronađi prethodno Find next Pronađi sljedeće MainWindow Warning Upozorenje Could not open '%1'. Nije moguće otvoriti '%1'. Open containing folder Open Otvori Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Otvori u novom tabu Could not refresh '%1'. Nije moguće osvježiti '%1'. Save copy Sačuvaj kopiju Could not save copy at '%1'. Nije moguće sačuvati kopiju u '%1'. Save as Sačuvaj kao Could not save as '%1'. Nije moguće sačuvati kao '%1'. Could not print '%1'. Nije moguće štampati '%1'. Jump to page Idi na stranicu Page: Stranica: Add bookmark Label Jump to page %1 Idi na stranicu %1 About qpdfview O qpdfviewu <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Širina stranice Page size Veličina stranice Match &case Slaganje &veličine slova Highlight &all Označi &sve &Open... &Otvori... Open in new &tab... Otvori u novom &tabu... &Refresh &Osvježi &Save copy... &Sačuvaj kopiju... Save &as... Sačuvaj &kao... &Print... &Štampaj... E&xit &Previous page &Prethodna stranica &Next page &Sljedeća stranica &First page &Prva stranica &Last page &Posljednja stranica &Jump to page... &Idi na stranicu... Jump &backward Jump for&ward &Search... &Pretraga... Find previous Pronađi prethodno Find next Pronađi sljedeće Cancel search Otkaži pretragu &Copy to clipboard &Kopiraj u privremenu memoriju &Add annotation &Dodaj napomenu Settings... Postavke... &Continuous &Neprekidno &Two pages &Dvije stranice Two pages &with cover page Dvije stranice &sa naslovnom stranicom &Multiple pages &Višestruke stranice Zoom &in Uveća&j Zoom &out Umanj&i Original &size Originalna &veličina Fit to page width Uklopi širinu stranice Fit to page size Uklopi veličinu stranice Rotate &left Rotiraj &lijevo Rotate &right Rotiraj &desno Invert colors Fonts... Fontovi... &Fullscreen Preko &cijelog ekrana &Presentation... &Prezentacija... &Previous tab &Prethodni tab &Next tab &Sljedeći tab &Close tab &Zatvori tab Close &all tabs Zatvori &sve tabove Close all tabs &but current tab Zatvori sve tabove &osim trenutnog &Previous bookmark &Prethodna zabilješka &Next bookmark &Sljedeća zabilješka &Add bookmark &Dodaj zabilješku &Remove bookmark &Remove zabilješku Remove all bookmarks Ukloni sve zabilješke &Contents &Sadržaj &About &O programu &File &Datoteka &Edit &Uredi &View &Prikaz &Search &Pretraga &Outline &Kontura &Properties &Svojstva &Thumbnails &Sličice &Tool bars &Alatne trake &Docks &Dokovi &Tabs &Tabovi &Bookmarks &Zabilješke &Help &Pomoć Model::PdfDocument Name Ime Type Vrsta: Embedded Ugrađeno Subset Podskup File Datoteka Yes Da No Ne Model::PdfPage Information Informacije Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Da biste dodali ili uklonili napomene potrebna vam je Poppler biblioteka verzija 0.20.1 ili novija. Model::PsDocument Title Naslov Created for Kreirano za Creator Napravio Creation date Datum kreiranja Format Format Language level Nino jezija PageItem Go to page %1. Idi na stranicu %1. Go to page %1 of file '%2'. Idi na stranicu %1 datoteke '%2'. Open '%1'. Otvori '%1'. Edit form field '%1'. Uredi polje obrasca '%1'. Copy &text Kopiraj &tekst Copy &image Kopiraj &sliku Save image to &file... Sačuvaj sliku u &datoteku... Save image to file Sačuvaj sliku u datoteku Warning Upozorenje Could not save image to file '%1'. Nije moguće sačuvati sliku u datoteku '%1'. Add &text Dodaj &tekst Add &highlight Dodaj &oznaku &Remove annotation &Ukloni napomenu PdfSettingsWidget Antialiasing: Antialiasing: Text antialiasing: Antialiasing teksta: None Ništa Full Reduced Text hinting: Savjeti o tekstu: Overprint preview: Pregled štampanja: Solid Shaped Thin line mode: PluginHandler Critical Kritično Could not load PDF plug-in! Nije moguće učitati PDF plugin! Could not load PS plug-in! Nije moguće učitati PS plugin! Could not load DjVu plug-in! Nije moguće učitati DjVu plugin! PrintDialog Fit to page: Uklopi u stranicu: Page ranges: Opsezi stranica: All pages Sve stranice Even pages Parne stranice Odd pages Neparne stranice Page set: Set stranica: Single page Jedna stranica Two pages Dvije stranice Four pages Četiri stranice Six pages Šest stranica Nine pages Devet stranica Sixteen pages Šesnaest stranica Number-up: Raspored: Bottom to top and left to right Od dna ka vrhu i s lijeva na desno Bottom to top and right to left Od dna ka vrhu i s desna na lijevo Left to right and bottom to top S lijeva na desno i od dna ka vrhu Left to right and top to bottom S lijeva na desno i od vrha ka dnu Right to left and bottom to top S desna na lijevo i od dna ka vrhu Right to left and top to bottom S desna na lijevo i od vrha ka dnu Top to bottom and left to right Od vrha ka dnu i s lijeva na desno Top to bottom and right to left Od vrha ka dnu i s desna na lijevo Number-up layout: Raspored: Extended options Proširene opcije PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. Ime instance ne može biti prazno. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Korištenje '--instance' zathejva i naziv instance. Using '--instance' is not allowed without using '--unique'. Korištenje '--instance' nije dozvoljeno bez korištenja '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. SyncTeX podaci za '%1' nisu pronađeni. Could not prepare signal handler. Nije moguće pripremiti handler za signal. QShortcut Shift Shift Ctrl Alt Alt Shift and Ctrl Shift and Alt Shift i Alt Ctrl and Alt RecentlyUsedMenu Recently &used Nedavno &korišteno &Clear list &Očisti listu SettingsDialog &Behavior &Ponašanje &Graphics &Grafika &Interface &Interfejs &Shortcuts &Modifiers &Prilagođavanja Defaults Podrazumijevano Defaults on current tab Open URL: Otvori URL: Auto-refresh: Automatsko osvježavanje: Effective after restart. Bit će u upotrebi nakon ponovnog pokretanja. Track recently used: Prati nedavno korišteno: Restore tabs: Povrati tabove: Restore bookmarks: Povrati zabilješke: Restore per-file settings: Povrati postavke za pojedinačne datoteke: Synchronize presentation: Sinhronizacija prezentacija: Default Podrazumijevano Presentation screen: Prezentacijski ekran: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' je zamijenjeno apsolutnom putanjom do datoteke. '%2' koje predstavlja '%3' je zamijenjeno linijom koja predstavlja broj kolone. Source editor: Uređivač izvornog teksta: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Ukrašavanje stranica: Decorate links: Ukrašavanje linkova: Decorate form fields: Ukrašavanje polja obrasca: None Ništa Highlight duration: Trajanje označavanja: Background color: Boja pozadine: Paper color: Boja papira: Pages per row: Stranica po redu: Page spacing: Razmak između stranica: Thumbnail spacing: Razmak između sličica: Thumbnail size: Veličina sličice: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB %1 MB Cache size: Veličina keša: Prefetch: Prefetch: Prefetch distance: Prefetch vrijednost: Top Vrh Bottom Dno Left Lijevo Right Desno Tab position: Položaj taba: As needed Kada je potrebno Always Uvijek Never Nikad Tab visibility: Vidljivost taba: New tab next to current tab: Recently used count: Current page in window title: File tool bar: Alatna traka datoteke: Edit tool bar: Alatna traka za uređivanje: View tool bar: Alatna traka za prikaz: Annotation overlay: Form field overlay: Zoom: Uvećanje: Rotate: Rotiraj: Scroll: Skrolanje: Copy to clipboard: Kopiraj u međumemoriju: Add annotation: Dodaj napomenu: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all Raširi sv&e &Collapse all &Zatvori sve qpdfview-0.4.7/translations/qpdfview_ca.ts0000644000000000000000000017560712246606025017101 0ustar 00000000000000 BookmarkMenu &Open &Obre Open in new &tab Obrir en nova pes&tanya &Remove bookmark Elimina ma&rcador Database Jump to page %1 Ves a pàgina %1 DocumentView Supported formats (%1) Formats suportats (%1) Unlock %1 Desbloqueja %1 Password: Contrasenya: Information Informació Opening URL is disabled in the settings. S'ha desactivat l'apertura d'URL a la configuració. Warning Avís SyncTeX data for '%1' could not be found. No s'han trobat les dades SyncText per «%1». Printing '%1'... Imprimint '%1'... Page %1 Pàgina %1 FileAttachmentAnnotationWidget Save... Desa... Save and open... Desa i obri... Save file attachment Desa l'adjunt Warning Atenció Could not save file attachment to '%1'. No s'ha pogut desar l'adjunt a '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_ca.html Find previous Cerca l'anterior Find next Cerca el següent MainWindow Warning Avís Could not open '%1'. No s'ha pogut obrir '%1'. Close all tabs but this one Tanca totes les pestanyes excepte esta Close all tabs to the left Tanca totes les pestanyes a l'esquerra Close all tabs to the right Tanca totes les pestanyes a la dreta Open Obre Open in new tab Obre en una pestanya nova Could not refresh '%1'. No s'ha pogut actualitzar '%1'. Save copy Desa còpia Could not save copy at '%1'. No s'ha pogut guardar una còpia a '%1'. Save as Anomena i desa Could not save as '%1'. No es pot desar com a '%1'. Could not print '%1'. No s'ha pogut imprimir '%1'. Jump to page Vés a la pàgina Page: Pàgina: Add bookmark Afegeix un nou marcador Label Etiqueta Jump to page %1 Ves a pàgina %1 About qpdfview Sobre qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview és un visor de documents amb pestanyes fent ús de Qt.</p><p>Esta versió inclou:<ul> <li>PDF support using Poppler</li> <li>Suport de PDF fent ús de Poppler</li> <li>PS support using libspectre</li> <li>Suport de PS fent ús de libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Suport de DjVu fent ús de DjVuLibre</li> <li>Printing support using CUPS</li> <li>Suport d'impressió fent ús de CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Veja <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> per a més informació.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? El document '%1' ha estat modificat. Voleu desar els vostres canvis? Page width Amplada de pàgina Page size Mida de la pàgina Match &case Coincidència de majús&cules Highlight &all Res&alta tot &Open... &Obre... Open in new &tab... Obre en nova pes&tanya... Open containing folder Obre la carpeta contenidora &Refresh &Refresca &Save copy... De&sa una còpia... Save &as... &Anomena i desa... &Print... Im&primir... E&xit Ei&xir &Previous page &Pàgina anterior &Next page Pàgi&na següent &First page &Primera pàgina &Last page Ú&ltima pàgina &Jump to page... &Bota a la pàgina ... Jump &backward Torna enrere Jump for&ward Ves endavant &Search... &Cerca... Find previous Cerca l'anterior Find next Cerca el següent Cancel search Cancel·la la cerca &Copy to clipboard &Còpia al portapapers &Add annotation &Afegir anotació Settings... Configuració… &Continuous &Continu &Two pages &Doble pàgina Two pages &with cover page Doble pàgina &amb portada &Multiple pages Múltiples pàgines Zoom &in A&costa Zoom &out A&llunya Original &size Mida &original Fit to page width Ajusta a l'amplària de la pàgina Fit to page size Ajusta a la mida de la pàgina Rotate &left Rota a &l'esquerra Rotate &right Rota a la &dreta Invert colors Inverteix els colors Fonts... Fonts... &Fullscreen Pantalla &completa &Presentation... &Presentació &Previous tab &Pestanya anterior &Next tab &Pestanya següent &Close tab Tan&ca pestanya Close &all tabs Tanc&a totes les pestanyes Close all tabs &but current tab Tanca totes les pestanyes &excepte l'actual &Previous bookmark &Anterior marcador &Next bookmark &Següent marcador &Add bookmark &Afegix marcador &Remove bookmark Elimina ma&rcador Remove all bookmarks Elimina tots els marcadors &Contents &Continguts &About Qu&ant a &File &Fitxer &Edit &Edita &View &Visualitza &Outline C&ontorn &Properties &Propietats &Thumbnails &Miniatures &Search &Cerca &Tool bars &Barra d'eines &Docks &Ports &Tabs Pes&tanyes &Bookmarks &Adreces d'interès &Help A&juda Model::PdfDocument Name Nom Type Tipus Embedded Incrustat Subset Subconjunt File Fitxer Yes No No Model::PdfPage Information Informació Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Es necessita una versió 2.20 o superior de la biblioteca Poppler per afegir o eliminar anotacions. Model::PsDocument Title Títol Created for Creat per a Creator Autor Creation date Data de creació Format Formatar Language level Nivell d'idioma PageItem Go to page %1. Ves a la pàgina %1. Go to page %1 of file '%2'. Ves a la pàgina %1 del fitxer '%2'. Open '%1'. Obre '%1'. Edit form field '%1'. Edita formulari '%1'. Copy &text Còpia &text Copy &image Còpia &imatge Save image to &file... Desa imatge a un &fitxer... Save image to file Desa imatge a un fitxer... Warning Avís Could not save image to file '%1'. No s'ha pogut guardar la imatge a l'arxiu '%1'. Add &text Afegix &text Add &highlight &Destaca &Remove annotation &Elimina anotació PdfSettingsWidget Antialiasing: Antidentat: Text antialiasing: Antidentat de text: None Res Full Ple Reduced Reduït Text hinting: Suggerències de text: Overprint preview: Previsualització de la impressió: Solid Sòlid Shaped Amb forma Thin line mode: Mode de línia fina: PluginHandler Critical Crític Could not load PDF plug-in! No s'ha pogut carregar el complement de PDF! Could not load PS plug-in! No s'ha pogut carregar el complement de PS! Could not load DjVu plug-in! No s'ha pogut carregar el complement de DjVu! PrintDialog Fit to page: Encaixa a la pàgina: Page ranges: Interval de pàgines: All pages Totes les pàgines Even pages Pàgines pars Odd pages Pàgines senars Page set: Conjunt de pàgines: Single page Només una pàgina Two pages Dos pàgines Four pages Quatre págines Six pages Sis pàgines Nine pages Nou pàgines Sixteen pages Setze pàgines Number-up: Augmenta número: Bottom to top and left to right De baix a dalt i d'esquerra a dreta Bottom to top and right to left De baix a dalt i de dreta a esquerra Left to right and bottom to top D'esquerra a dreta i de baix a dalt Left to right and top to bottom D'esquerra a dreta i de dalt a baix Right to left and bottom to top De dreta a esquerra i de baix a dalt Right to left and top to bottom De dreta a esquerra i de dalt a baix Top to bottom and left to right De dalt a baix i d'esquerra a dreta Top to bottom and right to left De dalt a baix i de dreta a esquerra Number-up layout: Disseny del número de seguiment: Extended options Opcions esteses PsSettingsWidget Graphics antialias bits: Bits del gràfics antidentat: Text antialias bits: Bits del text antidentat: QObject An empty instance name is not allowed. No es permet una instància buida. An empty search text is not allowed. No es permet una cadena de cerca buida. Choose instance Tria instància Instance: Instància: Unknown command-line option '%1'. Opció de línia de comandaments '%1' desconeguda. Using '--instance' requires an instance name. Usar '--instance' necessita d'un nom d'instància. Using '--instance' is not allowed without using '--unique'. Usar '--instance' no està permés sense l'ús de '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. El nom d'una instància només pot contindre els caràcters "[A-Z][a-z][0-9]_" i no pot començar per un número. Using '--search' requires a search text. L'ús de '--search' necessita un text de cerca. SyncTeX data for '%1' could not be found. No s'han trobat les dades SyncText per «%1». Could not prepare signal handler. No s'ha pogut preparar el gestor de senyals. QShortcut Shift Maj Ctrl Ctrl Alt Alt Shift and Ctrl Maj i Ctrl Shift and Alt Maj i Alt Ctrl and Alt Ctrl i Alt RecentlyUsedMenu Recently &used &Usats recentment &Clear list &Neteja la llista SettingsDialog General Genèriques &Behavior &Comportament &Graphics &Gràfics &Interface &Interfície &Shortcuts Drecere&s &Modifiers &Modificadors Defaults Valors per defecte Defaults on current tab Per defecte a la pestanya actual Open URL: Obre URL: Auto-refresh: Auto-actualització: Effective after restart. Efectiu desprès de reiniciar. Track recently used: Rastreja recents: Restore tabs: Restaura pestanyes: Restore bookmarks: Restaura marcadors: Restore per-file settings: Restaura opcions per cada fitxer: Synchronize presentation: Sincronitza presentació: Default Per defecte Presentation screen: Pantalla de presentació: None Cap Highlight duration: Remarca la durada: Highlight color: Color de ressaltat: Annotation color: Color de l'anotació: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' es canviarà pel camí absolut. '%2' resp. '%3' es canviarà per la línia resp. del número de la columna. Source editor: Editor de codi: Keep obsolete pixmaps: Manté els pixmaps obsolets: Use device pixel ratio: Usa la ràtio de píxel del dispositiu: Decorate pages: Decora pàgines: Decorate links: Decora enllaços: Decorate form fields: Decora camps del formulari: Background color: Color de fons: Paper color: Color del paper: Presentation background color: Color de fons de la presentació: Pages per row: Pàgines per fila: Page spacing: Espaiat de pàgina: Thumbnail spacing: Espaiat de miniatures: Thumbnail size: Mida de les miniatures: %1 MB %1 MB Cache size: Mida de la memòria cau: Prefetch: Precarrega: Prefetch distance: Distància de precàrrega: Top Superior Bottom Inferior Left Esquerra Right Dreta Tab position: Posició de pestanya: As needed Quan calgui Always Sempre Never Mai Tab visibility: Visibilitat de la pestanya: New tab next to current tab: Nova pestanya seguida de la actual: Recently used count: Nombre d'usats recentment: File tool bar: Arxiu barra d'eines: Edit tool bar: Edita la barra d'eines: View tool bar: Vore barra d'eines: Current page in window title: Pàgina actual al títol de la finestra: Instance name in window title: El nom de la instància al títol de la finestra: Synchronize outline view: Sincronitza la vista exterior: Highlight current thumbnail: Ressalta la miniatura actual: Limit thumbnails to results: Limita miniatures als resultats: Annotation overlay: Superposició d'anotacions: Form field overlay: Superposició del camp de formulari: Zoom: Ampliació: Rotate: Gira: Scroll: Desplaçament: Copy to clipboard: Còpia al porta-papers: Add annotation: Afegix anotació: ShortcutHandler Action Acció Key sequence Seqüència de tecles Skip backward Vés enrere Skip forward Salta endavant Move up Puja Move down Baixa Move left Mou a l'esquerra Move right Mou a la dreta TreeView &Expand all &Expandeix-ho tot &Collapse all &Col·lapsa tot: qpdfview-0.4.7/translations/qpdfview_cs.ts0000644000000000000000000017541012246606025017113 0ustar 00000000000000 BookmarkMenu &Open &Otevřít Open in new &tab Otevřít v nové &kartě &Remove bookmark &Odstranit záložku Database Jump to page %1 Skočit na stranu %1 DocumentView Supported formats (%1) Podporované formáty (%1) Unlock %1 Odemknout %1 Password: Heslo: Information Informace Opening URL is disabled in the settings. Otevření adresy (URL) je v nastavení zakázáno. Warning Varování SyncTeX data for '%1' could not be found. Nepodařilo se najít SyncTeX data pro '%1'. Printing '%1'... Tiskne se '%1'... Page %1 Strana %1 FileAttachmentAnnotationWidget Save... Uložit... Save and open... Uložit a otevřít... Save file attachment Uložit přílohu souboru Warning Varování Could not save file attachment to '%1'. Nepodařilo se uložit přílohu souboru so '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Najít předchozí Find next Najít další MainWindow Warning Varování Could not open '%1'. Nepodařilo se otevřít '%1'. Close all tabs but this one Zavřít všechny karty kromě této Close all tabs to the left Zavřít všechny karty nalevo Close all tabs to the right Zavřít všechny karty napravo Open Otevřít Open in new tab Otevřít v nové kartě Could not refresh '%1'. Nepodařilo se obnovit '%1'. Save copy Uložit kopii Could not save copy at '%1'. Nepodařilo se uložit kopii v '%1'. Save as Uložit jako Could not save as '%1'. Nepodařilo se uložit jako '%1'. Could not print '%1'. Nepodařilo se vytisknout '%1'. Jump to page Přejít na stranu Page: Strana: Add bookmark Přidat záložku Label Štítek Jump to page %1 Skočit na stranu %1 About qpdfview O programu qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview je prohlížeč dokumentů s kartami používající Qt.</p><p>Tato verze zahrnuje:<ul> <li>PDF support using Poppler</li> <li>Podpora pro PDF používající Poppler</li> <li>PS support using libspectre</li> <li>Podpora pro PS používající libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Podpora pro DjVu používající DjVuLibre</li> <li>Printing support using CUPS</li> <li>Podpora pro tisk používající CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Podívejte se na <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> pro další informace.</p><p>&copy; 2012-2013 Vývojáři qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Dokument '%1' byl změněn. Chcete uložit své změny? Page width Šířka strany Page size Velikost strany Match &case Rozlišovat velká a malá &písmena Highlight &all Zvýraznit &vše &Open... &Otevřít... Open in new &tab... Otevřít v nové &kartě... Open containing folder Otevřít obsahující složku &Refresh &Obnovit &Save copy... &Uložit kopii... Save &as... Uložit &jako... &Print... &Tisk... E&xit &Ukončit &Previous page &Předchozí strana &Next page &Další strana &First page P&rvní strana &Last page Pos&lední strana &Jump to page... Pře&jít na stranu... Jump &backward Skočit &zpět Jump for&ward Skočit &vpřed &Search... &Hledat... Find previous Najít předchozí Find next Najít další Cancel search Zrušit hledání &Copy to clipboard &Kopírovat do schránky &Add annotation &Přidat poznámku Settings... Nastavení... &Continuous &Průběžně &Two pages &Dvě strany Two pages &with cover page Dvě strany &s titulní stranou &Multiple pages &Více stran Zoom &in &Přiblížit Zoom &out &Oddálit Original &size Původní &velikost Fit to page width Přizpůsobit šířce strany Fit to page size Přizpůsobit velikosti strany Rotate &left Otočit v&levo Rotate &right Otočit v&pravo Invert colors Obrátit barvy Fonts... Písma... &Fullscreen &Celá obrazovka &Presentation... &Promítání... &Previous tab &Předchozí karta &Next tab &Další karta &Close tab &Zavřít kartu Close &all tabs Zavřít &všechny karty Close all tabs &but current tab Zavřít všechny karty &kromě nynější karty &Previous bookmark &Předchozí záložka &Next bookmark &Další záložka &Add bookmark &Přidat záložku &Remove bookmark &Odstranit záložku Remove all bookmarks Odstranit všechny záložky &Contents &Obsah &About O &programu &File &Soubor &Edit Úp&ravy &View &Pohled &Outline &Osnova &Properties &Vlastnosti &Thumbnails &Náhledy &Search &Hledání &Tool bars &Nástrojové panely &Docks Postranní p&anely &Tabs &Karty &Bookmarks &Záložky &Help &Nápověda Model::PdfDocument Name Název Type Typ Embedded Vloženo Subset Podmnožina File Soubor Yes Ano No Ne Model::PdfPage Information Informace Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Pro přidávání nebo odstraňování poznámek je požadována verze 0.20.1 nebo vyšší knihovny Poppler. Model::PsDocument Title Název Created for Vytvořeno pro Creator Tvůrce Creation date Datum vytvoření Format Formát Language level Úroveň jazyka PageItem Go to page %1. Jít na stranu %1. Go to page %1 of file '%2'. Jít na stranu %1 souboru '%2'. Open '%1'. Otevřít '%1'. Edit form field '%1'. Upravit formulářové pole '%1'. Copy &text Kopírovat &text Copy &image Kopírovat &obrázek Save image to &file... Uložit obrázek do &souboru... Save image to file Uložit obrázek do souboru Warning Varování Could not save image to file '%1'. Nepodařilo se uložit obrázek do souboru '%1'. Add &text Přidat &text Add &highlight Přidat &zvýraznění &Remove annotation &Odstranit poznámku PdfSettingsWidget Antialiasing: Vyhlazování: Text antialiasing: Vyhlazování textu: None Žádné Full Úplné Reduced Omezené Text hinting: Instruování textu: Overprint preview: Náhled přetisku: Solid Vyplněný Shaped Ohraničený Thin line mode: Režim tenké čáry: PluginHandler Critical Vážné Could not load PDF plug-in! Nepodařilo se nahrát přídavný modul PDF! Could not load PS plug-in! Nepodařilo se nahrát přídavný modul PS! Could not load DjVu plug-in! Nepodařilo se nahrát přídavný modul DjVu! PrintDialog Fit to page: Umístit na stranu: Page ranges: Rozsah stran: All pages Všechny strany Even pages Sudé strany Odd pages Liché strany Page set: Soubor stran: Single page Jedna strana Two pages Dvě strany Four pages Čtyři strany Six pages Šest stran Nine pages Devět stran Sixteen pages Šestnáct stran Number-up: Přepočítat: Bottom to top and left to right Zezdola nahoru a zleva doprava Bottom to top and right to left Zezdola nahoru a zprava doleva Left to right and bottom to top Zleva doprava a zezdola nahoru Left to right and top to bottom Zleva doprava a shora dolů Right to left and bottom to top Zprava doleva a zezdola nahoru Right to left and top to bottom Zprava doleva a shora dolů Top to bottom and left to right Shora dolů a zleva doprava Top to bottom and right to left Shora dolů a zprava doleva Number-up layout: Přepočítat rozmístění: Extended options Pokročilé volby PsSettingsWidget Graphics antialias bits: Bity vyhlazování grafiky: Text antialias bits: Bity vyhlazování textu: QObject An empty instance name is not allowed. Prázdný název instance není povolen. An empty search text is not allowed. Prázdný text k vyhledání není při vyhledávání povolen. Choose instance Vybrat instanci Instance: Instance: Unknown command-line option '%1'. Neznámá volba příkazového řádku '%1'. Using '--instance' requires an instance name. Použití'--instance' vyžaduje název instance. Using '--instance' is not allowed without using '--unique'. Použití'--instance' není povoleno bez použití '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Název instance musí obsahovat pouze znaky "[A-Z][a-z][0-9]_" a nesmí začínat číslem. Using '--search' requires a search text. Použití'--search' vyžaduje text k vyhledání. SyncTeX data for '%1' could not be found. Nepodařilo se najít SyncTeX data pro '%1'. Could not prepare signal handler. Nepodařilo se připravit zacházení se signálem. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift a Ctrl Shift and Alt Shift a Alt Ctrl and Alt Ctrl a Alt RecentlyUsedMenu Recently &used Nedávno &použité &Clear list S&mazat seznam SettingsDialog General Obecné &Behavior &Chování &Graphics &Grafika &Interface &Rozhraní &Shortcuts &Zkratky &Modifiers &Modifikátory Defaults Výchozí Defaults on current tab Výchozí na nynější kartě Open URL: Otevřít adresu (URL): Auto-refresh: Obnovit automaticky: Effective after restart. Účinné po opětovném spuštění. Track recently used: Sledovat nedávno použité: Restore tabs: Obnovit karty: Restore bookmarks: Obnovit záložky: Restore per-file settings: Obnovit nastavení souborů: Synchronize presentation: Ovládat promítání: Default Výchozí Presentation screen: Promítací obrazovka: None Žádný Highlight duration: Doba trvání zvýraznění: Highlight color: Barva zvýraznění: Annotation color: Barva poznámky: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' je nahrazeno absolutní souborovou cestou. '%2' příp. '%3' je nahrazeno číslem řádku popřípadě sloupce. Source editor: Editor zdroje: Keep obsolete pixmaps: Zachovat zastaralé pixmapy: Use device pixel ratio: Použít poměr pixelu zařízení: Decorate pages: Obtáhnout strany: Decorate links: Obtáhnout odkazy: Decorate form fields: Obtáhnout formulářová pole: Background color: Barva pozadí: Paper color: Barva papíru: Presentation background color: Barva pozadí promítání: Pages per row: Stran na řádek: Page spacing: Odstup stran: Thumbnail spacing: Odstup náhledů: Thumbnail size: Velikost náhledů: %1 MB %1 MB Cache size: Velikost vyrovnávací paměti: Prefetch: Přednatažení: Prefetch distance: Vzdálenost přednatažení: Top Nahoře Bottom Dole Left Vlevo Right Vpravo Tab position: Umístění karet: As needed Podle potřeby Always Vždy Never Nikdy Tab visibility: Viditelnost karet: New tab next to current tab: Nová karta vedle nynější karty: Recently used count: Počet nedávno použitých: File tool bar: Panel nástrojů pro soubor: Edit tool bar: Panel nástrojů pro úpravy: View tool bar: Panel nástrojů pro pohled: Current page in window title: Nynější strana v názvu okna: Instance name in window title: Název instance v názvu okna: Synchronize outline view: Zvýraznit položku osnovy: Highlight current thumbnail: Zvýraznit nynější náhled: Limit thumbnails to results: Omezit náhledy na výsledky: Annotation overlay: Překrytí poznámky: Form field overlay: Překrytí formulářového pole: Zoom: Zvětšení: Rotate: Otočit: Scroll: Posunout: Copy to clipboard: Kopírovat do schránky: Add annotation: Přidat poznámku: ShortcutHandler Action Činnost Key sequence Klávesová zkratka Skip backward Skočit zpět Skip forward Skočit vpřed Move up Posunout nahoru Move down Posunout dolů Move left Posunout doleva Move right Posunout doprava TreeView &Expand all &Rozbalit vše &Collapse all &Sbalit vše qpdfview-0.4.7/translations/qpdfview_da.ts0000644000000000000000000017037512246606025017077 0ustar 00000000000000 BookmarkMenu &Open &Åbn Open in new &tab Åbn i ny&t faneblad &Remove bookmark F&jern bogmærke Database Jump to page %1 Gå til side %1 DocumentView Supported formats (%1) Understøttede formater (%1) Unlock %1 Lås %1 op Password: Adgangskode: Information Oplysninger Opening URL is disabled in the settings. Åbning af hjemmesider er deaktiveret i indstillingerne. Warning Advarsel SyncTeX data for '%1' could not be found. SyncTeX-data for '%1' kunne ikke findes. Printing '%1'... Udskriver '%1'... Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Advarsel Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Find forrige Find next Find næste MainWindow Warning Advarsel Could not open '%1'. Kunne ikke åbne '%1'. Open containing folder Open Åbn Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Åbn i nyt faneblad Could not refresh '%1'. Kunne ikke opdatere '%1'. Save copy Gem kopi Could not save copy at '%1'. Kunne ikke gemme kopi i '%1'. Save as Gem som Could not save as '%1'. Kunne ikke gemme som '%1'. Could not print '%1'. Kunne ikke udskrive '%1'. Jump to page Gå til side Page: Side: Add bookmark Label Jump to page %1 Gå til side %1 About qpdfview Om qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Sidebredde Page size Sidestørrelse Match &case &Versalfølsom Highlight &all Marker &alle &Open... &Åbn... Open in new &tab... Åbn i nyt &faneblad... &Refresh &Opdater &Save copy... &Gem kopi... Save &as... Gem &som... &Print... &Udskriv... E&xit &Previous page &Foregående side &Next page &Næste side &First page Første &side &Last page &Sidste side &Jump to page... &Gå til side... Jump &backward Jump for&ward &Search... &Søg... Find previous Find forrige Find next Find næste Cancel search Fortryd søgning &Copy to clipboard &Kopier til udklipsholder &Add annotation Tilføj &notat Settings... Indstillinger... &Continuous &Fortløbende &Two pages &To sider Two pages &with cover page To sider &med forside &Multiple pages &Flere sider Zoom &in Fors&tør Zoom &out For&mindsk Original &size Oprindelig &størrelse Fit to page width Tilpas sidebredden Fit to page size Tilpas sidestørrelsen Rotate &left Roter til &venstre Rotate &right Roter til &højre Invert colors Fonts... Skrifttyper... &Fullscreen &Fuldskærm &Presentation... &Præsentation... &Previous tab &Forrige faneblad &Next tab &Næste faneblad &Close tab &Luk faneblad Close &all tabs Luk &alle faneblade Close all tabs &but current tab Luk alle &undtagen dette faneblad &Previous bookmark &Forrige bogmærke &Next bookmark &Næste bogmærke &Add bookmark &Tilføj bogmærke &Remove bookmark F&jern bogmærke Remove all bookmarks Fjern alle bogmærker &Contents &Indhold &About &Om &File &Filer &Edit &Rediger &View &Vis &Search &Søg &Outline &Oversigt &Properties &Egenskaber &Thumbnails &Miniaturebilleder &Tool bars &Værktøjslinjer &Docks &Paneler &Tabs &Faneblade &Bookmarks &Bogmærker &Help &Hjælp Model::PdfDocument Name Navn Type Type Embedded Indlejret Subset File Fil Yes Ja No Nej Model::PdfPage Information Oplysninger Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Der kræves version 0.20 eller højere af biblioteket Poppler, for at tilføje eller fjerne annoteringer. Model::PsDocument Title Titel Created for Oprettet for Creator Oprettet af Creation date Oprettelsesdato Format Format Language level Sprogniveau PageItem Go to page %1. Gå til side %1. Go to page %1 of file '%2'. Gå til side %1 i filen "%2". Open '%1'. Åbn "%1". Edit form field '%1'. Rediger formularfeltet '%1'. Copy &text Kopier &tekst Copy &image Kopier &billede Save image to &file... Gem billede til &fil... Save image to file Gam billede til fil Warning Advarsel Could not save image to file '%1'. Kunne ikke gemme billede til fil '%1'. Add &text Tilføj &tekst Add &highlight Tilføj &markering &Remove annotation &Fjern annotering PdfSettingsWidget Antialiasing: Text antialiasing: None Ingen Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Kritisk Could not load PDF plug-in! PDF-udvidelsesmodulet kunne ikke indlæses! Could not load PS plug-in! PS-udvidelsesmodulet kunne ikke indlæses! Could not load DjVu plug-in! DjVu-udvidelsesmodulet kunne ikke indlæses! PrintDialog Fit to page: Tilpas side: Page ranges: Sideintervaller: All pages Alle sider Even pages Lige sider Odd pages Ulige sider Page set: Sidevalg: Single page Enkelt side Two pages To sider Four pages Fire sider Six pages Seks sider Nine pages Ni sider Sixteen pages Seksten sider Number-up: Sider per ark: Bottom to top and left to right Nedefra til top og venstre til højre Bottom to top and right to left Nedefra til top og højre til venstre Left to right and bottom to top Venstre til højre og nedefra og op Left to right and top to bottom Venstre til højre og oppefra og ned Right to left and bottom to top Højre til venstre og nedefra og op Right to left and top to bottom Højre til venstre og top til bund Top to bottom and left to right Oppefra og ned og venstre til højre Top to bottom and right to left Oppefra og ned og højre til venstre Number-up layout: Sideopsætning: Extended options Udvidede indstillinger PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. Navnet på instansen kan ikke stå tomt. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Anvendes '--instance' kræver det et navn på den instans. Using '--instance' is not allowed without using '--unique'. Det er ikke tilladt at bruge '--instance' uden også at bruge '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. SyncTeX-data for '%1' kunne ikke findes. Could not prepare signal handler. Kunne ikke klargøre signalhåndteringen. QShortcut Shift Ctrl Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used Senest &brugte &Clear list &Ryd liste SettingsDialog General &Behavior &Opførsel &Graphics G&rafik &Interface &Grænseflade &Shortcuts &Modifiers &Tilpasninger Defaults Standardværdier Open URL: Åbn adresse: Auto-refresh: Automatisk genindlæsning: Effective after restart. Benyttes efter genstart. Track recently used: Husk senest anvendte: Restore tabs: Genskab faneblade: Restore bookmarks: Genskab bogmærker: Restore per-file settings: Genskab filindstillinger: Synchronize presentation: Synkroniser præsentation: Default Standard Presentation screen: Præsentationsskærm Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' erstattes af den absolutte filsti. '%2' og '%3' erstattes hhv. af linje- og kolonnenummer. Source editor: Kilderedigering: Decorate pages: Pynt sider: Decorate links: Pynt henvisninger: Decorate form fields: Pynt formularfelter: None Ingen Defaults on current tab Highlight color: Highlight duration: Fremhæv varighed: Keep obsolete pixmaps: Use device pixel ratio: Background color: Baggrundsfarve: Paper color: Papirfarve: Presentation background color: Pages per row: Sider per række: Page spacing: Sideafstand: Thumbnail spacing: Miniatureafstand: Thumbnail size: Miniaturestørrelse: %1 MB %1 MB Cache size: Cache-størrelse: Prefetch: Forudindlæs: Prefetch distance: Afstand for afhent på forkant: Top Øverst Bottom Nederst Left Venstre Right Højre Tab position: Fanebladsplacering: As needed Efter behov Always Altid Never Aldrig Tab visibility: Synlighed af faneblad: New tab next to current tab: Recently used count: Current page in window title: File tool bar: Filværktøjslinje: Edit tool bar: Redigeringsværktøjslinje: View tool bar: Vis-værktøjslinje: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Zoom: Rotate: Rotér: Scroll: Rul: Copy to clipboard: Kopiér til udklipsholder: Add annotation: Tilføj annotering: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &Fold alle ud &Collapse all &Fold alle sammen qpdfview-0.4.7/translations/qpdfview_de.ts0000644000000000000000000017545112246606025017103 0ustar 00000000000000 BookmarkMenu &Open Öff&nen Open in new &tab In neuem Rei&ter öffnen &Remove bookmark Lesezeichen &entfernen Database Jump to page %1 Gehe zu Seite %1 DocumentView Supported formats (%1) Unterstützte Formate (%1) Unlock %1 %1 entsperren Password: Kennwort: Information Hinweis Opening URL is disabled in the settings. Das Öffnen von URL ist in den Einstellungen deaktiviert. Warning Warnung SyncTeX data for '%1' could not be found. Keine SyncTeX-Daten für »%1« gefunden. Printing '%1'... Drucke »%1« … Page %1 Seite %1 FileAttachmentAnnotationWidget Save... Speichern... Save and open... Speichern und Öffnen... Save file attachment Dateianhang speichern Warning Warnung Could not save file attachment to '%1'. Dateianhang konnte nicht in '%1' gespeichert werden. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_de.html Find previous Rückwarts suchen Find next Vorwärts suchen MainWindow Warning Warnung Could not open '%1'. Konnte »%1« nicht öffnen. Close all tabs but this one Alle Reiter bis auf diesen schließen Close all tabs to the left Alle Reiter zur Linken schließen Close all tabs to the right Alle Reiter zur Rechten schließen Open Öffnen Open in new tab In neuem Reiter öffnen Could not refresh '%1'. Konnte »%1« nicht aktualisieren. Save copy Kopie speichern Could not save copy at '%1'. Konnte keine Kopie unter »%1« speichern. Save as Speichern unter Could not save as '%1'. Konnte nicht unter '%1' speichern. Could not print '%1'. Konnte »%1« nicht drucken. Jump to page Springe zu Seite Page: Seite: Add bookmark Lesezeichen hinzufügen Label Bezeichnung Jump to page %1 Gehe zu Seite %1 About qpdfview Über qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview ist ein Dokumentenbetrachter der Qt verwendet.</p><p>Diese Version enthält:<ul> <li>PDF support using Poppler</li> <li>PDF-Unterstützung mittels Poppler</li> <li>PS support using libspectre</li> <li>PS-Unterstützung mittels libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu-Unterstützung mittels DjVuLibre</li> <li>Printing support using CUPS</li> <li>Druckunterstützung mittels CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Siehe <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> für weitere Informationen.</p><p>&copy; 2012-2013 Die qpdfview-Entwickler</p> The document '%1' has been modified. Do you want to save your changes? Das Dokument »%1« wurde verändert. Möchten sie ihre Änderungen speichern? Page width Seitenbreite Page size Seitengröße Match &case Groß-/&Kleinschreibung beachten Highlight &all &Alle hervorheben &Open... Öff&nen … Open in new &tab... In neuem Rei&ter öffnen … Open containing folder Öffne beinhaltendes Verzeichnis &Refresh &Aktualisieren &Save copy... Kopie &speichern … Save &as... Speichern &unter … &Print... &Drucken … E&xit &Beenden &Previous page &Vorige Seite &Next page &Nächste Seite &First page &Erste Seite &Last page &Letzte Seite &Jump to page... &Zu Seite springen … Jump &backward Springe &rückwärts Jump for&ward Springe vor&wärts &Search... &Suchen … Find previous Rückwarts suchen Find next Vorwärts suchen Cancel search Suche abbrechen &Copy to clipboard In &Zwischenablage kopieren &Add annotation &Anmerkung hinzufügen Settings... Einstellungen … &Continuous &Fortlaufend &Two pages &Zweiseitig Two pages &with cover page Zweiseitig &mit Titelseite &Multiple pages Mehrere &Seiten Zoom &in Ver&größern Zoom &out Ver&kleinern Original &size &Ursprüngliche Größe Fit to page width An Seitenbreite anpassen Fit to page size An Seitengröße anpassen Rotate &left Nach &links drehen Rotate &right Nach &rechts drehen Invert colors Farben umkehren Fonts... Schriften … &Fullscreen &Vollbild &Presentation... &Präsentation … &Previous tab &Vorheriger Reiter &Next tab &Nächster Reiter &Close tab Reiter &schließen Close &all tabs &Alle Reiter schließen Close all tabs &but current tab Alle Reiter &bis auf den aktuellen schließen &Previous bookmark &Voriges Lesezeichen &Next bookmark &Nächstes Lesezeichen &Add bookmark Lesezeichen &hinzufügen &Remove bookmark Lesezeichen &entfernen Remove all bookmarks Alle Lesezeichen entfernen &Contents &Inhalt &About Ü&ber &File &Datei &Edit &Bearbeiten &View &Ansicht &Outline &Gliederung &Properties &Eigenschaften &Thumbnails &Vorschaubilder &Search S&uchen &Tool bars &Werkzeugleisten &Docks &Paletten &Tabs &Reiter &Bookmarks &Lesezeichen &Help &Hilfe Model::PdfDocument Name Name Type Typ Embedded Eingebettet Subset Teilmenge File Datei Yes Ja No Nein Model::PdfPage Information Hinweis Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Das Hinzufügen oder Entfernen von Anmerkungen benötigt die Poppler-Bibliothek in Version 0.20.1 oder höher. Model::PsDocument Title Titel Created for Erstellt für Creator Ersteller Creation date Erstellungsdatum Format Format Language level Sprachniveau PageItem Go to page %1. Zu Seite %1 gehen. Go to page %1 of file '%2'. Gehe zu Seite %1 in Datei »%2«. Open '%1'. "%1" öffnen. Edit form field '%1'. Formularfeld »%1« bearbeiten. Copy &text &Text kopieren Copy &image &Bild kopieren Save image to &file... Bild in &Datei speichern … Save image to file Bild in Datei speichern Warning Warnung Could not save image to file '%1'. Konnte Bild nicht in Datei »%1« speichern. Add &text &Text hinzufügen Add &highlight &Hervorhebung hinzufügen &Remove annotation &Anmerkung entfernen PdfSettingsWidget Antialiasing: Kantenglättung: Text antialiasing: Text-Kantenglättung: None Kein Full Voll Reduced Reduziert Text hinting: Text-Hinting: Overprint preview: Überdruckvorschau: Solid Gefüllt Shaped Geformt Thin line mode: Modus für dünne Linien: PluginHandler Critical Kritischer Fehler Could not load PDF plug-in! PDF-Plug-in konnte nicht geladen werden! Could not load PS plug-in! PS-Plug-in konnte nicht geladen werden! Could not load DjVu plug-in! DjVu-Plug-in konnte nicht geladen werden! PrintDialog Fit to page: An Seitengröße anpassen: Page ranges: Seitenbereiche: All pages Alle Seiten Even pages Gerade Seiten Odd pages Ungerade Seiten Page set: Seitenmenge: Single page Einzelne Seite Two pages Zwei Seiten Four pages Vier Seiten Six pages Sechs Seiten Nine pages Neun Seiten Sixteen pages Sechzehn Seiten Number-up: Seiten pro Blatt: Bottom to top and left to right Von unten nach oben und links nach rechts Bottom to top and right to left Von unten nach oben und rechts nach links Left to right and bottom to top Von links nach rechts und unten nach oben Left to right and top to bottom Von links nach rechts und oben nach unten Right to left and bottom to top Von rechts nach links und unten nach oben Right to left and top to bottom Von rechts nach links und oben nach unten Top to bottom and left to right Von oben nach unten und links nach rechts Top to bottom and right to left Von oben nach unten und rechts nach links Number-up layout: Anordnung der Seiten: Extended options Erweiterte Einstellungen PsSettingsWidget Graphics antialias bits: Bits für Grafik-Antialiasing: Text antialias bits: Bits für Text-Antialiasing: QObject An empty instance name is not allowed. Ein leerer Instanzname ist nicht zugelassen. An empty search text is not allowed. Ein leerer Suchtext ist nicht zugelassen. Choose instance Instanz auswählen Instance: Instanz: Unknown command-line option '%1'. Unbekannte Kommandozeilen-Option '%1'. Using '--instance' requires an instance name. '--instance' benötigt einen Instanznamen. Using '--instance' is not allowed without using '--unique'. '--instance' ist nur im Zusammenhang mit '--unique' zugelassen. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Eine Instanz darf lediglich die Zeichen "[A-Z][a-z][0-9]_" enthalten und darf nicht mit einer Ziffer beginnen. Using '--search' requires a search text. '--search' benötigt einen Suchtext. SyncTeX data for '%1' could not be found. Keine SyncTeX-Daten für »%1« gefunden. Could not prepare signal handler. Konnte Signalbehandlung nicht vorbereiten. QShortcut Shift Umschalt Ctrl Strg Alt Alt Shift and Ctrl Umschalt und Strg Shift and Alt Umschalt und Alt Ctrl and Alt Strg und Alt RecentlyUsedMenu Recently &used Zuletzt &verwendet &Clear list Liste &leeren SettingsDialog General Allgemein &Behavior &Verhalten &Graphics &Grafik &Interface &Oberfläche &Shortcuts &Tastenkürzel &Modifiers &Modifikatoren Defaults Vorgaben Defaults on current tab Vorgaben auf aktuellem Reiter Open URL: URL öffnen: Auto-refresh: Automatische Aktualisierung: Effective after restart. Nach Neustart wirksam. Track recently used: Verwendete Dateien aufzeichnen: Restore tabs: Reiter wiederherstellen: Restore bookmarks: Lesezeichen wiederherstellen: Restore per-file settings: Dateieinstellungen wiederherstellen: Synchronize presentation: Präsentation synchronisieren: Default Standard Presentation screen: Präsentationsbildschirm: None Keine Highlight duration: Dauer der Hervorhebungen: Highlight color: Farbe der Hervorhebungen: Annotation color: Farbe für Anmerkungen: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. »%1« wird durch den Pfad der Datei ersetzt. »%2« bzw. »%3« wird durch die Zeilen- bzw. Spaltennummer ersetzt. Source editor: Quelltexteditor: Keep obsolete pixmaps: Veraltete Grafiken aufheben: Use device pixel ratio: Gerätepixelverhältnis nutzen: Decorate pages: Seiten verzieren: Decorate links: Verweise verzieren: Decorate form fields: Formularfelder verzieren: Background color: Hintergrundfarbe: Paper color: Papierfarbe: Presentation background color: Präsentationshintergrundfarbe: Pages per row: Seiten pro Zeile: Page spacing: Abstand der Seiten: Thumbnail spacing: Abstand der Vorschaubilder: Thumbnail size: Größe der Vorschaubilder: %1 MB %1 MB Cache size: Größe des Zwischenspeichers: Prefetch: Vorausladen: Prefetch distance: Reichweite des Vorausladens: Top Oben Bottom Unten Left Links Right Rechts Tab position: Reiterposition: As needed Bei Bedarf Always Immer Never Niemals Tab visibility: Reitersichtbarkeit: New tab next to current tab: Neuer Reiter neben aktuellem Reiter: Recently used count: Anzahl verwendeter Dateien: File tool bar: Datei-Werkzeugleiste: Edit tool bar: Bearbeiten-Werkzeugleiste: View tool bar: Ansicht-Werkzeugleiste: Current page in window title: Aktuelle Seite im Fenstertitel: Instance name in window title: Instanzname im Fenstertitel: Synchronize outline view: Gliederung synchronisieren: Highlight current thumbnail: Aktuelles Vorschaubild hervorheben: Limit thumbnails to results: Vorschaubilder auf Ergebnisse beschränken: Annotation overlay: Eingebettet dargestellte Anmerkungen: Form field overlay: Eingebettet dargestellte Formularfelder: Zoom: Skalieren: Rotate: Rotieren: Scroll: Bildlauf: Copy to clipboard: In Zwischenablage kopieren: Add annotation: Anmerkung hinzufügen: ShortcutHandler Action Aktion Key sequence Tastenkürzel Skip backward Rückwärts springen Skip forward Vorwärts springen Move up Nach oben bewegen Move down Nach unten bewegen Move left Nach links bewegen Move right Nach rechts bewegen TreeView &Expand all Alle &aufklappen &Collapse all Alle &zuklappen qpdfview-0.4.7/translations/qpdfview_el.ts0000644000000000000000000017303312246606025017105 0ustar 00000000000000 BookmarkMenu &Open &Άνοιγμα Open in new &tab Άνοιγμα σε νέα &καρτέλα &Remove bookmark &Αφαίρεση σελιδοδείκτη Database Jump to page %1 Μετάβαση στη σελίδα %1 DocumentView Supported formats (%1) Υποστηριζόμενες μρφές (%1) Unlock %1 Ξεκλείδωμα %1 Password: Κωδικός: Information Πληροφορίες Opening URL is disabled in the settings. Το άνοιγμα υπερσυνδέσμων είναι απενεργοποιημένο στις ρυθμίσεις. Warning Προειδοποίηση SyncTeX data for '%1' could not be found. Τα δεδομένα SyncTeX για το '%1' δεν μπορούν να βρεθούν. Printing '%1'... Εκτύπωση '%1'... Page %1 Σελίδα %1 FileAttachmentAnnotationWidget Save... Αποθήκευση... Save and open... Αποθήκευση και άνοιγμα... Save file attachment Αποθήκευση επισυναπτόμενου αρχείου Warning Προειδοποίηση Could not save file attachment to '%1'. Αδύνατη η αποθήκευση του επισυναπτόμενου αρχείου στο '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Αναζήτηση προηγουμένου Find next Αναζήτηση επομένου MainWindow Warning Προειδοποίηση Could not open '%1'. Αδυναμία ανοίγματος του '%1'. Close all tabs but this one Close all tabs to the left Κλείσιμο όλων των καρτελών προς τα αριστερά Close all tabs to the right Κλείσιμο όλων των καρτελών προς τα δεξιά Open Άνοιγμα Open in new tab Άνοιγμα σε νέα καρτέλα Could not refresh '%1'. Αδυναμία ανανέωσης του '%1'. Save copy Αποθήκευση αντιγράφου Could not save copy at '%1'. Αδυναμία αποθήκευσης και αντιγραφής στο '%1'. Save as Αποθήκευση ως Could not save as '%1'. Αδύνατη η αποθήκευση ως '%1'. Could not print '%1'. Αδυναμία εκτύπωσης του '%1'. Jump to page Μετάβαση στη σελίδα Page: Σελίδα: Add bookmark Προσθήκη σελιδοδείκτη Label Ετικέτα Jump to page %1 Μετάβαση στη σελίδα %1 About qpdfview Σχετικά με το qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>Το qpdfview είναι μια εφαρμογή ανάγνωσης εγγράφων σε καρτέλες και χρησιμοποιεί Qt.</p><p>Αυτή η έκδοση περιλαμβάνει:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Το έγγραφο '%1' έχει τροποποιηθεί. Επιθυμείτε να αποθηκευθούν οι αλλαγές; Page width Πλάτος σελίδας Page size Μέγεθος σελίδας Match &case Ταίριασμα &πεζών/κεφαλαίων Highlight &all &Open... &Άνοιγμα... Open in new &tab... Άνοιγμα σε νέα &καρτέλα... Open containing folder Άνοιγμα φακέλου που το περιέχει &Refresh &Ανανέωση &Save copy... &Αποθήκευση αντιγράφου... Save &as... Αποθήκευση &ως... &Print... &Εκτύπωση... E&xit Έ&ξοδος &Previous page &Προηγούμενη σελίδα &Next page &Επόμενη σελίδα &First page &Πρώτη σελίδα &Last page &Τελευταία σελίδα &Jump to page... &Μετάβαση στη σελίδα... Jump &backward Μετάβαση &πίσω Jump for&ward &Search... &Αναζήτηση... Find previous Αναζήτηση προηγουμένου Find next Αναζήτηση επομένου Cancel search Ακύρωση αναζήτησης &Copy to clipboard &Αντιγραφή στο πρόχειρο &Add annotation &Προσθήκη σχολίου Settings... Ρυθμίσεις... &Continuous &Συνεχής &Two pages &Δύο σελίδες Two pages &with cover page &Δύο σελίδες &με εξώφυλλο &Multiple pages Zoom &in &Μεγέθυνση Zoom &out &Σμίκρυνση Original &size Αρχικό &μέγεθος Fit to page width Προσαρμογή στο πλάτος της σελίδας Fit to page size Ταίριασμα στο μέγεθος σελίδας Rotate &left Περιστροφή &αριστερά Rotate &right Περιστροφή δεξιά Invert colors Fonts... Γραμματοσειρές... &Fullscreen &Πλήρης οθόνη &Presentation... &Παρουσίαση &Previous tab &Προηγούμενη καρτέλα &Next tab &Επόμενη καρτέλα &Close tab &Κλείσιμο καρτέλας Close &all tabs Κλείσιμο &όλων των καρτέλων Close all tabs &but current tab &Previous bookmark &Προηγούμενος σελιδοδείκτης &Next bookmark &Επόμενος σελιδοδείκτης &Add bookmark &Προσθήκη σελιδοδείκτη &Remove bookmark &Αφαίρεση σελιδοδείκτη Remove all bookmarks Αφαίρεση όλων των σελιδοδεικτών &Contents &Περιεχόμενα &About &Σχετικά &File &Αρχείο &Edit &Επεξεργασία &View &Προβολή &Outline &Properties &Ιδιότητες &Thumbnails &Search &Αναζήτηση &Tool bars &Docks &Tabs &Καρτέλες &Bookmarks &Σελιδοδείκτες &Help &Βοήθεια Model::PdfDocument Name Type Embedded Subset File Yes No Model::PdfPage Information Πληροφορίες Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Μετάβαση στη σελίδα %1. Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text Αντιγραφή &κειμένου Copy &image Αντιγραφή &εικόνας Save image to &file... Αποθήκευση εικόνας στο &αρχείο... Save image to file Αποθήκευση εικόνας σε αρχείο Warning Προειδοποίηση Could not save image to file '%1'. Αδυναμία αποθήκευσης εικόνας στο αρχείο '%1'. Add &text Προσθήκη &κειμένου Add &highlight &Remove annotation &Αφαίρεση σχολίου PdfSettingsWidget Antialiasing: Text antialiasing: None Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Τα δεδομένα SyncTeX για το '%1' δεν μπορούν να βρεθούν. Could not prepare signal handler. QShortcut Shift Ctrl Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used Πρόσφατα &χρησιμοποιημένα &Clear list &Καθαρισμός λίστας SettingsDialog General &Behavior &Graphics &Interface &Shortcuts &Modifiers Defaults Προεπιλογές Defaults on current tab Open URL: Άνοιγμα υπερσυνδέσμου: Auto-refresh: Αυτόματη ανανέωση: Effective after restart. Εφαρμογή ύστερα από επανεκκίνηση Track recently used: Restore tabs: Επαναφορά καρτέλων: Restore bookmarks: Επαναφορά σελιδοδεικτών: Restore per-file settings: Synchronize presentation: Συγχρονισμός παρουσίασης: Default Προεπιλογή Presentation screen: Οθόνη παρουσίασης: None Highlight duration: Highlight color: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: Background color: Paper color: Presentation background color: Pages per row: Page spacing: Thumbnail spacing: Thumbnail size: Μέγεθος εικόνας επισκόπησης: %1 MB %1 MB Cache size: Μέγεθος προσωρινής μνήμης: Prefetch: Prefetch distance: Top Κορυφή Bottom Κάτω Left Αριστερά Right Δεξιά Tab position: Θέση καρτέλας: As needed Always Πάντα Never Ποτέ Tab visibility: New tab next to current tab: Recently used count: File tool bar: Edit tool bar: View tool bar: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Action Key sequence Skip backward Skip forward Move up Move down Move left Move right TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_en_GB.ts0000644000000000000000000017314212246606025017460 0ustar 00000000000000 BookmarkMenu &Open &Open Open in new &tab Open in new &tab &Remove bookmark &Remove bookmark Database Jump to page %1 Jump to page %1 DocumentView Supported formats (%1) Supported formats (%1) Unlock %1 Unlock %1 Password: Password: Information Information Opening URL is disabled in the settings. Opening URL is disabled in the settings. Warning Warning SyncTeX data for '%1' could not be found. SyncTeX data for '%1' could not be found. Printing '%1'... Printing '%1'... Page %1 Page %1 FileAttachmentAnnotationWidget Save... Save... Save and open... Save and open... Save file attachment Save file attachment Warning Warning Could not save file attachment to '%1'. Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_en_GB.html Find previous Find previous Find next Find next MainWindow Warning Warning Could not open '%1'. Could not open '%1'. Close all tabs but this one Close all tabs but this one Close all tabs to the left Close all tabs to the left Close all tabs to the right Close all tabs to the right Open Open Open in new tab Open in new tab Could not refresh '%1'. Could not refresh '%1'. Save copy Save copy Could not save copy at '%1'. Could not save copy at '%1'. Save as Save as Could not save as '%1'. Could not save as '%1'. Could not print '%1'. Could not print '%1'. Jump to page Jump to page Page: Page: Add bookmark Add bookmark Label Label Jump to page %1 Jump to page %1 About qpdfview About qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? The document '%1' has been modified. Do you want to save your changes? Page width Page width Page size Page size Match &case Match &case Highlight &all Highlight &all &Open... &Open... Open in new &tab... Open in new &tab... Open containing folder Open containing folder &Refresh &Refresh &Save copy... &Save copy... Save &as... Save &as... &Print... &Print... E&xit E&xit &Previous page &Previous page &Next page &Next page &First page &First page &Last page &Last page &Jump to page... &Jump to page... Jump &backward Jump &backward Jump for&ward Jump for&ward &Search... &Search... Find previous Find previous Find next Find next Cancel search Cancel search &Copy to clipboard &Copy to clipboard &Add annotation &Add annotation Settings... Settings... &Continuous &Continuous &Two pages &Two pages Two pages &with cover page Two pages &with cover page &Multiple pages &Multiple pages Zoom &in Zoom &in Zoom &out Zoom &out Original &size Original &size Fit to page width Fit to page width Fit to page size Fit to page size Rotate &left Rotate &left Rotate &right Rotate &right Invert colors Invert colours Fonts... Fonts... &Fullscreen &Fullscreen &Presentation... &Presentation... &Previous tab &Previous tab &Next tab &Next tab &Close tab &Close tab Close &all tabs Close &all tabs Close all tabs &but current tab Close all tabs &but current tab &Previous bookmark &Previous bookmark &Next bookmark &Next bookmark &Add bookmark &Add bookmark &Remove bookmark &Remove bookmark Remove all bookmarks Remove all bookmarks &Contents &Contents &About &About &File &File &Edit &Edit &View &View &Outline &Outline &Properties &Properties &Thumbnails &Thumbnails &Search &Search &Tool bars &Toolbars &Docks &Docks &Tabs &Tabs &Bookmarks &Bookmarks &Help &Help Model::PdfDocument Name Name Type Type Embedded Embedded Subset Subset File File Yes Yes No No Model::PdfPage Information Information Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Title Created for Created for Creator Creator Creation date Creation date Format Format Language level Language level PageItem Go to page %1. Go to page %1. Go to page %1 of file '%2'. Go to page %1 of file '%2'. Open '%1'. Open '%1'. Edit form field '%1'. Edit form field '%1'. Copy &text Copy &text Copy &image Copy &image Save image to &file... Save image to &file... Save image to file Save image to file Warning Warning Could not save image to file '%1'. Could not save image to file '%1'. Add &text Add &text Add &highlight Add &highlight &Remove annotation &Remove annotation PdfSettingsWidget Antialiasing: Antialiasing: Text antialiasing: Text antialiasing: None None Full Full Reduced Reduced Text hinting: Text hinting: Overprint preview: Overprint preview: Solid Solid Shaped Shaped Thin line mode: Thin line mode: PluginHandler Critical Critical Could not load PDF plug-in! Could not load PDF plug-in! Could not load PS plug-in! Could not load PS plug-in! Could not load DjVu plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Fit to page: Page ranges: Page ranges: All pages All pages Even pages Even pages Odd pages Odd pages Page set: Page set: Single page Single page Two pages Two pages Four pages Four pages Six pages Six pages Nine pages Nine pages Sixteen pages Sixteen pages Number-up: Number-up: Bottom to top and left to right Bottom to top and left to right Bottom to top and right to left Bottom to top and right to left Left to right and bottom to top Left to right and bottom to top Left to right and top to bottom Left to right and top to bottom Right to left and bottom to top Right to left and bottom to top Right to left and top to bottom Right to left and top to bottom Top to bottom and left to right Top to bottom and left to right Top to bottom and right to left Top to bottom and right to left Number-up layout: Number-up layout: Extended options Extended options PsSettingsWidget Graphics antialias bits: Graphics antialias bits: Text antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty instance name is not allowed. An empty search text is not allowed. An empty search text is not allowed. Choose instance Choose instance Instance: Instance: Unknown command-line option '%1'. Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. SyncTeX data for '%1' could not be found. Could not prepare signal handler. Could not prepare signal handler. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift and Ctrl Shift and Alt Shift and Alt Ctrl and Alt Ctrl and Alt RecentlyUsedMenu Recently &used Recently &used &Clear list &Clear list SettingsDialog General General &Behavior &Behaviour &Graphics &Graphics &Interface &Interface &Shortcuts &Shortcuts &Modifiers &Modifiers Defaults Defaults Defaults on current tab Defaults on current tab Open URL: Open URL: Auto-refresh: Auto-refresh: Effective after restart. Effective after restart. Track recently used: Track recently used: Restore tabs: Restore tabs: Restore bookmarks: Restore bookmarks: Restore per-file settings: Restore per-file settings: Synchronize presentation: Synchronise presentation: Default Default Presentation screen: Presentation screen: None None Highlight duration: Highlight duration: Highlight color: Highlight colour: Annotation color: Annotation colour: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Source editor: Keep obsolete pixmaps: Keep obsolete pixmaps: Use device pixel ratio: Use device pixel ratio: Decorate pages: Decorate pages: Decorate links: Decorate links: Decorate form fields: Decorate form fields: Background color: Background colour: Paper color: Paper colour: Presentation background color: Presentation background colour: Pages per row: Pages per row: Page spacing: Page spacing: Thumbnail spacing: Thumbnail spacing: Thumbnail size: Thumbnail size: %1 MB %1 MB Cache size: Cache size: Prefetch: Prefetch: Prefetch distance: Prefetch distance: Top Top Bottom Bottom Left Left Right Right Tab position: Tab position: As needed As needed Always Always Never Never Tab visibility: Tab visibility: New tab next to current tab: New tab next to current tab: Recently used count: Recently used count: File tool bar: File toolbar: Edit tool bar: Edit toolbar: View tool bar: View toolbar: Current page in window title: Current page in window title: Instance name in window title: Instance name in window title: Synchronize outline view: Synchronise outline view: Highlight current thumbnail: Highlight current thumbnail: Limit thumbnails to results: Limit thumbnails to results: Annotation overlay: Annotation overlay: Form field overlay: Form field overlay: Zoom: Zoom: Rotate: Rotate: Scroll: Scroll: Copy to clipboard: Copy to clipboard: Add annotation: Add annotation: ShortcutHandler Action Action Key sequence Key sequence Skip backward Skip backward Skip forward Skip forward Move up Move up Move down Move down Move left Move left Move right Move right TreeView &Expand all &Expand all &Collapse all &Collapse all qpdfview-0.4.7/translations/qpdfview_eo.ts0000644000000000000000000016756612246606025017126 0ustar 00000000000000 BookmarkMenu &Open Malfermi Open in new &tab Malfermi en nova langeto &Remove bookmark Forigi legosignon Database Jump to page %1 Salti al paĝo %1 DocumentView Supported formats (%1) Subtenataj formatoj (%1) Unlock %1 Malŝlosi je %1 Password: Pasvorto: Information Informo Opening URL is disabled in the settings. Malfermi je URL estas malŝaltita en la agordaĵoj. Warning Averto SyncTeX data for '%1' could not be found. SyncTeX datumoj por '%1' estas netroveblaj. Printing '%1'... Presado de '%1'... Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Averto Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Serĉi antaŭan Find next Serĉi sekvan MainWindow Warning Averto Could not open '%1'. '%1' ne estas malfermebla. Open containing folder Open Malfermi Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Malfermi en nova langeto Could not refresh '%1'. '%1' ne estas aktualigebla. Save copy Konservi ekzempleron Could not save copy at '%1'. Ekzemplero ne estas konservebla ĉe '%1'. Save as Konservi kiel Could not save as '%1'. Ne estas konservebla kiel '%1'. Could not print '%1'. '%1' ne estas presebla. Jump to page Salti al paĝo Page: Paĝo: Add bookmark Label Jump to page %1 Salti al paĝo %1 About qpdfview Pri qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview estas langeta dokumentvidigilo uzante je Qt.</p><p>Ĉi tiu versio inkludas:<ul> <li>PDF support using Poppler</li> <li>PDF subteno uzanta je Poppler</li> <li>PS support using libspectre</li> <li>PS subteno uzanta je libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu subteno uzanta je DjVuLibre</li> <li>Printing support using CUPS</li> <li>Presada subteno uzanta je CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> por plua informo.</p><p>&copy; 2012-2013 La programantoj de qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Page width Larĝo de paĝo Page size Grando de paĝo Match &case Kongruigi usklecon Highlight &all Emfazi ĉion &Open... Malfermi... Open in new &tab... Malfermi en nova langeto... &Refresh Aktualigi &Save copy... Konservi ekzempleron... Save &as... Konservi kiel... &Print... Presi... E&xit &Previous page Antaŭa paĝo &Next page Sekva paĝo &First page Unua paĝo &Last page Lasta paĝo &Jump to page... Salti al paĝo... Jump &backward Jump for&ward &Search... Serĉi... Find previous Serĉi antaŭan Find next Serĉi sekvan Cancel search Nuligi serĉon &Copy to clipboard Kopii al tondejo &Add annotation Enmeti noton Settings... Agordoj... &Continuous Kontinua &Two pages Du paĝoj Two pages &with cover page Du paĝoj kun kovrila paĝo &Multiple pages Pluraj paĝoj Zoom &in Pligrandigi Zoom &out Malpligrandigi Original &size Origina grando Fit to page width Adapti al larĝo de paĝo Fit to page size Adapti al grando de paĝo Rotate &left Turni maldekstren Rotate &right Turni dekstren Invert colors Inversigi kolorojn Fonts... Tiparoj... &Fullscreen Tutekrana &Presentation... Prezentaĵo... &Previous tab Antaŭa langeto &Next tab Sekva langeto &Close tab Fermi langeton Close &all tabs Fermi ĉiujn langetojn Close all tabs &but current tab Fermi ĉiujn langetojn escepte de la aktuala &Previous bookmark Antaŭa legosigno &Next bookmark Sekva legosigno &Add bookmark Enmeti legosignon &Remove bookmark Forigi legosignon Remove all bookmarks Forigi ĉiujn legosignojn &Contents &Enhavo &About Pri &File Dosiero &Edit Redakti &View Vido &Search Serĉi &Outline Resumo &Properties Atributoj &Thumbnails Miniaturoj &Tool bars Ilobretoj &Docks dokoj &Tabs Langetoj &Bookmarks Legosignoj &Help Helpo Model::PdfDocument Name Type Embedded Subset File Yes No Model::PdfPage Information Informo Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Iri al paĝo %1. Go to page %1 of file '%2'. Iri al paĝo %1 de dosiero '%2'. Open '%1'. Malfermi '%1'. Edit form field '%1'. Redakti kampon '%1' de la formularo. Copy &text Kopii tekston Copy &image Kopii bildon Save image to &file... Konservi bildon al dosiero... Save image to file Konservi bildon al dosiero Warning Averto Could not save image to file '%1'. Bildo ne estas konservebla al dosiero '%1'. Add &text Enmeti tekston Add &highlight Enmeti kaj emfazi &Remove annotation Forigi noton PdfSettingsWidget Antialiasing: Text antialiasing: None Neniu Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. Vaka nomo de ekzemplero estas nepermesita. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Uzi je '--instance' necesigas nomon de ekzemplero. Using '--instance' is not allowed without using '--unique'. Uzi je '--instance' estas ne permesita sen '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. SyncTeX datumoj por '%1' estas netroveblaj. Could not prepare signal handler. La signaltraktilo ne estas preparebla. QShortcut Shift Ctrl Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used Lastatempe uzita(j) &Clear list Vakigi liston SettingsDialog General Ĝenerala &Behavior Konduto &Graphics Grafikoj &Interface Fasado &Shortcuts &Modifiers Modifiloj Defaults Aprioroj Defaults on current tab Open URL: Malfermi je URL: Auto-refresh: Aŭtomate aktualigi: Effective after restart. Efikas post restarto. Track recently used: Trako uzita antaŭnelonge: Restore tabs: Restaŭri langetojn: Restore bookmarks: Restaŭri legosignojn: Restore per-file settings: Restaŭri laŭdosierajn agordojn: Synchronize presentation: Sinkronigi prezentaĵon: Default Apriora Presentation screen: Prezentaĵa fenestro: Highlight color: None Neniu Highlight duration: Emfazi daŭron: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' estas anstataŭigita de la absoluta vojo. '%2' kaj '%3' estas anstataŭigitaj de la nombro de linio aŭ kolumno respektive. Source editor: Redaktinto de la font: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Dekoracii paĝojn: Decorate links: Dekoracii ligilojn: Decorate form fields: Dekoracii formularajn kampojn: Background color: Fona koloro: Paper color: Papera koloro: Presentation background color: Pages per row: Paĝoj en vico: Page spacing: Paĝa interspaco: Thumbnail spacing: Spaco inter miniaturoj: Thumbnail size: Grando de miniaturo: %1 MB %1 MB Cache size: Grando de kaŝmemoro: Prefetch: Antaŭakiro: Prefetch distance: Distanco de antaŭakiro: Top Supro Bottom Malsupro Left Maldekstra Right Dekstra Tab position: Pozicio de langeto: As needed Laŭbezone Always Ĉiam Never Neniam Tab visibility: Langeta videblo: New tab next to current tab: Recently used count: File tool bar: Dosiera ilobreto: Edit tool bar: Ilobreto Redakti: View tool bar: Ilobreto Vido: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Zomi: Rotate: Turni: Scroll: Rulumi: Copy to clipboard: Kopii al tondejo: Add annotation: Enmeti noton: ShortcutHandler Action Key sequence Skip backward Skip forward Move up Move down Move left Move right TreeView &Expand all Etendi ĉiujn &Collapse all Maletendi ĉiujn qpdfview-0.4.7/translations/qpdfview_es.ts0000644000000000000000000017451012246606025017115 0ustar 00000000000000 BookmarkMenu &Open &Abrir Open in new &tab Abrir en una pes&taña nueva &Remove bookmark Eliminar marcador Database Jump to page %1 DocumentView Supported formats (%1) Formatos compatibles (%1) Unlock %1 Desbloquear %1 Password: Contraseña: Information Información Opening URL is disabled in the settings. Se ha desactivado la apertura de URL en la configuración. Warning Aviso SyncTeX data for '%1' could not be found. No se encontraron los datos SyncText para «%1». Printing '%1'... Imprimiendo «%1»… Page %1 Página %1 FileAttachmentAnnotationWidget Save... Guardar… Save and open... Guardar y abrir… Save file attachment Guardar el archivo adjunto Warning Aviso Could not save file attachment to '%1'. No se pudo guardar el archivo adjunto en «%1». HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Buscar anterior Find next Buscar siguiente MainWindow Warning Aviso Could not open '%1'. No se pudo abrir «%1». Close all tabs but this one Cerrar todas las pestañas excepto esta Close all tabs to the left Cerrar las pestañas a la izquierda Close all tabs to the right Cerrar las pestañas a la derecha Open Abrir Open in new tab Abrir en una pestaña nueva Could not refresh '%1'. No se pudo actualizar «%1». Save copy Guardar copia Could not save copy at '%1'. No se pudo guardar una copia en «%1». Save as Guardar como Could not save as '%1'. No se pudo guardar como «%1». Could not print '%1'. No se pudo imprimir «%1». Jump to page Ir a la página Page: Página: Add bookmark Añadir marcador Label Etiqueta Jump to page %1 About qpdfview Acerca de qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview es un visor de documentos con pestañas que usa Qt.</p><p>Esta versión incluye:<ul> <li>PDF support using Poppler</li> <li>Compatibilidad con PDF mediante Poppler</li> <li>PS support using libspectre</li> <li>Compatibilidad con PS mediante libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Compatibilidad con DjVu mediante DjVuLibre</li> <li>Printing support using CUPS</li> <li>Compatibilidad con impresión mediante CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Vea <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> para más información.</p><p>&copy; 2012–2013 Los desarrolladores de qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Se ha modificado el documento «%1». ¿Quiere guardar los cambios? Page width Anchura de página Page size Tamaño de página Match &case Distinguir &mayúsculas/minúsculas Highlight &all Resaltar &todo &Open... &Abrir Open in new &tab... Abrir en una &pestaña nueva… Open containing folder Abrir la carpeta contenedora &Refresh &Recargar &Save copy... &Guardar una copia Save &as... Guardar &como… &Print... Im&primir... E&xit &Salir &Previous page Página &anterior &Next page Página &siguiente &First page &Primera página &Last page &Última página &Jump to page... &Ir a la página… Jump &backward Saltar &hacia atrás Jump for&ward Salta ade&lante &Search... Bu&scar... Find previous Buscar anterior Find next Buscar siguiente Cancel search Cancelar la búsqueda &Copy to clipboard &Copiar al portapapeles &Add annotation &Añadir anotación Settings... Configuración... &Continuous &Continuo &Two pages &Doble página Two pages &with cover page Doble página &con portada &Multiple pages Múltiples páginas Zoom &in Acercar Zoom &out Alejar Original &size Tamaño &original Fit to page width Ajustar a la anchura de página Fit to page size Ajustar al tamaño de página Rotate &left Rotar a la &izquierda Rotate &right Rotar a la &derecha Invert colors Invertir colores Fonts... Tipografía... &Fullscreen &Pantalla completa &Presentation... &Presentación… &Previous tab &Pestaña anterior &Next tab &Pestaña siguiente &Close tab &Cerrar pestaña Close &all tabs Cerrar &todas las pestañas Close all tabs &but current tab Cerrar todas las pestañas &excepto la actual &Previous bookmark &Anterior marcador &Next bookmark &Siguiente marcador &Add bookmark &Añadir marcador &Remove bookmark &Eliminar marcador Remove all bookmarks Eliminar todos los marcadores &Contents &Contenido &About &Acerca de &File &Archivo &Edit &Editar &View &Ver &Outline Objetos &Properties &Propiedades &Thumbnails &Miniaturas &Search &Buscar &Tool bars Barras de &herramientas &Docks Vistas &Tabs &Pestañas &Bookmarks &Marcadores &Help Ay&uda Model::PdfDocument Name Nombre Type Tipo Embedded Incrustado Subset Subconjunto File Archivo Yes No No Model::PdfPage Information Información Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Para añadir o eliminar anotaciones, se necesita la versión 0.20.1 o superior de la biblioteca Poppler. Model::PsDocument Title Título Created for Creado para Creator Creador Creation date Fecha de creación Format Formato Language level nivel de Lenguaje PageItem Go to page %1. Ir a la página %1. Go to page %1 of file '%2'. Ir a la página %1 del archivo «%2». Open '%1'. Abrir «%1» Edit form field '%1'. Editar campo de formulario «%1». Copy &text Copiar &texto Copy &image Copiar la &imagen Save image to &file... G&uardar imagen en un archivo… Save image to file Guardar imagen en archivo Warning Aviso Could not save image to file '%1'. No se pudo guardar la imagen en el archivo '%1'. Add &text Añadir &texto Add &highlight &Destacar &Remove annotation &Eliminar anotación PdfSettingsWidget Antialiasing: suavizado de líneas: Text antialiasing: Suavizado del texto: None Full Completo Reduced Reducido Text hinting: Texto dando a entender: Overprint preview: Sobreimpresión de vista previa: Solid Sólidos Shaped en forma de Thin line mode: Modo de línea fina: PluginHandler Critical Crítico Could not load PDF plug-in! No se pudo cargar el complemento de PDF. Could not load PS plug-in! No se pudo cargar el complemento de PS. Could not load DjVu plug-in! No se pudo cargar el complemento de DjVu. PrintDialog Fit to page: Ajustar la página: Page ranges: Rango de la página: All pages Todas las páginas Even pages Páginas pares Odd pages Páginas impares Page set: Conjunto de páginas: Single page Una sola página Two pages Dos páginas Four pages Cuatro páginas Six pages Seis páginas Nine pages Nueve páginas Sixteen pages Dieciséis páginas Number-up: Número de resultados: Bottom to top and left to right De abajo a arriba y de izquierda a derecha Bottom to top and right to left De abajo a arriba y de derecha a izquierda Left to right and bottom to top De izquierda a derecha y de abajo a arriba Left to right and top to bottom De izquierda a derecha y de arriba a abajo Right to left and bottom to top De derecha a izquierda y de abajo hacia arriba Right to left and top to bottom De derecha a izquierda y de arriba a abajo Top to bottom and left to right De arriba a abajo y de izquierda a derecha Top to bottom and right to left De arriba a abajo y de izquierda a derecha Number-up layout: Número de plano de diseño: Extended options opciones extendidas PsSettingsWidget Graphics antialias bits: Gráficos antialias trozos: Text antialias bits: Antialias trozos de texto: QObject An empty instance name is not allowed. No se permite un nombre de instancia vacío. An empty search text is not allowed. Una búsqueda de texto vacío no está permitido. Choose instance Instance: Instancia: Unknown command-line option '%1'. La opción de la línea de órdenes «%1» es desconocida. Using '--instance' requires an instance name. Para usar «--instance» necesita un nombre de instancia. Using '--instance' is not allowed without using '--unique'. No se permite usar «--instance» sin usar «--unique». An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. Para usar «--search» se necesita un término de búsqueda. SyncTeX data for '%1' could not be found. No se encontraron los datos SyncText para «%1». Could not prepare signal handler. No se pudo preparar el manejador de señales. QShortcut Shift Mayús Ctrl Ctrl Alt Alt Shift and Ctrl Mayús y Ctrl Shift and Alt Mayús y Alt Ctrl and Alt Ctrl y Alt RecentlyUsedMenu Recently &used Usados &recientemente &Clear list &Limpiar lista SettingsDialog General General &Behavior &Comportamiento &Graphics &Gráficos &Interface &Interfaz &Shortcuts Acce&sos rápidos &Modifiers &Modificadores Defaults Predeterminados Defaults on current tab Open URL: Abrir URL: Auto-refresh: Actualizar automáticamente Effective after restart. Efectivo después de reiniciar Track recently used: Rastrear recientes Restore tabs: Restaurar pestañas: Restore bookmarks: Restaurar marcadores: Restore per-file settings: archivos de gran tamaño por ajustes: Synchronize presentation: Sincronizar la presentación: Default Predeterminado Presentation screen: Pantalla de presentación: None Highlight duration: Marca de duración Highlight color: Color de resaltado: Annotation color: Color de la anotación: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' se sustituye por la ruta de archivo absoluta. '%2' resp. '%3' se sustituye por el resp línea. columna número. Source editor: Editor de código Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorar páginas Decorate links: Decorar enlaces: Decorate form fields: Decorar campos de formulario: Background color: Color de fondo: Paper color: Color del papel: Presentation background color: Color de fondo de presentación: Pages per row: Páginas por fila: Page spacing: Espaciado de página Thumbnail spacing: Espaciado de miniaturas Thumbnail size: Tamaño de la miniatura: %1 MB %1 MB Cache size: Tamaño de caché: Prefetch: captación previa: Prefetch distance: captación previa de distancia: Top Arriba Bottom Abajo Left Izquierda Right Derecha Tab position: Posición de las pestañas: As needed Cuando haga falta Always Siempre Never Nunca Tab visibility: Visibilidad de la pestaña: New tab next to current tab: Recently used count: File tool bar: Barra de herramientas Archivo: Edit tool bar: Barra de herramientas Editar: View tool bar: Barra de herramientas Ver: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Resaltar la miniatura actual: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Ampliación: Rotate: Girar: Scroll: Desplazamiento: Copy to clipboard: Copiar al portapapeles: Add annotation: Añadir anotación: ShortcutHandler Action Acción Key sequence Secuencia de teclas Skip backward Skip forward Move up Mover hacia arriba Move down Mover hacia abajo Move left Mover a la izquierda Move right Mover a la derecha TreeView &Expand all &Expandir todo &Collapse all &Contraer todo qpdfview-0.4.7/translations/qpdfview_eu.ts0000644000000000000000000016730112246606025017117 0ustar 00000000000000 BookmarkMenu &Open &Ireki Open in new &tab Ireki &fitxa berrian &Remove bookmark &Kendu laster-marka Database Jump to page %1 Joan %1. orrira DocumentView Supported formats (%1) Unlock %1 Desblokeatu %1 Password: Pasahitza: Printing '%1'... '%1' inprimatzen... Page %1 Information Informazioa Opening URL is disabled in the settings. URLak irekitzea desgaituta dago ezarpenetan Warning Abisua SyncTeX data for '%1' could not be found. Ezin izan dira '%1'(e)n SyncTex datuak aurkitu. FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Abisua Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Bilatu aurrekoa Find next Bilatu hurrengoa MainWindow Warning Abisua Could not open '%1'. Ezin izan da '%1' ireki. Open containing folder Open Ireki Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Ireki fitxa berrian Could not refresh '%1'. Ezin izan da '%1' freskatu. Save copy Gorde kopia Could not save copy at '%1'. Ezin izan da '%1'(e)n kopia gorde. Save as Gorde honela Could not save as '%1'. Ezin izan da '%1' bezala gorde. Could not print '%1'. Ezin izan da '%1' inprimatu. Jump to page Joan orrira Page: Orria: Add bookmark Label Jump to page %1 Joan %1. orrira About qpdfview qpdfview-ri buruz <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Orriaren zabalera Page size Orriaren neurria Match &case Highlight &all Nabarmendu &guztiak &Open... &Ireki... Open in new &tab... Ireki &fitxa berrian... &Refresh &Freskatu &Save copy... &Gorde kopia... Save &as... Gorde &honela... &Print... &Inprimatu... E&xit &Previous page &Aurreko orria &Next page &Hurrengo orria &First page &Lehen orria &Last page A&zken orria &Jump to page... &Joan orrira... Jump &backward Jump for&ward &Search... &Bilatu... Find previous Bilatu aurrekoa Find next Bilatu hurrengoa Cancel search Utzi bilaketa &Copy to clipboard &Kopiatu arbelean &Add annotation &Gehitu oharra Settings... Ezarpenak... &Continuous &Jarraia &Two pages &Bi orri Two pages &with cover page Bi orri &azalarekin &Multiple pages &Hainbat orri Zoom &in &Handitu Zoom &out &Txikitu Original &size Jatorrizko &tamaina Fit to page width Doitu orriaren zabalerara Fit to page size Doitu orriaren tamainara Rotate &left Biratu e&zkerrera Rotate &right Biratu e&skuinera Invert colors Fonts... Letra-tipoak... &Fullscreen &Pantaila osoa &Presentation... &Aurkezpena... &Previous tab &Aurreko fitxa &Next tab &Hurrengo fitxa &Close tab &Itxi fitxa Close &all tabs Itxi fitxa &guztiak Close all tabs &but current tab Itxi fitxa guztiak &unekoa ezik &Previous bookmark &Aurreko laster-marka &Next bookmark &Hurrengo laster-marka &Add bookmark &Gehitu laster-marka &Remove bookmark &Kendu laster-marka Remove all bookmarks Kendu laster-marka guztiak &Contents &Edukiak &About &Honi buruz &File &Fitxategia &Edit &Editatu &View &Ikusi &Search &Bilatu &Outline &Properties &Propietateak &Thumbnails &Koadro txikiak &Tool bars &Tresna-barrak &Docks &Tabs &Fitxak &Bookmarks &Laster-markak &Help &Laguntza Model::PdfDocument Name Izena Type Mota Embedded Kapsulatuta Subset Azpimultzoa File Fitxategia Yes Bai No Ez Model::PdfPage Information Informazioa Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Oharrak gehitu edo kentzeko Poppler liburutegiaren 0.20.1 edo berriagoa behar da. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Joan %1 orrira Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Editatu '%1' inprimaki-eremua. Copy &text Kopiatu &testua Copy &image Kopiatu &irudia Save image to &file... Gorde irudia &fitxategian... Save image to file Gorde irudia fitxategian Warning Abisua Could not save image to file '%1'. Ezin izan da gorde irudia '%1' fitxategian. Add &text Gehitu &testua Add &highlight Gehitu &nabarmentzea &Remove annotation &Kendu oharra PdfSettingsWidget Antialiasing: Antialiasing-a: Text antialiasing: Testuaren antialiasing-a: None Bat ere ez Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Doitu orriari Page ranges: Orri-tarteak: All pages Orri guztiak Even pages Orri bikoitiak Odd pages Orri bakoitiak Page set: Orri multzoa: Single page Orri bakarra Two pages Bi orri Four pages Lau orri Six pages Sei orri Nine pages Bederatzi orri Sixteen pages Hamasei orri Number-up: Bottom to top and left to right Behetik gora eta ezkerretik eskuinera Bottom to top and right to left Behetik gora eta eskuinetik ezkerrera Left to right and bottom to top Ezkerretik eskuinera eta behetik gora Left to right and top to bottom Ezkerretik eskuinera eta goitik behera Right to left and bottom to top Eskuinetik ezkerrera eta behetik gora Right to left and top to bottom Eskuinetik ezkerrera eta goitik behera Top to bottom and left to right Goitik behera eta ezkerretik eskuinera Top to bottom and right to left Goitik behera eta eskuinetik ezkerrera Number-up layout: Extended options Aukera hedatuak PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Ezin izan dira '%1'(e)n SyncTex datuak aurkitu. Could not prepare signal handler. QShortcut Shift Maius Ctrl Alt Alt Shift and Ctrl Shift and Alt Maius eta Alt Ctrl and Alt RecentlyUsedMenu Recently &used Azkenaldiak &erabiliak &Clear list &Garbitu zerrenda SettingsDialog &Behavior &Portaera &Graphics &Grafikoak &Interface &Interfazea &Shortcuts &Modifiers &Aldatzaileak Defaults Lehenespenak Defaults on current tab Open URL: Ireki URLa: Auto-refresh: Freskatu automatikoki: Effective after restart. Berrabiarazi ondoren du eragina. Track recently used: Restore tabs: Leheneratu fitxak: Restore bookmarks: Leheneratu laster-markak: Restore per-file settings: Leheneratu fitxategi bakoitzeko ezarpenak: Synchronize presentation: Sinkronizatu aurkezpena: Default Lehenetsia Presentation screen: Aurkezpenaren pantaila: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Iturburu-editorea: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Apaindu orriak: Decorate links: Apaindu estekak: Decorate form fields: Apaindu inprimaki-eremuak: None Bat ere ez Highlight duration: Nabarmentzearen iraupena: Background color: Atzeko planoaren kolorea: Paper color: Paperaren kolorea: Pages per row: Orriak errenkadako: Page spacing: Orri arteko tartea: Thumbnail spacing: Koadro txikien arteko tartea: Thumbnail size: Koadro txikien tamaina: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB %1 MB Cache size: Cache-aren tamaina: Prefetch: Prefetch distance: Top Goia Bottom Behea Left Ezkerra Right Eskuina Tab position: Fitxaren kokapena: As needed Behar denean Always Beti Never Inoiz ez Tab visibility: Fitxaren ikusgaitasuna: New tab next to current tab: Recently used count: Current page in window title: File tool bar: Fitxategia tresna-barra: Edit tool bar: Editatu tresna-barra: View tool bar: Ikusi tresna-barra: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &Zabaldu dena &Collapse all &Tolestu dena qpdfview-0.4.7/translations/qpdfview_fi.ts0000644000000000000000000016432012246606025017102 0ustar 00000000000000 BookmarkMenu &Open &Avaa Open in new &tab Avaa uudessa välilehdessä &Remove bookmark Poista kirjanmerkki Database Jump to page %1 Siirry sivulle %1 DocumentView Supported formats (%1) Unlock %1 Lukitse %1 Password: Salasana: Printing '%1'... Tulostetaan tiedostoa '%1'... Page %1 Information Tiedot Opening URL is disabled in the settings. Warning Varoitus SyncTeX data for '%1' could not be found. FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Varoitus Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Etsi edellinen Find next Etsi seuraava MainWindow Warning Varoitus Could not open '%1'. Älä avaa kohdetta '%1'. Open containing folder Open Avaa Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Avaa uudessa välilehdessä Could not refresh '%1'. Älä päivitä kohdetta '%1'. Save copy Could not save copy at '%1'. Save as Could not save as '%1'. Could not print '%1'. Älä tulosta kohdetta '%1'. Jump to page Siirry sivulle Page: Sivu: Add bookmark Label Jump to page %1 Siirry sivulle %1 About qpdfview Tietoja qpdfview:istä <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Sivun leveys Page size Sivun koko Match &case Huomioi &kirjainkoko Highlight &all &Open... &Avaa... Open in new &tab... Avaa uuteen &välilehteen... &Refresh &Päivitä &Save copy... Save &as... &Print... &Tulosta... E&xit &Previous page &Edellinen sivu &Next page &Seuraava sivu &First page &Ensimmäinen sivu &Last page &Viimeinen sivu &Jump to page... &Siirry sivulle... Jump &backward Jump for&ward &Search... &Etsi... Find previous Etsi edellinen Find next Etsi seuraava Cancel search Peruuta haku &Copy to clipboard &Kopioi leikepöydälle &Add annotation %Lisää huomautus Settings... Asetukset... &Continuous &Jatkuva &Two pages &Kaksi sivua Two pages &with cover page &Multiple pages Zoom &in Zoomaa &lähemmäs Zoom &out Zoomaa &kaiemmas Original &size Alkuperäinen &koko Fit to page width Sovita sivun leveys Fit to page size Sovita sivuun Rotate &left Käännä &vasemmalle Rotate &right Käännä &oikealle Invert colors Fonts... Fontit... &Fullscreen &Koko näyttö &Presentation... &Previous tab &Edellinen välilehti &Next tab &Seuraava välilehti &Close tab &Sulje ikkuna Close &all tabs Sulje &kaikki ikkunat Close all tabs &but current tab Sulje kaikki &paitsi valittu välilehti &Previous bookmark &Edellinen kirjanmerkki &Next bookmark &Seuraava kirjanmerkki &Add bookmark &Lisää kirjanmerkki &Remove bookmark &Poista kirjanmerkki Remove all bookmarks Poista kaikki kirjanmerkit &Contents &About &Tietoja &File &Tiedosto &Edit &Muokkaa &View &Näytä &Search &Etsi &Outline &Properties &Ominaisuudet &Thumbnails &Tool bars &Työkalupalkit &Docks &Tabs &Välilehdet &Bookmarks &Kirjanmerkit &Help &Ohje Model::PdfDocument Name Nimi Type Tyyppi Embedded Subset File Tiedosto Yes Kyllä No Ei Model::PdfPage Information Tiedot Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Siirry sivulle %1 Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text Kopioi &teksti Copy &image Kopioi &kuva Save image to &file... Save image to file Warning Varoitus Could not save image to file '%1'. Tiedostoa '%1' ei voitu tallentaa. Add &text Lisää &teksti Add &highlight Lisää &korostus &Remove annotation &Poista huomautus PdfSettingsWidget Antialiasing: Text antialiasing: None Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Could not prepare signal handler. QShortcut Shift Shift Ctrl Alt Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used &Clear list &Tyhjennä lista SettingsDialog &Behavior &Graphics &Interface &Käyttöliittymä &Shortcuts &Modifiers &Muokkaajat Defaults Oletusasetukset Defaults on current tab Open URL: Avaa URL-osoite: Auto-refresh: Automaattinen päivitys: Effective after restart. Track recently used: Restore tabs: Palauta välilehdet Restore bookmarks: Palauta kirjanmerkit Restore per-file settings: Synchronize presentation: Default Palauta oletusarvot Presentation screen: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: None Highlight duration: Background color: Paper color: Pages per row: Page spacing: Thumbnail spacing: Thumbnail size: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB %1 MB Cache size: Välimuistin koko: Prefetch: Prefetch distance: Top Ylös Bottom Alas Left Vasen Right Oikea Tab position: Välilehtien sijainti: As needed Tarvittaessa Always Aina Never Ei koskaan Tab visibility: New tab next to current tab: Recently used count: Current page in window title: File tool bar: Edit tool bar: Muokkaa työkaluriviä: View tool bar: Näytä työkalurivi: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_fr.ts0000644000000000000000000017655612246606025017131 0ustar 00000000000000 BookmarkMenu &Open &Ouvrir Open in new &tab Ouvrir dans un nouvel ongle&t &Remove bookmark Supprime&r le signet Database Jump to page %1 Aller à la page %1 DocumentView Supported formats (%1) Formats supportés (%1) Unlock %1 Déverrouiller %1 Password: Mot de passe Information Information Opening URL is disabled in the settings. L'ouverture d'URL est désactivée dans les paramètres. Warning Avertissement SyncTeX data for '%1' could not be found. Impossible de trouver les données SyncTeX pour « %1 ». Printing '%1'... Impression de « %1 »... Page %1 Page %1 FileAttachmentAnnotationWidget Save... Enregistrer... Save and open... Enregistrer et ouvrir... Save file attachment Enregistrer la pièce jointe Warning Attention Could not save file attachment to '%1'. Impossible d'enregistrer la pièce jointe vers « %1 ». HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_fr.html Find previous Rechercher le précédent Find next Rechercher le suivant MainWindow Warning Avertissement Could not open '%1'. Impossible d'ouvrir « %1 ». Close all tabs but this one Fermer tous les onglets sauf celui-là Close all tabs to the left Fermer tous les onglets à gauche Close all tabs to the right Fermer tous les onglets à droite Open Ouvrir Open in new tab Ouvrir dans un nouvel onglet Could not refresh '%1'. Impossible d'actualiser « %1 ». Save copy Enregistrer une copie Could not save copy at '%1'. Impossible d'enregistrer la copie à « %1 ». Save as Enregistrer sous Could not save as '%1'. N'a pas pu enregistrer en tant que « %1 ». Could not print '%1'. Impossible d'imprimer « %1 ». Jump to page Aller à la page Page: Page Add bookmark Ajouter un signet Label Étiquette Jump to page %1 Aller à la page %1 About qpdfview À propos de qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview est une visionneuse de documents avec onglets utilisant Qt.</p><p>Cette version inclut :<ul> <li>PDF support using Poppler</li> <li>Prise en charge de PDF utilisant Poppler</li> <li>PS support using libspectre</li> <li>Prise en charge de PS utilisant libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Prise en charge de DjVu utilisant DjVuLibre</li> <li>Printing support using CUPS</li> <li>Prise en charge d'impression utilisant CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Voir <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> pour plus d'informations.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Le document « %1 » a été modifié. Voulez-vous enregistrer vos changements ? Page width Largeur de la page Page size Taille de la page Match &case Sensible à la &casse Highlight &all &Tout mettre en surbrillance &Open... &Ouvrir… Open in new &tab... Ouvrir dans un nouvel ongle&t... Open containing folder Ouvrir le répertoire contenant le fichier &Refresh Actualise&r &Save copy... Enregi&strer une copie… Save &as... Enregistrer &sous… &Print... Im&primer… E&xit &Quitter &Previous page Page &précédente &Next page Page suiva&nte &First page &Première page &Last page &Dernière page &Jump to page... &Aller à la page… Jump &backward Aller vers l'a&rrière Jump for&ward Aller vers l'a&vant &Search... &Rechercher… Find previous Rechercher le précédent Find next Rechercher le suivant Cancel search Annuler la recherche &Copy to clipboard &Copier dans le presse-papiers &Add annotation &Ajouter une annotation Settings... Paramètres… &Continuous &Continu &Two pages &Deux pages Two pages &with cover page Deux pages &avec page de couverture &Multiple pages &Multiple pages Zoom &in &Zoomer Zoom &out &Dé-zoomer Original &size Pleine page Fit to page width Ajuster à la largeur de la page Fit to page size Ajuster à la taille de la page Rotate &left Rotation vers la &gauche Rotate &right Rotation vers la d&roite Invert colors Inverser les couleurs Fonts... Polices… &Fullscreen &Plein écran &Presentation... &Présentation… &Previous tab Onglet &précédent &Next tab Onglet suiva&nt &Close tab &Fermer l'onglet Close &all tabs Fermer &tous les onglets Close all tabs &but current tab Fermer tous les onglets sa&uf l'onglet courant &Previous bookmark Signet &précédent &Next bookmark Signet suiva&nt &Add bookmark &Ajouter un signet &Remove bookmark Supprime&r le signet Remove all bookmarks Supprimer tous les signets &Contents &Contenu &About À &propos &File &Fichier &Edit &Édition &View &Affichage &Outline &Sommaire &Properties &Propriétés &Thumbnails Minia&ture(s) &Search &Chercher &Tool bars &Barres d'outils &Docks &Docks &Tabs &Onglets &Bookmarks &Signets &Help &Aide Model::PdfDocument Name Nom Type Type Embedded Incorporé Subset Jeu partiel File Fichier Yes Oui No Non Model::PdfPage Information Information Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Version 0.20.1 ou supérieure de la bibliothèque Poppler est requise pour ajouter ou supprimer des annotations. Model::PsDocument Title Titre Created for Créé pour Creator Créateur Creation date Date de création Format Format Language level Niveau de langue PageItem Go to page %1. Aller à la page %1. Go to page %1 of file '%2'. Aller à la page %1 du fichier « %2 ». Open '%1'. Ouvrir « %1 ». Edit form field '%1'. Modifier le champ du formulaire « %1 ». Copy &text Copier le &texte Copy &image Copier &l'image Save image to &file... Enregistrer l'image dans le &fichier… Save image to file Enregistrer l'image dans un fichier Warning Avertissement Could not save image to file '%1'. Impossible d'enregistrer l'image dans le fichier « %1 ». Add &text Ajouter &du texte Add &highlight Mettre en sur&brillance &Remove annotation &Supprimer annotation PdfSettingsWidget Antialiasing: Anti-crénelage Text antialiasing: Anti-crénelage du texte None Aucun Full Complet Reduced Réduit Text hinting: Indication Overprint preview: Sur-imprimer l’aperçu Solid Trait continu Shaped Déformé Thin line mode: Mode ligne mince PluginHandler Critical Critique Could not load PDF plug-in! Le greffon PDF n'a pu être chargé Could not load PS plug-in! Impossible de charger le greffon PS ! Could not load DjVu plug-in! Impossible de charger le greffon DjVu ! PrintDialog Fit to page: Ajuster à la page Page ranges: Plages de pages All pages Toutes les pages Even pages Pages paires Odd pages Pages impaires Page set: Sélectionner Single page Page unique Two pages Deux pages Four pages Quatre pages Six pages Six pages Nine pages Neuf pages Sixteen pages Seize pages Number-up: Pages par feuille Bottom to top and left to right De bas en haut et de gauche à droite Bottom to top and right to left De bas en haut et de droite à gauche Left to right and bottom to top De gauche à droite et de bas en haut Left to right and top to bottom De gauche à droite et de haut en bas Right to left and bottom to top De droite à gauche et de bas en haut Right to left and top to bottom De droite à gauche et de haut en bas Top to bottom and left to right De haut en bas et de gauche à droite Top to bottom and right to left De haut en bas et de droite à gauche Number-up layout: Ordre des pages Extended options Options avancées PsSettingsWidget Graphics antialias bits: Nombre de bits d'anti-crénelage graphique Text antialias bits: Nombre de bits d'anti-crénelage du texte QObject An empty instance name is not allowed. Un nom d'instance vide n'est pas autorisé. An empty search text is not allowed. Une recherche vide n’est pas autorisée. Choose instance Choisir une instance Instance: Instance Unknown command-line option '%1'. Option de ligne de commande '%1' inconnue. Using '--instance' requires an instance name. Utiliser « --instance » nécessite un nom d'instance. Using '--instance' is not allowed without using '--unique'. Utiliser « --instance » n'est pas autorisé sans utiliser « --unique ». An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Un nom d'instance ne doit contenir que les caractères "[A-Z][a-z][0-9]_" et ne doit pas commencer par un nombre. Using '--search' requires a search text. L'utilisation de « --search » nécessite un texte de recherche. SyncTeX data for '%1' could not be found. Impossible de trouver les données SyncTeX pour « %1 ». Could not prepare signal handler. Ne peut préparer le gestionnaire de signaux. QShortcut Shift Maj Ctrl Ctrl Alt Alt Shift and Ctrl Maj et Ctrl Shift and Alt Maj et Alt Ctrl and Alt Ctrl et Alt RecentlyUsedMenu Recently &used &Récemment ouvert &Clear list &Effacer la liste SettingsDialog General Général &Behavior &Comportement &Graphics &Affichage &Interface &Interface &Shortcuts Raccourci&s &Modifiers &Modificateurs Defaults Défauts Defaults on current tab Défauts sur l'onglet actuel Open URL: Ouvrir une URL Auto-refresh: Actualisation automatique Effective after restart. Effectif après redémarrage. Track recently used: Suivre les fichiers récemment ouverts Restore tabs: Restaurer les onglets Restore bookmarks: Restaurer les signets Restore per-file settings: Restaurer les paramètres par fichier Synchronize presentation: Synchroniser la présentation Default Défaut Presentation screen: Écran de présentation None Aucun Highlight duration: Durée de mise en surbrillance Highlight color: Couleur de surlignement Annotation color: Couleur d'annotation '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. « %1 » est remplacé par le chemin d'accès absolu. « %2 » et « %3 » sont remplacés respectivement par le numéro de ligne et le numéro de colonne. Source editor: Éditeur de source Keep obsolete pixmaps: Conserver l'affichage lors du zoom Use device pixel ratio: Utiliser le taux de pixel de l'appareil Decorate pages: Décorer les pages Decorate links: Décorer les liens Decorate form fields: Décorer les champs de formulaire Background color: Couleur de l'arrière-plan Paper color: Couleur du papier Presentation background color: Couleur de l'arrière plan en mode présentation Pages per row: Pages par ligne Page spacing: Espacement des pages Thumbnail spacing: Espacement des miniatures Thumbnail size: Taille des miniatures %1 MB %1 Mo Cache size: Taille du cache Prefetch: Préchargement Prefetch distance: Distance de préchargement Top Haut Bottom Bas Left Gauche Right Droite Tab position: Position de l'onglet As needed Au besoin Always Toujours Never Jamais Tab visibility: Visibilité onglet New tab next to current tab: Nouvel onglet à côté de l'onglet courant Recently used count: Nombre de fichiers récemment ouverts File tool bar: Barre d'outils Fichier Edit tool bar: Barre d'outils Édition View tool bar: Barre d'outils Affichage Current page in window title: Page courante dans le titre de la fenêtre Instance name in window title: Afficher le nom d'instance dans le titre de la fenêtre Synchronize outline view: Synchroniser le sommaire Highlight current thumbnail: Surligner la miniature courante Limit thumbnails to results: Limiter les miniatures aux résultats Annotation overlay: Superposition des annotations : Form field overlay: Superposition des champs de formulaire : Zoom: Zoom Rotate: Rotation Scroll: Défiler Copy to clipboard: Copier dans le presse-papiers Add annotation: Ajouter une annotation ShortcutHandler Action Action Key sequence Séquence clavier Skip backward Reculer Skip forward Avancer Move up Déplacer vers le haut Move down Déplacer vers le bas Move left Déplacer vers la gauche Move right Déplacer vers la droite TreeView &Expand all Tout &développer &Collapse all Tout &réduire qpdfview-0.4.7/translations/qpdfview_gl.ts0000644000000000000000000017541512246606025017115 0ustar 00000000000000 BookmarkMenu &Open &Abrir Open in new &tab &Abrir nunha nova lapela &Remove bookmark &Retirar marcador Database Jump to page %1 Ir á páxina %1 DocumentView Supported formats (%1) Formatos admitidos (%1) Unlock %1 Desbloquear %1 Password: Contrasinal: Information Información Opening URL is disabled in the settings. A apertura de URL está desactivada nos axustes. Warning Aviso SyncTeX data for '%1' could not be found. Non foi posíbel atopar os datos de SyncTeX para «%1». Printing '%1'... Imprimindo «%1»... Page %1 Páxina %1 FileAttachmentAnnotationWidget Save... Gardar... Save and open... Gardar e abrir... Save file attachment Gardar anexo Warning Aviso Could not save file attachment to '%1'. Non foi posíbel gardar o anexo en «%1». HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Buscar anterior Find next Buscar seguinte MainWindow Warning Aviso Could not open '%1'. Non foi posíbel abrir «%1». Close all tabs but this one Pechar todas as lapelas excepto este Close all tabs to the left Pechar todas as lapelas á esquerda Close all tabs to the right Pechar todas as lapelas á dereita Open Abrir Open in new tab Abrir nunha nova lapela Could not refresh '%1'. Non foi posíbel actualizar «%1». Save copy Gardar unha copia Could not save copy at '%1'. Non foi posíbel gardar unha copia en «%1». Save as Gardar como Could not save as '%1'. Non foi posíbel gardalo como «%1». Could not print '%1'. Non foi posíbel imprimir «%1». Jump to page Ir á páxina Page: Páxina: Add bookmark Engadir marcador Label Etiqueta Jump to page %1 Ir á páxina %1 About qpdfview Sobre qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview é un visor de documentos provisto de lapelas e que usa QT.</p><p>Esta versión inclúe:<ul> <li>PDF support using Poppler</li> <li>Compatibilidade con PDF usando Poppler</li> <li>PS support using libspectre</li> <li>Compatibilidade con PS usando libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Compatibilidade con DjVu usando DjVuLibre</li> <li>Printing support using CUPS</li> <li>Compatibilidade de impresión usando CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Ver <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> para obter máis información.</p><p>&copy; 2012-2013 Os desenvolvedores de qpdfview</p> The document '%1' has been modified. Do you want to save your changes? O documento «%1» modificouse. Desexa gardar os cambios? Page width Largo da páxina Page size Tamaño da páxina Match &case Distinguir &maiúsculas Highlight &all Destacar &todos &Open... &Abrir... Open in new &tab... Abrir nunha nova &lapela... Open containing folder Abrir o cartafol contedor &Refresh &Actualizar &Save copy... &Gardar unha copia... Save &as... Gardar &como... &Print... &Imprimir... E&xit &Saír &Previous page Páxina &anterior &Next page Páxina &seguinte &First page &Primeira páxina &Last page &Última páxina &Jump to page... &Ir á páxina... Jump &backward Ir cara a a&trás Jump for&ward Ir cara a a&diante &Search... &Buscar... Find previous Buscar anterior Find next Buscar seguinte Cancel search Cancelar busca &Copy to clipboard &Copiar ao portapapeis &Add annotation &Engadir anotación Settings... Axustes... &Continuous &Contínuo &Two pages &Dúas páxinas Two pages &with cover page Dúas páxinas &con portada &Multiple pages &Múltiples páxinas Zoom &in &Ampliar Zoom &out &Reducir Original &size &Tamaño orixinal Fit to page width Axustar á largura da páxina Fit to page size Axustar ao tamaño da páxina Rotate &left Rotar á &esquerda Rotate &right Rotar á &dereita Invert colors Inverter as cores Fonts... Tipos de letra... &Fullscreen &Pantalla completa &Presentation... &Presentación... &Previous tab Lapela &anterior &Next tab Lapela &seguinte &Close tab &Pechar a lapela Close &all tabs Pechar &todas as lapelas Close all tabs &but current tab Pechar todas as lapelas &agás a actual &Previous bookmark Marcador &anterior &Next bookmark Marcador &seguinte &Add bookmark &Engadir marcador &Remove bookmark &Retirar marcador Remove all bookmarks Retirar todos os marcadores &Contents &Contidos &About &Sobre &File &Ficheiro &Edit &Editar &View &Ver &Outline &Esquema &Properties &Propiedades &Thumbnails &Miniaturas &Search &Buscar &Tool bars &Barras de ferramentas &Docks &Docas &Tabs &Lapelas &Bookmarks &Marcadores &Help &Axuda Model::PdfDocument Name Nome Type Tipo Embedded Encaixado Subset Subconxunto File Ficheiro Yes Si No Non Model::PdfPage Information Información Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Precísase a version 0.20.1 ou superior da biblioteca Poppler para engadir ou eliminar anotacións. Model::PsDocument Title Título Created for Creado para Creator Creador Creation date Data de creación Format Formato Language level Nivel de idioma PageItem Go to page %1. Ir á páxina %1. Go to page %1 of file '%2'. Ir á páxina %1 do ficheiro «%2». Open '%1'. Abrir «%1». Edit form field '%1'. Editar campo do formulario «%1». Copy &text &Copiar texto Copy &image Copiar &imaxe Save image to &file... Gardar a imaxe nun &ficheiro... Save image to file Gardar a imaxe nun ficheiro Warning Aviso Could not save image to file '%1'. Non foi posíbel gardar a imaxe no ficheiro «%1». Add &text Engadir &texto Add &highlight Engadir &resalte &Remove annotation &Retirar a anotación PdfSettingsWidget Antialiasing: Suavizado: Text antialiasing: Suavizado do texto: None Ningún Full Completo Reduced Reducido Text hinting: Optimización do texto: Overprint preview: Previsualización da sobreimpresión: Solid Sólido Shaped Con forma Thin line mode: Modo de liña fina: PluginHandler Critical Crítico Could not load PDF plug-in! Non foi posíbel cargar o engadido para PDF. Could not load PS plug-in! Non foi posíbel cargar o engadido para PS. Could not load DjVu plug-in! Non foi posíbel cargar o engadido para DjVu. PrintDialog Fit to page: Axustar a páxina: Page ranges: Intervalo de páxinas: All pages Todas as páxinas Even pages Páxinas pares Odd pages Páxinas impares Page set: Grupo de páxinas: Single page Páxina única Two pages Dúas páxinas Four pages Catro páxinas Six pages Seis páxinas Nine pages Nove páxinas Sixteen pages Dezaseis páxinas Number-up: Número de páxinas: Bottom to top and left to right De abaixo a arriba e de esquerda a dereita Bottom to top and right to left De abaixo a arriba e de dereita a esquerda Left to right and bottom to top De esquerda a dereita e de abaixo a arriba Left to right and top to bottom De esquerda a dereita e de arriba a abaixo Right to left and bottom to top De dereita a esquerda e de abaixo a arriba Right to left and top to bottom De dereita a esquerda e de arriba a abaixo Top to bottom and left to right De arriba a abaixo e de esquerda a dereita Top to bottom and right to left De arriba a abaixo e de dereita a esquerda Number-up layout: Disposición das páxinas: Extended options Opcións ampliadas PsSettingsWidget Graphics antialias bits: Bits de suavizado de gráficos: Text antialias bits: Bits de suavizado de texto: QObject An empty instance name is not allowed. Non se permite un nome de instancia baleiro. An empty search text is not allowed. Non se permite un texto de busca baleiro. Choose instance Seleccionar instancia Instance: Instancia: Unknown command-line option '%1'. Opción de liña de ordes descoñecida «%1». Using '--instance' requires an instance name. O uso de «--instance» require un nome de instancia. Using '--instance' is not allowed without using '--unique'. Non se permite o uso de «--instance» sen usar «--unique». An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. O nome dunha instancia debe conter só os caracteres «[A-Z][a-z][0-9]_» e non debe comezar cun díxito. Using '--search' requires a search text. O uso de «--search» require un texto de busca. SyncTeX data for '%1' could not be found. Non foi posíbel atopar os datos de SyncTeX para «%1». Could not prepare signal handler. Non foi posíbel preparar o xestor de sinais. QShortcut Shift Maiús. Ctrl Ctrl Alt Alt Shift and Ctrl Maiús e Ctrl Shift and Alt Maiús e Alt Ctrl and Alt Ctrl e Alt RecentlyUsedMenu Recently &used Usados &recentemente &Clear list &Limpar lista SettingsDialog General Xeral &Behavior &Comportamento &Graphics &Gráficos &Interface &Interface &Shortcuts &Atallos &Modifiers &Modificadores Defaults Predeterminados Defaults on current tab Predefinicións na lapela actual Open URL: Abrir URL: Auto-refresh: Actualización automática: Effective after restart. Efectivo tras reiniciar. Track recently used: Lembrar os ficheiros recentes: Restore tabs: Restaurar lapelas: Restore bookmarks: Restaurar marcadores: Restore per-file settings: Restaurar axustes por-ficheiro: Synchronize presentation: Sincronizar a presentación: Default Predeterminado Presentation screen: Pantalla de presentación: None Ningún Highlight duration: Duración do resalte: Highlight color: Cor de resalte: Annotation color: Cor da anotación: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. «%1» é substituído pola ruta absoluta ao ficheiro «%2» correspondente, «%3» é substituído pola liña correspondente ao número de columna. Source editor: Editor de orixes: Keep obsolete pixmaps: Manter os mapas de píxeles obsoletos: Use device pixel ratio: Usar a taxa de píxeles do dispositivo: Decorate pages: Decorar páxinas: Decorate links: Decorar ligazóns: Decorate form fields: Decorar campos do formulario: Background color: Cor do fondo: Paper color: Cor do papel: Presentation background color: Cor do fondo da presentación: Pages per row: Páxinas por liña: Page spacing: Espazado de páxina: Thumbnail spacing: Espazado de miniaturas: Thumbnail size: Tamaño das miniaturas: %1 MB %1 MB Cache size: Tamaño da caché: Prefetch: Precargar: Prefetch distance: Distancia de precargado: Top Arriba Bottom Abaixo Left Esquerda Right Dereita Tab position: Posición da lapela: As needed Cando se precise Always Sempre Never Nunca Tab visibility: Visibilidade da lapela: New tab next to current tab: A nova lapela despois da actual: Recently used count: Nº de usados recentemente: File tool bar: Barra de ferramentas de ficheiro: Edit tool bar: Barra de ferramentas de edición: View tool bar: Barra de ferramentas de Ver: Current page in window title: Páxina actual no título da xanela: Instance name in window title: Nome da instancia no título da xanela: Synchronize outline view: Sincronizar a vista en esquema: Highlight current thumbnail: Resaltar a miniatura actual: Limit thumbnails to results: Mostrar só as miniaturas con resultados: Annotation overlay: Anotación superposta: Form field overlay: Superposición dos campos do formulario: Zoom: Ampliación: Rotate: Rotar: Scroll: Desprazamento: Copy to clipboard: Copiar ao portapapeis: Add annotation: Engadir anotación: ShortcutHandler Action Acción Key sequence Secuencia de teclas Skip backward Saltar cara a atrás Skip forward Saltar cara a adiante Move up Mover cara a arriba Move down Mover cara a abaixo Move left Mover cara a esquerda Move right Mover cara a dereita TreeView &Expand all &Expandir todo &Collapse all &Contraer todo qpdfview-0.4.7/translations/qpdfview_he.ts0000644000000000000000000017536712246606025017115 0ustar 00000000000000 BookmarkMenu &Open &פתיחה Open in new &tab פתיחה ב&לשונית חדשה &Remove bookmark הס&רת הסימנייה Database Jump to page %1 מעבר לעמוד %1 DocumentView Supported formats (%1) תבניות נתמכות (%1) Unlock %1 שחרור %1 Password: ססמה: Information פרטים Opening URL is disabled in the settings. פתיחת כתובות מנוטרלת בהגדרות. Warning אזהרה SyncTeX data for '%1' could not be found. לא ניתן למצוא את נתוני ה־SyncTeX עבור '%1'. Printing '%1'... '%1' בהדפסה... Page %1 עמוד %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning אזהרה Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous חיפוש הקודם Find next חיפוש הבא MainWindow Warning אזהרה Could not open '%1'. לא ניתן לפתוח את '%1'. Close all tabs but this one Close all tabs to the left Close all tabs to the right Open פתיחה Open in new tab פתיחה בלשונית חדשה Could not refresh '%1'. לא ניתן לרענן את '%1'. Save copy שמירת עותק Could not save copy at '%1'. לא ניתן לשמור עותק למיקום '%1'. Save as שמירה בשם Could not save as '%1'. לא ניתן לשמור בשם ‚%1‘. Could not print '%1'. לא ניתן להדפיס את '%1'. Jump to page מעבר לעמוד Page: עמוד: Add bookmark Label Jump to page %1 מעבר לעמוד %1 About qpdfview על אודות qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview הנו מציג מסמכים בלשוניות לסביבת Qt.</p><p>גרסה זו כוללת:<ul> <li>PDF support using Poppler</li> <li>תמיכה ב־PDF באמצעות Poppler</li> <li>PS support using libspectre</li> <li>תמיכה ב־PS באמצעות libspectre</li> <li>DjVu support using DjVuLibre</li> <li>תמיכה ב־DjVu באמצעות DjVuLibre</li> <li>Printing support using CUPS</li> <li>תמיכה בהדפסה באמצעות CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>ניתן לעיין באתר <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> למידע נוסף.</p><p>&copy; 2012-2013 המתכנתים של qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Page width רוחב העמוד Page size גודל עמוד Match &case התאמת &רישיות Highlight &all ה&דגשה של הכול &Open... &פתיחה... Open in new &tab... פתיחה ב&לשונית חדשה... Open containing folder פתיחת התיקייה המכילה &Refresh &רענון &Save copy... שמירת &עותק... Save &as... שמירה &בשם... &Print... הד&פסה... E&xit י&ציאה &Previous page העמוד ה&קודם &Next page העמוד ה&בא &First page העמוד ה&ראשון &Last page העמוד ה&אחרון &Jump to page... מ&עבר לעמוד... Jump &backward Jump for&ward &Search... &חיפוש... Find previous חיפוש הקודם Find next חיפוש הבא Cancel search ביטול החיפוש &Copy to clipboard ה&עתקה ללוח הגזירים &Add annotation הוספת ה&ערה Settings... הגדרות... &Continuous מ&תמשך &Two pages &שני עמודים Two pages &with cover page &שני עמודים עם עמוד שער &Multiple pages מ&ספר עמודים Zoom &in הת&קרבות Zoom &out הת&רחקות Original &size גודל מ&קורי Fit to page width התאמת העמוד לרוחב Fit to page size התאמה לגודל העמוד Rotate &left הטייה &שמאלה Rotate &right הטייה ימי&נה Invert colors היפוך צבעים Fonts... גופנים... &Fullscreen מ&סך מלא &Presentation... מ&צגת... &Previous tab הלשונית ה&קודמת &Next tab הלשונית ה&באה &Close tab &סגירת הלשונית Close &all tabs סגירת &כל הלשוניות Close all tabs &but current tab סגירת כל הלשוניות &פרטי לנוכחית &Previous bookmark הסימנייה ה&קודמת &Next bookmark הסימנייה ה&באה &Add bookmark הוס&פת סימנייה &Remove bookmark הס&רת הסימנייה Remove all bookmarks הסרת כל הסימניות &Contents ת&כנים &About על &אודות &File &קובץ &Edit ע&ריכה &View ת&צוגה &Outline מ&תאר &Properties מ&אפיינים &Thumbnails תמונות ממו&זערות &Search &חיפוש &Tool bars סרגלי &כלים &Docks מ&עגנים &Tabs &לשוניות &Bookmarks &סימניות &Help ע&זרה Model::PdfDocument Name שם Type סוג Embedded מוטמע Subset File קובץ Yes כן No לא Model::PdfPage Information פרטים Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title כותרת Created for נוצר עבור Creator יוצר Creation date תאריך היצירה Format עיצוב Language level רמת השפה PageItem Go to page %1. מעבר לעמוד %1. Go to page %1 of file '%2'. מעבר לעמוד %1 בקובץ '%2'. Open '%1'. פתיחת '%1'. Edit form field '%1'. עריכת שדה הטופס '%1'. Copy &text ה&עתקת טקסט Copy &image העתקת ת&מונה Save image to &file... שמירת תמונה ל&קובץ... Save image to file שמירת תמונה לקובץ Warning אזהרה Could not save image to file '%1'. לא ניתן לשמור את התמונה לקובץ '%1'. Add &text הוספת &טקסט Add &highlight הוספת ה&דגשה &Remove annotation הסרת ה&ערה PdfSettingsWidget Antialiasing: החלקת קצוות: Text antialiasing: החלקת קצוות גופנים: None אין Full מלא Reduced Text hinting: Overprint preview: טווחי Solid אחיד Shaped Thin line mode: PluginHandler Critical קריטי Could not load PDF plug-in! לא ניתן לטעון את תוסף ה־PDF! Could not load PS plug-in! לא ניתן לטעון את תוסף ה־PS! Could not load DjVu plug-in! לא ניתן לטעון את תוסף ה־DjVu! PrintDialog Fit to page: התאמה לעמוד: Page ranges: טווחי עמודים: All pages כל העמודים Even pages עמודים זוגיים Odd pages עמודים אי־זוגיים Page set: Single page עמוד יחיד Two pages שני עמודים Four pages ארבעה עמודים Six pages שישה עמודים Nine pages תשעה עמודים Sixteen pages שישה עשר עמודים Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top משמאל לימין ומלמטה למעלה Left to right and top to bottom משמאל לימין ומלמעלה למטה Right to left and bottom to top מימין לשמאל ומלמטה למעלה Right to left and top to bottom מימין לשמאל ומלמעלה למטה Top to bottom and left to right מלמעלה למטה ומשמאל לימין Top to bottom and right to left מלמעלה למטה ומימין לשמאל Number-up layout: Extended options אפשרויות מורחבות PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty instance name is not allowed. An empty search text is not allowed. Choose instance בחירת מופע Instance: מופע: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. לא ניתן למצוא את נתוני ה־SyncTeX עבור '%1'. Could not prepare signal handler. לא ניתן להכין את המטפל באותות. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift ו־Ctrl Shift and Alt Shift ו־Alt Ctrl and Alt Ctrl ו־Alt RecentlyUsedMenu Recently &used בשימוש לא&חרונה &Clear list &פינוי הרשימה SettingsDialog General כללי &Behavior הת&נהגות &Graphics &גרפיקה &Interface מ&נשק &Shortcuts &קיצורי מקשים &Modifiers מקשי ה&חלפה Defaults בררות מחדל Defaults on current tab Open URL: פתיחת כתובת: Auto-refresh: &רענון אוטומטי: Effective after restart. ייכנס לתוקף אחרי הפעלה מחדש. Track recently used: מעקב אחר האחרונים בשימוש: Restore tabs: שחזור לשוניות: Restore bookmarks: שחזור סימניות: Restore per-file settings: שחזור ההגדרות לפי קובץ: Synchronize presentation: סנכרון מצגת: Default בררת מחדל Presentation screen: מסך המצגת: Highlight color: צבע ההדגשה: None ללא Highlight duration: משך ההדגשה: Annotation color: צבע ההערות: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' יוחלף בנתיב המלא והמוחלט. '%2' ו־'%3' יוחלפו בשורה ובמספר העמודה בהתאמה. Source editor: עורך המקור: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: קישוט עמודים: Decorate links: קישוט קישורים: Decorate form fields: עיצוב שדות הטופס: Background color: צבע הרקע: Paper color: צבע הנייר: Presentation background color: Pages per row: עמודים בשורה: Page spacing: ריווח עמודים: Thumbnail spacing: ריווח בין התמונות הממוזערות: Thumbnail size: גודל תמונה ממוזערת: %1 MB %1 מ״ב Cache size: גודל מטמון: Prefetch: אחזור קדם: Prefetch distance: מרחק בין אחזורי הקדם: Top למעלה Bottom למטה Left משמאל Right מימין Tab position: מיקום הלשונית: As needed לפי הצורך Always תמיד Never לעולם לא Tab visibility: הופעת הלשונית: New tab next to current tab: לשונית חדשה ליד הלשונית הנוכחית: Recently used count: File tool bar: סרגל הכלים קובץ: Edit tool bar: סרגל הכלים עריכה: View tool bar: סרגל כלים הצגה: Current page in window title: העמוד הנוכחי בכותרת החלון: Instance name in window title: Synchronize outline view: Highlight current thumbnail: הדגשת התמונה הממוזערת הנוכחית: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: מרחק מתצוגה: Rotate: סיבוב: Scroll: גלילה: Copy to clipboard: העתקה ללוח הגזירים: Add annotation: הוספת הערה: ShortcutHandler Action פעולה Key sequence צירוף מקשים Skip backward דילוג אחורה Skip forward דילוג קדימה Move up Move down הזזה למטה Move left הזזה שמאלה Move right הזזה ימינה TreeView &Expand all ה&רחבה של הכול &Collapse all &צמצום של הכול qpdfview-0.4.7/translations/qpdfview_hr.ts0000644000000000000000000017335412246606025017124 0ustar 00000000000000 BookmarkMenu &Open &Otvori Open in new &tab Otvori u novoj &kartici &Remove bookmark &Ukloni oznaku Database Jump to page %1 Skoči na stranicu %1 DocumentView Supported formats (%1) Podržani formati (%1) Unlock %1 Otključaj %1 Password: Lozinka: Information Informacija Opening URL is disabled in the settings. Otvaranje URL je onemogućeno u postavkama. Warning Upozorenje SyncTeX data for '%1' could not be found. SyncTeX podaci za '%1' nije pronađen. Printing '%1'... Tiskanje '%1'... Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Upozorenje Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Pronađi prethodno Find next Pronađi sljedeće MainWindow Warning Upozorenje Could not open '%1'. Ne mogu otvoriti '%1'. Open containing folder Open Otvori Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Otvori u novoj kartici Could not refresh '%1'. Ne mogu osvježiti '%1'. Save copy Spremi kopiju Could not save copy at '%1'. Ne mogu spremiti kopiju na '%1'. Save as Spremi kao Could not save as '%1'. Ne mogu spremiti kao '%1'. Could not print '%1'. Ne može se ispisati '%1'. Jump to page Skoči na stranicu Page: Stranica: Add bookmark Label Jump to page %1 Skoči na stranicu %1 About qpdfview O qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview je preglednik dokumenata s mogućom upotrbom kartica, a napravljen je koristeći Qt.</p><p>Ova verzija uključuje:<ul> <li>PDF support using Poppler</li> <li>PDF podrška upotrebom Poppler</li> <li>PS support using libspectre</li> <li>PS podrška upotrebom libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu podrška upotrebom DjVuLibre</li> <li>Printing support using CUPS</li> <li>Printing podrška upotrebom CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Pogledajte <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> za više informacija.</p><p>&copy; 2012-2013 Qpdfview razvojni programeri</p> The document '%1' has been modified. Do you want to save your changes? Page width Širina stranice Page size Veličina stranice Match &case Odgovara &slučaju Highlight &all Označi &sve &Open... &Otvori... Open in new &tab... Otvori u novoj &kartici... &Refresh &Osvježi &Save copy... &Spremi kopiju... Save &as... Spremi &kao &Print... &Tiskanje... E&xit I&zlaz &Previous page &Prethodna stranica &Next page &Sljedeća stranica &First page &Početna stranica &Last page &Posljednja stranica &Jump to page... &Skoči na stranicu... Jump &backward Skok &natrag Jump for&ward Skok nap&rijed &Search... &Traži... Find previous Pronađi prethodno Find next Pronađi sljedeće Cancel search Otkaži pretraživanje &Copy to clipboard &Kopiraj u međuspremnik &Add annotation &Dodaj anotaciju Settings... Postavke... &Continuous &Neprekidno &Two pages &Dvije stranice Two pages &with cover page Dvije stranice &sa naslovnicom &Multiple pages &Višestruke stranice Zoom &in Zumiraj &unutra Zoom &out Zumiraj &van Original &size Originalna &veličina Fit to page width Podesi prema širini stranice Fit to page size Prilagodi po veličini stranice Rotate &left Rotiraj &lijevo Rotate &right Rotiraj &desno Invert colors Izokreni boje Fonts... Fontovi... &Fullscreen &Na cijelom zaslonu &Presentation... &Prezentacija... &Previous tab &Prethodna kartica &Next tab &Sljedeća kartica &Close tab &Zatvori karticu Close &all tabs Zatvori &sve kartice Close all tabs &but current tab Zatvorite sve kartice &osim trenutnu karticu &Previous bookmark &Pijašnja oznaka &Next bookmark &Sljedeća oznaka &Add bookmark &Dodaj oznaku &Remove bookmark &Ukloni oznaku Remove all bookmarks Uklonite sve oznake &Contents &Sadržaj &About &O programu &File &Datoteka &Edit &Uredi &View &Prikaz &Search &Pretraživanje &Outline &Obris &Properties &Karakteristike &Thumbnails &Sličice &Tool bars &Alatne trake &Docks &Dokovi &Tabs &Kartice &Bookmarks &Oznake &Help &Pomoć Model::PdfDocument Name Naziv Type Tip Embedded Ugrađen Subset Podskupina File Datoteka Yes Da No Ne Model::PdfPage Information Informacija Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Verzija 0.20.1 ili novija Poppler biblioteke su potrebni za dodavanje ili uklanjanje napomena. Model::PsDocument Title Naslov Created for Napravljeno za Creator Tvorac Creation date Datum izrade Format Format Language level Razina jezika PageItem Go to page %1. Idi na stranicu %1. Go to page %1 of file '%2'. Idi na stranicu %1 datoteke '%2'. Open '%1'. Otvori '%1'. Edit form field '%1'. Uredi iz polja '%1'. Copy &text Kopiraj &tekst Copy &image Kopiraj &sliku Save image to &file... Sačuvaj sliku u &datoteci... Save image to file Sačuvaj sliku u datoteci Warning Upozorenje Could not save image to file '%1'. Nemoguće je spremiti sliku u datoteku '%1'. Add &text Dodaj &tekst Add &highlight Dodaj &istakni &Remove annotation &Odstrani napomenu PdfSettingsWidget Antialiasing: Antialiasing: Text antialiasing: Antialiasing teksta: None Nijedno Full Potpuno Reduced Smanjeno Text hinting: Aludiranje teksta: Overprint preview: Pregled pretiska: Solid Čvrsto Shaped Oblikovano Thin line mode: Način tanke linije: PluginHandler Critical Kritično Could not load PDF plug-in! Ne mogu učitati PDF priključak! Could not load PS plug-in! Greška pri učitavanju PS priključka! Could not load DjVu plug-in! Greška pri učitavanju DjVu priključka! PrintDialog Fit to page: Prilagodi stranici: Page ranges: Opseg stranica: All pages Sve stranice Even pages Parne stranice Odd pages Neparne stranice Page set: Set stranica: Single page Jedna stranica Two pages Dvije stranice Four pages Četiri stranice Six pages Šest stranica Nine pages Devet stranica Sixteen pages Šesnaest stranica Number-up: Broj-više: Bottom to top and left to right Dno na vrh i lijevo na desno Bottom to top and right to left Dno na vrh i desno na lijevo Left to right and bottom to top Lijevo na desno i dno na vrh Left to right and top to bottom S lijeva na desno i vrha do dna Right to left and bottom to top Desno na lijevo i dno na vrh Right to left and top to bottom Desno na lijevo i vrh na dno Top to bottom and left to right Vrh na dno i lijevo na desno Top to bottom and right to left Vrh na dno i desno na lijevo Number-up layout: Broj van sučelja: Extended options Proširene opcije PsSettingsWidget Graphics antialias bits: Bitovi grafičkog popravljanja: Text antialias bits: Bitovi ispravljanja teksta: QObject An empty instance name is not allowed. Prazna instanca imena nije dopuštena. An empty search text is not allowed. Prazan izraz nije dozvoljen. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Koristim '--instance' potražuje naziv instance. Using '--instance' is not allowed without using '--unique'. Koristim '--instance' nije dozvoljeno bez korištenja '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. Korištenje '--search' potražuje upis teksta. SyncTeX data for '%1' could not be found. SyncTeX podaci za '%1' nije pronađen. Could not prepare signal handler. Neuspjelo pripremanje signal poslužitelja. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift i Ctrl Shift and Alt Shift i Alt Ctrl and Alt Ctrl i Alt RecentlyUsedMenu Recently &used Nedavno &korišteno &Clear list &Očisti listu SettingsDialog General Općenito &Behavior &Ponašanje &Graphics &Grafika &Interface &Sučelje &Shortcuts &Prečice &Modifiers &Modifikatori Defaults Zadano Defaults on current tab Zadano na trenutačnoj kartici Open URL: Otvori URL: Auto-refresh: Auto-osvježavanje: Effective after restart. Učinkovito nakon ponovnog pokretanja. Track recently used: Prati nedavno korišteno: Restore tabs: Vrati kartice: Restore bookmarks: Vraćanje oznaka: Restore per-file settings: Vrati postavke za svaku datoteku posebno: Synchronize presentation: Sinkroniziraj prezentaciju: Default Zadana vrijednost Presentation screen: Zaslon prezentacije: Highlight color: Boja za označavanje: None Nijedan Highlight duration: Označite trajanje: Annotation color: Boja napomene: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' je zamijenjen za apsolutnu putanju. '%2' resp. '%3' je zamijenjen za resp. broj stupca. Source editor: Uređivač izvora: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Dekoriraj stranice: Decorate links: Dekoriraj veze: Decorate form fields: Dekoriranje polja forme: Background color: Boja pozadine: Paper color: Boja stranice: Presentation background color: Pages per row: Stranice po redu: Page spacing: Razmak stranica: Thumbnail spacing: Razmak sličica: Thumbnail size: Veličina sličice: %1 MB %1 MB Cache size: Veličina predmemorije: Prefetch: Pretpreuzmi: Prefetch distance: Pretpreuzmi udaljenost: Top Vrh Bottom Dno Left Lijevo Right Desno Tab position: Položaj kartice: As needed Po potrebi Always Uvijek Never Nikada Tab visibility: Vidljivost kartice: New tab next to current tab: Nova kartica uz trenutnu karticu: Recently used count: Zbroj nedavno korištenih: File tool bar: Alatna traka datoteke: Edit tool bar: Alatna traka za uređivanje: View tool bar: Alatna traka pregleda: Current page in window title: Trenutna stranica u naslovu prozora: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Označite trenutnu sličicu: Limit thumbnails to results: Ograniči sličicu na rezultate: Annotation overlay: Form field overlay: Zoom: Zumiraj: Rotate: Rotiraj: Scroll: Scroll: Copy to clipboard: Kopiraj u međuspremnik: Add annotation: Dodaj napomenu: ShortcutHandler Action Akcija Key sequence Niz tipaka Skip backward Preskoči unazad Skip forward Preskoči unaprijed Move up Pomakni gore Move down Pomakni dolje Move left Pomakni lijevo Move right Pomakni desno TreeView &Expand all &Raširi sve &Collapse all &Sažmi sve qpdfview-0.4.7/translations/qpdfview_id.ts0000644000000000000000000016171712246606025017107 0ustar 00000000000000 BookmarkMenu &Open Open in new &tab Buka di &tab baru &Remove bookmark Database Jump to page %1 Lompat ke halaman %1 DocumentView Supported formats (%1) Format yang didukung (%1) Unlock %1 Buka kunci %1 Password: Sandi: Information Informasi Opening URL is disabled in the settings. Warning Peringatan SyncTeX data for '%1' could not be found. Printing '%1'... Mencetak '%1'... Page %1 Halaman %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Peringatan Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Cari sebelumnya Find next Cari berikutnya MainWindow Warning Peringatan Could not open '%1'. Tidak dapat membuka '%1'. Close all tabs but this one Close all tabs to the left Close all tabs to the right Open Buka Open in new tab Buka di tab baru Could not refresh '%1'. Takdapat menyegarkan '%1' Save copy Simpan salinan Could not save copy at '%1'. Save as Simpan sebagai Could not save as '%1'. Tidak dapat menyimpan sebagai '%1'. Could not print '%1'. Tidak dapat mencetak '%1'. Jump to page Lompat ke halaman Page: Halaman: Add bookmark Label Jump to page %1 Lompat ke halaman %1 About qpdfview Tentang qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Lebar halaman Page size Ukuran halaman Match &case Highlight &all &Open... Open in new &tab... Open containing folder Buka folder yang memuat &Refresh &Save copy... Save &as... &Print... E&xit &Previous page &Next page &First page &Last page &Jump to page... Jump &backward Jump for&ward &Search... Find previous Cari sebelumnya Find next Cari berikutnya Cancel search &Copy to clipboard &Add annotation Settings... &Continuous &Two pages Two pages &with cover page &Multiple pages Zoom &in Zoom &out Original &size Fit to page width Fit to page size Rotate &left Rotate &right Invert colors Fonts... &Fullscreen &Presentation... &Previous tab &Next tab &Close tab Close &all tabs Close all tabs &but current tab &Previous bookmark &Next bookmark &Add bookmark &Remove bookmark Remove all bookmarks &Contents &About &File &Edit &View &Outline &Properties &Thumbnails &Search &Tool bars &Docks &Tabs &Bookmarks &Help Model::PdfDocument Name Type Embedded Subset File Yes No Model::PdfPage Information Informasi Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text Copy &image Save image to &file... Save image to file Warning Peringatan Could not save image to file '%1'. Add &text Add &highlight &Remove annotation PdfSettingsWidget Antialiasing: Text antialiasing: None Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Could not prepare signal handler. QShortcut Shift Ctrl Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used &Clear list SettingsDialog General &Behavior &Graphics &Interface &Shortcuts &Modifiers Defaults Defaults on current tab Open URL: Auto-refresh: Effective after restart. Track recently used: Restore tabs: Restore bookmarks: Restore per-file settings: Synchronize presentation: Default Presentation screen: Highlight color: None Highlight duration: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: Background color: Paper color: Presentation background color: Pages per row: Page spacing: Thumbnail spacing: Thumbnail size: %1 MB Cache size: Prefetch: Prefetch distance: Top Bottom Left Right Tab position: As needed Always Never Tab visibility: New tab next to current tab: Recently used count: File tool bar: Edit tool bar: View tool bar: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Action Key sequence Skip backward Skip forward Move up Move down Move left Move right TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_it.ts0000644000000000000000000017547012246606025017130 0ustar 00000000000000 BookmarkMenu &Open &Apri Open in new &tab Apri in nuova &scheda &Remove bookmark &Rimuovi segnalibro Database Jump to page %1 Vai alla pagina %1 DocumentView Supported formats (%1) Formati supportati (%1) Unlock %1 Sblocca %1 Password: Password: Information Informazioni Opening URL is disabled in the settings. Apertura degli URL disabilitata nelle impostazioni. Warning Avviso SyncTeX data for '%1' could not be found. Impossibile trovare i dati SyncTeX per «%1». Printing '%1'... Stampa di «%1»... Page %1 Pagina %1 FileAttachmentAnnotationWidget Save... Salva... Save and open... Salva e apri... Save file attachment Salva allegato Warning Attenzione Could not save file attachment to '%1'. Impossibile salvare l'allegato in '%1' HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_it.html Find previous Trova precedente Find next Trova successivo MainWindow Warning Avviso Could not open '%1'. Impossibile aprire «%1». Close all tabs but this one Chiudi tutte le schede tranne questa Close all tabs to the left Chiudi tutte le schede alla sinistra Close all tabs to the right Chiudi tutte le schede alla destra Open Apri Open in new tab Apri in nuova scheda Could not refresh '%1'. Impossibile aggiornare «%1». Save copy Salva una copia Could not save copy at '%1'. Impossibile salvare in «%1». Save as Salva come Could not save as '%1'. Impossibile salvare come «%1» Could not print '%1'. Impossibile stampare «%1». Jump to page Vai alla pagina Page: Pagina: Add bookmark Aggiungi segnalibro Label Etichetta Jump to page %1 Va alla pagina %1 About qpdfview Informazioni su qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview è un visualizzatore di documenti a schede che usa Qt.</p><p>Questa versione include:<ul> <li>PDF support using Poppler</li> <li>Supporto a PDF con l'uso di Poppler</li> <li>PS support using libspectre</li> <li>Supporto a PS con l'uso di libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Supporto a DjVu con l'uso di DjVuLibre</li> <li>Printing support using CUPS</li> <li>Supporto per la stammpa con l'uo di CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Consultare <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> per maggiori informazioni.</p><p>© 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Il documento «%1» è stato modificato. Salvare le modifiche? Page width Larghezza pagina Page size Dimensione pagina Match &case &Corrispondenza MAIUSCOLO/minuscolo Highlight &all E&videnzia tutto &Open... &Apri... Open in new &tab... Apri in nuova &scheda... Open containing folder Apri cartella &Refresh Aggio&rna &Save copy... &Salva una copia... Save &as... Sa&lva come... &Print... Stam&pa... E&xit &Esci &Previous page &Pagina precedente &Next page Pagina &successiva &First page Pr&ima pagina &Last page &Ultima pagina &Jump to page... &Vai alla pagina... Jump &backward Va indietro Jump for&ward Va avanti &Search... C&erca... Find previous Trova precedente Find next Trova successivo Cancel search Annulla ricerca &Copy to clipboard &Copia negli appunti &Add annotation &Aggiungi nota Settings... Impostazioni... &Continuous &Continuo &Two pages &Due pagine Two pages &with cover page Due pagine co&mpresa la copertina &Multiple pages Pagine &multiple Zoom &in A&umenta Zoom &out Ri&duci Original &size Dimen&sione originale Fit to page width Adatta alla larghezza della pagina Fit to page size Adatta alla dimensione della pagina Rotate &left Ruota a si&nistra Rotate &right &Ruota a destra Invert colors Inverti colori Fonts... Caratteri... &Fullscreen Sc&hermo intero &Presentation... &Presentazione... &Previous tab Scheda &precedente &Next tab S&cheda successiva &Close tab &Chiusi scheda Close &all tabs Chiudi &tutte le schede Close all tabs &but current tab Chiudi tutte le schede t&ranne questa &Previous bookmark Segnalibro &precedente &Next bookmark Seg&nalibro successivo &Add bookmark &Aggiungi segnalibro &Remove bookmark &Rimuovi segnalibro Remove all bookmarks Rimuovi tutti i segnalibri &Contents &Contenuti &About I&nformazioni &File &File &Edit &Modifica &View &Visualizza &Outline St&ruttura &Properties &Proprietà &Thumbnails Minia&ture &Search &Cerca &Tool bars Barre degli s&trumenti &Docks &Elementi &Tabs &Schede &Bookmarks Segnali&bri &Help A&iuto Model::PdfDocument Name Nome Type Tipo Embedded Incorporato Subset Sottoinsieme File File Yes No No Model::PdfPage Information Informazioni Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. È necessaria la libreria Poppler versione 0.20.1 o successiva per aggiungere o rimuovere le annotazioni. Model::PsDocument Title Titolo Created for Creato per Creator Autore Creation date Data di creazione Format Formato Language level Livello linguaggio PageItem Go to page %1. Vai alla pagina %1. Go to page %1 of file '%2'. Va alla pagina %1 del file «%2» Open '%1'. Apre «%1» Edit form field '%1'. Modifica campo del form «%1». Copy &text Copia &testo Copy &image Copia &immagine Save image to &file... Salva immagine in un &file... Save image to file Salva immagine in un file Warning Avviso Could not save image to file '%1'. Impossibile salvare l'immagine nel file «%1». Add &text Aggiungi &testo Add &highlight Aggiungi e&videnziazione &Remove annotation &Rimuovi nota PdfSettingsWidget Antialiasing: Antialiasing: Text antialiasing: Antialiasing del testo: None Nessuna Full Completa Reduced Ridotta Text hinting: Approssimazione del testo: Overprint preview: Anteprima sovrastampa: Solid Solida Shaped Sagomata Thin line mode: Modalità per le linee sottili: PluginHandler Critical Attenzione Could not load PDF plug-in! Impossibile caricare il plugin PDF. Could not load PS plug-in! Impossibile caricare il plugin PS. Could not load DjVu plug-in! Impossibile caricare il plugin DjVu. PrintDialog Fit to page: Adattare alla pagina: Page ranges: Intervalli di pagine: All pages Tutte le pagine Even pages Pagine pari Odd pages Pagine dispari Page set: Pagine da stampare: Single page Pagina singola Two pages Due pagine Four pages Quattro pagine Six pages Sei pagine Nine pages NOve pagine Sixteen pages Sedici pagine Number-up: Number-up: Bottom to top and left to right Dal basso all'alto e da sinistra a destra Bottom to top and right to left Dal basso all'alto e da destra a sinistra Left to right and bottom to top Da sinistra a destra e dal basso all'alto Left to right and top to bottom Da sinistra a destra e dall'alto al basso Right to left and bottom to top Da destra a sinistra e dal basso all'alto Right to left and top to bottom Da destra a sinistra e dall'alto al basso Top to bottom and left to right Dall'alto al basso e da sinistra a destra Top to bottom and right to left Dall'alto al basso e da destra a sinistra Number-up layout: Disposizione number-up: Extended options Opzioni estese PsSettingsWidget Graphics antialias bits: Bit antialias grafica: Text antialias bits: Bit antialias testo: QObject An empty instance name is not allowed. Non è consentito un nome vuoto dell'istanza An empty search text is not allowed. Non è consentita una stringa di ricerca vuota. Choose instance Scelta dell'istanza Instance: Istanza: Unknown command-line option '%1'. Opzione per la riga di comando «%1» sconosciuta. Using '--instance' requires an instance name. L'uso di "--instance" richiede il nome di un'istanza Using '--instance' is not allowed without using '--unique'. L'uso di "--instance" non è consentito senza usare "--unique" An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Il nome dell'istanza deve contenere solo i caratteri "[A-Z][a-z][0-9]_" e non deve iniziare con una cifra. Using '--search' requires a search text. L'uso dell'opzione "--search" richiede una ricerca testuale- SyncTeX data for '%1' could not be found. Impossibile trovare i dati SyncTeX per «%1». Could not prepare signal handler. Impossibile preparare il gestore di segnale QShortcut Shift Maiusc Ctrl Ctrl Alt Alt Shift and Ctrl Maiusc e Ctrl Shift and Alt Maiusc e Alt Ctrl and Alt Ctrl e Alt RecentlyUsedMenu Recently &used &Usati di recente &Clear list Pulis&ci elenco SettingsDialog General Generali &Behavior Co&mportamento &Graphics &Grafica &Interface &Interfaccia &Shortcuts &Scorciatoie &Modifiers &Modificatori Defaults Predefiniti Defaults on current tab Ripristina i valori predefiniti per la scheda attuale Open URL: Aprire URL: Auto-refresh: Aggiornare automaticamente: Effective after restart. Effettive al riavvio. Track recently used: Memorizzare usati di recente: Restore tabs: Ripristinare schede: Restore bookmarks: Ripristinare segnalibri: Restore per-file settings: Modificare impostazioni per singoli fie: Synchronize presentation: Sincronizzare presentazione: Default Predefinito Presentation screen: Schermo per presentazione: None Nessuna Highlight duration: Durata dell'evidenziatore: Highlight color: Colore dell'evidenziatore: Annotation color: Colore dell'annotazione: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. «%1» viene sostituito dal percorso assoluto del file. «%2» relativamente a «%3» viene sostituito dalla riga relativamente al numero della colonna. Source editor: Editor sorgente: Keep obsolete pixmaps: Mantenere pixmap obsoleti: Use device pixel ratio: Usare il rapporto pixel del dispositivo: Decorate pages: Decorare pagine: Decorate links: Decorare collegamenti: Decorate form fields: Decorare campo del form: Background color: Colore di fondo: Paper color: Colore della carta: Presentation background color: Colore sfondo presentazione: Pages per row: Pagine per riga: Page spacing: Spaziatura pagina: Thumbnail spacing: Spaziatura miniatura: Thumbnail size: Dimensione miniatura: %1 MB %1 MB Cache size: Dimensione cache: Prefetch: Prefetch: Prefetch distance: Distanza di prefetch: Top In alto Bottom In basso Left A sinistra Right A destra Tab position: Posizione scheda: As needed Quando necessaria Always Sempre Never Mai Tab visibility: Visibilità scheda: New tab next to current tab: Nuova scheda dopo quella attuale: Recently used count: Conteggio usati di recente: File tool bar: Barra degli strumenti «File»: Edit tool bar: Barra degli strumenti «Modifica»: View tool bar: Barra degli strumenti «Visualizza»: Current page in window title: Pagina attuale nel titolo della finestra: Instance name in window title: Nome dell'istanza nel titolo della finestra: Synchronize outline view: Sincronizzare vista struttura: Highlight current thumbnail: Evidenziare scheda corrente: Limit thumbnails to results: Limitare le miniature nei risultati: Annotation overlay: Motivo annotazione: Form field overlay: Motivo campo del form: Zoom: Ingrandimento: Rotate: Rotazione: Scroll: Scorrimento: Copy to clipboard: Copia negli appunti: Add annotation: Aggiungi nota: ShortcutHandler Action Azione Key sequence Scorciatoia da tastiera Skip backward Salta indietro Skip forward Salta avanti Move up Sposta su Move down Sposta giù Move left Sposta a sinistra Move right Sposta a destra TreeView &Expand all &Espandi tutto &Collapse all &Comprimi tutto qpdfview-0.4.7/translations/qpdfview_kk.ts0000644000000000000000000020243012246606025017104 0ustar 00000000000000 BookmarkMenu &Open А&шу Open in new &tab Жаңа бе&тте ашу &Remove bookmark Бетбелгіні ө&шіру Database Jump to page %1 %1 бетіне өту DocumentView Supported formats (%1) Қолдауы бар пішімдер (%1) Unlock %1 %1 босату Password: Пароль: Information Ақпараты Opening URL is disabled in the settings. Сілтемелерді ашу мүмкіндігі баптауларда сөндірілген. Warning Ескерту SyncTeX data for '%1' could not be found. '%1' үшін SyncTeX мәліметін табу мүмкін емес. Printing '%1'... '%1' баспаға шығару... Page %1 Бет %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Файл салынымын сақтау Warning Ескерту Could not save file attachment to '%1'. Файл салынымын '%1' ішіне сақтау мүмкін емес. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Алдыңғысын табу Find next Келесісін табу MainWindow Warning Ескерту Could not open '%1'. '%1' ашу мүмкін емес. Close all tabs but this one Осыдан басқа барлық бетті жабу Close all tabs to the left Сол жақта барлық бетті жабу Close all tabs to the right Оң жақта барлық бетті жабу Open Ашу Open in new tab Жаңа бетте ашу Could not refresh '%1'. '%1' жаңарту мүмкін емес. Save copy Көшірмесін сақтау Could not save copy at '%1'. Көшірмені '%1' жерінде сақтау мүмкін емес. Save as Қалайша сақтау Could not save as '%1'. '%1' ретінде сақтау мүмкін емес. Could not print '%1'. '%1' баспаға шығару мүмкін емес. Jump to page Бетке өту Page: Бет: Add bookmark Бетбелгіні қосу Label Белгі Jump to page %1 %1 бетіне өту About qpdfview qpdfview туралы <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview - құжаттарды көрсетушісі, Qt қолданады.</p><p>Бұл нұсқада бар:<ul> <li>PDF support using Poppler</li> <li>PDF қолдауы, Poppler негізінде</li> <li>PS support using libspectre</li> <li>PS қодауы, libspectre негізінде</li> <li>DjVu support using DjVuLibre</li> <li>DjVu қолдауы, DjVuLibre негізінде</li> <li>Printing support using CUPS</li> <li>Баспаға шығару мүмкіндігі, CUPS негізінде</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Көбірек білу үшін <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> қараңыз.</p><p>&copy; 2012-2013 qpdfview өндірушілері</p> The document '%1' has been modified. Do you want to save your changes? '%1' құжаты өзгертілген. Өзгерістерді сақтау керек пе? Page width Бет ені Page size Бет өлшемдері Match &case Ре&гистрін ескеру Highlight &all Б&арлығын түспен ерекшелеу &Open... А&шу... Open in new &tab... Жаңа бе&тте ашу... Open containing folder Орналасқан бумасын ашу &Refresh Жаңа&рту &Save copy... Көшірмесін &сақтау... Save &as... Қала&йша сақтау... &Print... Бас&паға шығару... E&xit &Шығу &Previous page А&лдыңғы бет &Next page К&елесі бет &First page &Бірінші бет &Last page С&оңғы бет &Jump to page... Б&етке өту... Jump &backward Ар&тқа секіру Jump for&ward А&лға секіру &Search... І&здеу... Find previous Алдыңғысын табу Find next Келесісін табу Cancel search Іздеуден бас тарту &Copy to clipboard Алмасу буферіне &көшіру &Add annotation Аңдатпаны қ&осу Settings... Баптаулар... &Continuous Ү&зіліссіз &Two pages &Екі бет Two pages &with cover page Екі бет, мұқабамен &бірге &Multiple pages Бірн&еше бет Zoom &in Үлке&йту Zoom &out Кі&шірейту Original &size Бастапқы ө&лшемі Fit to page width Бет енімен сыйдыру Fit to page size Бет өлшемімен сыйдыру Rotate &left &Солға бұру Rotate &right &Оңға бұру Invert colors Түстерді терістеу Fonts... Қаріптер... &Fullscreen Толық &экранға &Presentation... &Презентация... &Previous tab А&лдыңғы бет &Next tab К&елесі бет &Close tab Бетті жа&бу Close &all tabs Б&арлық беттерді жабу Close all tabs &but current tab Ағ&ымдағы беттен барлық басқа беттерді жабу &Previous bookmark Ал&дыңғы бетбелгі &Next bookmark Ке&лесі бетбелгі &Add bookmark Бе&тбелгіні қосу &Remove bookmark Бетбелгіні ө&шіру Remove all bookmarks Барлық бетбелгілерді өшіру &Contents Құра&масы &About &Осы туралы &File &Файл &Edit &Түзету &View Тү&рі &Outline &Мазмұны &Properties Қас&иеттері &Thumbnails Үл&гілер &Search І&здеу &Tool bars &Саймандар панельдері &Docks &Бекіткіштер &Tabs Б&еттер &Bookmarks &Бетбелгілер &Help &Көмек Model::PdfDocument Name Аты Type Түрі Embedded Енгізілген Subset Ішкі жиын File Файл Yes Иә No Жоқ Model::PdfPage Information Ақпараты Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Аңдатпаларды қосу не өшіру үшін Poppler библиотекасының 0.20.1 не одан жоғары нұсқасы керек. Model::PsDocument Title Атауы Created for Үшін жасалған Creator Жасаған Creation date Жасалған күні Format Пішімі Language level Тіл деңгейі PageItem Go to page %1. %1 бетке өту. Go to page %1 of file '%2'. %1 бетке өту, '%2' файлы ішінде. Open '%1'. %1' ашу. Edit form field '%1'. '%1' форма өрісін түзету. Copy &text Мә&тінін көшіріп алу Copy &image Сурет&ті көшіру Save image to &file... Суретті &файлға сақтау... Save image to file Суретті файлға сақтау Warning Ескерту Could not save image to file '%1'. Суретті '%1' файлын сақтау мүмкін емес. Add &text Мә&тінді қосу Add &highlight Түспен ер&екшелеуді қосу &Remove annotation Аңдатпаны ө&шіру PdfSettingsWidget Antialiasing: Тегістеу: Text antialiasing: Мәтінді тегістеу: None Ешнәрсе Full Толық Reduced Кішірейтілген Text hinting: Overprint preview: Solid Бүтін Shaped Пішінделген Thin line mode: Жұқа сызық режимі: PluginHandler Critical Критикалық Could not load PDF plug-in! PDF плагинін жүктеу мүмкін емес! Could not load PS plug-in! PS плагинін жүктеу мүмкін емес! Could not load DjVu plug-in! DjVu плагинін жүктеу мүмкін емес! PrintDialog Fit to page: Бетке сыйдыру: Page ranges: Беттер ауқымы: All pages Барлық беттер Even pages Жұп беттер Odd pages Тақ беттер Page set: Баспаға шығарылатын беттер: Single page Бір бет Two pages Екі бет Four pages Төрт бет Six pages Алты бет Nine pages Тоғыз бет Sixteen pages Он алты бет Number-up: Bottom to top and left to right Төменнен жоғарыға, солдан оңға Bottom to top and right to left Төменнен жоғарыға, оңнан солға Left to right and bottom to top Солдан оңға, төменнен жоғарыға Left to right and top to bottom Солдан оңға, жоғарыдан төмен Right to left and bottom to top Оңнан солға, төменнен жоғарыға Right to left and top to bottom Оңнан солға, жоғарыдан төмен Top to bottom and left to right Жоғарыдан төмен, солдан оңға Top to bottom and right to left Жоғарыдан төмен, оңнан солға Number-up layout: Беттер реті: Extended options Кеңейтілген баптаулар PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. Экземплярдың бос атына рұқсат жоқ. An empty search text is not allowed. Іздеу үшін мәтін бос болмауы тиіс. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. '--instance' опциясын қолдану экземпляр атын талап етеді. Using '--instance' is not allowed without using '--unique'. '--instance' опциясын '--unique' опциясыз қолдану рұқсат етілмеген. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. '--search' опциясы іздеу үшін мәтінді талап етеді. SyncTeX data for '%1' could not be found. '%1' үшін SyncTeX мәліметін табу мүмкін емес. Could not prepare signal handler. Сигнал талдаушысын дайындау мүмкін емес. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift және Ctrl Shift and Alt Shift және Alt Ctrl and Alt Ctrl және Alt RecentlyUsedMenu Recently &used Соңғы қ&олданылған &Clear list Тізімді та&зарту SettingsDialog General Жалпы &Behavior Мінез-құл&ығы &Graphics &Графика &Interface &Интерфейс &Shortcuts Жа&рлықтар &Modifiers &Түрлендіргіштер Defaults Бастапқы мәндер Defaults on current tab Open URL: Сілтемені ашу: Auto-refresh: Автожаңарту: Effective after restart. Қайта қосудан кейін іске асады. Track recently used: Жақында қолданылғанды бақылау: Restore tabs: Беттерді қалпына келтіру: Restore bookmarks: Бетбелгілерді қалпына келтіру: Restore per-file settings: Жеке файлдарға қатысты баптауларды қалпына келтіру: Synchronize presentation: Презентацияны синхрондау: Default Бастапқы Presentation screen: Презентация экраны Highlight color: Түспен ерекшелеу түсі: None Ешнәрсе Highlight duration: Түспен ерекшелеу ұзақтығы: Annotation color: Аңдатпа түсі: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' файлға дейінгі абсолютті орналасу жолымен алмастырылады. '%2' және '%3' сәйкесінше жол және баған нөмерімен алмастырылады. Source editor: Бастапқы код түзеткіші: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Бет қоршауы: Decorate links: Сілтемелерді ерекшелеу: Decorate form fields: Формалар өрістерін ерекшелеу: Background color: Фон түсі: Paper color: Қағаз түсі: Presentation background color: Pages per row: Бір жолдағы беттер саны Page spacing: Беттер аралығы: Thumbnail spacing: Үлгілер аралығы: Thumbnail size: Үлгі өлшемі: %1 MB %1 МБ Cache size: Кэш өлшемі: Prefetch: Алдын-ала жүктеу: Prefetch distance: Алдын-ала жүктеу қашықтығы: Top Жоғары Bottom Төмен Left Сол жақ Right Оң жақ Tab position: Беттердің орналасуы: As needed Керек болған кезде Always Әрқашан Never Ешқашан Tab visibility: Бет көрінуі: New tab next to current tab: Жаңа бетті ағымдағы беттен кейін ашу: Recently used count: Жақында қолданылған құжаттар саны: File tool bar: Файл саймандар панелі: Edit tool bar: Түзету саймандар панелі: View tool bar: Түрі саймандар панелі: Current page in window title: Терезе атауында ағымдағы бет: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Ағымдағы үлгіні түспен ерекшелеу: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Масштаб: Rotate: Бұру: Scroll: Айналдыру: Copy to clipboard: Алмасу буферіне көшіру: Add annotation: Аңдатпаны қосу: ShortcutHandler Action Әрекет Key sequence Пернелер тізбегі Skip backward Артқа өткізу Skip forward Алға өткізу Move up Жоғары жылжыту Move down Төмен жылжыту Move left Солға жылжыту Move right Оңға жылжыту TreeView &Expand all Барлығын &жазық қылу &Collapse all Барлығын ж&инау qpdfview-0.4.7/translations/qpdfview_ko.ts0000644000000000000000000020732612246606025017121 0ustar 00000000000000 2013-11-19 10:28+0000 2013-11-20 05:40+0000 Project-Id-Version,Report-Msgid-Bugs-To,POT-Creation-Date,PO-Revision-Date,Last-Translator,Language-Team,MIME-Version,Content-Type,Content-Transfer-Encoding,X-Launchpad-Export-Date,X-Generator Launchpad (build 16831) FULL NAME <EMAIL@ADDRESS> Korean <ko@li.org> qpdfview 2013-11-06 17:31+0000 # Korean translation for qpdfview # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the qpdfview package. # FIRST AUTHOR <EMAIL@ADDRESS>, 2013. # Litty <Unknown> &Open BookmarkMenu| Open in new &tab BookmarkMenu| &Remove bookmark BookmarkMenu| Jump to page %1 Database| Supported formats (%1) DocumentView| Unlock %1 DocumentView| Password: DocumentView| Information DocumentView| Opening URL is disabled in the settings. DocumentView| Warning DocumentView| SyncTeX data for '%1' could not be found. DocumentView| Printing '%1'... DocumentView| Page %1 DocumentView| Save... FileAttachmentAnnotationWidget| Save and open... FileAttachmentAnnotationWidget| Save file attachment FileAttachmentAnnotationWidget| Warning FileAttachmentAnnotationWidget| Could not save file attachment to '%1'. FileAttachmentAnnotationWidget| help.html HelpDialog| Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous HelpDialog| Find next HelpDialog| Warning MainWindow| Could not open '%1'. MainWindow| Close all tabs but this one MainWindow| 이 탭만 남기고 모두 닫기 Close all tabs to the left MainWindow| Close all tabs to the right MainWindow| Open MainWindow| Open in new tab MainWindow| Could not refresh '%1'. MainWindow| Save copy MainWindow| Could not save copy at '%1'. MainWindow| Save as MainWindow| Could not save as '%1'. MainWindow| Could not print '%1'. MainWindow| Jump to page MainWindow| Page: MainWindow| Add bookmark MainWindow| Label MainWindow| Jump to page %1 MainWindow| About qpdfview MainWindow| gpdfview에 대하여 <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> MainWindow| <li>PDF support using Poppler</li> MainWindow| <li>PS support using libspectre</li> MainWindow| <li>DjVu support using DjVuLibre</li> MainWindow| <li>Printing support using CUPS</li> MainWindow| </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> MainWindow| The document '%1' has been modified. Do you want to save your changes? MainWindow| Page width MainWindow| Page size MainWindow| Match &case MainWindow| Highlight &all MainWindow| &Open... MainWindow| Open in new &tab... MainWindow| Open containing folder MainWindow| &Refresh MainWindow| &Save copy... MainWindow| Save &as... MainWindow| &Print... MainWindow| E&xit MainWindow| &Previous page MainWindow| &Next page MainWindow| &First page MainWindow| &Last page MainWindow| &Jump to page... MainWindow| Jump &backward MainWindow| Jump for&ward MainWindow| &Search... MainWindow| Find previous MainWindow| Find next MainWindow| Cancel search MainWindow| &Copy to clipboard MainWindow| &Add annotation MainWindow| Settings... MainWindow| &Continuous MainWindow| &Two pages MainWindow| Two pages &with cover page MainWindow| &Multiple pages MainWindow| Zoom &in MainWindow| Zoom &out MainWindow| Original &size MainWindow| Fit to page width MainWindow| Fit to page size MainWindow| Rotate &left MainWindow| Rotate &right MainWindow| Invert colors MainWindow| Fonts... MainWindow| &Fullscreen MainWindow| &Presentation... MainWindow| &Previous tab MainWindow| &Next tab MainWindow| &Close tab MainWindow| Close &all tabs MainWindow| Close all tabs &but current tab MainWindow| &Previous bookmark MainWindow| &Next bookmark MainWindow| &Add bookmark MainWindow| &Remove bookmark MainWindow| Remove all bookmarks MainWindow| &Contents MainWindow| &About MainWindow| &File MainWindow| &Edit MainWindow| &View MainWindow| &Outline MainWindow| &Properties MainWindow| &Thumbnails MainWindow| &Search MainWindow| &Tool bars MainWindow| &Docks MainWindow| &Tabs MainWindow| &Bookmarks MainWindow| &Help MainWindow| Name Model::PdfDocument| Type Model::PdfDocument| Embedded Model::PdfDocument| Subset Model::PdfDocument| File Model::PdfDocument| Yes Model::PdfDocument| No Model::PdfDocument| Information Model::PdfPage| Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PdfPage| Title Model::PsDocument| Created for Model::PsDocument| Creator Model::PsDocument| Creation date Model::PsDocument| Format Model::PsDocument| Language level Model::PsDocument| Go to page %1. PageItem| Go to page %1 of file '%2'. PageItem| Open '%1'. PageItem| Edit form field '%1'. PageItem| Copy &text PageItem| Copy &image PageItem| Save image to &file... PageItem| Save image to file PageItem| Warning PageItem| Could not save image to file '%1'. PageItem| Add &text PageItem| Add &highlight PageItem| &Remove annotation PageItem| Antialiasing: PdfSettingsWidget| Text antialiasing: PdfSettingsWidget| None PdfSettingsWidget| Full PdfSettingsWidget| Reduced PdfSettingsWidget| Text hinting: PdfSettingsWidget| Overprint preview: PdfSettingsWidget| Solid PdfSettingsWidget| Shaped PdfSettingsWidget| Thin line mode: PdfSettingsWidget| Critical PluginHandler| Could not load PDF plug-in! PluginHandler| Could not load PS plug-in! PluginHandler| Could not load DjVu plug-in! PluginHandler| Fit to page: PrintDialog| Page ranges: PrintDialog| All pages PrintDialog| Even pages PrintDialog| Odd pages PrintDialog| Page set: PrintDialog| Single page PrintDialog| Two pages PrintDialog| Four pages PrintDialog| Six pages PrintDialog| Nine pages PrintDialog| Sixteen pages PrintDialog| Number-up: PrintDialog| Bottom to top and left to right PrintDialog| Bottom to top and right to left PrintDialog| Left to right and bottom to top PrintDialog| Left to right and top to bottom PrintDialog| Right to left and bottom to top PrintDialog| Right to left and top to bottom PrintDialog| Top to bottom and left to right PrintDialog| Top to bottom and right to left PrintDialog| Number-up layout: PrintDialog| Extended options PrintDialog| Graphics antialias bits: PsSettingsWidget| Text antialias bits: PsSettingsWidget| An empty instance name is not allowed. QObject| An empty search text is not allowed. QObject| Choose instance QObject| Instance: QObject| Unknown command-line option '%1'. QObject| Using '--instance' requires an instance name. QObject| Using '--instance' is not allowed without using '--unique'. QObject| An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. QObject| Using '--search' requires a search text. QObject| SyncTeX data for '%1' could not be found. QObject| Could not prepare signal handler. QObject| Shift QShortcut| Ctrl QShortcut| Alt QShortcut| Shift and Ctrl QShortcut| Shift and Alt QShortcut| Ctrl and Alt QShortcut| Recently &used RecentlyUsedMenu| &Clear list RecentlyUsedMenu| General SettingsDialog| &Behavior SettingsDialog| &Graphics SettingsDialog| &Interface SettingsDialog| &Shortcuts SettingsDialog| &Modifiers SettingsDialog| Defaults SettingsDialog| Defaults on current tab SettingsDialog| Open URL: SettingsDialog| Auto-refresh: SettingsDialog| Effective after restart. SettingsDialog| Track recently used: SettingsDialog| Restore tabs: SettingsDialog| Restore bookmarks: SettingsDialog| Restore per-file settings: SettingsDialog| Synchronize presentation: SettingsDialog| Default SettingsDialog| Presentation screen: SettingsDialog| Highlight color: SettingsDialog| None SettingsDialog| Highlight duration: SettingsDialog| Annotation color: SettingsDialog| '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. SettingsDialog| Source editor: SettingsDialog| Keep obsolete pixmaps: SettingsDialog| Use device pixel ratio: SettingsDialog| Decorate pages: SettingsDialog| Decorate links: SettingsDialog| Decorate form fields: SettingsDialog| Background color: SettingsDialog| Paper color: SettingsDialog| Presentation background color: SettingsDialog| Pages per row: SettingsDialog| Page spacing: SettingsDialog| Thumbnail spacing: SettingsDialog| Thumbnail size: SettingsDialog| %1 MB SettingsDialog| Cache size: SettingsDialog| Prefetch: SettingsDialog| Prefetch distance: SettingsDialog| Top SettingsDialog| Bottom SettingsDialog| Left SettingsDialog| Right SettingsDialog| Tab position: SettingsDialog| As needed SettingsDialog| Always SettingsDialog| Never SettingsDialog| Tab visibility: SettingsDialog| New tab next to current tab: SettingsDialog| Recently used count: SettingsDialog| File tool bar: SettingsDialog| Edit tool bar: SettingsDialog| View tool bar: SettingsDialog| Current page in window title: SettingsDialog| Instance name in window title: SettingsDialog| Synchronize outline view: SettingsDialog| Highlight current thumbnail: SettingsDialog| Limit thumbnails to results: SettingsDialog| Annotation overlay: SettingsDialog| Form field overlay: SettingsDialog| Zoom: SettingsDialog| Rotate: SettingsDialog| Scroll: SettingsDialog| Copy to clipboard: SettingsDialog| Add annotation: SettingsDialog| Action ShortcutHandler| Key sequence ShortcutHandler| Skip backward ShortcutHandler| Skip forward ShortcutHandler| Move up ShortcutHandler| Move down ShortcutHandler| Move left ShortcutHandler| Move right ShortcutHandler| &Expand all TreeView| &Collapse all TreeView| qpdfview-0.4.7/translations/qpdfview_ky.ts0000644000000000000000000016306312246606025017132 0ustar 00000000000000 BookmarkMenu &Open &Ачуу Open in new &tab Жаңы &салмадан ачуу &Remove bookmark Чөп катты &өчүрүү Database Jump to page %1 %1 барагына өтүү DocumentView Supported formats (%1) Unlock %1 %1 тосмолоодон алуу Password: Сырсөз: Printing '%1'... '%1' басуу... Page %1 Information Маалымат Opening URL is disabled in the settings. Warning Эскертүү SyncTeX data for '%1' could not be found. FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Эскертүү Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Мурункуну табуу Find next Кийинкини табуу MainWindow Warning Эскертүү Could not open '%1'. Open containing folder Open Ачуу Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Жаңы салмадан ачуу Could not refresh '%1'. Save copy Көчүрмөнү сактоо Could not save copy at '%1'. Save as Ат коюп сактоо Could not save as '%1'. Could not print '%1'. Jump to page Баракка өтүү Page: Барак: Add bookmark Label Jump to page %1 %1 барагына өтүү About qpdfview qpdfview жөнүндө <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Барактын туурасы боюнча Page size Барактын өлчөмү боюнча Match &case Highlight &all &Open... &Ачуу... Open in new &tab... &Refresh &Жаңыртуу &Save copy... Көчүрмөнү &сактоо... Save &as... &Ат коюп сактоо... &Print... &Басма... E&xit &Previous page &Мурунку барак &Next page &Кийинки барак &First page &Биринчи барак &Last page &Акыркы барак &Jump to page... Баракка &өтүү... Jump &backward Jump for&ward &Search... &Издөө... Find previous Мурункуну табуу Find next Кийинкини табуу Cancel search Издөөнү жокко чыгаруу &Copy to clipboard Алмашуу буферине &көчүрүү &Add annotation Settings... Ырастоолор... &Continuous &Two pages &Эки барак Two pages &with cover page &Multiple pages Zoom &in Zoom &out Original &size Fit to page width Fit to page size Rotate &left Rotate &right Invert colors Fonts... &Fullscreen &Presentation... &Previous tab &Next tab &Close tab Close &all tabs Close all tabs &but current tab &Previous bookmark &Next bookmark &Add bookmark &Remove bookmark Чөп катты &өчүрүү Remove all bookmarks &Contents &About &File &Edit &View &Search &Outline &Properties &Thumbnails &Tool bars &Docks &Tabs &Bookmarks &Help Model::PdfDocument Name Ат Type Түр Embedded Subset File Файл Yes Ооба No Жок Model::PdfPage Information Маалымат Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text Copy &image Save image to &file... Save image to file Warning Эскертүү Could not save image to file '%1'. Add &text Add &highlight &Remove annotation PdfSettingsWidget Antialiasing: Text antialiasing: None Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Could not prepare signal handler. QShortcut Shift Ctrl Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used &Clear list SettingsDialog &Behavior &Graphics &Interface &Shortcuts &Modifiers Defaults Defaults on current tab Open URL: Auto-refresh: Effective after restart. Track recently used: Restore tabs: Restore bookmarks: Restore per-file settings: Synchronize presentation: Default Presentation screen: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: None Highlight duration: Background color: Paper color: Pages per row: Page spacing: Thumbnail spacing: Thumbnail size: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB Cache size: Prefetch: Prefetch distance: Top Bottom Left Right Tab position: As needed Always Never Tab visibility: New tab next to current tab: Recently used count: Current page in window title: File tool bar: Edit tool bar: View tool bar: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_lt.ts0000644000000000000000000016120512246606025017122 0ustar 00000000000000 BookmarkMenu &Open Open in new &tab &Remove bookmark Database Jump to page %1 Pereiti į puslapį %1 DocumentView Supported formats (%1) Unlock %1 Password: Slaptažodis Information Opening URL is disabled in the settings. Warning SyncTeX data for '%1' could not be found. Printing '%1'... Page %1 FileAttachmentAnnotationWidget Save... Išsaugoti... Save and open... Save file attachment Warning Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Find next MainWindow Warning Could not open '%1'. Neįmanoma atverti %1 Close all tabs but this one Close all tabs to the left Uždaryti visus skirtukus kairėje Close all tabs to the right Uždaryti visus skirtukus dešinėje Open Atverti Open in new tab Ativerti naujame skirtuke Could not refresh '%1'. Save copy Could not save copy at '%1'. Save as Could not save as '%1'. Could not print '%1'. Jump to page Page: Add bookmark Label Jump to page %1 Pereiti į puslapį %1 About qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Page size Match &case Highlight &all &Open... Open in new &tab... Open containing folder &Refresh &Save copy... Save &as... &Print... E&xit &Previous page &Next page &Kitas puslapis &First page &Last page &Jump to page... Jump &backward Jump for&ward &Search... Find previous Find next Cancel search &Copy to clipboard &Add annotation Settings... &Continuous &Two pages Two pages &with cover page &Multiple pages Zoom &in Zoom &out Original &size Fit to page width Fit to page size Rotate &left Rotate &right Invert colors Fonts... &Fullscreen &Presentation... &Previous tab &Next tab &Close tab Close &all tabs Close all tabs &but current tab &Previous bookmark &Next bookmark &Add bookmark &Remove bookmark Remove all bookmarks &Contents &About &File &Edit &View &Outline &Properties &Thumbnails &Search &Tool bars &Docks &Tabs &Bookmarks &Help Model::PdfDocument Name Type Embedded Subset File Yes No Model::PdfPage Information Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text Copy &image Save image to &file... Save image to file Warning Could not save image to file '%1'. Add &text Add &highlight &Remove annotation PdfSettingsWidget Antialiasing: Text antialiasing: None Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Could not prepare signal handler. QShortcut Shift Ctrl Alt Shift and Ctrl Shift and Alt Ctrl and Alt RecentlyUsedMenu Recently &used &Clear list SettingsDialog General &Behavior &Graphics &Interface &Shortcuts &Modifiers Defaults Defaults on current tab Open URL: Auto-refresh: Effective after restart. Track recently used: Restore tabs: Restore bookmarks: Restore per-file settings: Synchronize presentation: Default Presentation screen: None Highlight duration: Highlight color: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: Background color: Paper color: Presentation background color: Pages per row: Page spacing: Thumbnail spacing: Thumbnail size: %1 MB Cache size: Prefetch: Prefetch distance: Top Bottom Left Right Tab position: As needed Always Never Tab visibility: New tab next to current tab: Recently used count: File tool bar: Edit tool bar: View tool bar: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Action Key sequence Skip backward Skip forward Move up Move down Move left Move right TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_ms.ts0000644000000000000000000017417512246606025017134 0ustar 00000000000000 BookmarkMenu &Open &Buka Open in new &tab Buka dalam &tab baru &Remove bookmark &Buang tanda buku Database Jump to page %1 Lompat ke halaman %1 DocumentView Supported formats (%1) Format disokong (%1) Unlock %1 Buka %1 Password: Kata Laluan: Information Maklumat Opening URL is disabled in the settings. Membuka URL dilumpuhkan dalam tetapan. Warning Amaran SyncTeX data for '%1' could not be found. Data SyncTeX untuk '%1' tidak ditemui. Printing '%1'... Mencetak '%1'... Page %1 Halaman %1 FileAttachmentAnnotationWidget Save... Simpan... Save and open... Simpan dan buka... Save file attachment Simpan lampiran fail Warning Amaran Could not save file attachment to '%1'. Tidak dapat simpan lampiran ke '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Cari terdahulu Find next Cari berikutnya MainWindow Warning Amaran Could not open '%1'. Tidak dapat buka '%1'. Close all tabs but this one Tutup semua tab tetapi kecualikan ini Close all tabs to the left Tutup semua ke disebelah kiri Close all tabs to the right Tutup semua tab disebelah kanan Open Buka Open in new tab Buka dalam tab baru Could not refresh '%1'. Tidak dapat segar semula '%1'. Save copy Simpan salinan Could not save copy at '%1'. Tidak dapat simpan salinan pada '%1'. Save as Simpan sebagai Could not save as '%1'. Tidak dapat simpan sebagai '%1'. Could not print '%1'. Tidak dapat cetak '%1'. Jump to page Lompat ke halaman Page: Halaman: Add bookmark Tambah tanda buku Label Label Jump to page %1 Lompat ke halaman %1 About qpdfview Perihal qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview merupakan pelihat dokumen bertab yang menggunakan Qt.</p><p>Versi ini menyertakan:<ul> <li>PDF support using Poppler</li> <li>Sokongan PDF menggunakan Poppler</li> <li>PS support using libspectre</li> <li>Sokongan PS menggunakan libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Sokongan DjVu menggunakan DjVuLibre</li> <li>Printing support using CUPS</li> <li>Sokongan cetakan menggunakan CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Rujuk <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> untuk maklumat lanjut.</p><p>&copy; 2012-2013 Pembangun qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Dokumen '%1' telah diubahsuai. Anda hendak simpan perubahan yang anda buat? Page width Lebar halaman Page size Saiz halaman Match &case Padan &kata Highlight &all Sorot semu&a &Open... B&uka... Open in new &tab... Buka dalam &tab baru... Open containing folder Buka folder yang mengandungi &Refresh Sega&r semula &Save copy... &Simpan salinan... Save &as... Simp&an sebagai... &Print... &Cetak... E&xit &Keluar &Previous page Halaman te&rdahulu &Next page Halaman &berikut &First page Halaman per&tama &Last page Halaman t&erakhir &Jump to page... L&ompat ke halaman... Jump &backward Lompat men&gundur Jump for&ward Lompat ma&ju &Search... &Gelintar... Find previous Cari terdahulu Find next Cari berikutnya Cancel search Batal gelintar &Copy to clipboard Sa&lin ke papan keratan &Add annotation T&ambah anotasi Settings... Tetapan... &Continuous &Bersambung &Two pages &Dua halaman Two pages &with cover page Dua halaman de&ngan muka hadapan &Multiple pages Halaman be&rbilang Zoom &in Zum mas&uk Zoom &out Zum ke&luar Original &size &Saiz asal Fit to page width Suai muat mengikut lebar halaman Fit to page size Muat mengikut saiz halaman Rotate &left Putar k&iri Rotate &right Putar ka&nan Invert colors Songsangkan warna Fonts... Fon... &Fullscreen Skrin &Penuh &Presentation... &Persembahan... &Previous tab Tab ter&dahulu &Next tab Tab b&erikutnya &Close tab T&utup tab Close &all tabs Tutup semu&a tab Close all tabs &but current tab Tutup semua tab ke&cuali tab semasa &Previous bookmark Tanda buku te&rdahulu &Next bookmark Tanda buku ber&ikutnya &Add bookmark T&ambah tanda buku &Remove bookmark &Buang tanda buku Remove all bookmarks Buang semua tanda buku &Contents &Kandungan &About Perih&al &File &Fail &Edit &Sunting &View &Lihat &Outline Garis&luar &Properties Si&fat &Thumbnails &Thumbnail &Search &Gelintar &Tool bars Palang ala&t &Docks La&buh &Tabs &Tab &Bookmarks Tanda &Buku &Help Ban&tuan Model::PdfDocument Name Nama Type Jenis Embedded Terbenam Subset Subset File Fail Yes Ya No Tidak Model::PdfPage Information Maklumat Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Versi pustaka Poppler 0.201 atau lebih tinggi diperlukan untuk tambah atau buang catatan. Model::PsDocument Title Tajuk Created for Dicipta untuk Creator Pencipta Creation date Tarikh Ciptaan Format Format Language level Aras bahasa PageItem Go to page %1. Pergi ke halaman %1. Go to page %1 of file '%2'. Pergi ke halaman %1 dari fail '%2'. Open '%1'. Buka '%1'. Edit form field '%1'. Sunting medan borang '%1'. Copy &text Salin &teks Copy &image Salin &imej Save image to &file... Simpan imej ke &fail... Save image to file Simpan imej ke fail Warning Amaran Could not save image to file '%1'. Tidak dapat simpan imej ke fail '%1'. Add &text Tambah &teks Add &highlight Tambah s&orot &Remove annotation &Buang anotasi PdfSettingsWidget Antialiasing: Anti alias: Text antialiasing: Anti alias teks: None Tiada Full Penuh Reduced Terkurang Text hinting: Pembayang teks: Overprint preview: Pratonton lampau cetak: Solid Tegar Shaped Terbentuk Thin line mode: Mod garis nipis: PluginHandler Critical Kritikal Could not load PDF plug-in! Tidak dapat muat pemalam PDF! Could not load PS plug-in! Tidak dapat muat pemalam PS! Could not load DjVu plug-in! Tidak dapat muat pemalam DjVu! PrintDialog Fit to page: Suai muat ke halaman: Page ranges: Julat halaman: All pages Semua halaman Even pages Halaman genap Odd pages Halaman ganjil Page set: Set halaman: Single page Halaman tunggal Two pages Dua halaman Four pages Empat halaman Six pages Enam halaman Nine pages Sembilan halaman Sixteen pages Enam belas halaman Number-up: Nombor-menaik: Bottom to top and left to right Bawah ke atas dan kiri ke kanan Bottom to top and right to left Bawah ke atas dan kanan ke kiri Left to right and bottom to top Kiri ke kanan dan bawah ke atas Left to right and top to bottom Kiri ke kanan dan atas ke bawah Right to left and bottom to top Kanan ke kiri dan bawah ke atas Right to left and top to bottom Kanan ke kiri dan atas ke bawah Top to bottom and left to right Atas ke bawah dan kiri ke kanan Top to bottom and right to left Atas ke bawah dan kanan ke kiri Number-up layout: Bentangan nombor-keatas: Extended options Pilihan sambungan PsSettingsWidget Graphics antialias bits: Bit antialias grafik Text antialias bits: Bit antialias teks: QObject An empty instance name is not allowed. Nama kejadian kosong tidak dibenarkan. An empty search text is not allowed. Teks gelintar kosong tidak dibenarkan. Choose instance Pilih kejadian Instance: Kejadian: Unknown command-line option '%1'. Pilihan baris-perintah '%1' tidak diketahui. Using '--instance' requires an instance name. Penggunaan '--instance' memerlukan nama kejadian. Using '--instance' is not allowed without using '--unique'. Penggunaan '--instance' tidak dibenarkan tanpa menggunakan '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Satu nama kejadian mesti mengandungi aksara "[A-Z][a-z][0-9]_" dan mesti tidak bermula dengan digit. Using '--search' requires a search text. Menggunakan '--search' memerlukan teks gelintar. SyncTeX data for '%1' could not be found. Data SyncTeX untuk '%1' tidak ditemui. Could not prepare signal handler. Tidak dapat sediakan pengendali isyarat. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift dan Ctrl Shift and Alt Shift dan Alt Ctrl and Alt Ctrl dan Alt RecentlyUsedMenu Recently &used Digunakan baru-baru &ini &Clear list K&osongkan senarai SettingsDialog General Am &Behavior &Kelakuan &Graphics &Grafik &Interface Anta&ramuka &Shortcuts &Pintasan &Modifiers Peng&ubahsuai Defaults Lalai Defaults on current tab Lalai pada tab semasa Open URL: URL buka: Auto-refresh: Segar-semula-automatik: Effective after restart. Berkesan selepas mula semula. Track recently used: Jejak yang digunakan baru-baru ini: Restore tabs: Pulih tab: Restore bookmarks: Piulih tanda buku: Restore per-file settings: Pulih tetapan per-fail: Synchronize presentation: Segerakkan persembahan: Default Lalai Presentation screen: Skrin persembahan: None Tiada Highlight duration: Sorot jangkamasa: Highlight color: Warna sorot: Annotation color: Warna catatan: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' diganti dengan laluan fail mutlak. '%2' resp. '%3' diganti dengan nombot lajur resp. baris. Source editor: Penyunting sumber: Keep obsolete pixmaps: Kekalkan peta pix lapuk: Use device pixel ratio: Guna nisbah piksel peranti: Decorate pages: Hias halaman: Decorate links: Hias pautan: Decorate form fields: Hias medan borang: Background color: Warna latar belakang: Paper color: Warna kertas: Presentation background color: Warna latar belakang persembahan: Pages per row: Halaman per baris: Page spacing: Jarak halaman: Thumbnail spacing: Jarak thumbnail: Thumbnail size: Saiz thumbnail: %1 MB %1 MB Cache size: Saiz cache: Prefetch: Prefetch: Prefetch distance: Jarak prefetch: Top Atas Bottom Bawah Left Kiri Right Kanan Tab position: Kedudukan tab: As needed Seperti diperlukan Always Sentiasa Never Jangan sesekali Tab visibility: Ketampakan tab: New tab next to current tab: Tab baru bersebelahan tab semasa: Recently used count: Kiraan yang terkini digunakan: File tool bar: Palang alat fail: Edit tool bar: Palang alat sunting: View tool bar: Palang alat lihat: Current page in window title: Halaman semasa dalam tajuk tetingkap: Instance name in window title: Nama kejadian dalam tajuk tetingkap: Synchronize outline view: Segerak paparan garis luar: Highlight current thumbnail: Sorot lakaran kenit semasa: Limit thumbnails to results: Had thumbnail terhadap keputusan: Annotation overlay: Tindihan catatan: Form field overlay: Tindihan medan borang: Zoom: Zum: Rotate: Putar: Scroll: Tatal: Copy to clipboard: Salin ke papan keratan: Add annotation: Tambah anotasi: ShortcutHandler Action Tindakan Key sequence Jujukan kekunci Skip backward Langkau mengundur Skip forward Langkau maju Move up Alih ke atas Move down Alih ke bawah Move left Alih ke kiri Move right Alih ke kanan TreeView &Expand all K&embang semua &Collapse all K&uncup semua qpdfview-0.4.7/translations/qpdfview_my.ts0000644000000000000000000017601112246606025017131 0ustar 00000000000000 BookmarkMenu &Open &Oဖွင့်မည်။ Open in new &tab &t အသစ်တွင်ဖွင့်မည် &Remove bookmark &Rမှတ်တမ်းဖြုတ်မည် Database Jump to page %1 %1 စာမျက်နှာသို့သွားမည် DocumentView Supported formats (%1) Unlock %1 Unlock %1 Password: စကားဝှက် − Printing '%1'... '%1' ကိုစာရွက်ထုတ်နေပါသည် Page %1 Information အချက်အလက် Opening URL is disabled in the settings. Opening URL is disabled in the settings. Warning သတိပေးချက် SyncTeX data for '%1' could not be found. SyncTeX data for '%1' could not be found. FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning သတိပေးချက် Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous ရှေ့တွင်ရှာမည် Find next နောက်တွင်ရှာမည် MainWindow Warning သတိပေးချက် Could not open '%1'. '%1' ကိုမဖွင့်နိုင်ပါ Open containing folder Open ဖွင့် Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Tab တစ်ခုတွင်ဖွင့်မည် Could not refresh '%1'. Save copy မိတ္ထူကိုသိမ်းမည် Could not save copy at '%1'. '%1' မှာ မိတ္ထူကိုမသိမ်းနိုင်ပါ Save as Could not save as '%1'. Could not print '%1'. '%1' ပရင့်မထုတ်နိုင်ပါ Jump to page စာမျက်နှာသို့သွားမည် Page: စာမျက်နှာ- Add bookmark Label Jump to page %1 %1 စာမျက်နှာသို့သွားမည် About qpdfview qpdfview အကြောင်း <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width စာမျက်နှာအနံ Page size စာမျက်နှာအရွယ်အစား Match &case Highlight &all &Open... &Oဖွင့် Open in new &tab... &t Tab အသစ်တွင်ဖွင့်မည် &Refresh &Refresh &Save copy... &S မိတ္ထူကိုသိမ်းမည် Save &as... &Print... &P စာရွက်ထုတ်မည် E&xit &Previous page &P ယခင်စာမျက်နှာ &Next page &N နောက်စာမျက်နှာ &First page &F ပထမစာမျက်နှာ &Last page &L နောက်ဆုံးစာမျက်နှာ &Jump to page... &J တခြားစာမျက်နှာသို့သွားမည် Jump &backward Jump for&ward &Search... &S ရှာမည် Find previous ရှေ့တွင်ရှာမည် Find next နောက်တွင်ရှာမည် Cancel search ရှာဖွေခြင်းကိုရပ်မည် &Copy to clipboard &Add annotation &A မှတ်သားစာထည့်မည် Settings... &Continuous &C ဆက်လုပ်မည် &Two pages & နှစ်မျက်နှာ Two pages &with cover page &w အဖုံးစာမျက်နှာနှင့်နှစ်မျက်နှာ &Multiple pages &M စာရွက်အမြောက်အများ Zoom &in &i ချုံ့မည် Zoom &out &o ချဲ့မည် Original &size &s မူလအရွယ်အစား Fit to page width စာမျက်နှာအနံနှင့်ဆန့်အောင်ထားမည် Fit to page size စာမျက်နှာအရွယ်အစားနှင့်ဆန့်အောင်ထားမည် Rotate &left &l ဘယ်ဖက်သို့လှည့်မည် Rotate &right &r ညာဖက်သို့လှည့်မည် Invert colors Fonts... စာလုံးပုံစံ &Fullscreen &F စကရင်အပြည့် &Presentation... &Previous tab &P ယခင် tab &Next tab &N နောက် tab &Close tab &C tab ကိုပိတ်မည် Close &all tabs &a tab များအားလုံးကိုပိတ်မည် Close all tabs &but current tab &b ယခု tab မှလွဲပြီး tab များအားလုံးကိုပိတ်မည် &Previous bookmark &P ရှေ့ကမှတ်တမ်း &Next bookmark &N နောက်မှတ်တမ်း &Add bookmark &A မှတ်တမ်းထည့်မည် &Remove bookmark &Rမှတ်တမ်းဖြုတ်မည် Remove all bookmarks မှတ်တမ်းများအားလုံးကိုဖျက်မည် &Contents &C မာတိကာ &About &A အကြောင်း &File &Fဖိုင် &Edit &Eပြင်ဆင်ရန် &View &V မြင်ကွင်း &Search &Sရှာဖွေရေး &Outline &Properties &Thumbnails &Tool bars &Docks &Tabs &Tabs &Bookmarks &B မှတ်တမ်းများ &Help &H အကူအညီ Model::PdfDocument Name အမည် Type အမျိုးအစား Embedded Embedded Subset Subset File ဖိုင် Yes ဟုတ်ကဲ့ No မဟုတ်ဘူး Model::PdfPage Information အချက်အလက် Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. %1 စာမျက်နှာသို့သွားမည် Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text &t စာများကိုကူးမည် Copy &image &i ပုံများကိုကူးမည် Save image to &file... &f ပုံများကိုဖိုင်ထဲသို့သိမ်းမည် Save image to file ပုံများကို ဖိုင်ထဲသိမ်းမည် Warning သတိပေးချက် Could not save image to file '%1'. '%1' ဖိုင်ထဲသို့ပုံ မသိမ်းနိုင်ပါ Add &text &t စာများထည့်မည် Add &highlight &Remove annotation &R မှတ်သားစာဖြုတ်မည် PdfSettingsWidget Antialiasing: Antialiasing: Text antialiasing: Text antialiasing: None ဘာမျှမဟုတ် Full Reduced Text hinting: Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: စာမျက်နှာတွင်ဆန့်အောင်ထားမည်- Page ranges: All pages စာမျက်နှာများအားလုံး Even pages စုံစာမျက်နှာများ Odd pages မ စာမျက်နှာများ Page set: Single page စာရွက်တစ်ရွက်တည်း Two pages စာရွက်နှစ်ရွက် Four pages စာရွက် ၄ ရွက် Six pages စာရွက် ၆ ရွက် Nine pages စာရွက် ၉ ရွက် Sixteen pages စာရွက် ၁၆ ရွက် Number-up: Bottom to top and left to right အောက်မှ အထက်သို့ နှင့် ဘယ်မှ ညာသို့ Bottom to top and right to left အောက်မှ အထက်သို့ ညာမှ ဘယ်သို့ Left to right and bottom to top ဘယ်မှညာသို့ နှင့် အောက်မှ အထက်သို့ Left to right and top to bottom ဘယ်မှညာသို့ နှင့် အထက်မှအောက်သို့ Right to left and bottom to top ညာမှဘယ်ဖက်သို့ နှင့် အောက်မှအထက်သို့ Right to left and top to bottom ညာမှ ဘယ်သို့ နှင့်အောက်မှ အထက်သို့ Top to bottom and left to right အပေါ်မှ အောက်သို့နှင့် ဘယ်မှညာသို့ Top to bottom and right to left အထက်မှ အောက်သို့နှင့် ညာမှ ဘယ်သို့ Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. SyncTeX data for '%1' could not be found. Could not prepare signal handler. QShortcut Shift Shift Ctrl Alt Alt Shift and Ctrl Shift and Alt Shift နှင့် Alt Ctrl and Alt RecentlyUsedMenu Recently &used &u မကြာသေးခင်ကသုံးသွားသော &Clear list &Clear list SettingsDialog &Behavior &Graphics &Graphics &Interface &I အသွင်အပြင် &Shortcuts &Modifiers Defaults နဂိုမူလအတိုင်း Defaults on current tab Open URL: URL ကိုဖွင့်မည် - Auto-refresh: Effective after restart. စက်ကိုပိတ်ပြီးပြန်ဖွင့်မှထိရောက်မည် Track recently used: Restore tabs: tab များကို ပြန်ထားမည် - Restore bookmarks: မှတ်တမ်းများကိုပြန်ထားမည် - Restore per-file settings: Synchronize presentation: Default မူလပုံစံ Presentation screen: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: အလှချယ်ထားသောစာမျက်နှာများ- Decorate links: Decorate form fields: None ဘာမျှမဟုတ် Highlight duration: Background color: Paper color: Pages per row: တစ်တိုင်တွင်စာမျက်နှာများ Page spacing: Thumbnail spacing: Thumbnail size: Thumbnail အရွယ်အစား- Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB %1 MB Cache size: Cache အရွယ်အစား- Prefetch: Prefetch: Prefetch distance: Top ထိပ် Bottom အောက်ခြေ Left ဘယ်ဖက် Right ညာဖက် Tab position: Tab တည်နေရာ- As needed လိုအပ်သလို Always အမြဲတမ်း Never ဘယ်တော့မှ Tab visibility: Tab မြင်သာမှု့- New tab next to current tab: Recently used count: Current page in window title: File tool bar: ဖိုင် tool bar: Edit tool bar: Edit tool bar: View tool bar: မြင်ကွင်း tool bar: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &E အားလုံးကိုဖြန့်မည် &Collapse all &C အားလုံးကိုချုံ့မည် qpdfview-0.4.7/translations/qpdfview_pl.ts0000644000000000000000000016354612246606025017130 0ustar 00000000000000 BookmarkMenu &Open &Otwórz Open in new &tab Otwórz w nowej &karcie &Remove bookmark &Usuń zakładkę Database Jump to page %1 Przejdź do strony %1 DocumentView Supported formats (%1) Wspierane formaty (%1) Unlock %1 Odblokuj %1 Password: Hasło: Information Informacje Opening URL is disabled in the settings. Otwieranie adresów URL jest wyłączone w ustawieniach. Warning Ostrzeżenie SyncTeX data for '%1' could not be found. Dane systemu SyncTeX dla '%1' nie zostały znalezione. Printing '%1'... Drukowanie '%1'... Page %1 Strona %1 FileAttachmentAnnotationWidget Save... Zapisz... Save and open... Zapisz i otwórz... Save file attachment Zapisz plik załącznika Warning Ostrzeżenie Could not save file attachment to '%1'. Nie udało się zapisać pliku załącznika do '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help.html Find previous Znajdź poprzedni Find next Znajdź następny MainWindow Warning Ostrzeżenie Could not open '%1'. Nie można otworzyć '%1'. Close all tabs but this one Zamknij wszystkie karty, ale nie tą Close all tabs to the left Zamknij wszystkie karty w lewo Close all tabs to the right Zamknij wszystkie karty w prawo Open Otwórz Open in new tab Otwórz w nowej karcie Could not refresh '%1'. Nie można odświeżyć '%1'. Save copy Zapisz kopię Could not save copy at '%1'. Nie można zapisać kopii jako '%1'. Save as Zapisz jako Could not save as '%1'. Nie można zapisać jako '%1'. Could not print '%1'. Nie można wydrukować '%1'. Jump to page Skocz do strony Page: Strona: Add bookmark Dodaj zakładkę Label Etykieta Jump to page %1 Przejdź do strony %1 About qpdfview O programie qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview to przeglądarka dokumentów z kartami używająca interfejsu Qt.</p><p>Ta wersja zawiera:<ul> <li>PDF support using Poppler</li> <li>Obsługa formatu PDF za pomocą Poppler</li> <li>PS support using libspectre</li> <li>Wsparcie PS przy użyciu libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Wsparcie DjVu przy użyciu DjVuLibre</li> <li>Printing support using CUPS</li> <li>Drukowanie wspieranie przez użyciu CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Zobacz <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> po więcej informacji.</p><p>&copy; 2012-2013 Autorzy qpdfview</p> The document '%1' has been modified. Do you want to save your changes? The document '%1' has been modified. Do you want to save your changes? Page width Szerokość strony Page size Rozmiar strony Match &case Uwzględniaj &wielkość liter Highlight &all Podświetl &wszystko &Open... &Otwórz... Open in new &tab... Otwórz w nowej &karcie... Open containing folder Otwórz folder zawierający &Refresh O&dśwież &Save copy... &Zapisz kopię... Save &as... Zapisz &jako... &Print... &Drukuj... E&xit Zakoń&cz &Previous page Pop&rzednia strona &Next page &Następna strona &First page &Pierwsza strona &Last page &Ostatnia strona &Jump to page... &Skocz do strony... Jump &backward Przejdź &do tyłu Jump for&ward Przejdź do p&rzodu &Search... &Znajdź... Find previous Znajdź poprzedni Find next Znajdź następny Cancel search Anuluj wyszukiwanie &Copy to clipboard &Kopiuj do schowka &Add annotation &Dodaj adnotację Settings... Ustawienia... &Continuous Widok &ciągły &Two pages &Dwie strony Two pages &with cover page Dwie strony z &okładką &Multiple pages &Wiele stron Zoom &in &Powiększ Zoom &out Po&mniejsz Original &size Wielkość &oryginalna Fit to page width Dostosuj do szerokości Fit to page size Dostosuj do wielkości Rotate &left Obróć w &lewo Rotate &right Obróć w &prawo Invert colors Odwróć kolory Fonts... Czcionki... &Fullscreen &Pełny ekran &Presentation... Pre&zentacja... &Previous tab &Poprzednia karta &Next tab &Następna karta &Close tab &Zamknij kartę Close &all tabs Zamknij &wszystkie karty Close all tabs &but current tab Zamknij &pozostałe karty &Previous bookmark &Poprzednia zakładka &Next bookmark &Następna zakładka &Add bookmark &Dodaj zakładkę &Remove bookmark &Usuń zakładkę Remove all bookmarks Usuń wszystkie zakładki &Contents &Spis streści &About &O progamie &File &Plik &Edit &Edycja &View &Widok &Outline &Konspekt &Properties &Właściwości &Thumbnails &Miniatury &Search &Wyszukaj &Tool bars Paski &narzędzi &Docks &Widoki &Tabs &Karty &Bookmarks &Zakładki &Help P&omoc Model::PdfDocument Name Nazwa Type Rodzaj Embedded Osadzony Subset Podzbiór File Plik Yes Tak No Nie Model::PdfPage Information Informacja Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Wersja 0.20.1 lub wyższa biblioteki Poppler jest wymagana by dodawać lub usuwać adnotacje. Model::PsDocument Title Tytuł Created for Utworzono dla Creator Utworzył Creation date Data utworzenia Format Format Language level Poziom języka PageItem Go to page %1. Skocz do strony %1. Go to page %1 of file '%2'. Przejdź do strony %1 pliku '%2'. Open '%1'. Otwórz '%1'. Edit form field '%1'. Edytuj pole formularza '%1'. Copy &text Kopiuj &tekst Copy &image Kopiuj &obraz Save image to &file... Zapisz obraz do &pliku... Save image to file Zapisz obraz do pliku Warning Ostrzeżenie Could not save image to file '%1'. Nie można zapisać obrazu do pliku '%1'. Add &text Dodaj &tekst Add &highlight Dodaj po&dświetlenie &Remove annotation &Usuń adnotację PdfSettingsWidget Antialiasing: Antyaliasing: Text antialiasing: Antyaliasing tekstu: None Brak Full Pełny Reduced Zredukowano Text hinting: Tekst podpowiedzi: Overprint preview: Podgląd wydruku: Solid Jednolity Shaped Uformowane Thin line mode: Tryb cienkiej linii: PluginHandler Critical Krytyczny Could not load PDF plug-in! Nie można wczytać wtyczki PDF! Could not load PS plug-in! Nie można wczytać wtyczki PS! Could not load DjVu plug-in! Nie można wczytać wtyczki DjVu! PrintDialog Fit to page: Dopasuj do strony: Page ranges: Zakres stron: All pages Wszystkie strony Even pages Parzyste strony Odd pages Nieparzyste strony Page set: Wybór stron: Single page Pojedyncza strona Two pages Dwie strony Four pages Cztery strony Six pages Sześć stron Nine pages Dziewięć stron Sixteen pages Szesnaście stron Number-up: Stron na arkusz: Bottom to top and left to right Od dołu do góry i od lewej do prawej Bottom to top and right to left Od dołu do góry i od prawej do lewej Left to right and bottom to top Od lewej do prawej i od dołu do góry Left to right and top to bottom Od lewej do prawej i od góry do dołu Right to left and bottom to top Od prawej do lewej i od dołu do góry Right to left and top to bottom Od prawej do lewej i od góry do dołu Top to bottom and left to right Od góry do dołu i od lewej do prawej Top to bottom and right to left Od góry do dołu i od prawej do lewej Number-up layout: Kolejność: Extended options Opcje rozszerzone PsSettingsWidget Graphics antialias bits: Antyaliasing grafiki: Text antialias bits: Antyaliasing tekstu: QObject An empty instance name is not allowed. Pusta nazwa instancji nie jest dozwolona. An empty search text is not allowed. Wyszukiwanie pustego tekstu jest niedozwolone. Choose instance Instance: Unknown command-line option '%1'. Nieznana opcja wiersza poleceń '%1'. Using '--instance' requires an instance name. Użycie opcji '--instance' wymaga podania nazwy. Using '--instance' is not allowed without using '--unique'. Użycie opcji '--instance' nie jest dozwolone bez opcji '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. Użycie '--search' wymaga podania szukanego tekstu. SyncTeX data for '%1' could not be found. Dane systemu SyncTeX dla '%1' nie zostały znalezione. Could not prepare signal handler. Nie można przygotować obsługi sygnału. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift i Ctrl Shift and Alt Shift i Alt Ctrl and Alt Ctrl i Alt RecentlyUsedMenu Recently &used Ostatnio &użyte &Clear list &Wyczyść listę SettingsDialog General Ogólne &Behavior &Zachowanie &Graphics &Wyświetlanie &Interface &Interfejs &Shortcuts &Skróty &Modifiers &Klawisze Defaults Domyślne Defaults on current tab Domyślne na bieżącej karcie Open URL: Otwieraj URL-e: Auto-refresh: Autoodświeżanie: Effective after restart. Zmiany dostępne po ponownym uruchomieniu. Track recently used: Śledź ostatnio użyte: Restore tabs: Przywróć karty: Restore bookmarks: Przywróć zakładki: Restore per-file settings: Przywróć ustawienia dla plików: Synchronize presentation: Synchronizuj prezentację: Default Domyślny Presentation screen: Ekran do prezentacji: Highlight color: Kolor podświetlenia: None Brak Highlight duration: Czas trwania podświetlenia: Annotation color: Kolor adnotacji: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. sekwencja '%1' jest zastępowana przez ścieżkę bezwzględną. '%2' i '%3' są zastępowane odpowiednio przez numer linii i kolumny. Source editor: Edytor tekstu źródłowego: Keep obsolete pixmaps: Zachowaj przestarzałe mapy pikseli: Use device pixel ratio: Użyj współczynnika piksela urządzenia: Decorate pages: Dekoracje stron: Decorate links: Dekoracje linków: Decorate form fields: Dekoracje pól formularza: Background color: Kolor tła: Paper color: Kolor papieru: Presentation background color: Kolor tła prezentacji: Pages per row: Stron w wierszu: Page spacing: Odstępy między stronami: Thumbnail spacing: Odstępy między miniaturami: Thumbnail size: Wielkość miniatury: %1 MB %1 MB Cache size: Wielkość bufora: Prefetch: Ładowanie z wyprzedzeniem: Prefetch distance: Dystans wyprzedzenia: Top Na górze Bottom Na dole Left Po lewej Right Po prawej Tab position: Położenie paska kart: As needed Gdy konieczne Always Zawsze Never Nigdy Tab visibility: Widoczność paska kart: New tab next to current tab: Nowa zakładka obok bieżącej zakładki: Recently used count: Ostatnio używane liczba: File tool bar: Pasek narzędziowy "Plik": Edit tool bar: Pasek narzędziowy "Edycja": View tool bar: Pasek narzędziowy "Widok": Current page in window title: Bieżąca strona w tytule okna: Instance name in window title: Nazwa instancji w tytule okna: Synchronize outline view: Synchronizuj widok konspektu: Highlight current thumbnail: Zaznacz bieżącą miniaturkę: Limit thumbnails to results: Limit miniatur do: Annotation overlay: Form field overlay: Zoom: Powiększenie: Rotate: Obrót: Scroll: Przewijaj: Copy to clipboard: Kopiuj do schowka: Add annotation: Dodaj adnotację: ShortcutHandler Action Działanie Key sequence Sekwencja klawiszy Skip backward Przejdź wstecz Skip forward Przejdź naprzód Move up Przesuń w górę Move down Przesuń w dół Move left Idź w lewo Move right Idź w prawo TreeView &Expand all &Rozszerz wszystko &Collapse all &Zwiń wszystko qpdfview-0.4.7/translations/qpdfview_pt.ts0000644000000000000000000017434012246606025017132 0ustar 00000000000000 BookmarkMenu &Open &Abrir Open in new &tab Abrir em novo &separador &Remove bookmark &Remover marcador Database Jump to page %1 Ir para a página %1 DocumentView Supported formats (%1) Formatos suportados (%1) Unlock %1 Desbloquear %1 Password: Senha: Information Informações Opening URL is disabled in the settings. A abertura de URLs está inativa nas definições. Warning Aviso SyncTeX data for '%1' could not be found. Os dados SyncTeX de %1 não foram encontrados. Printing '%1'... A imprimir %1... Page %1 Página %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Aviso Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_pt.html Find previous Localizar anterior Find next Procurar seguinte MainWindow Warning Aviso Could not open '%1'. Não foi possível abrir %1. Close all tabs but this one Close all tabs to the left Close all tabs to the right Open Abrir Open in new tab Abrir em novo separador Could not refresh '%1'. Não foi possível atualizar %1. Save copy Gravar cópia Could not save copy at '%1'. Não foi possível gravar a cópia em %1. Save as Gravar como Could not save as '%1'. Não foi possível gravar como %1. Could not print '%1'. Não foi possível imprimir %1. Jump to page Ir para a página Page: Página: Add bookmark Label Jump to page %1 Ir para a página %1 About qpdfview Sobre o qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>O qpdfview é um visualizador de documentos que utiliza a tecnologia Qt.</p><p>Esta versão inclui:<ul> <li>PDF support using Poppler</li> <li>Suporte PDF com a aplicação Poppler</li> <li>PS support using libspectre</li> <li>Suporte PS com a aplicação libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Suporte DjVu com a aplicação DjVuLibre</li> <li>Printing support using CUPS</li> <li>Suporte a impressão com a aplicação CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Consulte <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> para mais informações</p><p>&copy; 2012-2013 os programadores do qpdfview</p> The document '%1' has been modified. Do you want to save your changes? O documento %1 foi modificado. Pretende gravar as alterações? Page width Largura da página Page size Tamanho da página Match &case &Corresponder à capitalização Highlight &all Realç&ar tudo &Open... &Abrir... Open in new &tab... Abrir em novo &separador... Open containing folder Abrir pasta respetiva &Refresh Atualiza&r &Save copy... &Gravar cópia... Save &as... Gr&avar como... &Print... Im&primir... E&xit S&air &Previous page &Página anterior &Next page Página segui&nte &First page Pri&meira página &Last page Ú&ltima página &Jump to page... &Ir para a página... Jump &backward &Recuar Jump for&ward A&vançar &Search... Proc&urar... Find previous Procurar anterior Find next Procurar seguinte Cancel search Cancelar &Copy to clipboard &Copiar para a área de transferência &Add annotation &Adicionar nota Settings... Definições... &Continuous &Contínuo &Two pages &Duas páginas Two pages &with cover page Duas páginas com &folha de rosto &Multiple pages &Múltiplas páginas Zoom &in Ampl&iar Zoom &out &Reduzir Original &size &Tamanho original Fit to page width Ajustar à largura da página Fit to page size Ajustar ao tamanho da página Rotate &left Rodar à &esquerda Rotate &right &Rodar à direita Invert colors Inverter cores Fonts... Tipo de letra... &Fullscreen &Ecrã completo &Presentation... A&presentação... &Previous tab Separador &anterior &Next tab Separador &seguinte &Close tab Fe&char separador Close &all tabs Fech&ar todos os separadores Close all tabs &but current tab Fechar todos &os separadores exceto o atual &Previous bookmark Marcador &anterior &Next bookmark Marcador se&guinte &Add bookmark &Adicionar marcador &Remove bookmark &Remover marcador Remove all bookmarks Remover todos os marcadores &Contents &Conteúdo &About &Sobre &File &Ficheiro &Edit &Editar &View &Ver &Outline &Conteúdo &Properties &Propriedades &Thumbnails Minia&turas &Search &Procurar &Tool bars Barra de ferramen&tas &Docks &Docas &Tabs &Separadores &Bookmarks &Marcadores &Help Aj&uda Model::PdfDocument Name Nome Type Tipo Embedded Incorporado Subset Subconjunto File Ficheiro Yes Sim No Não Model::PdfPage Information Informações Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Tem que instalar a versão 0.20.1 do poppler para adicionar ou remover notas. Model::PsDocument Title Titulo Created for Criado para Creator Autor Creation date Data de criação Format Formato Language level Nível de linguagem PageItem Go to page %1. Ir para a página %1. Go to page %1 of file '%2'. Ir para a página %1 do ficheiro %2. Open '%1'. Abrir %1. Edit form field '%1'. Editar o campo %1. Copy &text Copiar &texto Copy &image Copiar &imagem Save image to &file... Gravar imagem no &ficheiro... Save image to file Gravar imagem no ficheiro Warning Aviso Could not save image to file '%1'. Não foi possível gravar a imagem no ficheiro %1. Add &text Adicionar &texto Add &highlight Adicionar r&ealce &Remove annotation &Remover nota PdfSettingsWidget Antialiasing: Melhoramento: Text antialiasing: Melhoramento de texto: None Nenhum Full Completo Reduced Reduzido Text hinting: Hinting de texto: Overprint preview: Pré-visualização: Solid Sólida Shaped Com formas Thin line mode: Modo de linha: PluginHandler Critical Crítico Could not load PDF plug-in! Não foi possível carregar o plugin PDF! Could not load PS plug-in! Não foi possível carregar o plugin PS! Could not load DjVu plug-in! Não foi possível carregar o plugin DjVu! PrintDialog Fit to page: Ajustar à página: Page ranges: Intervalo de páginas: All pages Todas as páginas Even pages Páginas pares Odd pages Páginas ímpares Page set: Páginas: Single page Uma página Two pages Duas páginas Four pages Quatro páginas Six pages Seis páginas Nine pages Nove páginas Sixteen pages Dezasseis páginas Number-up: Número: Bottom to top and left to right De baixo para cima e da esquerda para a direita Bottom to top and right to left De baixo para cima e da direita para a esquerda Left to right and bottom to top Da esquerda para a direita e de baixo para cima Left to right and top to bottom Da esquerda para a direita e de cima para baixo Right to left and bottom to top Dadireita para a esquerda e de baixo para cima Right to left and top to bottom Dadireita para a esquerda e de cima para baixo Top to bottom and left to right De cima para baixo e da esquerda para a direita Top to bottom and right to left De cima para baixo e da direita para a esquerda Number-up layout: Esquema: Extended options Opções detalhadas PsSettingsWidget Graphics antialias bits: Bits de melhoramento de objetos: Text antialias bits: Bits de melhoramento de texto: QObject An empty instance name is not allowed. Não é permitido um nome em branco na instância. An empty search text is not allowed. Não é permitida uma procura de texto em branco. Choose instance Escolha a instância Instance: Instância: Unknown command-line option '%1'. Using '--instance' requires an instance name. A opção --instance requer o nome da instância. Using '--instance' is not allowed without using '--unique'. A opção --instance obriga à utilização da opção --unique. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. A opção --search requer o texto a procurar. SyncTeX data for '%1' could not be found. Não foi possível encontrar os dados SyncText para %1. Could not prepare signal handler. Não foi possível preparar o gestor de sinais. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift e Ctrl Shift and Alt Shift e Alt Ctrl and Alt Ctrl e Alt RecentlyUsedMenu Recently &used Doc&umentos recentes &Clear list &Limpar lista SettingsDialog General Geral &Behavior &Comportamento &Graphics Objetos &gráficos &Interface &Interface &Shortcuts Atalho&s &Modifiers &Modificadores Defaults Pré-definições Defaults on current tab Predefinições no separador atual Open URL: Abrir URL: Auto-refresh: Atualização automática Effective after restart. As alterações serão aplicadas ao reiniciar. Track recently used: Utilizado recentemente: Restore tabs: Restaurar separadores: Restore bookmarks: Restaurar marcadores: Restore per-file settings: Restaurar definições por ficheiro: Synchronize presentation: Sincronizar apresentação: Default Pré-definição Presentation screen: Ecrã de apresentação: Highlight color: Cor de realce: None Não Highlight duration: Duração de realce: Annotation color: Cor da nota: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. %1 será substituido pelo caminho absoluto. %2 e %3 serão substituidos pelos números de linha e coluna. Source editor: Editor de fonte: Keep obsolete pixmaps: Manter pixmaps obsoletos: Use device pixel ratio: Utilizar rácio de pixeis: Decorate pages: Decorar páginas: Decorate links: Decorar ligações: Decorate form fields: Decorar campos: Background color: Cor de fundo: Paper color: Cor do papel: Presentation background color: Cor de fundo da apresentação: Pages per row: Páginas por linha: Page spacing: Espaçamento de páginas: Thumbnail spacing: Espaçamento de miniaturas: Thumbnail size: Tamanho de miniaturas: %1 MB %1 MB Cache size: Tamanho de cache: Prefetch: Prefetch: Prefetch distance: Distância prefetch: Top Cima Bottom Baixo Left Esquerda Right Direita Tab position: Posição do separador: As needed Conforme necessário Always Sempre Never Nunca Tab visibility: Mostrar separadores: New tab next to current tab: Novo separador junto ao atual: Recently used count: Número de documentos recentes: File tool bar: Barra de ferramentas Ficheiro: Edit tool bar: Barra de ferramentas Editar: View tool bar: Barra de ferramentas Ver: Current page in window title: Página atual na barra de título: Instance name in window title: Nome da instância no título da janela: Synchronize outline view: Sincronizar vista de tópicos: Highlight current thumbnail: Realçar miniatura atual: Limit thumbnails to results: Limitar miniaturas a: Annotation overlay: Form field overlay: Zoom: Ampliação: Rotate: Rotação: Scroll: Deslocação: Copy to clipboard: Copiar para a área de transferência: Add annotation: Adicionar nota: ShortcutHandler Action Ação Key sequence Combinação de teclas Skip backward Avançar Skip forward Recuar Move up Mover para cima Move down Mover para baixo Move left Mover para a esquerda Move right Mover para a direita TreeView &Expand all &Expandir tudo &Collapse all Re&colher tudo qpdfview-0.4.7/translations/qpdfview_pt_BR.ts0000644000000000000000000017562212246606025017521 0ustar 00000000000000 BookmarkMenu &Open &Abrir Open in new &tab Abrir em uma nova &aba &Remove bookmark &Remover marcador Database Jump to page %1 Pular para página %1 DocumentView Supported formats (%1) Formatos suportados (%1) Unlock %1 Destravar %1 Password: Senha: Information Informações Opening URL is disabled in the settings. Abertura de URL está desabilitada nas configurações. Warning Aviso SyncTeX data for '%1' could not be found. SyncTeX dados para '%1' não pôde ser encontrado. Printing '%1'... Imprimindo '%1'... Page %1 Página %1 FileAttachmentAnnotationWidget Save... Salvar... Save and open... Salvar e abrir... Save file attachment Salvar arquivo em anexo Warning Atenção Could not save file attachment to '%1'. Não foi possível salvar o arquivo anexo para '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Localizar anterior Find next Localizar próxima MainWindow Warning Aviso Could not open '%1'. Não foi possível abrir '%1'. Close all tabs but this one Fechar todas as abas menos a atual Close all tabs to the left Fechar todas as abas a esquerda Close all tabs to the right Fechar todas as abas a direita Open Abrir Open in new tab Abrir em uma nova aba Could not refresh '%1'. Não foi possível atualizar '%1'. Save copy Salvar uma cópia Could not save copy at '%1'. Não foi possível salvar cópia '%1'. Save as Salvar como Could not save as '%1'. Não foi possível salvar como '%1'. Could not print '%1'. Não foi possível imprimir '%1'. Jump to page Pular para a página Page: Página: Add bookmark Adicionar marcador Label Rótulo Jump to page %1 Pular para página %1 About qpdfview Sobre o qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview é um leitor de documentos com abas usando QT.</p><p>Esta versão inclui:<ul> <li>PDF support using Poppler</li> <li>Suporte a PDF usando Poppler</li> <li>PS support using libspectre</li> <li>Suporte a PS usando libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Suporte a DjVu usando DjVuLibre</li> <li>Printing support using CUPS</li> <li>Support a impressão usando CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Veja <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> para mais informações.</p><p>&copy; 2012-2013 Os desenvolvedores do qpdfview</p> The document '%1' has been modified. Do you want to save your changes? O documento '%1' foi modificado. Deseja salvar suas alterações? Page width Largura da página Page size Tamanho da página Match &case Diferenciar &maiúsculas de minúsculas Highlight &all Destacar &tudo &Open... &Abrir... Open in new &tab... Abrir em uma nova &aba... Open containing folder Exibir na pasta &Refresh &Atualizar &Save copy... &Salvar uma cópia... Save &as... Salvar &como... &Print... &Imprimir... E&xit S&air &Previous page Página &anterior &Next page &Próxima página &First page &Primeira página &Last page &Última página &Jump to page... &Pular para a página... Jump &backward Ir para &trás Jump for&ward Ir para &frente &Search... &Pesquisar... Find previous Localizar anterior Find next Localizar próxima Cancel search Cancelar pesquisa &Copy to clipboard &Copiar para a área de transferência &Add annotation &Adicionar anotações Settings... Configurações... &Continuous &Contínuo &Two pages &Páginas duplas Two pages &with cover page Duas páginas &com capa &Multiple pages &Múltiplas páginas Zoom &in &Aumentar zoom Zoom &out &Diminuir zoom Original &size &Tamanho original Fit to page width Ajusta à largura da página Fit to page size Ajustar ao tamanho da página Rotate &left Girar para a &esquerda Rotate &right Girar para a &direita Invert colors Inverter as cores Fonts... Fontes... &Fullscreen Tela &cheia &Presentation... &Apresentação... &Previous tab Aba &anterior &Next tab &Próxima aba &Close tab &Fechar aba Close &all tabs Fechar &todas as abas Close all tabs &but current tab Fechar todas as abas &menos a atual &Previous bookmark Marcador &anterior &Next bookmark &Próximo marcador &Add bookmark &Adicionar marcador &Remove bookmark &Remover marcador Remove all bookmarks Remover todos os marcadores &Contents &Conteúdo &About &Sobre &File &Arquivo &Edit &Editar &View &Exibir &Outline &Contornar &Properties &Propriedades &Thumbnails &Miniaturas &Search &Pesquisar &Tool bars Barra de &ferramentas &Docks &Barras &Tabs &Abas &Bookmarks &Marcadores &Help A&juda Model::PdfDocument Name Nome Type Tipo Embedded Embutido Subset Sublistar File Arquivo Yes Sim No Não Model::PdfPage Information Informações Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Versão 0.20.1 ou maior da biblioteca Poppler é necessária para adicionar ou remover anotações. Model::PsDocument Title Título Created for Criado para Creator Autor Creation date Data de criação Format Formato Language level Nível de linguagem PageItem Go to page %1. Ir para página %1. Go to page %1 of file '%2'. Ir para a página %1 do arquivo '%2'. Open '%1'. Abrir '%1'. Edit form field '%1'. Editar campo do formulário '%1'. Copy &text Copiar &texto Copy &image Copiar &imagem Save image to &file... Salvar imagem para &arquivo... Save image to file Salvar imagem para arquivo Warning Aviso Could not save image to file '%1'. Não foi possível salvar imagem para o arquivo '%1' Add &text Adicionar &texto Add &highlight Adicionar &destaque &Remove annotation Remover &anotação PdfSettingsWidget Antialiasing: Suavização: Text antialiasing: Suvaização de texto: None Nenhum Full Completo Reduced Reduzido Text hinting: Sugestão de texto: Overprint preview: Visualização de superimposição: Solid Sólido Shaped Com Formas Thin line mode: Modo de linha fina: PluginHandler Critical Crítico Could not load PDF plug-in! Não foi possível carregar o plug-in PDF! Could not load PS plug-in! Não foi possível carregar o plug-in PS! Could not load DjVu plug-in! Não foi possível carregar o plug-in DjVu! PrintDialog Fit to page: Ajustar à página: Page ranges: Intervalo de páginas: All pages Todas as páginas Even pages Páginas pares Odd pages Páginas ímpares Page set: Conjunto de páginas: Single page Página única Two pages Duas páginas Four pages Quatro páginas Six pages Seis páginas Nine pages Nove páginas Sixteen pages 16 páginas Number-up: Bottom to top and left to right De baixo para cima e da esquerda para a direita Bottom to top and right to left De baixo para cima e da direita para a esquerda Left to right and bottom to top Da esquerda para a direita e de baixo para cima Left to right and top to bottom Da esquerda para a direita e de cima para baixo Right to left and bottom to top Da direita para esquerda e de baixo para cima Right to left and top to bottom Da direita para a esquerda e de cima para baixo Top to bottom and left to right De cima para baixo de da esquerda para a direita Top to bottom and right to left De cima para baixo e da direita para a esquerda Number-up layout: Extended options Opções estendidas PsSettingsWidget Graphics antialias bits: Bits de suavização de gráficos: Text antialias bits: Bits de suavização de texto: QObject An empty instance name is not allowed. Um nome de instância vazio não é permitido. An empty search text is not allowed. Não é permitido pesquisa de texto vazio. Choose instance Selecione a instância Instance: Instância: Unknown command-line option '%1'. Opção de linha de comando desconhecida '%1'. Using '--instance' requires an instance name. Usar '--instance' requer um nome de instância. Using '--instance' is not allowed without using '--unique'. Usar '--instance' não é permitido sem utilizar '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Um nome de instância deve conter somente os caracteres "[A-Z][a-z][0-9]_" e não deve iniciar com dígito. Using '--search' requires a search text. Usando '--search' requer um texto de pesquisa. SyncTeX data for '%1' could not be found. SyncTeX dados para '%1' não pôde ser encontrado. Could not prepare signal handler. Não foi possível preparar manipulador de sinal. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift e Ctrl Shift and Alt Shift e Alt Ctrl and Alt Ctrl e Alt RecentlyUsedMenu Recently &used Recentemente &utilizados &Clear list &Limpar lista SettingsDialog General Geral &Behavior &Comportamento &Graphics &Gráficos &Interface &Interface &Shortcuts &Atalhos &Modifiers &Modificadores Defaults Padrões Defaults on current tab Padrões na guia atual Open URL: Abrir URL: Auto-refresh: Auto-atualizar: Effective after restart. Efetivar após reiniciar. Track recently used: Acompanhar recentemente utilizados: Restore tabs: Restaurar abas: Restore bookmarks: Restaurar marcadores: Restore per-file settings: Restaurar configurações por arquivo: Synchronize presentation: Sincronizar apresentação: Default Padrão Presentation screen: Tela de apresentação: None Nenhuma Highlight duration: Duração do destaque: Highlight color: Cor de destaque: Annotation color: Cor das anotações: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' é substituído pelo caminho absoluto do arquivo. '%2' resp. '%3' é substituído pela linha resp. número da coluna. Source editor: Editor de código: Keep obsolete pixmaps: Manter pixmaps obsoletos: Use device pixel ratio: Utilizar taxa de pixel do dispositivo: Decorate pages: Decorar páginas: Decorate links: Decorar links: Decorate form fields: Decorar campos do formulário: Background color: Cor de fundo: Paper color: Cor da folha: Presentation background color: Cor de fundo da apresentação: Pages per row: Páginas por linha: Page spacing: Espaçamento das páginas: Thumbnail spacing: Espaçamento das miniaturas: Thumbnail size: Tamanho das miniaturas: %1 MB %1 MB Cache size: Tamanho do cache: Prefetch: Pré-carregar: Prefetch distance: Distância pré-obtida: Top Topo Bottom Base Left Esquerda Right Direita Tab position: Posição das abas: As needed Quando necessário Always Sempre Never Nunca Tab visibility: Visualização das abas: New tab next to current tab: Nova aba ao lado da aba atual: Recently used count: Contagem de recentemente utilizados: File tool bar: Barra de ferramenta de arquivo: Edit tool bar: Editar barra de ferramentas: View tool bar: Visualizar barra de ferramentas: Current page in window title: Página atual no título da janela: Instance name in window title: Nome da instância no título da janela: Synchronize outline view: Highlight current thumbnail: Destacar miniatura atual: Limit thumbnails to results: Limite de miniaturas para resultados: Annotation overlay: Sobreposição de anotação Form field overlay: Sobreposição de campo do formulário: Zoom: Zoom: Rotate: Girar: Scroll: Rolar: Copy to clipboard: Copiar para a área de transferência: Add annotation: Adicionar anotação: ShortcutHandler Action Ação Key sequence Sequência de teclas Skip backward Ignorar anterior Skip forward Ignorar próxima Move up Mover para cima Move down Mover para baixo Move left Mover para esquerda Move right Mover para direita TreeView &Expand all &Expandir tudo &Collapse all &Fechar todos qpdfview-0.4.7/translations/qpdfview_ro.ts0000644000000000000000000017373612246606025017137 0ustar 00000000000000 BookmarkMenu &Open &Deschide Open in new &tab Deschide în &tab nou &Remove bookmark Ște&rge semn de carte Database Jump to page %1 Sari la pagina %1 DocumentView Supported formats (%1) Formate suportate (%1) Unlock %1 Deblocare %1 Password: Parolă: Information Informații Opening URL is disabled in the settings. Accesarea URL-urilor este dezactivată din configurări. Warning Atenție SyncTeX data for '%1' could not be found. Nu s-au găsit datele SyncTeX pentru „%1”. Printing '%1'... Se tipărește „%1”... Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Atenție Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Caută elementul anterior Find next Caută elementul următor MainWindow Warning Atenție Could not open '%1'. Nu se poate deschide „%1” Open containing folder Open Deschide Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Deschide într-o filă nouă Could not refresh '%1'. Nuse poate reactualiza „%1”. Save copy Salvează o copie Could not save copy at '%1'. NU am putut salva copia în „%1”. Save as Salvează ca Could not save as '%1'. Nu s-a putut salva ca „%1”. Could not print '%1'. Nuse poate tipări „%1” Jump to page Sari la pagina Page: Pagina: Add bookmark Label Jump to page %1 Sari la pagina %1 About qpdfview Despre qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview este un utilitar de vizualizat documente cu file care utilizează Qt.</p><p>Această versiune include:<ul> <li>PDF support using Poppler</li> <li>suport pentru PDF cu Poppler</li> <li>PS support using libspectre</li> <li>suport PS cu libspectre</li> <li>DjVu support using DjVuLibre</li> <li>suport DjVu cu ajutorul DjVuLibre</li> <li>Printing support using CUPS</li> <li>suport pentru tipărire cu ajutorul CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Vizitați <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> pentru mai multe informații.</p><p>&copy; 2012-2013 Dezvoltatorii qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Page width Lățime pagină Page size Mărime pagină Match &case Potrivește mărimea literelor Highlight &all Evidențiază &tot &Open... &Deschide... Open in new &tab... Deschide în &filă nouă... &Refresh &Reactualizează &Save copy... &Salvează o copie... Save &as... Salvați c&a... &Print... Ti&părește... E&xit Ieș&ire &Previous page &Pagina anterioară &Next page Pagi&na următoare &First page Prima pa&gină &Last page U&ltima pagină &Jump to page... &Sari la pagina... Jump &backward &Sari înapoi Jump for&ward Sari înai&nte &Search... &Căutare... Find previous Caută elementul anterior Find next Caută elementul următor Cancel search Anulează căutarea &Copy to clipboard &Copiază în clipboard &Add annotation &Adaugă notiță Settings... Configurări... &Continuous &Continuu &Two pages Două pagini Two pages &with cover page Două pagini și &coperta &Multiple pages Pagini &multiple Zoom &in &Mărire Zoom &out Micș&orare Original &size Mărime originală Fit to page width Potrivire la lățimea paginii Fit to page size Potrivire la mărimea paginii Rotate &left Rotire &stânga Rotate &right Rotire &dreapta Invert colors Inversează culorile Fonts... Fonturi... &Fullscreen &Ecran complet &Presentation... &Prezentare... &Previous tab Fila &precedentă &Next tab &Fila următoare &Close tab În&chide fila Close &all tabs Inchide &toate filele Close all tabs &but current tab Închide toate filele în &afară de aceasta &Previous bookmark Semn de carte &precedent &Next bookmark Semn de carte &următor &Add bookmark &Adaugă semn de carte &Remove bookmark Ște&rge semn de carte Remove all bookmarks Șterge toate semnele de carte &Contents &Cuprins &About &Despre &File &Fișier &Edit &Editare &View &Vizualizare &Search &Caută &Outline &Cuprins &Properties &Proprietăți &Thumbnails &Miniaturi &Tool bars &Bare de unelte &Docks &Bare andocabile &Tabs Fi&le &Bookmarks &Semne de carte &Help &Ajutor Model::PdfDocument Name Nume Type Tip Embedded Încorporat Subset Subset File Fișier Yes Da No Nu Model::PdfPage Information Detalii Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Pentru a adăuga sau șterge adnotările este nevoie de versiunea 0.20.1 sau mai mare a bibliotecii popler. Model::PsDocument Title Titlu Created for Creat pentru Creator Autor Creation date Data creării Format Format Language level Nivel limbaj PageItem Go to page %1. Du-te la pagina %1. Go to page %1 of file '%2'. Du-te la pagina %1 din fișierul „%2”. Open '%1'. Deschide „%1”. Edit form field '%1'. Editare formular „%1”. Copy &text Copiere &text Copy &image Copiere &imagine Save image to &file... Salvează imaginea în &fișier... Save image to file Salvează imaginea în fișier Warning Atenție Could not save image to file '%1'. Nu s-a putut salva imaginea în fișierul „%1”. Add &text Adaugă &text Add &highlight Adaugă &evidențiere &Remove annotation Ște&rge notiță PdfSettingsWidget Antialiasing: Antialiasing: Text antialiasing: Antialiasing text: None Nimic Full Complet Reduced Redus Text hinting: Reliefare text: Overprint preview: Previziualizare suprapunere: Solid Solid Shaped Conturat Thin line mode: Mod linie subțire: PluginHandler Critical Critic Could not load PDF plug-in! Imposibil de încărcat plug-inul PDF! Could not load PS plug-in! Imposibil de încărcat plug-inul PS! Could not load DjVu plug-in! Imposibil de încărcat plug-inul DjVu! PrintDialog Fit to page: Potrivire la pagină: Page ranges: Șir pagini: All pages Toate paginile Even pages Pagini pare Odd pages Pagini impare Page set: Set pagini: Single page O singură pagină Two pages Două pagini Four pages Patru pagini Six pages Șase pagini Nine pages Nouă pagini Sixteen pages 16 pagini Number-up: Numerotare: Bottom to top and left to right De jos în sus și de la stânga la dreapta Bottom to top and right to left De jos în sus și de la dreapta la stânga Left to right and bottom to top De la stânga la dreapta și de jos în sus Left to right and top to bottom De la stânga la dreapta și de sus în jos Right to left and bottom to top De la dreapta la stânga și de jos în sus Right to left and top to bottom De la dreapta la stânga și de sus în jos Top to bottom and left to right De sus în jos și de la stânga la dreapta Top to bottom and right to left De sus în jos și de la dreapta la stânga Number-up layout: Aranjament numerotare: Extended options Opțiuni extinse PsSettingsWidget Graphics antialias bits: Biți antialias grafică: Text antialias bits: Biți antialias text: QObject An empty instance name is not allowed. Nu sunt permise câpuri goale. An empty search text is not allowed. Nu este permis un câmp de căutare gol. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Utilizarea „--instance” trebuie să aibă un nume. Using '--instance' is not allowed without using '--unique'. Utilizarea „--instance” nu este permisă fără a utiliza și „--unique”. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. Dacă utlizați „--search” trebuie să introduceți text. SyncTeX data for '%1' could not be found. Nu s-au găsit datele SyncTeX pentru „%1”. Could not prepare signal handler. Nu s-a putut pregăti prelucrarea semnalelor (signal handler). QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift și Ctrl Shift and Alt Shift și Alt Ctrl and Alt Ctrl și Alt RecentlyUsedMenu Recently &used Deschise &recent &Clear list Șterge &lista SettingsDialog General Setări generale &Behavior &Comportament &Graphics &Grafică &Interface &Interfață &Shortcuts &Scurtături &Modifiers &Modificatori Defaults Implicit Defaults on current tab Setări implicite în tabul curent Open URL: Deschide URL: Auto-refresh: Reîmprospătare automată: Effective after restart. Se aplică după repornire. Track recently used: Memorează documente deschise recent: Restore tabs: Restaurare file: Restore bookmarks: Restaurare semne de carte: Restore per-file settings: Restabilire configurări pentru fiecare fișier: Synchronize presentation: Sincronizare prezentare: Default Implicit Presentation screen: Ecran prezentare: Highlight color: Culoare evidențiere: None Nimic Highlight duration: Durată evidențiere: Annotation color: Culoare adnotări: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. „%1” este înlocuit(ă) de calea absolută către fișier. „%2” respectiv „%3” este înlocuit(ă) de un rând corespunzător numărului coloanei. Source editor: Editor surse: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorare pagini: Decorate links: Decorare legături: Decorate form fields: Decorare formulare: Background color: Culoare fundal: Paper color: Culoare hârtie: Presentation background color: Pages per row: Pagini per rând: Page spacing: Spațiere pagină: Thumbnail spacing: Spațiere miniaturi: Thumbnail size: Dimensiune miniaturi: %1 MB %1 MB Cache size: Mărime cache: Prefetch: Preîncărcare: Prefetch distance: Interval pre-încărcare: Top Sus Bottom Jos Left Stânga Right Dreapta Tab position: Poziția filei: As needed După necesitate Always Întotdeauna Never Niciodată Tab visibility: Vizibilitate file: New tab next to current tab: Tab nou lângă cel actual: Recently used count: Numărătoare utilizată recent: File tool bar: Bară de unelte pentru fișiere: Edit tool bar: Bara de unelte pentru editare: View tool bar: Vizualizare bare de unelte: Current page in window title: Pagina curentă în titlul ferestrei: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Evidențiere pictogramă curentă: Limit thumbnails to results: Limitare pictograme la rezultate: Annotation overlay: Form field overlay: Zoom: Panoramare: Rotate: Rotire: Scroll: Derulare: Copy to clipboard: Copiere în clipboard: Add annotation: Adăugare adnotare: ShortcutHandler Action Acțiune Key sequence Secvență taste Skip backward Sari înapoi: Skip forward Sari înainte: Move up Sus Move down Jos Move left Stânga Move right Dreapta TreeView &Expand all &Extinde tot &Collapse all &Strânge tot qpdfview-0.4.7/translations/qpdfview_ru.ts0000644000000000000000000020154412246606025017132 0ustar 00000000000000 BookmarkMenu &Open &Открыть… Open in new &tab Открыть в новой &вкладке… &Remove bookmark &Удалить закладку Database Jump to page %1 Перейти к странице %1 DocumentView Supported formats (%1) Поддерживаемые форматы (%1) Unlock %1 Разблокировать %1 Password: Пароль: Information Сведения Opening URL is disabled in the settings. Открытие адреса запрещено в настройках. Warning Предупреждение SyncTeX data for '%1' could not be found. Не найдены данные SyncTeX для '%1'. Printing '%1'... Печать '%1'… Page %1 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Предупреждение Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Найти предыдущее Find next Найти следующее MainWindow Warning Предупреждение Could not open '%1'. Не удалось открыть '%1' Open containing folder Open Открыть Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Открыть в новой вкладке Could not refresh '%1'. Не удалось обновить '%1' Save copy Сохранить копию Could not save copy at '%1'. Не удалось сохранить копию в '%1' Save as Сохранить как Could not save as '%1'. Не удалось сохранить как '%1'. Could not print '%1'. Не удалось напечатать '%1' Jump to page Переход на страницу Page: Страница: Add bookmark Label Jump to page %1 Перейти к странице %1 About qpdfview О программе qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview — просмотрщик документов со вкладками, использующий Qt.</p><p>В этой версии:<ul> <li>PDF support using Poppler</li> поддержка PDF используя Poppler <li>PS support using libspectre</li> поддержка PS используя libspectre <li>DjVu support using DjVuLibre</li> поддержка DjVu используя DjVuLibre <li>Printing support using CUPS</li> поддержка печати используя CUPS </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Подробнее смотрите <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> здесь.</p><p>&copy; 2012-2013 Разработчики qpdfview</p> The document '%1' has been modified. Do you want to save your changes? Page width По ширине страницы Page size Страница целиком Match &case С уч&ётом регистра Highlight &all Выделить &все &Open... &Открыть… Open in new &tab... Открыть в новой &вкладке… &Refresh О&бновить &Save copy... Сохранить &копию… Save &as... Со&хранить как... &Print... Пе&чать… E&xit &Выход &Previous page &Предыдущая страница &Next page &Следующая страница &First page П&ервая страница &Last page После&дняя страница &Jump to page... Пе&рейти к странице… Jump &backward Назад Jump for&ward Вперёд &Search... П&оиск… Find previous Найти предыдущее Find next Найти следующее Cancel search Отменить поиск &Copy to clipboard &Скопировать в буфер &Add annotation Добавить &комментарий Settings... Настройки… &Continuous &Рулоном &Two pages &Две страницы Two pages &with cover page Две страницы и &обложка &Multiple pages &Несколько страниц Zoom &in У&величить Zoom &out У&меньшить Original &size &Исходный размер Fit to page width По ширине Fit to page size Страница целиком Rotate &left Повернуть в&лево Rotate &right Повернуть в&право Invert colors Инвертировать цвета Fonts... Шрифты… &Fullscreen Полный &экран &Presentation... Пре&зентация &Previous tab &Предыдущая вкладка &Next tab &Следующая вкладка &Close tab &Закрыть вкладку Close &all tabs Закрыть &все вкладки Close all tabs &but current tab Закрыть все вкладки, кроме текуще&й &Previous bookmark &Предыдущая закладка &Next bookmark &Следующая закладка &Add bookmark Д&обавить закладку &Remove bookmark &Удалить закладку Remove all bookmarks Удалить все закладки &Contents &Содержание &About &О программе &File &Файл &Edit П&равка &View В&ид &Search &Поиск &Outline &Оглавление &Properties С&войства &Thumbnails Миниат&юры &Tool bars Панели инс&трументов &Docks Прилип&алы &Tabs Вкла&дки &Bookmarks &Закладки &Help &Справка Model::PdfDocument Name Название Type Тип Embedded Встроенный Subset Подмножество File Файл Yes Да No Нет Model::PdfPage Information Сведения Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Для добавления или удаления аннотаций требуется версия 0.20.1 (или выше) библиотеки Poppler. Model::PsDocument Title Название Created for Создано для Creator Создатель Creation date Дата создания Format Формат Language level Уровень языка PageItem Go to page %1. Перейти к странице %1. Go to page %1 of file '%2'. Перейти на страницу %1 файла '%2'. Open '%1'. Открыть '%1'. Edit form field '%1'. Редактировать поле формы '%1'. Copy &text &Копировать текст Copy &image Копировать и&зображение Save image to &file... Сохранить изображение в &файл… Save image to file Сохранить изображение в файл Warning Предупреждение Could not save image to file '%1'. Невозможно сохранить изображение в файл '%1'. Add &text Добавить &текст Add &highlight Добавить &выделение &Remove annotation &Удалить комментарий PdfSettingsWidget Antialiasing: Сглаживание: Text antialiasing: Сглаживание текста: None Нет Full Полное Reduced Укороченный Text hinting: Подсказка текста: Overprint preview: Solid Цельный Shaped Формовый Thin line mode: Режим тонкой линии: PluginHandler Critical Критический Could not load PDF plug-in! Невозможно загрузить надстройку PDF! Could not load PS plug-in! Невозможно загрузить надстройку PS! Could not load DjVu plug-in! Невозможно загрузить надстройку DjVu! PrintDialog Fit to page: Уместить в страницу Page ranges: Диапазон страниц: All pages Все страницы Even pages Чётные страницы Odd pages Нечётные страницы Page set: Печатать страницы: Single page Одна страница Two pages 2 траницы Four pages 4 страницы Six pages 6 страниц Nine pages 9 страниц Sixteen pages Шестнадцать страниц Number-up: Номером вверх Bottom to top and left to right Снизу вверх и слева направо Bottom to top and right to left Снизу вверх и справа налево Left to right and bottom to top Слева направо и снизу вверх Left to right and top to bottom Слева направо и сверху вниз Right to left and bottom to top Справа налево и снизу вверх Right to left and top to bottom Справа налево и сверху вниз Top to bottom and left to right Сверху вниз и слева направо Top to bottom and right to left Сверху вниз и справа налево Number-up layout: Порядок страниц Extended options Дополнительные параметры PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. Пустое имя экземпляра не допустимо. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Использование '--instance' требует имени экземпляра. Using '--instance' is not allowed without using '--unique'. Использование '--instance' не возможно без использования '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. Не найдены данные SyncTeX для '%1'. Could not prepare signal handler. Не удалось подготовить обработчик сигнала. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift и Ctrl Shift and Alt Shift и Alt Ctrl and Alt Ctrl и Alt RecentlyUsedMenu Recently &used Не&давно открытые &Clear list О&чистить список SettingsDialog General Общие &Behavior &Поведение &Graphics &Графика &Interface &Интерфейс &Shortcuts &Комбинации клавиш &Modifiers &Модификаторы Defaults По умолчанию Defaults on current tab Open URL: Открыть адрес: Auto-refresh: Автообновление: Effective after restart. Вступит в силу после перезапуска Track recently used: Помнить недавно открытые: Restore tabs: Восстановить вкладки: Restore bookmarks: Восстановить закладки: Restore per-file settings: Восстановление пофайловых настроек: Synchronize presentation: Синхронная презентация: Default По умолчанию Presentation screen: Экран презентации Highlight color: Цвет выделения: None Нет Highlight duration: Длительность подсветки: Annotation color: Цвет аннотаций: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' заменяется абсолютным путём к файлу. '%2' и '%3' заменяются номером строки и столбца соответственно. Source editor: Редактор исходника: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Рамка страницы: Decorate links: Выделять ссылки: Decorate form fields: Выделять поля форм: Background color: Цвет фона: Paper color: Цвет бумаги: Presentation background color: Pages per row: Страниц в ряд: Page spacing: Расстояние между страницами: Thumbnail spacing: Расстояние между миниатюрами Thumbnail size: Размер миниатюр: %1 MB %1 MБ Cache size: Размер кэша: Prefetch: Подгружать наперёд: Prefetch distance: Длина предзагрузки: Top Вверху Bottom Внизу Left Слева Right Справа Tab position: Положение вкладок: As needed По надобности Always Всегда Never Никогда Tab visibility: Видимость вкладок: New tab next to current tab: Новая вкладка рядом с текущей вкладкой: Recently used count: File tool bar: Панель "Файл": Edit tool bar: Панель "Правка": View tool bar: Панель "Вид": Current page in window title: Текущая страница в заголовке окна: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Выделять текущий эскиз Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: Масштаб: Rotate: Повернуть: Scroll: Прокрутка: Copy to clipboard: Скопировать в буфер обмена: Add annotation: Добавить примечание: ShortcutHandler Action Действие Key sequence Последовательность клавиш Skip backward Назад Skip forward Вперёд Move up Переместить вверх Move down Переместить вниз Move left Переместить влево Move right Переместить вправо TreeView &Expand all &Развернуть все &Collapse all &Свернуть все qpdfview-0.4.7/translations/qpdfview_sk.ts0000644000000000000000000017566212246606025017134 0ustar 00000000000000 BookmarkMenu &Open &Otvoriť Open in new &tab Otvoriť na novej kar&te &Remove bookmark Odst&rániť záložku Database Jump to page %1 Prejsť na stranu %1 DocumentView Supported formats (%1) Podporované formáty (%1) Unlock %1 Odomknúť %1 Password: Heslo: Information Informácie Opening URL is disabled in the settings. Otvorenie URL adresy je v nastaveniach zakázané. Warning Varovanie SyncTeX data for '%1' could not be found. SyncTeX dáta pre '%1' sa nedali nájsť. Printing '%1'... Tlačí sa '%1'... Page %1 Strana %1 FileAttachmentAnnotationWidget Save... Uložiť... Save and open... Uložiť a otvoriť... Save file attachment Uložiť prílohu súboru Warning Varovanie Could not save file attachment to '%1'. Nepodarilo sa uložiť prílohu súboru do '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_sk.html Find previous Nájsť predchádzajúce Find next Nájsť ďalšie MainWindow Warning Varovanie Could not open '%1'. Nedalo sa otvoríť '%1'. Close all tabs but this one Zatvoriť všetky karty okrem tejto Close all tabs to the left Zatvoriť všetky karty naľavo Close all tabs to the right Zatvoriť všetky karty napravo Open Otvoriť Open in new tab Otvoriť na novej karte Could not refresh '%1'. Nedalo se obnoviť '%1'. Save copy Uložiť kópiu Could not save copy at '%1'. Nedalo se uložiť kópiu v '%1'. Save as Uložiť ako Could not save as '%1'. Nedalo sa uložiť ako '%1'. Could not print '%1'. Nedalo se vytlačiť '%1'. Jump to page Prejsť na stranu Page: Strana: Add bookmark Pridať záložku Label Štítok Jump to page %1 Prejsť na stranu %1 About qpdfview O qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview je prehliadač dokumentov na kartách používajúci Qt.</p><p>Táto verzia obsahuje:<ul> <li>PDF support using Poppler</li> <li>PDF podpora používajúca Poppler</li> <li>PS support using libspectre</li> <li>PostScript podpora používajúca libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu podpora používajúca DjVuLibre</li> <li>Printing support using CUPS</li> <li>Podpora tlače používajúca CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Pozrite <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> pre ďalšie informácie.</p><p>&copy; 2012-2013 Vývojári qpdfview</p><p>Do slovenčiny preložil DAG Software <i>(Ďanovský Ján)</i></p> The document '%1' has been modified. Do you want to save your changes? Dokument '%1' bol zmenený. Chcete uložiť vaše zmeny? Page width Šírka strany Page size Veľkosť strany Match &case Zhoda malý&ch a veľkých písmen Highlight &all Zvýr&azniť všetko &Open... &Otvoriť... Open in new &tab... Otvoriť na novej &karte... Open containing folder Otvoriť nadradený priečinok &Refresh O&bnoviť &Save copy... U&ložiť kópiu... Save &as... Uložiť &ako... &Print... &Tlačiť... E&xit U&končiť &Previous page &Predchádzajúca strana &Next page &Nasledujúca strana &First page P&rvá strana &Last page Pos&ledná strana &Jump to page... Pre&jsť na stranu... Jump &backward Skočiť &späť Jump for&ward Skočit &dopredu &Search... &Hľadať... Find previous Nájsť predchádzajúce Find next Nájsť ďalšie Cancel search Zrušiť hľadanie &Copy to clipboard &Kopírovať do schránky &Add annotation Prid&ať komentár Settings... Nastavenia... &Continuous &Súvislo &Two pages &Dve strany Two pages &with cover page Dve strany s &titulnou stranou &Multiple pages Viac&eré strany Zoom &in Priblíž&iť Zoom &out &Odialiť Original &size Pôvodná &veľkosť Fit to page width Prispôsobiť šírku strany Fit to page size Prispôsobiť veľkosť strany Rotate &left Otočiť doľ&ava Rotate &right Otočiť dop&rava Invert colors Invertovať farby Fonts... Písma... &Fullscreen &Celá obrazovka &Presentation... &Prezentácia... &Previous tab &Predchádzajúca karta &Next tab &Nasledujúca karta &Close tab &Zatvoriť kartu Close &all tabs Z&atvoriť všetky karty Close all tabs &but current tab Zatvoriť všetky karty &okrem súčasnej &Previous bookmark &Predchádzajúca záložka &Next bookmark &Nasledujúca záložka &Add bookmark Prid&ať záložku &Remove bookmark Odst&rániť záložku Remove all bookmarks Odstrániť všetky záložky &Contents Pomo&cník &About O &programe &File &Súbor &Edit &Upraviť &View &Zobraziť &Outline &Obsah &Properties &Vlastnosti &Thumbnails &Miniatúry &Search &Hľadať &Tool bars Panely &nástrojov &Docks &Bočné panely &Tabs Kar&ty &Bookmarks Zá&ložky &Help &Nápoveda Model::PdfDocument Name Názov Type Typ Embedded Zabudované Subset Podmnožina File Súbor Yes Áno No Nie Model::PdfPage Information Informácie Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Na vkladanie a odstraňovanie komentárov je vyžadovaná knižnica Poppler vo verzie 0.20.1 alebo vyššej. Model::PsDocument Title Názov Created for Vytvorené pre Creator Vytvoril Creation date Dátum vytvorenia Format Formát Language level Úroveň jazyka PageItem Go to page %1. Prejsť na stranu %1. Go to page %1 of file '%2'. Prejsť na stranu %1 súboru '%2'. Open '%1'. Otvoriť '%1'. Edit form field '%1'. Upraviť políčko formulára '%1'. Copy &text Kopírovať &text Copy &image Kopírovať &obrázok Save image to &file... Uložiť obrázok so &súboru... Save image to file Uložiť obrázok do súboru Warning Varovanie Could not save image to file '%1'. Obrázok sa nemohol uložiť do súboru '%1'. Add &text Pridať &text Add &highlight Pridať &zvýraznenie &Remove annotation Odst&rániť komentár PdfSettingsWidget Antialiasing: Vyhladzovanie: Text antialiasing: Vyhlazovanie textu: None Žiadne Full Úplné Reduced Čiastočné Text hinting: Hinting textu: Overprint preview: Náhľad pretlače: Solid Pevné Shaped Ohraničený Thin line mode: Režim tenkej čiary: PluginHandler Critical Kritické Could not load PDF plug-in! Nepodarilo sa načítať PDF plugin! Could not load PS plug-in! Nepodarilo sa načítať PostScript plugin! Could not load DjVu plug-in! Nepodarilo sa načítať DjVu plugin! PrintDialog Fit to page: Prispôsobiť strane: Page ranges: Rozsah strán: All pages Všetky strany Even pages Párne strany Odd pages Nepárne strany Page set: Súbor strán: Single page Jedna strana Two pages Dve strany Four pages Štyri strany Six pages Šesť strán Nine pages Deväť strán Sixteen pages Šestnásť strán Number-up: Na jednu stranu: Bottom to top and left to right Zdola hore a zľava doprava Bottom to top and right to left Zdola hore a zprava doľava Left to right and bottom to top Zľava doprava a zdola hore Left to right and top to bottom Zľava doprava a zhora dolu Right to left and bottom to top Zprava doľava a zdola hore Right to left and top to bottom Zprava doľava a zhora dolu Top to bottom and left to right Zhora dolu a zľava doprava Top to bottom and right to left Zhora dolu a zprava doľava Number-up layout: Rozloženie na strane: Extended options Pokročilé možnosti PsSettingsWidget Graphics antialias bits: Bity vyhladzovania grafiky: Text antialias bits: Bity vyhladzovania textu: QObject An empty instance name is not allowed. Prázdny názov inštancie nie je povolený. An empty search text is not allowed. Prázdny text na vyhľadanie nie je povolený. Choose instance Vybrať inštanciu Instance: Inštancia Unknown command-line option '%1'. Neznámy parameter príkazového riadka '%1'. Using '--instance' requires an instance name. Použitie '--instance' vyžaduje názov inštancie. Using '--instance' is not allowed without using '--unique'. Použitie '--instance' nieje povolené bez použitia '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Názov inštancie môže obsahovať iba znaky "[A-Z][a-z][0-9]_" a nesmie začínať číslom. Using '--search' requires a search text. Použitie '--search' vyžaduje text na vyhľadanie. SyncTeX data for '%1' could not be found. SyncTeX dáta pre '%1' sa nedali nájsť. Could not prepare signal handler. Nepodarilo se pripraviť obsluhovanie signálu. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift a Ctrl Shift and Alt Shift a Alt Ctrl and Alt Ctrl a Alt RecentlyUsedMenu Recently &used Nedávno ot&vorené &Clear list &Vyčistiť zoznam SettingsDialog General Všeobecné &Behavior &Správanie &Graphics &Grafika &Interface Rozhran&ie &Shortcuts &Skratky &Modifiers &Modifikátory Defaults Predvolené Defaults on current tab Východzie na aktuálnej karte Open URL: Otvárať URL adresy: Auto-refresh: Obnoviť automaticky: Effective after restart. Aplikuje sa po reštarte programu. Track recently used: Zaznamenávať nedávno otvorené: Restore tabs: Obnoviť karty: Restore bookmarks: Obnoviť záložky: Restore per-file settings: Obnoviť nastavenie súboru: Synchronize presentation: Synchronizovať prezentovanie: Default Predvolené Presentation screen: Obrazovka prezentovania: None Nič Highlight duration: Trvanie zvýraznenia: Highlight color: Farba zvýraznenia: Annotation color: Farba poznámky: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. '%1' je nahradené absolútnou cestou k súboru. '%2' resp. '%3' je nahradené číslom radku resp. stĺpca. Source editor: Editor zdrojov: Keep obsolete pixmaps: Zachovať zastaralé pixmapy: Use device pixel ratio: Použiť pomer obrazovky zariadenia: Decorate pages: Orámovať strany: Decorate links: Orámovať odkazy: Decorate form fields: Orámovať políčka formulára: Background color: Farba pozadia: Paper color: Farba papiera: Presentation background color: Farba pozadia prezentácie: Pages per row: Strán na riadok Page spacing: Odstup strán: Thumbnail spacing: Odstup miniatúr: Thumbnail size: Veľkosť miniatúr: %1 MB %1 MiB Cache size: Veľkosť vyrovnávacej pamäte: Prefetch: Načítavať dopredu: Prefetch distance: Vzdialenosť predprípravy: Top Hore Bottom Dole Left Vľavo Right Vpravo Tab position: Pozícia kariet: As needed Podľa potreby Always Vždy Never Nikdy Tab visibility: Viditeľnosť kariet: New tab next to current tab: Nová karta vedľa aktuálnej karty: Recently used count: Počet nedávno použitých: File tool bar: Panel nástrojov pre Súbor: Edit tool bar: Panel nástrojov pre Upraviť: View tool bar: Panel nástrojov pre Zobraziť: Current page in window title: Aktuálna strana v názve okna: Instance name in window title: Názov inštancie v názve okna: Synchronize outline view: Synchronizovať zobrazenie obsahu: Highlight current thumbnail: Zvýrazniť aktuálny náhľad: Limit thumbnails to results: Obmedziť náhľady pre výsledky: Annotation overlay: Prekrytie poznámky: Form field overlay: Prekrytie formulárového políčka: Zoom: Priblíženie: Rotate: Otočenie: Scroll: Skrolovanie: Copy to clipboard: Skopírovať do schránky: Add annotation: Pridať komentár: ShortcutHandler Action Činnosť Key sequence Klávesová skratka Skip backward Preskočiť dozadu Skip forward Preskočiť dopredu Move up Posunúť vyššie Move down Posunúť nižšie Move left Posunúť doľava Move right Posunúť doprava TreeView &Expand all &Rozbaliť všetko &Collapse all &Zbaliť všetko qpdfview-0.4.7/translations/qpdfview_tr.ts0000644000000000000000000016604012246606025017132 0ustar 00000000000000 BookmarkMenu &Open &Aç Open in new &tab Yeni &sekmede aç &Remove bookmark &Yerimini kaldır Database Jump to page %1 %1. sayfaya geç DocumentView Supported formats (%1) Unlock %1 %1 dosyasının kilidini aç Password: Açarsöz: Printing '%1'... '%1' dosyası yazdırılıyor... Page %1 Information Bilgiler Opening URL is disabled in the settings. Bağlantıları açmak ayarlardan kapatılmış durumda. Warning Uyarı SyncTeX data for '%1' could not be found. '%1' belgesi için SyncTeX verisi bulunamadı. FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning Uyarı Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous Öncekini bul Find next Sonrakini bul MainWindow Warning Uyarı Could not open '%1'. '%1' dosyası açılamadı. Open containing folder Open Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab Yeni sekmede aç Could not refresh '%1'. '%1' dosyası yenilenemedi. Save copy Kopyayı kaydet Could not save copy at '%1'. Kopya '%1' yoluna kaydedilemedi. Save as Could not save as '%1'. Could not print '%1'. '%1' dosyası yazdırılamadı. Jump to page Sayfaya geç Page: Sayfa: Add bookmark Label Jump to page %1 %1. sayfaya geç About qpdfview qpdfview Hakkında <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width Sayfa genişliği Page size Sayfa boyutu Match &case Eşleme &durumu Highlight &all &Open... &Aç... Open in new &tab... Yeni &sekmede aç... &Refresh &Yenile &Save copy... &Kopyayı kaydet... Save &as... &Print... &Yazdır... E&xit &Previous page &Önceki sayfa &Next page So&nraki sayfa &First page İlk say&fa &Last page Son sayfa &Jump to page... &Sayfaya geç... Jump &backward Jump for&ward &Search... &Ara... Find previous Öncekini bul Find next Sonrakini bul Cancel search Aramyı iptâl et &Copy to clipboard &Panoya kopyala &Add annotation &Not ekle Settings... Ayarlar... &Continuous &Sürekli &Two pages &İkili sayfalar Two pages &with cover page &Kapak sayfasıyla birlikte ikili sayfalar &Multiple pages Zoom &in &Yakınlaştır Zoom &out &Uzaklaştır Original &size &Gerçek boyut Fit to page width Sayfa genişliğine sığdır Fit to page size Sayfa boyutuna uydur Rotate &left So&la döndür Rotate &right Sa&ğa döndür Invert colors Fonts... Yazıbiçimleri... &Fullscreen &Tam Ekran &Presentation... &Sunum... &Previous tab &Önceki sekme &Next tab &Sonraki sekme &Close tab &Sekmeyi kapat Close &all tabs &Tüm sekmeleri kapat Close all tabs &but current tab &Şimdiki dışındaki tüm sekmeleri kapat &Previous bookmark &Önceki yerimi &Next bookmark &Sonraki yerimi &Add bookmark Yerimi &ekle &Remove bookmark Yerimini &kaldır Remove all bookmarks Tüm yerimlerini kaldır &Contents &İçindekiler &About &Hakkında &File &Dosya &Edit Dü&zenle &View &Görünüm &Search &Ara &Outline &Ana Çizgi &Properties &Özellikler &Thumbnails &Küçük Resimler &Tool bars &Araç Çubukları &Docks &Rıhtımlar &Tabs &Sekmeler &Bookmarks &Yerimleri &Help &Yardım Model::PdfDocument Name Ad Type Tür Embedded Gömülü Subset Alt Küme File Dosya Yes Evet No Hayır Model::PdfPage Information Bilgiler Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. %1. sayfaya git. Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text Metni &kopyala Copy &image &Görüntüyü kopyala Save image to &file... Görüntüyü &dosyaya kaydet... Save image to file Görüntüyü dosyaya kaydet Warning Uyarı Could not save image to file '%1'. Görüntü '%1' dosyasına kaydedilemedi. Add &text &Metin ekle Add &highlight &Vurgu ekle &Remove annotation Notu &kaldır PdfSettingsWidget Antialiasing: Keskinlik yumuşatma: Text antialiasing: Yazıtipi yumuşatma: None Hiçbiri Full Reduced Text hinting: Metin ipuçları: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: Page ranges: All pages Even pages Odd pages Page set: Single page Two pages Four pages Six pages Nine pages Sixteen pages Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. '%1' belgesi için SyncTeX verisi bulunamadı. Could not prepare signal handler. QShortcut Shift Üst Karakter Ctrl Alt Değişim Shift and Ctrl Shift and Alt Üst Karakter ve Değişim Ctrl and Alt RecentlyUsedMenu Recently &used Son &kullanılanlar &Clear list &Listeyi temizle SettingsDialog &Behavior &Graphics &Grafikler &Interface &Arayüz &Shortcuts &Modifiers &Düzenleyiciler Defaults Öntanımlılar Defaults on current tab Open URL: Bağlantı aç: Auto-refresh: Özişler yenileme: Effective after restart. Yeniden başlatıldıktan sonra uygulanır. Track recently used: Son kullanılanları listele: Restore tabs: Sekmeleri geri yükle: Restore bookmarks: Yerimlerini geri yükle: Restore per-file settings: Synchronize presentation: Sunumu eşle: Default Öntanımlı Presentation screen: Sunum ekranı: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Kaynak düzenleyici: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Süsleme düzenleyicileri: Decorate links: Süsleme bağlantıları: Decorate form fields: None Hiçbiri Highlight duration: Vurgu süresi: Background color: Paper color: Pages per row: Page spacing: Sayfa aralığı: Thumbnail spacing: Küçük resim aralığı: Thumbnail size: Küçük resim boyutu: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB %1 MB Cache size: Önbellek boyutu: Prefetch: Önbellekleme: Prefetch distance: Top Sayfabaşı Bottom Sayfasonu Left Sol Right Sağ Tab position: Sekme konumu: As needed Gerektiğinde Always Her zaman Never Hiç bir zaman Tab visibility: Sekme görünürlüğü: New tab next to current tab: Recently used count: Current page in window title: File tool bar: Dosya araç çubuğu: Edit tool bar: Araç çubuğunu düzenle: View tool bar: Araç çubuğunu görüntüle: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_ug.ts0000644000000000000000000017220012246606025017113 0ustar 00000000000000 BookmarkMenu &Open ئاچ(&O) Open in new &tab يېڭى بەتكۈچتە ئاچ(&T) &Remove bookmark خەتكۈشنى چىقىۋەت(&R) Database Jump to page %1 بەت %1 غا يۆتكەل DocumentView Supported formats (%1) Unlock %1 %1 نى قۇلۇپسىزلا Password: ئىم: Printing '%1'... بېسىۋاتقىنى ‹%1›… Page %1 Information ئۇچۇر Opening URL is disabled in the settings. تەڭشەكتە URL نى ئېچىش چەكلەنگەن. Warning ئاگاھلاندۇرۇش SyncTeX data for '%1' could not be found. '%1' نىڭ SyncTeX سانلىق مەلۇماتىنى تاپالمىدى. FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning ئاگاھلاندۇرۇش Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous كېيىنكىنى ئىزدە Find next كېيىنكىنى ئىزدە MainWindow Warning ئاگاھلاندۇرۇش Could not open '%1'. ‹%1› نى ئاچالمىدى. Open containing folder Open ئاچ Close all tabs but this one Close all tabs to the left Close all tabs to the right Open in new tab يېڭى بەتكۈچتە ئاچ Could not refresh '%1'. ‹%1› نى يېڭىلىيالمىدى. Save copy كۆچۈرمىسىنى ساقلا Could not save copy at '%1'. كۆچۈرمىسىنى ‹%1› غا ساقلىيالمىدى. Save as باشقا ئاتتا ساقلا Could not save as '%1'. '%1' سۈپىتىدە ساقلىيالمايدۇ. Could not print '%1'. ‹%1› نى ساقلىيالمىدى. Jump to page بەتكە يۆتكەل Page: بەت: Add bookmark Label Jump to page %1 بەت %1 غا يۆتكەل About qpdfview qpdfview ھەققىدە <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <li>PDF support using Poppler</li> <li>PS support using libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Printing support using CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> The document '%1' has been modified. Do you want to save your changes? Page width بەت كەڭلىكى Page size بەت چوڭلۇقى Match &case چوڭ كىچىك ھەرپنى پەرقلەندۈر(&C) Highlight &all ھەممىنى يورۇت(&A) &Open... ئاچ(&O)… Open in new &tab... يېڭى بەتكۈچتە ئاچ(&T)… &Refresh يېڭىلا(&R) &Save copy... كۆچۈرمىسىنى ساقلا(&S)… Save &as... باشقا ئاتتا ساقلا(&A)… &Print... باس(&P)… E&xit &Previous page ئالدىنقى بەت(&P) &Next page كېيىنكى بەت(&N) &First page بىرىنچى بەت(&F) &Last page ئاخىرقى بەت(&L) &Jump to page... بەتكە يۆتكەل(&J)… Jump &backward Jump for&ward &Search... ئىزدە(&S)… Find previous كېيىنكىنى ئىزدە Find next كېيىنكىنى ئىزدە Cancel search ئىزدەشتىن ۋاز كەچ &Copy to clipboard چاپلاش تاختىسىغا كۆچۈر(&C) &Add annotation ئىزاھات قوش(&A) Settings... تەڭشەكلەر… &Continuous ئۈزلۈكسىز(&C) &Two pages ئىككى بەت(&T) Two pages &with cover page مۇقاۋىسى بار ئىككى بەت(&W) &Multiple pages كۆپ بەت(&M) Zoom &in چوڭايت(&I) Zoom &out كىچىكلەت(&O) Original &size ئەسلى چوڭلۇقى(&O) Fit to page width بەت كەڭلىكىگە ماسلاشتۇر Fit to page size بەت چوڭلۇقىغا ماسلاشتۇر Rotate &left سولغا چۆرگىلەت(&L) Rotate &right ئوڭغا چۆرگىلەت(&R) Invert colors Fonts... خەت نۇسخىلىرى … &Fullscreen پۈتۈن ئېكران(&F) &Presentation... سۇنۇلما(&P) … &Previous tab ئالدىنقى بەتكۈچ(&P) &Next tab كېيىنكى بەتكۈچ(&N) &Close tab بەتكۈچنى ياپ(&C) Close &all tabs بارلىق بەتكۈچلەرنى ياپ(&A) Close all tabs &but current tab نۆۋەتتىكى بەتكۈچتىن باشقا ھەممە بەتكۈچنى تاقا(&B) &Previous bookmark ئالدىنقى خەتكۈش(&P) &Next bookmark كېيىنكى خەتكۈش(N) &Add bookmark خەتكۈش قوش(&A) &Remove bookmark خەتكۈشنى چىقىۋەت(&R) Remove all bookmarks ھەممە خەتكۈشنى چىقىرىۋەت &Contents مەزمۇنلار(&C) &About ھەققىدە(&A) &File ھۆججەت(&F) &Edit تەھرىر(&E) &View كۆرۈنۈش(&V) &Search ئىزدە(&S) &Outline تېزىس(&O) &Properties خاسلىق(&P) &Thumbnails كىچىك سۈرەت(&T) &Tool bars قورال بالداقلار(&T) &Docks قونداقلار(&D) &Tabs بەتكۈچلەر(&T) &Bookmarks خەتكۈچلەر(&B) &Help ياردەم(&H) Model::PdfDocument Name ئاتى Type تىپى Embedded سىڭدۈرۈلگەن Subset تارماق توپلام File ھۆججەت Yes ھەئە No ياق Model::PdfPage Information ئۇچۇر Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Model::PsDocument Title Created for Creator Creation date Format Language level PageItem Go to page %1. بەت %1 غا يۆتكىلىدۇ. Go to page %1 of file '%2'. Open '%1'. Edit form field '%1'. Copy &text تېكىست كۆچۈر(&C) Copy &image سۈرەت كۆچۈر(&I) Save image to &file... سۈرەتنى ھۆججەتكە ساقلا(&F)… Save image to file سۈرەتنى ھۆججەتكە ساقلا Warning ئاگاھلاندۇرۇش Could not save image to file '%1'. سۈرەتنى ھۆججەت ‹%1› غا ساقلىيالمىدى. Add &text تېكىست قوش(&T) Add &highlight يورۇتۇش قوش((&H)) &Remove annotation PdfSettingsWidget Antialiasing: ھەرە چىشىغا قارشى: Text antialiasing: None يوق Full Reduced Text hinting: Overprint preview: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! Could not load PS plug-in! Could not load DjVu plug-in! PrintDialog Fit to page: بەتكە تولدۇر: Page ranges: All pages ھەممە بەتلەر Even pages جۈپ بەتلەر Odd pages تاق بەتلەر Page set: بەت تەڭشە: Single page يەككە بەت Two pages ئىككى بەت Four pages تۆت بەت Six pages ئالتە بەت Nine pages يەتتە بەت Sixteen pages ئون ئالتە بەت Number-up: Bottom to top and left to right ئاستىدىن ئۈستىگە، سولدىن ئوڭغا Bottom to top and right to left ئاستىدىن ئۈستىگە، ئوڭدىن سولغا Left to right and bottom to top سولدىن ئوڭغا، ئاستىدىن ئۈستىگە Left to right and top to bottom سولدىن ئوڭغا، ئۈستىدىن ئاستىغا Right to left and bottom to top ئوڭدىن سولغا، ئاستىدىن ئۈستىگە Right to left and top to bottom ئوڭدىن سولغا، ئۈستىدىن ئاستىغا Top to bottom and left to right ئۈستىدىن ئاستىغا، سولدىن ئوڭغا Top to bottom and right to left ئۈستىدىن ئاستىغا، ئوڭدىن سولغا Number-up layout: Extended options كېڭەيتىلمە تاللانمىلار PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. '%1' نىڭ SyncTeX سانلىق مەلۇماتىنى تاپالمىدى. Could not prepare signal handler. QShortcut Shift Shift Ctrl Alt Alt Shift and Ctrl Shift and Alt Shift ۋە Alt Ctrl and Alt RecentlyUsedMenu Recently &used يېقىندا ئىشلەتكەن(&U) &Clear list تىزىمنى تازىلا(&C) SettingsDialog &Behavior مەشغۇلات(&B) &Graphics گرافىك(&G) &Interface ئارايۈز(&I) &Shortcuts &Modifiers سۈپەتلىگۈچىلەر(&M): Defaults كۆڭۈلدىكى قىممەتلەر Defaults on current tab Open URL: تور ئادرېسى(URL) ئاچ: Auto-refresh: Effective after restart. Track recently used: Restore tabs: بەتكۈچلەرنى ئەسلىگە كەلتۈر Restore bookmarks: Restore per-file settings: Synchronize presentation: Default كۆڭۈلدىكى Presentation screen: Annotation color: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: Decorate links: Decorate form fields: None يوق Highlight duration: يورۇتۇش ۋاقتى: Background color: تەگلىك رەڭگى: Paper color: Pages per row: Page spacing: بەت ئارىلىقى: Thumbnail spacing: كىچىك سۈرەت ئارىلىقى: Thumbnail size: كىچىك سۈرەت چوڭلۇقى: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: General Highlight color: Presentation background color: %1 MB %1 مېگابايت Cache size: غەملەك چوڭلۇقى: Prefetch: ئالدىن ئوقۇش: Prefetch distance: Top ئۈستى Bottom ئاستى Left سول Right ئوڭ Tab position: بەتكۈچ ئورنى: As needed زۆرۈر بولغاندا Always ھەمىشە Never ھەرگىز Tab visibility: New tab next to current tab: Recently used count: Current page in window title: File tool bar: ھۆججەت قورال بالدىقى: Edit tool bar: تەھرىر قورال بالدىقى: View tool bar: كۆرۈنۈش قورال بالدىقى: Annotation overlay: Form field overlay: Zoom: Rotate: Scroll: Copy to clipboard: Add annotation: ShortcutHandler Skip backward Skip forward Move up Move down Move left Move right Action Key sequence TreeView &Expand all &Collapse all qpdfview-0.4.7/translations/qpdfview_uk.ts0000644000000000000000000020551412246606025017124 0ustar 00000000000000 BookmarkMenu &Open &Відкрити Open in new &tab Ві&дкрити у новій вкладці &Remove bookmark Ви&далити закладку Database Jump to page %1 Перейти до сторінки %1 DocumentView Supported formats (%1) Підтримувані формати (%1) Unlock %1 Розблокувати %1 Password: Пароль: Information Інформація Opening URL is disabled in the settings. Перехід за посиланням заборонено у налаштуваннях. Warning Попередження SyncTeX data for '%1' could not be found. Не знайдено даних SyncTeX для '%1'. Printing '%1'... Друк '%1'... Page %1 Сторінка %1 FileAttachmentAnnotationWidget Save... Зберегти... Save and open... Зберегти і відкрити… Save file attachment Зберегти долучення до файла Warning Попередження Could not save file attachment to '%1'. Не вдалося зберегти файл-долучення до «%1». HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". help_uk.html Find previous Знайти попереднє Find next Знайти наступне MainWindow Warning Попередження Could not open '%1'. Не вдалося відкрити '%1'. Close all tabs but this one Закрити усі вкладки, окрім цієї Close all tabs to the left Закрити усі вкладки ліворуч Close all tabs to the right Закрити усі вкладки праворуч Open Відкрити Open in new tab Відкрити у новій вкладці Could not refresh '%1'. Не вдалося оновити '%1'. Save copy Зберегти копію Could not save copy at '%1'. Не вдалося зберегти копію '%1'. Save as Зберегти як Could not save as '%1'. Не вдалося зберегти як '%1'. Could not print '%1'. Не вдалося роздрукувати '%1'. Jump to page Перехід до сторінки Page: Сторінка: Add bookmark Додати закладку Label Мітка Jump to page %1 Перейти до сторінки %1 About qpdfview Про qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview — програма для перегляду документів на основі Qt.</p><p>Можливості цієї версії:<ul> <li>PDF support using Poppler</li> <li>Підтримка PDF на основі Poppler</li> <li>PS support using libspectre</li> <li>Підтримка PS на основі libspectre</li> <li>DjVu support using DjVuLibre</li> <li>Підтримка DjVu на основі DjVuLibre</li> <li>Printing support using CUPS</li> <li>Підтримка друку за допомогою CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>Докладніші відомості можна знайти на сторінці <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a>.</p><p>&copy; Розробники qpdfview, 2012–2013</p> The document '%1' has been modified. Do you want to save your changes? До документа «%1» внесено зміни. Хочете зберегти ці зміни? Page width Ширина сторінки Page size Розмір сторінки Match &case Враховувати &регістр Highlight &all Виділити &усе &Open... &Відкрити... Open in new &tab... Ві&дкрити у новій вкладці... Open containing folder Відкрити теку, яка містить дані &Refresh &Оновити &Save copy... &Зберегти копію... Save &as... Зберегти &як... &Print... Д&рукувати... E&xit Ви&йти &Previous page &Попередня сторінка &Next page &Наступна сторінка &First page П&ерша сторінка &Last page О&стання сторінка &Jump to page... Пе&рейти до сторінки... Jump &backward Перейти &назад Jump for&ward Перейти в&перед &Search... &Пошук... Find previous Знайти попереднє Find next Знайти наступне Cancel search Скасувати пошук &Copy to clipboard С&копіювати до буфера &Add annotation &Додати коментар Settings... Параметри… &Continuous &Неперервний перегляд &Two pages &Дві сторінки Two pages &with cover page Дві сторінки та &обкладинка &Multiple pages &Кілька сторінок Zoom &in З&більшити Zoom &out З&меншити Original &size По&чатковий розмір Fit to page width За шириною Fit to page size Сторінка цілком Rotate &left Повернути &праворуч Rotate &right Повернути &ліворуч Invert colors Інвертувати кольори Fonts... Шрифти... &Fullscreen &На весь екран &Presentation... Пре&зентація... &Previous tab &Попередня вкладка &Next tab &Наступна вкладка &Close tab &Закрити вкладку Close &all tabs Закрити &усі вкладки Close all tabs &but current tab Закрити усі вкладки, &крім поточної &Previous bookmark &Попередня закладка &Next bookmark &Наступна закладка &Add bookmark &Додати закладку &Remove bookmark &Вилучити закладку Remove all bookmarks Вилучити усі закладки &Contents &Зміст &About &Про програму &File &Файл &Edit З&міни &View П&ерегляд &Outline &Зміст &Properties &Властивості &Thumbnails &Мініатюри &Search &Пошук &Tool bars Па&нелі інструментів &Docks &Бічні панелі &Tabs В&кладки &Bookmarks &Закладки &Help &Довідка Model::PdfDocument Name Назва Type Тип Embedded Вбудований Subset Підмножина File Файл Yes Так No Ні Model::PdfPage Information Відомості Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. Для додавання або вилучення анотацій слід встановити версію 0.20.1 або новішу бібліотеки Poppler. Model::PsDocument Title Заголовок Created for Створено для Creator Створено у Creation date Дата створення Format Формат Language level Рівень мови PageItem Go to page %1. Перейти до сторінки %1. Go to page %1 of file '%2'. Перейти на сторінку %1 файла «%2». Open '%1'. Відкрити «%1». Edit form field '%1'. Редагувати поле '%1'. Copy &text Скопіювати &текст Copy &image Скопіювати &зображення Save image to &file... Зберегти зображення у &файл... Save image to file Зберегти зображення у файл Warning Попередження Could not save image to file '%1'. Неможливо зберегти зображення у файл '%1'. Add &text Додати &текст Add &highlight Додати &підсвічування &Remove annotation &Вилучити анотацію PdfSettingsWidget Antialiasing: Згладжування: Text antialiasing: Згладжування тексту: None Немає Full Повне Reduced Спрощене Text hinting: Гінтінґ тексту: Overprint preview: Перегляд наддруку: Solid Суцільні Shaped Надати форму Thin line mode: Режим тонких ліній: PluginHandler Critical Критична помилка Could not load PDF plug-in! Не вдалося завантажити додаток роботи з PDF! Could not load PS plug-in! Не вдалося завантажити додаток роботи з PS! Could not load DjVu plug-in! Не вдалося завантажити додаток роботи з DjVuPS! PrintDialog Fit to page: Підлаштовування під аркуш: Page ranges: Діапазон сторінок: All pages Всі сторінки Even pages Парні сторінки Odd pages Непарні сторінки Page set: Набір сторінок: Single page Одна сторінка Two pages Дві сторінки Four pages Чотири сторінки Six pages Шість сторінок Nine pages Дев’ять сторінок Sixteen pages Шістнадцять сторінок Number-up: Розташовування: Bottom to top and left to right Знизу вгору і зліва праворуч Bottom to top and right to left Знизу вгору і справа ліворуч Left to right and bottom to top Зліва праворуч і знизу вгору Left to right and top to bottom Зліва праворуч і згори взниз Right to left and bottom to top Справа ліворуч і знизу вгору Right to left and top to bottom Справа ліворуч і згори вниз Top to bottom and left to right Згори вниз і зліва праворуч Top to bottom and right to left Згори вниз і справа ліворуч Number-up layout: Компонування сторінок: Extended options Додаткові параметри PsSettingsWidget Graphics antialias bits: Бітова маска згладжування графіки: Text antialias bits: Бітова маска згладжування тексту: QObject An empty instance name is not allowed. Порожнє ім'я екземпляру не дозволяється. An empty search text is not allowed. Не можна шукати порожній рядок. Choose instance Виберіть екземпляр Instance: Екземпляр: Unknown command-line option '%1'. Невідомий параметр командного рядка, «%1». Using '--instance' requires an instance name. Використання '--instance' потребує вказання імені екземпляру. Using '--instance' is not allowed without using '--unique'. Використання '--instance' не дозволяється без '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Назва екземпляра програми може складатися лише з символів «[A-Z][a-z][0-9]_» і не повинна починатися з цифри. Using '--search' requires a search text. Використання параметра «--search» вимагає зазначення тексту для пошуку. SyncTeX data for '%1' could not be found. Не знайдено даних SyncTeX для '%1'. Could not prepare signal handler. Не вдалося підготувати обробник сигналу. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift і Ctrl Shift and Alt Shift і Alt Ctrl and Alt Ctrl і Alt RecentlyUsedMenu Recently &used Останні відкр&иті &Clear list О&чистити список SettingsDialog General Загальне &Behavior &Поведінка &Graphics &Графіка &Interface &Інтерфейс &Shortcuts &Клавіатурні скорочення &Modifiers &Модифікатори Defaults Типові Defaults on current tab Типові на поточній вкладці Open URL: Відкривати URL: Auto-refresh: Автооновлення: Effective after restart. Діятиме після перезапуску. Track recently used: Пам'ятати останні відкриті: Restore tabs: Відновлювати вкладки: Restore bookmarks: Відновлювати закладки: Restore per-file settings: Відновлювати налаштування окремих документів: Synchronize presentation: Синхронна презентація: Default Типові Presentation screen: Екран презентації: None Немає Highlight duration: Тривалість підсвічування: Highlight color: Колір підсвічування: Annotation color: Колір анотацій: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. «%1» замінюється абсолютним шляхом до файлу. «%2» та «%3» замінюються номером рядка та стовпчика відповідно. Source editor: Редактор вихідного файла: Keep obsolete pixmaps: Зберігати застарілі растрові зображення: Use device pixel ratio: Використовувати співвідношення у пікселях пристрою: Decorate pages: Рамка навколо сторінки: Decorate links: Виокремлювати посилання: Decorate form fields: Виокремлювати поля форм: Background color: Колір тла: Paper color: Колір паперу: Presentation background color: Колір тла у режимі презентації: Pages per row: Сторінок у ряд: Page spacing: Між сторінками: Thumbnail spacing: Між мініатюрами: Thumbnail size: Розмір мініатюр: %1 MB %1 МБ Cache size: Кеш: Prefetch: Передзавантаження: Prefetch distance: Довжина передзавантаження: Top Вгорі Bottom Внизу Left Ліворуч Right Праворуч Tab position: Розташування вкладок: As needed За потребою Always Завжди Never Ніколи Tab visibility: Показувати вкладки: New tab next to current tab: Нова вкладка поряд з поточною: Recently used count: Кількість останніх відкритих: File tool bar: Панель «Файл»: Edit tool bar: Панель «Редагування»: View tool bar: Панель «Перегляд»: Current page in window title: Поточна сторінка у заголовку вікна: Instance name in window title: Назва екземпляра у заголовку вікна: Synchronize outline view: Синхронізувати перегляд ескізу: Highlight current thumbnail: Підсвічування поточної мініатюри: Limit thumbnails to results: Обмежити мініатюри результатами: Annotation overlay: Накладка анотації: Form field overlay: Накладка поля форми: Zoom: Масштабування: Rotate: Обертання: Scroll: Гортання: Copy to clipboard: Копіювання до буфера: Add annotation: Додавання анотацій: ShortcutHandler Action Дія Key sequence Комбінація клавіш Skip backward Гортати назад Skip forward Гортати вперед Move up Вгору Move down Вниз Move left Ліворуч Move right Праворуч TreeView &Expand all &Розгорнути все &Collapse all &Згорнути все qpdfview-0.4.7/translations/qpdfview_zh_CN.ts0000644000000000000000000017005212246606025017504 0ustar 00000000000000 BookmarkMenu &Open 打开(&O) Open in new &tab 在新标签中打开(&T) &Remove bookmark 移除书签(&R) Database Jump to page %1 跳到 %1 页 DocumentView Supported formats (%1) 支持的格式(%1) Unlock %1 解锁 %1 Password: 密码: Information 信息 Opening URL is disabled in the settings. 在设置中已经禁用打开 URL。 Warning 警告 SyncTeX data for '%1' could not be found. 无法找到“%1”的 SyncTex 数据。 Printing '%1'... 正在打印“%1”... Page %1 第 %1 页 FileAttachmentAnnotationWidget Save... Save and open... Save file attachment Warning 警告 Could not save file attachment to '%1'. HelpDialog help.html Please replace by file name of localized help if available, e.g. "help_fr.html". Find previous 查找上一个 Find next 查找下一个 MainWindow Warning 警告 Could not open '%1'. 无法打开“%1”。 Close all tabs but this one Close all tabs to the left Close all tabs to the right Open 打开 Open in new tab 在新标签页中打开 Could not refresh '%1'. 无法刷新“%1”。 Save copy 保存副本 Could not save copy at '%1'. 无法在“%1”保存副本。 Save as 另存为 Could not save as '%1'. 无法保存为“%1”。 Could not print '%1'. 无法打印“%1”。 Jump to page 跳到页面 Page: 页: Add bookmark Label Jump to page %1 跳到 %1 页 About qpdfview 关于 qpdfview <p><b>qpdfview %1</b></p><p>qpdfview is a tabbed document viewer using Qt.</p><p>This version includes:<ul> <p><b>qpdfview %1</b></p><p>qpdfview 是一款使用 Qt 的标签式文档查看器。</p><p>该版本包括:<ul> <li>PDF support using Poppler</li> <li>PDF 支持使用 Poppler</li> <li>PS support using libspectre</li> <li>PS 支持使用 libspectre</li> <li>DjVu support using DjVuLibre</li> <li>DjVu 支持使用 DjVuLibre</li> <li>Printing support using CUPS</li> <li>打印支持使用 CUPS</li> </ul><p>See <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> for more information.</p><p>&copy; 2012-2013 The qpdfview developers</p> </ul><p>查看 <a href="https://launchpad.net/qpdfview">launchpad.net/qpdfview</a> 获取更多信息。</p><p>&copy; 2012-2013 qpdfview 开发者</p> The document '%1' has been modified. Do you want to save your changes? 文件 %1 已被修改,你想要保存你的修改吗? Page width 页面宽度 Page size 页面大小 Match &case 匹配大小写(&C) Highlight &all 全部高亮(&A) &Open... 打开(&O)... Open in new &tab... 在新标签中打开(&T)... Open containing folder 打开所在目录 &Refresh 刷新(&R) &Save copy... 保存副本(&S)... Save &as... 另存为(&A)... &Print... 打印(&P)... E&xit 退出(&X) &Previous page 上一页(&P) &Next page 下一页(&N) &First page 第一页(&F) &Last page 最后一页(&L) &Jump to page... 跳到页面(&J)... Jump &backward 向后跳至(&B) Jump for&ward 向前跳至(&W) &Search... 搜索(&S)... Find previous 查找上一个 Find next 查找下一个 Cancel search 取消搜索 &Copy to clipboard 复制到剪贴板(&C) &Add annotation 添加注释 Settings... 设置... &Continuous 连续(&C) &Two pages 2 页(&T) Two pages &with cover page 双页带有封面(&W) &Multiple pages 多页(&M) Zoom &in 放大(&I) Zoom &out 缩小(&O) Original &size 原始尺寸(&S) Fit to page width 适合页宽 Fit to page size 适合页面大小 Rotate &left 左旋转(&L) Rotate &right 右旋转(&R) Invert colors 反色 Fonts... 字体... &Fullscreen 全屏(&F) &Presentation... 幻灯(&P)... &Previous tab 上一标签(&P) &Next tab 下一标签(&N) &Close tab 关闭标签(&C) Close &all tabs 关闭全部标签(&A) Close all tabs &but current tab 关闭当前标签外的全部标签(&B) &Previous bookmark 上一书签(&P) &Next bookmark 下一书签(&N) &Add bookmark 添加书签(&A) &Remove bookmark 移除书签(&R) Remove all bookmarks 移除全部书签 &Contents 内容(&C) &About 关于(&A) &File 文件(&F) &Edit 编辑(&E) &View 查看(&V) &Outline 大纲(&O) &Properties 属性(&P) &Thumbnails 缩略图(&T) &Search 搜索(&S) &Tool bars 工具栏(&T) &Docks &Docks &Tabs 标签(&T) &Bookmarks 书签(&B) &Help 帮助(&H) Model::PdfDocument Name 名称 Type 类型 Embedded 嵌入 Subset 子集 File 文件 Yes No Model::PdfPage Information 信息 Version 0.20.1 or higher of the Poppler library is required to add or remove annotations. 添加或删除注释需要 0.20.1 或更高版本的 Poppler 库。 Model::PsDocument Title 标题 Created for Creator 创建人 Creation date 创建日期 Format 格式 Language level PageItem Go to page %1. 转到 %1 页。 Go to page %1 of file '%2'. 转到文件“%2”第 %1 页。 Open '%1'. 打开“%1”。 Edit form field '%1'. 编辑表格字段“%1”。 Copy &text 复制文本(&T) Copy &image 复制图像(&I) Save image to &file... 保存图像到文件(&F)... Save image to file 保存图像到文件 Warning 警告 Could not save image to file '%1'. 无法保存图像到文件“%1”。 Add &text 添加文本(&T) Add &highlight 添加高亮(&H) &Remove annotation 移除注释(&R) PdfSettingsWidget Antialiasing: 抗锯齿: Text antialiasing: 文本抗锯齿: None Full 完全 Reduced Text hinting: Overprint preview: 打印预览: Solid Shaped Thin line mode: PluginHandler Critical Could not load PDF plug-in! 无法加载 PDF 插件! Could not load PS plug-in! 无法加载 PS 插件! Could not load DjVu plug-in! 无法加载 DjVu 插件! PrintDialog Fit to page: 适合页面: Page ranges: 页数范围: All pages 全部页面 Even pages 偶数页 Odd pages 奇数页 Page set: 页面设置: Single page 单页 Two pages 双页 Four pages 4 页 Six pages 6 页 Nine pages 9 页 Sixteen pages 16 页 Number-up: Bottom to top and left to right Bottom to top and right to left Left to right and bottom to top Left to right and top to bottom Right to left and bottom to top Right to left and top to bottom Top to bottom and left to right Top to bottom and right to left Number-up layout: Extended options 扩展选项 PsSettingsWidget Graphics antialias bits: Text antialias bits: QObject An empty instance name is not allowed. An empty search text is not allowed. Choose instance Instance: Unknown command-line option '%1'. Using '--instance' requires an instance name. Using '--instance' is not allowed without using '--unique'. An instance name must only contain the characters "[A-Z][a-z][0-9]_" and must not begin with a digit. Using '--search' requires a search text. SyncTeX data for '%1' could not be found. 无法找到“%1”的 SyncTex 数据。 Could not prepare signal handler. QShortcut Shift Shift Ctrl Ctrl Alt Alt Shift and Ctrl Shift 和 Ctrl Shift and Alt Shift 和 Alt Ctrl and Alt Ctrl 和 Alt RecentlyUsedMenu Recently &used 最近使用的(&U) &Clear list 清理列表(&C) SettingsDialog General 常规 &Behavior 行为(&B) &Graphics 图形(&G) &Interface 界面(&I) &Shortcuts 快捷键(&S) &Modifiers 修饰键(&M) Defaults 默认 Defaults on current tab Open URL: 打开 URL: Auto-refresh: 自动刷新: Effective after restart. 重新启动后生效。 Track recently used: 记录最近使用的: Restore tabs: 恢复标签: Restore bookmarks: 恢复书签: Restore per-file settings: 恢复先前的文件设置: Synchronize presentation: Default 默认 Presentation screen: Highlight color: None Highlight duration: 高亮时长: Annotation color: 注释颜色: '%1' is replaced by the absolute file path. '%2' resp. '%3' is replaced by line resp. column number. Source editor: 源编辑器: Keep obsolete pixmaps: Use device pixel ratio: Decorate pages: 装饰页面: Decorate links: 装饰链接: Decorate form fields: 装饰表格字段: Background color: 背景色: Paper color: 页面颜色: Presentation background color: Pages per row: Page spacing: 页间距: Thumbnail spacing: 缩略图间隔: Thumbnail size: 缩略图大小: %1 MB %1 MB Cache size: 缓存大小: Prefetch: 预取: Prefetch distance: Top Bottom 底部 Left 左侧 Right 右侧 Tab position: 标签位置: As needed 根据需要 Always 总是 Never 从不 Tab visibility: 标签可视: New tab next to current tab: 新建与当前标签相邻的标签: Recently used count: File tool bar: 文件工具栏: Edit tool bar: 编辑工具栏: View tool bar: 查看工具栏: Current page in window title: Instance name in window title: Synchronize outline view: Highlight current thumbnail: Limit thumbnails to results: Annotation overlay: Form field overlay: Zoom: 缩放: Rotate: 旋转: Scroll: 滚屏: Copy to clipboard: 复制到剪贴板: Add annotation: 添加注释: ShortcutHandler Action Key sequence Skip backward 向后跳转 Skip forward Move up Move down Move left Move right TreeView &Expand all &Collapse all