Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 427 → Rev 6

/branches/start/admin/README
File deleted
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/config.h.in
===================================================================
--- start/Scribus/config.h.in (revision 427)
+++ start/Scribus/config.h.in (nonexistent)
@@ -1,116 +0,0 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-
-/* Debug Messages */
-#undef DEBUG
-
-/* ColorManagement */
-#undef HAVE_CMS
-
-/* Defines if your system has the crypt function */
-#undef HAVE_CRYPT
-
-/* Cups */
-#undef HAVE_CUPS
-
-/* Defines if your system has the libfreetype library */
-#undef HAVE_FREETYPE
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have libjpeg */
-#undef HAVE_LIBJPEG
-
-/* Define if you have libpng */
-#undef HAVE_LIBPNG
-
-/* Define if you have a working libpthread (will enable threaded code) */
-#undef HAVE_LIBPTHREAD
-
-/* Define if you have libz */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <pthread/linuxthreads/pthread.h> header file.
- */
-#undef HAVE_PTHREAD_LINUXTHREADS_PTHREAD_H
-
-/* Define if you have the res_init function */
-#undef HAVE_RES_INIT
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* C++ compiler supports template repository */
-#undef HAVE_TEMPLATE_REPOSITORY
-
-/* Tifflib */
-#undef HAVE_TIFF
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you want Xinerama support */
-#undef HAVE_XINERAMA
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Dataprefix */
-#undef PREL
-
-/* The size of a `char', as computed by sizeof. */
-#undef SIZEOF_CHAR
-
-/* The size of a `char *', as computed by sizeof. */
-#undef SIZEOF_CHAR_P
-
-/* The size of a `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of a `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Compatibility define */
-#undef ksize_t
-
-/* Define the real type of socklen_t */
-#undef socklen_t
/start/Scribus/config.h.in
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/ChangeLogCVS
===================================================================
--- start/Scribus/ChangeLogCVS (revision 427)
+++ start/Scribus/ChangeLogCVS (nonexistent)
@@ -1,38 +0,0 @@
-Changes since Version 0.9.9
-12.05.2003 customfdialog.cpp Fixed a small Bug with the File-Preview.
- pdflib.cpp Removed some unneeded Code.
-
-11.05.2003 pdflib.cpp Removed Bug with Small Caps.
- scfonts.cpp
- util.cpp Added Support for Automatic Kerning Values from .afm Files.
-
-09.05.2003 cmykfw.cpp Added Color Model "Websave RGB".
- pdflib.cpp
- pslib.cpp Solved the Problem that the last Hyphen in linked Textframes wasn't printed.
- scribus.cpp Fixed crash with PDF-Previes enabled.
-
-08.05.2003 scribus.cpp Disabled Autosave when in Template Pages Mode.
- page.cpp Some Bugfixes for Polygon Editing and Context Menue.
-
-06.05.2003 page.cpp Added a Command to split combined Polygons.
- UniteObj() works now with more than two Objects.
- pdflib.cpp Improved Detection of unused Fonts.
- scribus.cpp Added a Command to split combined Polygons.
- util.cpp traceCharacter() handles now Small Caps correctly.
-
-05.05.2003 When you edit a Path, you can select now more than one Point for moving,
- either by pressing the Shift Key or using the selection Rectangle.
- Fonts are now scanned for their Chararcter width only when they are used.
- (Avoids building big Tables for never used Fonts)
-
-04.05.2003 Extended the Node-Palette.
- The PDF-Exporter now embeds only really used Fonts.
-
-03.05.2003 Added new Command "Convert Text to Polygons"
-
-27.04.2003 Implemented Subpaths for Polygons.
- Removed various Copy and Paste Errors.
-
-26.04.2003 Improved Textrendering for Zoomfactors > 100 %
-
-
/start/Scribus/ChangeLogCVS
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus.lsm
===================================================================
--- start/Scribus/scribus.lsm (revision 427)
+++ start/Scribus/scribus.lsm (nonexistent)
@@ -1,14 +0,0 @@
-Begin3
-Title: Scribus
-Version: 0.4
-Entered-date:
-Description:
-Keywords:
-Author: Franz Schmid <Franz.Schmid@altmuehlnet.de>
-Maintained-by: Franz Schmid <Franz.Schmid@altmuehlnet.de>
-Primary-site:
-Home-page: http://web2.altmuehlnet.de/fschmid
-Original-site:
-Platforms: Linux and other Unices
-Copying-policy: GNU Public License
-End
/start/Scribus/scribus.lsm
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/TODO
===================================================================
--- start/Scribus/TODO (revision 427)
+++ start/Scribus/TODO (nonexistent)
@@ -1,5 +0,0 @@
-Plans for the next Release:
-
- - Integrate a Spellchecker
- - Provide an alternative Fontselector
- - enhanche the Display
/start/Scribus/TODO
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/INSTALL
===================================================================
--- start/Scribus/INSTALL (revision 427)
+++ start/Scribus/INSTALL (nonexistent)
@@ -1,167 +0,0 @@
-Basic Installation
-==================
-
- These are generic installation instructions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
- The file `configure.in' is used to create `configure' by a program
-called `autoconf'. You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
-
- Running `configure' takes a while. While running, it prints some
- messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Type `make install' to install the programs and any data files and
- documentation.
-
- 4. You can remove the program binaries and object files from the
- source code directory by typing `make clean'.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. You can give `configure'
-initial values for variables by setting them in the environment. Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
- CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-
-Or on systems that have the `env' program, you can do it like this:
- env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory. After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
-
-Installation Names
-==================
-
- By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc. You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on. Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
- CPU-COMPANY-SYSTEM
-
-See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
-
- If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Operation Controls
-==================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--cache-file=FILE'
- Use and save the results of the tests in FILE instead of
- `./config.cache'. Set FILE to `/dev/null' to disable caching, for
- debugging `configure'.
-
-`--help'
- Print a summary of the options to `configure', and exit.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made.
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`--version'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`configure' also accepts some other, not widely useful, options.
-
/start/Scribus/INSTALL
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/COPYING
===================================================================
--- start/Scribus/COPYING (revision 427)
+++ start/Scribus/COPYING (nonexistent)
@@ -1,280 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, 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 Library 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
/start/Scribus/COPYING
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/stamp-h
===================================================================
--- start/Scribus/stamp-h (revision 427)
+++ start/Scribus/stamp-h (nonexistent)
@@ -1 +0,0 @@
-timestamp
/start/Scribus/stamp-h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/Makefile.am
===================================================================
--- start/Scribus/Makefile.am (revision 427)
+++ start/Scribus/Makefile.am (nonexistent)
@@ -1,31 +0,0 @@
-####### kdevelop will overwrite this part!!! (begin)##########
-
-SUBDIRS = scribus
-
-EXTRA_DIST = scribus.kdevprj AUTHORS COPYING ChangeLog INSTALL README TODO scribus.lsm scribus.desktop
-
-####### kdevelop will overwrite this part!!! (end)############
-# not a GNU package. You can remove this line, if
-# have all needed files, that a GNU package needs
-AUTOMAKE_OPTIONS = foreign
-
-#$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
-# cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
-
-$(top_srcdir)/subdirs:
- cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
-
-$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
- @cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
-
-MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
-
-package-messages:
- $(MAKE) -f admin/Makefile.common package-messages
- $(MAKE) -C po merge
-
-EXTRA_DIST += admin
-
-dist-hook:
- cd $(top_distdir) && perl admin/am_edit -padmin
- cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
/start/Scribus/Makefile.am
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/druck.cpp
===================================================================
--- start/Scribus/scribus/druck.cpp (revision 427)
+++ start/Scribus/scribus/druck.cpp (nonexistent)
@@ -1,650 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Druck.ui'
-**
-** Created: Mon Sep 17 21:42:19 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "druck.h"
-#include "druck.moc"
-#include "config.h"
-#include "customfdialog.h"
-#include "cupsoptions.h"
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qmap.h>
-#ifdef HAVE_CUPS
-#include <cups/cups.h>
-#endif
-#ifdef HAVE_CMS
-extern bool CMSuse;
-#endif
-
-extern bool loadText(QString nam, QString *Buffer);
-extern QPixmap loadIcon(QString nam);
-
-AdvOptions::AdvOptions(QWidget* parent, bool Hm, bool Vm, bool Ic) : QDialog( parent, "prin", true, 0 )
-{
- setCaption( tr( "Advanced Options" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- AdvOptionsLayout = new QVBoxLayout( this );
- AdvOptionsLayout->setSpacing( 5 );
- AdvOptionsLayout->setMargin( 10 );
- MirrorH = new QCheckBox(this, "MirrorH");
- MirrorH->setText(tr("Mirror Page(s) horizontal"));
- MirrorH->setChecked(Hm);
- AdvOptionsLayout->addWidget( MirrorH );
- MirrorV = new QCheckBox(this, "MirrorV");
- MirrorV->setText(tr("Mirror Page(s) vertical"));
- MirrorV->setChecked(Vm);
- AdvOptionsLayout->addWidget( MirrorV );
-#ifdef HAVE_CMS
- if (CMSuse)
- {
- UseICC = new QCheckBox(this, "ICC");
- UseICC->setText(tr("Apply ICC-Profiles"));
- UseICC->setChecked(Ic);
- AdvOptionsLayout->addWidget( UseICC );
- }
-#endif
-
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 30 );
- Layout2->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "OK" ) );
- Layout2->addWidget( PushButton1 );
- QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer2 );
- PushButton2 = new QPushButton( this, "PushButton1_2" );
- PushButton2->setText( tr( "Cancel" ) );
- PushButton2->setDefault( TRUE );
- PushButton2->setFocus();
- Layout2->addWidget( PushButton2 );
- QSpacerItem* spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer3 );
- AdvOptionsLayout->addLayout( Layout2 );
- setMinimumSize( sizeHint() );
- connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
-}
-
-Druck::Druck( QWidget* parent, QString PDatei, QString PDev, QString PCom)
- : QDialog( parent, "Dr", true, 0)
-{
- PrinterOpts = "";
- setCaption( tr( "Setup Printer" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- DruckLayout = new QVBoxLayout( this );
- DruckLayout->setSpacing( 6 );
- DruckLayout->setMargin( 10 );
-
- Drucker = new QGroupBox( this, "Drucker" );
- Drucker->setTitle( tr( "Print destination" ) );
- Drucker->setColumnLayout(0, Qt::Vertical );
- Drucker->layout()->setSpacing( 0 );
- Drucker->layout()->setMargin( 0 );
- DruckerLayout = new QGridLayout( Drucker->layout() );
- DruckerLayout->setAlignment( Qt::AlignTop );
- DruckerLayout->setSpacing( 6 );
- DruckerLayout->setMargin( 10 );
-
- Layout1x = new QHBoxLayout;
- Layout1x->setSpacing( 6 );
- Layout1x->setMargin( 0 );
- PrintDest = new QComboBox( true, Drucker, "PrintDest" );
- PrintDest->setMinimumSize( QSize( 250, 22 ) );
- PrintDest->setMaximumSize( QSize( 260, 22 ) );
- PrintDest->setEditable(false);
- QString Pcap;
- QString tmp;
- QStringList wt;
-#ifdef HAVE_CUPS
- cups_dest_t *dests;
- int num_dests;
- num_dests = cupsGetDests(&dests);
- for (int pr = 0; pr < num_dests; pr++)
- {
- tmp = QString(dests[pr].name);
- PrintDest->insertItem(tmp);
- if (tmp == PDev)
- {
- PrintDest->setCurrentItem(PrintDest->count()-1);
- ToFile = false;
- }
- }
- cupsFreeDests(num_dests, dests);
-#else
- if (loadText("/etc/printcap", &Pcap))
- {
- QTextStream ts(&Pcap, IO_ReadOnly);
- while(!ts.atEnd())
- {
- tmp = ts.readLine();
- if (tmp.isEmpty())
- continue;
- if ((tmp[0] != '#') && (tmp[0] != ' ') && (tmp[0] != '\n') && (tmp[0] != '\t'))
- {
- tmp = tmp.stripWhiteSpace();
- if (tmp.right(2) == ":\\")
- tmp = tmp.left(tmp.length()-2);
- else
- tmp = tmp.left(tmp.length()-1);
- wt = QStringList::split("|", tmp);
- PrintDest->insertItem(wt[0]);
- if (wt[0] == PDev)
- {
- PrintDest->setCurrentItem(PrintDest->count()-1);
- ToFile = false;
- }
- }
- }
- }
-#endif
- PrintDest->insertItem(tr("File"));
- if (PDev == "")
- {
- Geraet = PrintDest->text(0);
- ToFile = false;
- }
- else
- Geraet = PDev;
- Layout1x->addWidget( PrintDest );
-
-#ifdef HAVE_CUPS
- OptButton = new QPushButton(Drucker, "Optionen" );
- OptButton->setText( tr( "Options..." ) );
- Layout1x->addWidget( OptButton );
-#endif
- QSpacerItem* spacerDR = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1x->addItem( spacerDR );
- DruckerLayout->addLayout( Layout1x, 0, 0);
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- DateiT = new QLabel( Drucker, "DateiT" );
- DateiT->setEnabled( false );
- DateiT->setText( tr( "File:" ) );
- Layout1->addWidget( DateiT );
- LineEdit1 = new QLineEdit( Drucker, "LineEdit1" );
- LineEdit1->setMinimumSize( QSize( 240, 22 ) );
- LineEdit1->setEnabled(false);
- LineEdit1->setText(PDatei);
- Layout1->addWidget( LineEdit1 );
- ToolButton1 = new QToolButton( Drucker, "ToolButton1" );
- ToolButton1->setMinimumSize( QSize( 80, 22 ) );
- ToolButton1->setText( tr( "Change..." ) );
- ToolButton1->setEnabled(false);
- Layout1->addWidget( ToolButton1 );
- DruckerLayout->addLayout( Layout1, 1, 0 );
-
- OtherCom = new QCheckBox(Drucker, "Dc");
- OtherCom->setChecked(false);
- OtherCom->setText(tr("Print via other Command"));
- DruckerLayout->addWidget( OtherCom, 2, 0, Qt::AlignLeft);
- LayoutCC = new QHBoxLayout;
- LayoutCC->setSpacing( 6 );
- LayoutCC->setMargin( 0 );
- OthText = new QLabel( Drucker, "DateiTc" );
- OthText->setEnabled( false );
- OthText->setText( tr( "Command:" ) );
- LayoutCC->addWidget( OthText );
- Command = new QLineEdit( Drucker, "LineEdit12" );
- Command->setMinimumSize( QSize( 240, 22 ) );
- Command->setEnabled(false);
- Command->setText(PCom);
- LayoutCC->addWidget( Command );
- DruckerLayout->addLayout( LayoutCC, 3, 0 );
- DruckLayout->addWidget( Drucker );
-
-
- Umfang = new QButtonGroup( this, "Umfang" );
- Umfang->setTitle( tr( "Range:" ) );
- Umfang->setColumnLayout(0, Qt::Vertical );
- Umfang->layout()->setSpacing( 0 );
- Umfang->layout()->setMargin( 0 );
- UmfangLayout = new QHBoxLayout( Umfang->layout() );
- UmfangLayout->setAlignment( Qt::AlignTop );
- UmfangLayout->setSpacing( 6 );
- UmfangLayout->setMargin( 5 );
-
- ButtonGroup5 = new QButtonGroup( Umfang, "ButtonGroup5" );
- ButtonGroup5->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup5->setTitle( tr( "" ) );
- ButtonGroup5->setColumnLayout(0, Qt::Vertical );
- ButtonGroup5->layout()->setSpacing( 0 );
- ButtonGroup5->layout()->setMargin( 0 );
- ButtonGroup5Layout = new QGridLayout( ButtonGroup5->layout() );
- ButtonGroup5Layout->setAlignment( Qt::AlignTop );
- ButtonGroup5Layout->setSpacing( 6 );
- ButtonGroup5Layout->setMargin( 5 );
-
- TextLabel2_2 = new QLabel( ButtonGroup5, "TextLabel2_2" );
- TextLabel2_2->setEnabled( false );
- TextLabel2_2->setText( tr( "To page:" ) );
-
- ButtonGroup5Layout->addWidget( TextLabel2_2, 3, 0 );
-
- To = new QSpinBox( ButtonGroup5, "To" );
- To->setEnabled( false );
- To->setMinimumSize( QSize( 70, 22 ) );
- To->setMinValue(1);
- To->setMaxValue(1000);
- To->setValue(1);
- ButtonGroup5Layout->addWidget( To, 3, 1 );
-
- From = new QSpinBox( ButtonGroup5, "From" );
- From->setEnabled( false );
- From->setMinimumSize( QSize( 70, 22 ) );
- From->setMinValue(1);
- From->setMaxValue(1000);
- From->setValue(1);
-
- ButtonGroup5Layout->addWidget( From, 2, 1 );
-
- TextLabel2 = new QLabel( ButtonGroup5, "TextLabel2" );
- TextLabel2->setEnabled( false );
- TextLabel2->setText( tr( "From page:" ) );
-
- ButtonGroup5Layout->addWidget( TextLabel2, 2, 0 );
-
- RadioButton2 = new QRadioButton( ButtonGroup5, "RadioButton2" );
- RadioButton2->setText( tr( "Print range" ) );
-
- ButtonGroup5Layout->addMultiCellWidget( RadioButton2, 1, 1, 0, 1 );
-
- RadioButton1 = new QRadioButton( ButtonGroup5, "RadioButton1" );
- RadioButton1->setText( tr( "Print all" ) );
- RadioButton1->setChecked( true );
-
- ButtonGroup5Layout->addWidget( RadioButton1, 0, 0 );
- UmfangLayout->addWidget( ButtonGroup5 );
-
- ButtonGroup4 = new QButtonGroup( Umfang, "ButtonGroup4" );
- ButtonGroup4->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup4->setTitle( tr( "" ) );
- ButtonGroup4->setColumnLayout(0, Qt::Vertical );
- ButtonGroup4->layout()->setSpacing( 0 );
- ButtonGroup4->layout()->setMargin( 0 );
- ButtonGroup4Layout = new QGridLayout( ButtonGroup4->layout() );
- ButtonGroup4Layout->setAlignment( Qt::AlignTop );
- ButtonGroup4Layout->setSpacing( 6 );
- ButtonGroup4Layout->setMargin( 5 );
-
- FirstPlast = new QRadioButton( ButtonGroup4, "FirstPlast" );
- FirstPlast->setText( tr( "Print last page first" ) );
-
- ButtonGroup4Layout->addMultiCellWidget( FirstPlast, 1, 1, 0, 1 );
-
- FirstPfirst = new QRadioButton( ButtonGroup4, "FirstPfirst" );
- FirstPfirst->setText( tr( "Print first page first" ) );
- FirstPfirst->setChecked( true );
-
- ButtonGroup4Layout->addMultiCellWidget( FirstPfirst, 0, 0, 0, 1 );
-
- TextLabel3 = new QLabel( ButtonGroup4, "TextLabel3" );
- TextLabel3->setText( tr( "Number of copies:" ) );
-
- ButtonGroup4Layout->addWidget( TextLabel3, 2, 0 );
-
- Copies = new QSpinBox( ButtonGroup4, "Copies" );
- Copies->setEnabled( true );
- Copies->setMinimumSize( QSize( 70, 22 ) );
- Copies->setMinValue( 1 );
- Copies->setMaxValue(1000);
- Copies->setValue(1);
-
- ButtonGroup4Layout->addWidget( Copies, 2, 1 );
- UmfangLayout->addWidget( ButtonGroup4 );
- DruckLayout->addWidget( Umfang );
-
- Optionen = new QButtonGroup( this, "Optionen" );
- Optionen->setTitle( tr( "Options" ) );
- Optionen->setColumnLayout(0, Qt::Vertical );
- Optionen->layout()->setSpacing( 0 );
- Optionen->layout()->setMargin( 0 );
- OptionenLayout = new QGridLayout( Optionen->layout() );
- OptionenLayout->setAlignment( Qt::AlignTop );
- OptionenLayout->setSpacing( 5 );
- OptionenLayout->setMargin( 5 );
-
- ButtonGroup3 = new QButtonGroup( Optionen, "ButtonGroup3" );
- ButtonGroup3->setGeometry( QRect( 11, 19, 138, 95 ) );
- ButtonGroup3->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup3->setTitle( tr( "" ) );
- ButtonGroup3->setColumnLayout(0, Qt::Vertical );
- ButtonGroup3->layout()->setSpacing( 0 );
- ButtonGroup3->layout()->setMargin( 0 );
- ButtonGroup3Layout = new QVBoxLayout( ButtonGroup3->layout() );
- ButtonGroup3Layout->setAlignment( Qt::AlignTop );
- ButtonGroup3Layout->setSpacing( 5 );
- ButtonGroup3Layout->setMargin( 5 );
-
- NormalP = new QRadioButton( ButtonGroup3, "NormalP" );
- NormalP->setText( tr( "Print Normal" ) );
- NormalP->setChecked( true );
- ButtonGroup3Layout->addWidget( NormalP );
-
- PrintSep = new QRadioButton( ButtonGroup3, "PrintSep" );
- PrintSep->setText( tr( "Print Separations" ) );
- ButtonGroup3Layout->addWidget( PrintSep );
- ToSeparation = false;
-
- SepArt = new QComboBox( true, ButtonGroup3, "SepArt" );
- SepArt->insertItem( tr( "All" ) );
- SepArt->insertItem("Cyan");
- SepArt->insertItem("Magenta");
- SepArt->insertItem("Yellow");
- SepArt->insertItem("Black");
- SepArt->setEnabled( false );
- SepArt->setEditable( false );
- ButtonGroup3Layout->addWidget( SepArt );
- OptionenLayout->addWidget( ButtonGroup3, 0, 0, Qt::AlignLeft );
-
- ButtonGroup3_2 = new QButtonGroup( Optionen, "ButtonGroup3_2" );
- ButtonGroup3_2->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup3_2->setTitle( tr( "" ) );
- ButtonGroup3_2->setColumnLayout(0, Qt::Vertical );
- ButtonGroup3_2->layout()->setSpacing( 0 );
- ButtonGroup3_2->layout()->setMargin( 0 );
- ButtonGroup3_2Layout = new QVBoxLayout( ButtonGroup3_2->layout() );
- ButtonGroup3_2Layout->setAlignment( Qt::AlignTop );
- ButtonGroup3_2Layout->setSpacing( 5 );
- ButtonGroup3_2Layout->setMargin( 5 );
-
- PrintGray = new QRadioButton( ButtonGroup3_2, "PrintGray" );
- PrintGray->setText( tr( "Print in color if available" ) );
- PrintGray->setChecked( true );
- ButtonGroup3_2Layout->addWidget( PrintGray );
-
- PrintGray2 = new QRadioButton( ButtonGroup3_2, "PrintGray2" );
- PrintGray2->setText( tr( "Print in grayscale" ) );
- ButtonGroup3_2Layout->addWidget( PrintGray2 );
- MirrorH = false;
- MirrorV = false,
- ICCinUse = false;
- AdvOptButton = new QPushButton(ButtonGroup3_2, "Adv");
- AdvOptButton->setText(tr("Advanced Options..."));
- ButtonGroup3_2Layout->addWidget( AdvOptButton );
-
- OptionenLayout->addWidget( ButtonGroup3_2, 0, 1 );
- DruckLayout->addWidget( Optionen );
-
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 24 );
- Layout2->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer );
-
- OKButton = new QPushButton( this, "OKButton" );
- OKButton->setText( tr( "OK" ) );
- OKButton->setDefault( true );
- Layout2->addWidget( OKButton );
- OKButton_2 = new QPushButton( this, "OKButton_2" );
- OKButton_2->setText( tr( "Cancel" ) );
- OKButton_2->setDefault( false );
- Layout2->addWidget( OKButton_2 );
-
- DruckLayout->addLayout( Layout2 );
- if ((PDev==tr("File")) || (PrintDest->count() == 1))
- {
- PrintDest->setCurrentItem(PrintDest->count()-1);
- DateiT->setEnabled(true);
- LineEdit1->setEnabled(true);
- ToolButton1->setEnabled(true);
- ToFile = true;
- }
- setMaximumSize(sizeHint());
-
- // signals and slots connections
- connect( OKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( OKButton_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(SelPrinter(const QString&)));
- connect( RadioButton1, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
- connect( NormalP, SIGNAL(toggled(bool)), this, SLOT(SelMode(bool)));
- connect( ToolButton1, SIGNAL(clicked()), this, SLOT(SelFile()));
- connect( OtherCom, SIGNAL(clicked()), this, SLOT(SelComm()));
- connect( AdvOptButton, SIGNAL( clicked() ), this, SLOT( SetAdvOptions() ) );
-#ifdef HAVE_CUPS
- connect( OptButton, SIGNAL( clicked() ), this, SLOT( SetOptions() ) );
-#endif
-}
-
-void Druck::SetAdvOptions()
-{
- AdvOptions* dia = new AdvOptions(this, MirrorH, MirrorV, ICCinUse);
- if (dia->exec())
- {
- MirrorH = dia->MirrorH->isChecked();
- MirrorV = dia->MirrorV->isChecked();
-#ifdef HAVE_CMS
- if (CMSuse)
- ICCinUse = dia->UseICC->isChecked();
-#endif
- }
- delete dia;
-}
-
-void Druck::SetOptions()
-{
- PrinterOpts = "";
- CupsOptions* dia = new CupsOptions(this, Geraet);
- if (dia->exec())
- {
- struct CupsOptions::OpData daten;
- QMap<QString,CupsOptions::OpData>::Iterator it;
- for (it = dia->KeyToText.begin(); it != dia->KeyToText.end(); ++it)
- {
- if (dia->KeyToDefault[it.key()] != dia->FlagsOpt.at(it.data().Cnum)->currentText())
- {
- if (it.data().KeyW == "mirror")
- PrinterOpts += " -o mirror";
- else
- {
- if (it.data().KeyW == "page-set")
- {
- PrinterOpts += " -o "+it.data().KeyW+"=";
- if (dia->FlagsOpt.at(it.data().Cnum)->currentItem() == 1)
- PrinterOpts += "even";
- else
- PrinterOpts += "odd";
- }
- else
- {
- if (it.data().KeyW == "number-up")
- {
- PrinterOpts += " -o "+it.data().KeyW+"=";
- switch (dia->FlagsOpt.at(it.data().Cnum)->currentItem())
- {
- case 1:
- PrinterOpts += "2";
- break;
- case 2:
- PrinterOpts += "4";
- break;
- case 3:
- PrinterOpts += "6";
- break;
- case 4:
- PrinterOpts += "9";
- break;
- case 5:
- PrinterOpts += "16";
- break;
- }
- }
- else
- PrinterOpts += " -o "+it.data().KeyW+"="+dia->FlagsOpt.at(it.data().Cnum)->currentText();
- }
- }
- }
- }
- }
- delete dia;
-}
-
-void Druck::SelComm()
-{
- if (OtherCom->isChecked())
- {
- OthText->setEnabled(true);
- Command->setEnabled(true);
- DateiT->setEnabled(false);
- LineEdit1->setEnabled(false);
- ToolButton1->setEnabled(false);
- PrintDest->setEnabled(false);
- ToFile = false;
-#ifdef HAVE_CUPS
- OptButton->setEnabled(false);
-#endif
- }
- else
- {
- OthText->setEnabled(false);
- Command->setEnabled(false);
- PrintDest->setEnabled(true);
- SelPrinter(PrintDest->currentText());
-#ifdef HAVE_CUPS
- if (Geraet != tr("File"))
- OptButton->setEnabled(true);
-#endif
- }
-}
-
-void Druck::SelPrinter(const QString& prn)
-{
- if (prn == tr("File"))
- {
- DateiT->setEnabled(true);
- LineEdit1->setEnabled(true);
- ToolButton1->setEnabled(true);
- ToFile = true;
-#ifdef HAVE_CUPS
- OptButton->setEnabled(false);
-#endif
- }
- else
- {
- DateiT->setEnabled(false);
- LineEdit1->setEnabled(false);
- ToolButton1->setEnabled(false);
- ToFile = false;
-#ifdef HAVE_CUPS
- OptButton->setEnabled(true);
-#endif
- }
- Geraet = prn;
-}
-
-void Druck::SelRange(bool e)
-{
- if (e)
- {
- TextLabel2_2->setEnabled( false );
- TextLabel2->setEnabled( false );
- To->setEnabled( false );
- From->setEnabled( false );
- }
- else
- {
- TextLabel2_2->setEnabled( true );
- TextLabel2->setEnabled( true );
- To->setEnabled( true );
- From->setEnabled( true );
- }
-}
-
-void Druck::SelMode(bool e)
-{
- if (e)
- {
- SepArt->setEnabled( false );
- ToSeparation = false;
- }
- else
- {
- SepArt->setEnabled( true );
- ToSeparation = true;
- }
-}
-
-void Druck::SelFile()
-{
- CustomFDialog dia(this, tr("Save as"), tr("Postscript-Files (*.ps);; All Files (*)"), false, false);
- if (LineEdit1->text() != "")
- dia.setSelection(LineEdit1->text());
- if (dia.exec() == QDialog::Accepted)
- LineEdit1->setText(dia.selectedFile());
-}
-
-void Druck::setMinMax(int min, int max)
-{
- To->setMinValue(min);
- To->setMaxValue(max);
- From->setMinValue(min);
- From->setMaxValue(max);
-}
-
-void Druck::setFromTo(int min, int max)
-{
- To->setValue(max);
- From->setValue(min);
-}
-
-QString Druck::printerName()
-{
- return Geraet;
-}
-
-QString Druck::outputFileName()
-{
- return LineEdit1->text();
-}
-
-bool Druck::outputToFile()
-{
- return ToFile;
-}
-
-int Druck::fromPage()
-{
- return From->value();
-}
-
-int Druck::toPage()
-{
- return To->value();
-}
-
-int Druck::numCopies()
-{
- return Copies->value();
-}
-
-int Druck::pageOrder()
-{
- if (FirstPfirst->isChecked())
- return 0;
- else
- return 1;
-}
-
-bool Druck::outputSeparations()
-{
- return ToSeparation;
-}
-
-QString Druck::separationName()
-{
- return SepArt->currentText();
-}
-
-bool Druck::color()
-{
- return PrintGray->isChecked();
-}
/start/Scribus/scribus/druck.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/werktoolb.cpp
===================================================================
--- start/Scribus/scribus/werktoolb.cpp (revision 427)
+++ start/Scribus/scribus/werktoolb.cpp (nonexistent)
@@ -1,284 +0,0 @@
-/***************************************************************************
- texttoolb.cpp - description
- -------------------
- begin : Sun Mar 10 2002
- copyright : (C) 2002 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include "werktoolb.h"
-#include "werktoolb.moc"
-#include "polyprops.h"
-
-extern int PolyC;
-extern int PolyFd;
-extern float PolyF;
-extern bool PolyS;
-extern float PolyR;
-extern QPixmap loadIcon(QString nam);
-
-WerkToolB::WerkToolB(QMainWindow* parent) : QToolBar(tr("Tools"), parent)
-{
- Select = new QToolButton(loadIcon("Kreuz.xpm"), tr("Select Items"), QString::null, this, SLOT(ModeFromTB()), this);
- Select->setToggleButton(true);
- Select->setOn(true);
- Rotiere = new QToolButton(loadIcon("Rotieren.xpm"), tr("Rotate Item"), QString::null, this, SLOT(ModeFromTB()), this);
- Rotiere->setToggleButton( true );
- Rotiere->setEnabled(false);
- Textedit = new QToolButton(loadIcon("Editm.xpm"),tr("Edit Contents of Frame"), QString::null, this, SLOT(ModeFromTB()), this);
- Textedit->setToggleButton( true );
- Textedit->setEnabled( FALSE );
- Zoom = new QToolButton(loadIcon("Lupe.xpm"),tr("Zooms in or out"), QString::null, this, SLOT(ModeFromTB()), this);
- Zoom->setToggleButton( true );
- Texte = new QToolButton(loadIcon("Text.xpm"),tr("Insert Textbox"), QString::null, this, SLOT(ModeFromTB()), this);
- Texte->setToggleButton( true );
- BildB = new QToolButton(loadIcon("Bild.xpm"),tr("Insert Picture"), QString::null, this, SLOT(ModeFromTB()), this);
- BildB->setToggleButton( true );
- Rechteck = new QToolButton(loadIcon("Rechtecke.xpm"),tr("Insert Rectangles"), QString::null, this, SLOT(ModeFromTB()), this);
- Rechteck->setToggleButton( true );
- Kreis = new QToolButton(loadIcon("Kreise.xpm"),tr("Insert Ovals"), QString::null, this, SLOT(ModeFromTB()), this);
- Kreis->setToggleButton( true );
- PolyM = new QPopupMenu();
- PolyM->insertItem(tr("Properties..."), this, SLOT(GetPolyProps()));
- Polygon = new QToolButton(loadIcon("spline.png"),tr("Insert Polygons"), QString::null, this, SLOT(ModeFromTB()), this);
- Polygon->setToggleButton( true );
- Polygon->setPopup(PolyM);
- Polygon->setPopupDelay(0);
- Linien = new QToolButton(loadIcon("Stift.xpm"),tr("Insert Lines"), QString::null, this, SLOT(ModeFromTB()), this);
- Linien->setToggleButton( true );
- PolyLin = new QToolButton(loadIcon("beziertool.png"),tr("Insert Bezier Curves"), QString::null, this, SLOT(ModeFromTB()), this);
- PolyLin->setToggleButton( true );
- KetteEin = new QToolButton(loadIcon("Lock.xpm"),tr("Create Textchains"), QString::null, this, SLOT(ModeFromTB()), this);
- KetteEin->setToggleButton( true );
- KetteEin->setEnabled(false);
- KetteAus = new QToolButton(loadIcon("Unlock.xpm"),tr("Break Textchains"), QString::null, this, SLOT(ModeFromTB()), this);
- KetteAus->setToggleButton( true );
- KetteAus->setEnabled(false);
- PDFM = new QPopupMenu();
- PDFM->insertItem(loadIcon("pushbutton.png"), tr("Button"));
- PDFM->insertItem(loadIcon("textview.png"), tr("Text Field"));
- PDFM->insertItem(loadIcon("checkbox.png"), tr("Check Box"));
- PDFM->insertItem(loadIcon("combobox.png"), tr("Combo Box"));
- PDFM->insertItem(loadIcon("listbox.png"), tr("List Box"));
- PDFTool = new QToolButton(loadIcon("pushbutton.png"),tr("Insert PDF-Fields"), QString::null, this, SLOT(ModeFromTB()), this);
- PDFTool->setToggleButton(true);
- PDFTool->setPopup(PDFM);
- PDFTool->setPopupDelay(0);
- PDFwerkz = 0;
- PDFA = new QPopupMenu();
- PDFA->insertItem(loadIcon("charset.png"), tr("Text"));
- PDFA->insertItem(loadIcon("goto.png"), tr("Link"));
- PDFaTool = new QToolButton(loadIcon("charset.png"),tr("Insert PDF-Annotations"), QString::null, this, SLOT(ModeFromTB()), this);
- PDFaTool->setToggleButton(true);
- PDFaTool->setPopup(PDFA);
- PDFaTool->setPopupDelay(0);
- PDFnotiz = 0;
- setCloseMode(QDockWindow::Undocked);
- connect(this, SIGNAL(placeChanged(QDockWindow::Place)), this, SLOT(Docken(QDockWindow::Place)));
- connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(Verbergen(bool)));
- connect(PDFM, SIGNAL(activated(int)), this, SLOT(setPDFtool(int)));
- connect(PDFA, SIGNAL(activated(int)), this, SLOT(setPDFnotiz(int)));
-}
-
-void WerkToolB::setPDFnotiz(int id)
-{
- int c = PDFA->indexOf(id);
- PDFnotiz = c;
- switch (c)
- {
- case 0:
- PDFaTool->setPixmap(loadIcon("charset.png"));
- break;
- case 1:
- PDFaTool->setPixmap(loadIcon("goto.png"));
- break;
- }
- Select->setOn(false);
- Rotiere->setOn(false);
- Textedit->setOn(false);
- Zoom->setOn(false);
- Texte->setOn(false);
- BildB->setOn(false);
- Rechteck->setOn(false);
- Kreis->setOn(false);
- Linien->setOn(false);
- KetteEin->setOn(false);
- KetteAus->setOn(false);
- Polygon->setOn(false);
- PolyLin->setOn(false);
- PDFTool->setOn(false);
- PDFaTool->setOn(true);
- emit NewMode(19+PDFnotiz);
-}
-
-void WerkToolB::setPDFtool(int id)
-{
- int c = PDFM->indexOf(id);
- PDFwerkz = c;
- switch (c)
- {
- case 0:
- PDFTool->setPixmap(loadIcon("pushbutton.png"));
- break;
- case 1:
- PDFTool->setPixmap(loadIcon("textview.png"));
- break;
- case 2:
- PDFTool->setPixmap(loadIcon("checkbox.png"));
- break;
- case 3:
- PDFTool->setPixmap(loadIcon("combobox.png"));
- break;
- case 4:
- PDFTool->setPixmap(loadIcon("listbox.png"));
- break;
- }
- Select->setOn(false);
- Rotiere->setOn(false);
- Textedit->setOn(false);
- Zoom->setOn(false);
- Texte->setOn(false);
- BildB->setOn(false);
- Rechteck->setOn(false);
- Kreis->setOn(false);
- Linien->setOn(false);
- KetteEin->setOn(false);
- KetteAus->setOn(false);
- Polygon->setOn(false);
- PolyLin->setOn(false);
- PDFTool->setOn(true);
- PDFaTool->setOn(false);
- emit NewMode(14+PDFwerkz);
-}
-
-void WerkToolB::Docken(QDockWindow::Place p)
-{
- if (p == InDock)
- setOrientation(Horizontal);
- else
- setOrientation(Vertical);
-}
-
-void WerkToolB::Verbergen(bool vis)
-{
- if (!vis)
- emit Schliessen();
-}
-
-void WerkToolB::GetPolyProps()
-{
- PolygonProps* dia = new PolygonProps(this);
- if (dia->exec())
- {
- PolyC = dia->Ecken->value();
- PolyF = dia->PFactor;
- PolyS = dia->Konvex->isChecked();
- PolyFd = dia->Slider1->value();
- PolyR = dia->Faktor2->value();
- }
- delete dia;
-}
-
-void WerkToolB::ModeFromTB()
-{
- Select->setOn(false);
- Rotiere->setOn(false);
- Textedit->setOn(false);
- Zoom->setOn(false);
- Texte->setOn(false);
- BildB->setOn(false);
- Rechteck->setOn(false);
- Kreis->setOn(false);
- Linien->setOn(false);
- KetteEin->setOn(false);
- KetteAus->setOn(false);
- Polygon->setOn(false);
- PolyLin->setOn(false);
- PDFTool->setOn(false);
- PDFaTool->setOn(false);
- if (Select == sender())
- {
- Select->setOn(true);
- emit NewMode(1);
- }
- if (Rotiere == sender())
- {
- Rotiere->setOn(true);
- emit NewMode(9);
- }
- if (Textedit == sender())
- {
- Textedit->setOn(true);
- emit NewMode(7);
- }
- if (Zoom == sender())
- {
- Zoom->setOn(true);
- emit NewMode(6);
- }
- if (Texte == sender())
- {
- Texte->setOn(true);
- emit NewMode(5);
- }
- if (BildB == sender())
- {
- BildB->setOn(true);
- emit NewMode(4);
- }
- if (Rechteck == sender())
- {
- Rechteck->setOn(true);
- emit NewMode(2);
- }
- if (Kreis == sender())
- {
- Kreis->setOn(true);
- emit NewMode(3);
- }
- if (Linien == sender())
- {
- Linien->setOn(true);
- emit NewMode(8);
- }
- if (KetteEin == sender())
- {
- KetteEin->setOn(true);
- emit NewMode(10);
- }
- if (KetteAus == sender())
- {
- KetteAus->setOn(true);
- emit NewMode(11);
- }
- if (Polygon == sender())
- {
- Polygon->setOn(true);
- emit NewMode(12);
- }
- if (PolyLin == sender())
- {
- PolyLin->setOn(true);
- emit NewMode(13);
- }
- if (PDFTool == sender())
- {
- PDFTool->setOn(true);
- emit NewMode(14+PDFwerkz);
- }
- if (PDFaTool == sender())
- {
- PDFaTool->setOn(true);
- emit NewMode(19+PDFnotiz);
- }
-}
-
/start/Scribus/scribus/werktoolb.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/missing.cpp
===================================================================
--- start/Scribus/scribus/missing.cpp (revision 427)
+++ start/Scribus/scribus/missing.cpp (nonexistent)
@@ -1,122 +0,0 @@
-#include "missing.h"
-#include "missing.moc"
-extern QPixmap loadIcon(QString nam);
-
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-
-static const char* const image100_data[] = {
-"48 48 4 1",
-". c None",
-"b c #000000",
-"# c #a4a1a4",
-"a c #ffffff",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"...................########.....................",
-"................###aaaaaaaa###..................",
-"..............##aaaaaaaaaaaaaa##................",
-".............#aaaaaaaaaaaaaaaaaa#...............",
-"............#aaaaaaaabbbbaaaaaaaab..............",
-"...........#aaaaaaaabbbbbbaaaaaaaab.............",
-"..........#aaaaaaaaabbbbbbaaaaaaaaab............",
-".........#aaaaaaaaaaabbbbaaaaaaaaaaab...........",
-".........#aaaaaaaaaaaaaaaaaaaaaaaaaab#..........",
-"........#aaaaaaaaaaaaaaaaaaaaaaaaaaaab#.........",
-"........#aaaaaaaaaabbbbbbbaaaaaaaaaaab#.........",
-"........#aaaaaaaaaaaabbbbbaaaaaaaaaaab##........",
-"........#aaaaaaaaaaaabbbbbaaaaaaaaaaab##........",
-"........#aaaaaaaaaaaabbbbbaaaaaaaaaaab##........",
-"........#aaaaaaaaaaaabbbbbaaaaaaaaaaab##........",
-"........#aaaaaaaaaaaabbbbbaaaaaaaaaaab##........",
-".........#aaaaaaaaaaabbbbbaaaaaaaaaab###........",
-".........#aaaaaaaaaaabbbbbaaaaaaaaaab###........",
-"..........#aaaaaaaaaabbbbbaaaaaaaaab###.........",
-"...........baaaaaaabbbbbbbbbaaaaaab####.........",
-"............baaaaaaaaaaaaaaaaaaaab####..........",
-".............baaaaaaaaaaaaaaaaaab####...........",
-"..............bbaaaaaaaaaaaaaabb####............",
-"...............#bbbaaaaaaaabbb#####.............",
-"................###bbbaaaab#######..............",
-"..................####baaab#####................",
-".....................#baaab##...................",
-".......................baab##...................",
-"........................bab##...................",
-".........................bb##...................",
-"..........................###...................",
-"...........................##...................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................",
-"................................................"};
-
-
-DmF::DmF( QWidget* parent, QString fon, SCFonts &avail )
- : QDialog( parent, "mfont", true, 0 )
-{
- QPixmap image0( ( const char** ) image100_data );
- setCaption( tr( "Missing Font" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- MissingFontLayout = new QHBoxLayout( this );
- MissingFontLayout->setSpacing( 0 );
- MissingFontLayout->setMargin( 10 );
- Layout1 = new QGridLayout;
- Layout1->setSpacing( 12 );
- Layout1->setMargin( 0 );
- TextLabel1 = new QLabel( this, "TextLabel1" );
- TextLabel1->setText(tr("The Font %1 is not installed.").arg(fon));
- Layout1->addMultiCellWidget( TextLabel1, 0, 0, 1, 2 );
- PixmapLabel1 = new QLabel( this, "PixmapLabel1" );
- PixmapLabel1->setMinimumSize( QSize( 50, 50 ) );
- PixmapLabel1->setMaximumSize( QSize( 50, 50 ) );
- PixmapLabel1->setPixmap( image0 );
- PixmapLabel1->setScaledContents( true );
- Layout1->addWidget( PixmapLabel1, 1, 0 );
- TextLabel4 = new QLabel( this, "TextLabel4" );
- TextLabel4->setText( tr( "Use" ) );
- Layout1->addWidget( TextLabel4, 1, 1 );
- Replace = new QComboBox( true, this, "Replace" );
- Replace->setMinimumSize( QSize( 175, 24 ) );
- Replace->setEditable(false);
- QStringList rlist;
- rlist.clear();
- SCFontsIterator it(avail);
- for ( ; it.current(); ++it)
- {
- if (it.current()->UseFont)
- rlist.append(it.currentKey());
- }
- rlist.sort();
- Replace->insertStringList(rlist);
- Ersatz = rlist[0];
- Layout1->addWidget( Replace, 1, 2 );
- TextLabel6 = new QLabel( this, "TextLabel6" );
- TextLabel6->setText( tr( "instead" ) );
- Layout1->addWidget( TextLabel6, 1, 3 );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "OK" ) );
- Layout1->addWidget( PushButton1, 2, 2 );
- MissingFontLayout->addLayout( Layout1 );
-
- // signals and slots connections
- connect( Replace, SIGNAL( activated(const QString&) ), this, SLOT( NeuerFont(const QString&) ) );
- connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
-}
-
-
-void DmF::NeuerFont(const QString& e)
-{
- Ersatz = e;
-}
-
/start/Scribus/scribus/missing.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/bookpalette.h
===================================================================
--- start/Scribus/scribus/bookpalette.h (revision 427)
+++ start/Scribus/scribus/bookpalette.h (nonexistent)
@@ -1,45 +0,0 @@
-/***************************************************************************
- bookpalette.h - description
- -------------------
- begin : Son Jan 19 2003
- copyright : (C) 2003 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef BOOKPALETTE_H
-#define BOOKPALETTE_H
-
-#include <qdialog.h>
-#include <qlayout.h>
-#include <bookmwin.h>
-/**
- *@author Franz Schmid
- */
-
-class BookPalette : public QDialog
-{
- Q_OBJECT
-
-public:
- BookPalette(QWidget* parent);
- ~BookPalette() {};
- void closeEvent(QCloseEvent *ce);
- BookMView *BView;
-
-signals:
- void Schliessen();
-
-protected:
- QVBoxLayout* PaletteLayout;
-};
-
-#endif
/start/Scribus/scribus/bookpalette.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/muster.cpp
===================================================================
--- start/Scribus/scribus/muster.cpp (revision 427)
+++ start/Scribus/scribus/muster.cpp (nonexistent)
@@ -1,256 +0,0 @@
-#include "muster.h"
-#include "muster.moc"
-#include "newtemp.h"
-#include <qmessagebox.h>
-
-extern QPixmap loadIcon(QString nam);
-
-MusterSeiten::MusterSeiten( QWidget* parent, ScribusDoc *doc, ScribusView *view, QString temp)
- : QDialog( parent, "Muster", false, WDestructiveClose)
-{
- setCaption( tr( "Edit Templates" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- Doc = doc;
- View = view;
- MusterSeitenLayout = new QHBoxLayout( this );
- MusterSeitenLayout->setSpacing( 6 );
- MusterSeitenLayout->setMargin( 10 );
-
- ListBox1 = new QListBox( this, "ListBox1" );
- ListBox1->setMinimumSize( QSize( 150, 240 ) );
- MusterSeitenLayout->addWidget( ListBox1 );
-
- Layout2 = new QVBoxLayout;
- Layout2->setSpacing( 6 );
- Layout2->setMargin( 0 );
-
- NewB = new QPushButton( this, "NewB" );
- NewB->setText( tr( "New" ) );
- Layout2->addWidget( NewB );
-
- DuplicateB = new QPushButton( this, "DublicateB" );
- DuplicateB->setText( tr( "Duplicate" ) );
- Layout2->addWidget( DuplicateB );
-
- DeleteB = new QPushButton( this, "DeleteB" );
- DeleteB->setText( tr( "Delete" ) );
- Layout2->addWidget( DeleteB );
-
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout2->addItem( spacer );
-
- ExitB = new QPushButton( this, "ExitB" );
- ExitB->setText( tr( "Exit" ) );
- Layout2->addWidget( ExitB );
- MusterSeitenLayout->addLayout( Layout2 );
- if (temp == "")
- {
- sMuster = "Normal";
- updateMList(sMuster);
- View->ShowTemplate(0);
- }
- else
- {
- sMuster = temp;
- updateMList(sMuster);
- View->ShowTemplate(View->MasterNames[sMuster]);
- }
- setMaximumSize(sizeHint());
-
- // signals and slots connections
- connect(ExitB, SIGNAL(clicked()), this, SLOT(ExitEditor()));
- connect(DuplicateB, SIGNAL(clicked()), this, SLOT(DuplTemp()));
- connect(DeleteB, SIGNAL(clicked()), this, SLOT(DelTemp()));
- connect(NewB, SIGNAL(clicked()), this, SLOT(NewTemp()));
- connect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selTemplate(QListBoxItem*)));
-}
-
-/*<<<<<<< muster.cpp
-void MusterSeiten::closeEvent(QCloseEvent *)
-=======
-*
- * Destroys the object and frees any allocated resources
- *
-*
-MusterSeiten::~MusterSeiten()
-{
- no need to delete child widgets, Qt does it all for us
-}*/
-
-void MusterSeiten::closeEvent(QCloseEvent *ce)
- //>>>>>>> 1.3
-{
-// View->HideTemplate();
- emit Fertig();
- ce->accept();
-}
-
-void MusterSeiten::ExitEditor()
-{
- close();
-}
-
-void MusterSeiten::DelTemp()
-{
- if (sMuster == "Normal")
- return;
- int exit=QMessageBox::warning(this,
- tr("Warning"),
- tr("Do you really want do delete this Template?"),
- tr("No"),
- tr("Yes"),
- 0, 0, 1);
- if (exit == 1)
- {
- Doc->PageC = View->Pages.count();
- View->delPage(View->MasterNames[sMuster]);
- View->reformPages();
- View->MasterNames.clear();
- for (uint a=0; a<View->Pages.count(); ++a)
- {
- View->MasterNames[View->Pages.at(a)->PageNam] = View->Pages.at(a)->PageNr;
- }
- for (uint b=0; b<View->DocPages.count(); ++b)
- {
- if (View->DocPages.at(b)->MPageNam == sMuster)
- View->DocPages.at(b)->MPageNam = "Normal";
- }
- Doc->PageC = 1;
- sMuster = "Normal";
- updateMList(sMuster);
- }
-}
-
-void MusterSeiten::DuplTemp()
-{
- QString nam;
- int nr;
- bool atf;
- struct CLBuf Buffer;
- NewTm *dia = new NewTm(this, "Name:", "New Template", Doc);
- dia->Answer->setText(tr("Copy of ")+sMuster);
- dia->Answer->selectAll();
- if (dia->exec())
- {
- nam = dia->Answer->text();
- while (View->MasterNames.contains(nam) || (nam == "Normal"))
- {
- if (!dia->exec())
- {
- delete dia;
- return;
- }
- nam = dia->Answer->text();
- }
- nr = View->Pages.count();
- View->MasterNames.insert(nam, nr);
- for (uint a=0; a<View->Pages.count(); ++a)
- {
- View->Pages.at(a)->parentWidget()->hide();
- }
- Doc->PageC = 0;
- atf = Doc->PageAT;
- Doc->PageAT = false;
- emit CreateNew(nr);
- if (Doc->PageFP)
- {
- View->Pages.at(nr)->LeftPg = dia->Links->currentItem() == 0 ? true : false;
- }
- int inde = View->MasterNames[sMuster];
- for (uint a=0; a<View->Pages.at(inde)->Items.count(); ++a)
- {
- View->Pages.at(inde)->Items.at(a)->CopyIt(&Buffer);
- Doc->ActPage->PasteItem(&Buffer, true);
- }
- Doc->ActPage->Deselect(true);
- View->DrawNew();
- View->Pages.at(nr)->PageNam = nam;
- View->Pages.at(nr)->MPageNam = "";
- updateMList(nam);
- Doc->PageAT = atf;
- }
- delete dia;
-}
-
-void MusterSeiten::NewTemp()
-{
- QString nam;
- int nr;
- bool atf;
- NewTm *dia = new NewTm(this, "Name:", "New Template", Doc);
- dia->Answer->setText(tr("New Template"));
- dia->Answer->selectAll();
- if (dia->exec())
- {
- nam = dia->Answer->text();
- while (View->MasterNames.contains(nam) || (nam == "Normal"))
- {
- if (!dia->exec())
- {
- delete dia;
- return;
- }
- nam = dia->Answer->text();
- }
- nr = View->Pages.count();
- View->MasterNames.insert(nam, nr);
- for (uint a=0; a<View->Pages.count(); ++a)
- {
- View->Pages.at(a)->parentWidget()->hide();
- }
- Doc->PageC = 0;
- atf = Doc->PageAT;
- Doc->PageAT = false;
- emit CreateNew(nr);
- if (Doc->PageFP)
- {
- View->Pages.at(nr)->LeftPg = dia->Links->currentItem() == 0 ? true : false;
- }
- View->Pages.at(nr)->PageNam = nam;
- View->Pages.at(nr)->MPageNam = "";
- updateMList(nam);
- Doc->PageAT = atf;
- }
- delete dia;
-}
-
-void MusterSeiten::selTemplate(QListBoxItem *c)
-{
- sMuster = c->text();
- if (View->MasterNames.count() == 1)
- DeleteB->setEnabled(false);
- else
- DeleteB->setEnabled(true);
- if (sMuster == tr("Normal"))
- {
- sMuster = "Normal";
- DeleteB->setEnabled(false);
- }
- else
- DeleteB->setEnabled(true);
- View->ShowTemplate(View->MasterNames[sMuster]);
-}
-
-void MusterSeiten::updateMList(QString nam)
-{
- ListBox1->clear();
- QMap<QString,int>::Iterator it;
- for (it = View->MasterNames.begin(); it != View->MasterNames.end(); ++it)
- {
- if (it.key() == "Normal")
- ListBox1->insertItem(tr("Normal"));
- else
- ListBox1->insertItem(it.key());
- }
- if (View->MasterNames.count() == 1)
- DeleteB->setEnabled(false);
- else
- DeleteB->setEnabled(true);
- if (nam == "Normal")
- {
- nam = tr("Normal");
- DeleteB->setEnabled(false);
- }
- ListBox1->setSelected(ListBox1->index(ListBox1->findItem(nam)), true);
-}
-
/start/Scribus/scribus/muster.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/libabout/about.cpp
===================================================================
--- start/Scribus/scribus/libabout/about.cpp (revision 427)
+++ start/Scribus/scribus/libabout/about.cpp (nonexistent)
@@ -1,156 +0,0 @@
-#include "about.h"
-#include "about.moc"
-#include <qpixmap.h>
-#include "config.h"
-
-extern QPixmap loadIcon(QString nam);
-
-extern "C" void* Run(QWidget *d);
-
-void* Run(QWidget *d)
-{
- About *dia = new About(d);
- return dia;
-}
-
-About::About( QWidget* parent )
- : QDialog( parent, "About", true, 0 )
-{
- setCaption( tr( "About Scribus")+" "+VERSION );
- setIcon(loadIcon("AppIcon.xpm"));
- AboutLayout = new QVBoxLayout( this );
- AboutLayout->setSpacing( 6 );
- AboutLayout->setMargin( 10 );
- TabWidget2 = new QTabWidget( this, "TabWidget2" );
- TabWidget2->setMinimumSize( QSize( 438, 258 ) );
- tab = new QWidget( TabWidget2, "tab" );
- tabLayout1 = new QVBoxLayout( tab );
- tabLayout1->setSpacing( 6 );
- tabLayout1->setMargin( 10 );
- PixmapLabel1 = new QLabel( tab, "PixmapLabel1" );
- PixmapLabel1->setPixmap(loadIcon("scribus_logo.jpg"));
- tabLayout1->addWidget( PixmapLabel1 );
- BuildID = new QLabel( tab, "BB" );
- BuildID->setAlignment(Qt::AlignCenter);
- QString bu;
- bu.sprintf("%s %s ", __TIME__, __DATE__);
-#ifdef HAVE_FREETYPE
- bu += "F";
-#else
- bu += "*";
-#endif
- bu += "-";
-#ifdef HAVE_CMS
- bu += "C";
-#else
- bu += "*";
-#endif
- bu += "-";
-#ifdef HAVE_CUPS
- bu += "C";
-#else
- bu += "*";
-#endif
- bu += "-";
-#ifdef HAVE_TIFF
- bu += "T";
-#else
- bu += "*";
-#endif
-
- BuildID->setText("Scribus Version "+QString(VERSION)+"\nBuild-ID: "+bu);
- tabLayout1->addWidget( BuildID );
- TabWidget2->insertTab( tab, tr( "About" ) );
- tab_2 = new QWidget( TabWidget2, "tab_2" );
- tabLayout = new QHBoxLayout( tab_2 );
- tabLayout->setSpacing( 6 );
- tabLayout->setMargin( 10 );
- TextView1 = new QTextView( tab_2, "TextView1" );
- TextView1->setText( "<table><tr><td><b>" + tr("Programming:") + "</b></td><td> </td></tr>" +
- "<tr><td>Franz Schmid</td><td>Franz.Schmid@altmuehlnet.de</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Contributions from:") + "</b></td><td></td></tr>" +
- "<tr><td>Christian Töpp</td><td>mr-ct@gmx.de</td></tr>" +
- "<tr><td>Alastair Robinson</td><td>blackfive@fakenhamweb.co.uk</td></tr>" +
- "<tr><td>Paul Johnson</td><td>paulf.johnson@ukonline.co.uk</td></tr>" +
- "<tr><td></td><td> </td></tr>" +
- "<tr><td><b>" + tr("Documentation:") + "</b></td><td></td></tr>" +
- "<tr><td>Peter Linnell</td><td>scribusdocs@atlantictechsolutions.com</td></tr>" +
- "<tr><td>Yves Ceccone</td><td>yves@yeccoe.org</td></tr>" +
- "<tr><td>Thomas Zastrow</td><td>webmaster@thomas-zastrow.de</td></tr></table>");
- TextView1->setTextFormat( QTextView::RichText );
- tabLayout->addWidget( TextView1 );
- TabWidget2->insertTab( tab_2, tr( "Authors" ) );
- tab_3 = new QWidget( TabWidget2, "tab_3" );
- tabLayout_2 = new QHBoxLayout( tab_3 );
- tabLayout_2->setSpacing( 6 );
- tabLayout_2->setMargin( 10 );
- TextView2 = new QTextView( tab_3, "TextView1_2" );
- TextView2->setText( "<table><tr><td><b>" + tr("German:") + "</b></td><td> </td></tr>" +
- "<tr><td>Franz Schmid</td><td>Franz.Schmid@altmuehlnet.de</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("French:") + "</b></td><td> </td>" +
- "<tr><td>Michel Briand</td><td>michelbriand@free.fr</td></tr>" +
- "<tr><td>Yves Ceccone</td><td>yves@yeccoe.org</td></tr>" +
- "<tr><td>Nicolas Boos</td><td>nicolas.boos@wanadoo.fr</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Spanish and Catalan:") + "</b></td><td> </td></tr>" +
- "<tr><td>Josep Febrer</td><td>josep@linuxmail.org</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Hungarian and Italian:") + "</b></td><td> </td></tr>" +
- "<tr><td>Giovanni Biczó</td><td>gbiczo@freestart.hu</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Ukrainian:") + "</b></td><td> </td></tr>" +
- "<tr><td>Sergiy Kudryk</td><td>kudryk@yahoo.com</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Bulgarian:") + "</b></td><td> </td></tr>" +
- "<tr><td>Vasko Tomanov</td><td>vasko@web.bg</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Galician:") + "</b></td><td> </td></tr>" +
- "<tr><td>Manuel Anxo Rei</td><td>manxopar@avogaciagalega.org</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Turkish:") + "</b></td><td> </td></tr>" +
- "<tr><td>Erkan Kaplan</td><td>Selamsana@uni.de</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Lithuanian:") + "</b></td><td> </td></tr>" +
- "<tr><td>Aivaras Kirejevas</td><td>kiras@mail.lt</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Polish:") + "</b></td><td> </td></tr>" +
- "<tr><td>Maciej Hañski</td><td>m.hanski@gmx.at</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Slovak:") + "</b></td><td></td></tr>" +
- "<tr><td>Zdenko Podobný</td><td>zdpo@mailbox.sk</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("Danish:") + "</b></td><td></td></tr>" +
- "<tr><td>Morten Langlo</td><td>mlanglo@post6.tele.dk</td></tr>" +
- "<tr><td> </td><td> </td></tr>" +
- "<tr><td><b>" + tr("English:") + "</b></td><td></td></tr>" +
- "<tr><td>Paul F. Johnson</td><td>paulf.johnson@ukonline.co.uk</td></tr></table>");
- TextView2->setTextFormat( QTextView::RichText );
- tabLayout_2->addWidget( TextView2 );
- TabWidget2->insertTab( tab_3, tr( "Translations" ) );
- AboutLayout->addWidget( TabWidget2 );
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 6 );
- Layout2->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "Close" ) );
- PushButton1->setDefault( true );
- Layout2->addWidget( PushButton1 );
- AboutLayout->addLayout( Layout2 );
- setMaximumSize(sizeHint());
-
- // signals and slots connections
- connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
-}
-
-/*
- * Destroys the object and frees any allocated resources
- */
-About::~About()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
/start/Scribus/scribus/libabout/about.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/libabout/about.h
===================================================================
--- start/Scribus/scribus/libabout/about.h (revision 427)
+++ start/Scribus/scribus/libabout/about.h (nonexistent)
@@ -1,39 +0,0 @@
-#ifndef ABOUT_H
-#define ABOUT_H
-
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qtextview.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-
-class About : public QDialog
-{
- Q_OBJECT
-
-public:
- About( QWidget* parent );
- ~About();
-
- QLabel* PixmapLabel1;
- QLabel* BuildID;
- QPushButton* PushButton1;
- QTabWidget* TabWidget2;
- QWidget* tab;
- QWidget* tab_2;
- QWidget* tab_3;
- QTextView* TextView1;
- QTextView* TextView2;
-
-protected:
- QVBoxLayout* AboutLayout;
- QHBoxLayout* tabLayout;
- QVBoxLayout* tabLayout1;
- QHBoxLayout* tabLayout_2;
- QHBoxLayout* Layout2;
-
-};
-
-#endif // ABOUT_H
/start/Scribus/scribus/libabout/about.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/libabout/Makefile.am
===================================================================
--- start/Scribus/scribus/libabout/Makefile.am (revision 427)
+++ start/Scribus/scribus/libabout/Makefile.am (nonexistent)
@@ -1,15 +0,0 @@
-libdir = $(prefix)/lib/scribus/libs
-lib_LTLIBRARIES = libabout.la
-
-INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes)
-
-libabout_la_LDFLAGS = -version-info 0:0:0
-
-libabout_la_METASOURCES = AUTO
-
-libabout_la_SOURCES = about.cpp
-KDE_OPTIONS = qtonly
-
-EXTRA_DIST = about.cpp about.h
-
-AM_LDFLAGS = -s $(LIBFREETYPE_LIBS)
/start/Scribus/scribus/libabout/Makefile.am
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/iso8859-5ps.enc
===================================================================
--- start/Scribus/scribus/iso8859-5ps.enc (revision 427)
+++ start/Scribus/scribus/iso8859-5ps.enc (nonexistent)
@@ -1,96 +0,0 @@
-16#A0 /space
-16#A1 /afii10023
-16#A2 /afii10051
-16#A3 /afii10052
-16#A4 /afii10053
-16#A5 /afii10054
-16#A6 /afii10055
-16#A7 /afii10056
-16#A8 /afii10057
-16#A9 /afii10058
-16#AA /afii10059
-16#AB /afii10060
-16#AC /afii10061
-16#AD /hyphen
-16#AE /afii10062
-16#AF /afii10145
-16#B0 /afii10017
-16#B1 /afii10018
-16#B2 /afii10019
-16#B3 /afii10020
-16#B4 /afii10021
-16#B5 /afii10022
-16#B6 /afii10024
-16#B7 /afii10025
-16#B8 /afii10026
-16#B9 /afii10027
-16#BA /afii10028
-16#BB /afii10029
-16#BC /afii10030
-16#BD /afii10031
-16#BE /afii10032
-16#BF /afii10033
-16#C0 /afii10034
-16#C1 /afii10035
-16#C2 /afii10036
-16#C3 /afii10037
-16#C4 /afii10038
-16#C5 /afii10039
-16#C6 /afii10040
-16#C7 /afii10041
-16#C8 /afii10042
-16#C9 /afii10043
-16#CA /afii10044
-16#CB /afii10045
-16#CC /afii10046
-16#CD /afii10047
-16#CE /afii10048
-16#CF /afii10049
-16#D0 /afii10065
-16#D1 /afii10066
-16#D2 /afii10067
-16#D3 /afii10068
-16#D4 /afii10069
-16#D5 /afii10070
-16#D6 /afii10072
-16#D7 /afii10073
-16#D8 /afii10074
-16#D9 /afii10075
-16#DA /afii10076
-16#DB /afii10077
-16#DC /afii10078
-16#DD /afii10079
-16#DE /afii10080
-16#DF /afii10081
-16#E0 /afii10082
-16#E1 /afii10083
-16#E2 /afii10084
-16#E3 /afii10085
-16#E4 /afii10086
-16#E5 /afii10087
-16#E6 /afii10088
-16#E7 /afii10089
-16#E8 /afii10090
-16#E9 /afii10091
-16#EA /afii10092
-16#EB /afii10093
-16#EC /afii10094
-16#ED /afii10095
-16#EE /afii10096
-16#EF /afii10097
-16#F0 /afii61352
-16#F1 /afii10071
-16#F2 /afii10099
-16#F3 /afii10100
-16#F4 /afii10101
-16#F5 /afii10102
-16#F6 /afii10103
-16#F7 /afii10104
-16#F8 /afii10105
-16#F9 /afii10106
-16#FA /afii10107
-16#FB /afii10108
-16#FC /afii10109
-16#FD /yacute
-16#FE /afii10110
-16#FF /afii10193
/start/Scribus/scribus/iso8859-5ps.enc
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/libpostscript/Makefile.am
===================================================================
--- start/Scribus/scribus/libpostscript/Makefile.am (revision 427)
+++ start/Scribus/scribus/libpostscript/Makefile.am (nonexistent)
@@ -1,23 +0,0 @@
-libdir = $(prefix)/lib/scribus/libs
-AM_CPPFLAGS = -I$(top_builddir)/scribus
-lib_LTLIBRARIES = libpostscript.la
-
-INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes)
-
-libpostscript_la_LDFLAGS = -version-info 0:0:0
-
-libpostscript_la_METASOURCES = AUTO
-
-libpostscript_la_SOURCES = pslib.cpp
-KDE_OPTIONS = qtonly
-
-EXTRA_DIST = pslib.cpp pslib.h
-
-install-data-local:
- $(mkinstalldirs) $(prefix)/include/scribus/libpostscript/
- $(INSTALL_DATA) $(srcdir)/pslib.h $(prefix)/include/scribus/libpostscript/pslib.h
-
-uninstall-local:
- -rm -f $(prefix)/include/scribus/libpostscript/pslib.h
-
-AM_LDFLAGS = -s $(LIBFREETYPE_LIBS)
/start/Scribus/scribus/libpostscript/Makefile.am
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/libpostscript/pslib.cpp
===================================================================
--- start/Scribus/scribus/libpostscript/pslib.cpp (revision 427)
+++ start/Scribus/scribus/libpostscript/pslib.cpp (nonexistent)
@@ -1,1238 +0,0 @@
-/***************************************************************************
- pslib.cpp - description
- -------------------
- begin : Sat May 26 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qimage.h>
-#include <qcolor.h>
-#include <qcstring.h>
-#include <qfontinfo.h>
-#include <cstdlib>
-#include <qregexp.h>
-#include "config.h"
-#include "pslib.h"
-#include "scfonts.h"
-#include <cmath>
-
-extern bool loadText(QString nam, QString *Buffer);
-extern QImage LoadPict(QString fn);
-extern QString CompressStr(QString *in);
-extern QString ImageToCMYK_PS(QImage *im, int pl, bool pre);
-extern QString MaskToTxt(QImage *im, bool PDF = true);
-extern char *toHex( uchar u );
-extern QString String2Hex(QString *in, bool lang = true);
-#ifdef HAVE_CMS
-extern bool CMSuse;
-extern QImage LoadPictCol(QString fn, QString Prof, bool UseEmbedded, bool *realCMYK);
-#endif
-
-extern "C" void* Run(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf);
-
-void* Run(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
-{
- PSLib *dia = new PSLib(psart, AllFonts, DocFonts, DocColors, pdf);
- return dia;
-}
-
-PSLib::PSLib(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
-{
- QString tmp, tmp2, tmp3, tmp4, CHset;
- QStringList wt;
- int IsoInUse = 0;
- QString Epfad = PREL;
- Seiten = 0;
- User = "";
- Creator = "PSlib-0.3";
- Titel = "";
- FillColor = "0.0 0.0 0.0 0.0";
- StrokeColor = "0.0 0.0 0.0 0.0";
- if (psart)
- {
- Header = "%!PS-Adobe-3.0\n";
- }
- else
- {
- Header = "%!PS-Adobe-3.0 EPSF-3.0\n";
- }
- BBox = "";
- BBoxH = "";
- Art = psart;
- isPDF = pdf;
- UsedFonts.clear();
- Fonts = "";
- FontDesc = "";
- GraySc = false;
- DoSep = false;
-#ifdef HAVE_LIBZ
- CompAvail = true;
-#else
- CompAvail = false;
-#endif
- GrayCalc = "/setcmykcolor {exch 0.11 mul add exch 0.59 mul add exch 0.3 mul add\n";
- GrayCalc += " dup 1 gt {pop 1} if 1 exch sub oldsetgray} bind def\n";
- GrayCalc += "/setrgbcolor {0.11 mul exch 0.59 mul add exch 0.3 mul add\n";
- GrayCalc += " oldsetgray} bind def\n";
- Farben = "%%CMYKCustomColor: ";
- FNamen = "%%DocumentCustomColors: ";
- CListe::Iterator itf;
- int c, m, y, k;
- bool erst = true;
- for (itf = DocColors.begin(); itf != DocColors.end(); ++itf)
- {
- if ((itf.key() != "Cyan") && (itf.key() != "Magenta") && (itf.key() != "Yellow") && (itf.key() != "Black"))
- {
- DocColors[itf.key()].getCMYK(&c, &m, &y, &k);
- if (!erst)
- {
- Farben += "%%+ ";
- FNamen += "%%+ ";
- }
- Farben += ToStr(float(c) / 255) + " " + ToStr(float(m) / 255) + " ";
- Farben += ToStr(float(y) / 255) + " " + ToStr(float(k) / 255) + " (" + itf.key() + ")\n";
- FNamen += "(" + itf.key() + ")\n";
- erst = false;
- }
- }
- QMap<QString,QFont>::Iterator it;
- int a = 0;
- for (it = DocFonts.begin(); it != DocFonts.end(); ++it)
- {
- UsedFonts.insert(it.key(), "/Fo"+IToStr(a));
- CHset = AllFonts[it.key()]->FontEnc;
- if ((CHset == "iso8859-1") || (CHset == "ascii-0") || (CHset == "iso8859-15"))
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" cf ef\n";
- if (CHset == "iso8859-2")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso2f ef\n";
- IsoInUse = 2;
- }
- if (CHset == "iso8859-3")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso3f ef\n";
- IsoInUse = 3;
- }
- if (CHset == "iso8859-4")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso4f ef\n";
- IsoInUse = 4;
- }
- if (CHset == "iso8859-5")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso5f ef\n";
- IsoInUse = 5;
- }
- if (CHset == "iso8859-7")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso7f ef\n";
- IsoInUse = 7;
- }
- if (CHset == "iso8859-9")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso9f ef\n";
- IsoInUse = 9;
- }
- if (CHset == "iso8859-10")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso10f ef\n";
- IsoInUse = 10;
- }
- if (CHset == "iso8859-13")
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" iso13f ef\n";
- IsoInUse = 13;
- }
- if (CHset.startsWith("koi8"))
- {
- Fonts += "/"+AllFonts[it.key()]->RealName()+" /Fo"+IToStr(a)+" koi8f ef\n";
- IsoInUse = 99;
- }
- if (CHset == "adobe-fontspecific")
- Fonts += "/Fo"+IToStr(a)+" /"+AllFonts[it.key()]->RealName()+" findfont definefont pop\n";
- if (AllFonts[it.key()]->EmbedPS)
- {
- QString tmp;
- if(AllFonts[it.key()]->EmbedFont(tmp))
- {
- GListe gl;
- AllFonts[it.key()]->GlNames(&gl);
- GlyphsOfFont.insert(it.key(), gl);
- FontDesc += "%%BeginFont: " + AllFonts[it.key()]->RealName() + "\n";
- FontDesc += tmp + "\n%%EndFont\n";
- }
- }
- a++;
- }
- Prolog = "%%BeginProlog\n";
- Prolog += "/Scribusdict 100 dict def\n";
- Prolog += "Scribusdict begin\n";
- Prolog += "/sp {showpage} bind def\n";
- Prolog += "/oldsetgray /setgray load def\n";
- Prolog += "/cmyk {setcmykcolor} def\n";
- Prolog += "/m {moveto} bind def\n";
- Prolog += "/li {lineto} bind def\n";
- Prolog += "/cl {closepath} bind def\n";
- Prolog += "/gs {gsave} bind def\n";
- Prolog += "/gr {grestore} bind def\n";
- Prolog += "/tr {translate} bind def\n";
- Prolog += "/ro {rotate} bind def\n";
- Prolog += "/sh {show} bind def\n";
- Prolog += "/ftt {currentfont /FontType get 42 eq { 1000 } { 1 } ifelse div} bind def\n";
- Prolog += "/shg {setcmykcolor moveto glyphshow} def\n";
- Prolog += "/shm {setcmykcolor moveto\n";
- Prolog += " dup (\\55) eq\n";
- Prolog += " {pop /hyphen glyphshow}\n";
- Prolog += " {show}\n";
- Prolog += " ifelse} def\n";
- Prolog += "/sc {scale} bind def\n";
- Prolog += "/se {selectfont} bind def\n";
- Prolog += "/sf {setfont} bind def\n";
- Prolog += "/sw {setlinewidth} bind def\n";
- Prolog += "/srt {2 setlinecap currentfont dup /FontMatrix get\n";
- Prolog += " exch /FontInfo get dup /UnderlinePosition get ftt exch\n";
- Prolog += " /UnderlineThickness get ftt 3 -1 roll dtransform\n";
- Prolog += " setlinewidth 0 exch rmoveto stringwidth rlineto stroke} bind def\n";
- Prolog += "/srd {2 setlinecap currentfont dup /FontMatrix get\n";
- Prolog += " exch /FontInfo get dup /UnderlinePosition get ftt exch\n";
- Prolog += " /UnderlineThickness get ftt 3 -1 roll dtransform\n";
- Prolog += " setlinewidth pop stringwidth rlineto stroke} bind def\n";
- Prolog += "/f {findfont} bind def\n";
- Prolog += "/mf {makefont} bind def\n";
- Prolog += "/ss {scalefont setfont} bind def\n";
- Prolog += "/ci {newpath 0 0 1 0 360 arc} bind def\n";
- Prolog += "/fi {fill} bind def\n";
- Prolog += "/st {stroke} bind def\n";
- QString isoenc;
- if (IsoInUse != 0)
- {
- switch (IsoInUse)
- {
- case 2:
- Prolog += "/iso2f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-2ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 3:
- Prolog += "/iso3f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-3ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 4:
- Prolog += "/iso4f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-4ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 5:
- Prolog += "/iso5f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-5ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 7:
- Prolog += "/iso7f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-7ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 9:
- Prolog += "/iso9f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-9ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 10:
- Prolog += "/iso10f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-10ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 13:
- Prolog += "/iso13f [\n";
- loadText(Epfad+"/lib/scribus/iso8859-13ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- case 99:
- Prolog += "/koi8f [\n";
- loadText(Epfad+"/lib/scribus/koi8ps.enc", &isoenc);
- Prolog += isoenc;
- Prolog += "] def\n";
- break;
- }
- }
- Prolog += "/cf [\n";
- Prolog += " 16#2d /hyphen\n";
- Prolog += " 16#80 /Euro\n";
- Prolog += " 16#82 /quotesinglbase\n";
- Prolog += " 16#83 /florin\n";
- Prolog += " 16#84 /quotedblbase\n";
- Prolog += " 16#85 /ellipsis\n";
- Prolog += " 16#86 /dagger\n";
- Prolog += " 16#87 /daggerdbl\n";
- Prolog += " 16#88 /circumflex\n";
- Prolog += " 16#89 /perthousand\n";
- Prolog += " 16#8a /Scaron\n";
- Prolog += " 16#8b /guilsinglleft\n";
- Prolog += " 16#8c /OE\n";
- Prolog += " 16#8e /zcaron\n";
- Prolog += " 16#91 /quoteleft\n";
- Prolog += " 16#92 /quoteright\n";
- Prolog += " 16#93 /quotedblleft\n";
- Prolog += " 16#94 /quotedblright\n";
- Prolog += " 16#95 /bullet\n";
- Prolog += " 16#96 /endash\n";
- Prolog += " 16#97 /emdash\n";
- Prolog += " 16#98 /tilde\n";
- Prolog += " 16#99 /trademark\n";
- Prolog += " 16#9a /scaron\n";
- Prolog += " 16#9b /guilsinglright\n";
- Prolog += " 16#9c /oe\n";
- Prolog += " 16#9e /zcaron\n";
- Prolog += " 16#9f /Ydieresis\n";
- Prolog += "] def\n";
- Prolog += "/ski /ISOLatin1Encoding where{pop true}{false}ifelse def\n";
- Prolog += "/reencodesmalldict 12 dict def\n";
- Prolog += "/ef {\n";
- Prolog += " reencodesmalldict begin\n";
- Prolog += " /newcodesandnames exch def\n";
- Prolog += " /newfontname exch def\n";
- Prolog += " /basefontname exch def\n";
- Prolog += " /basefontdict basefontname findfont def\n";
- Prolog += " /newfont basefontdict maxlength dict def\n";
- Prolog += " basefontdict\n";
- Prolog += " {\n";
- Prolog += " exch dup /FID ne\n";
- Prolog += " {\n";
- Prolog += " dup /Encoding eq\n";
- Prolog += " {\n";
- Prolog += " ski\n";
- Prolog += " {\n";
- Prolog += " exch pop\n";
- Prolog += " ISOLatin1Encoding dup length array copy\n";
- Prolog += " }{\n";
- Prolog += " exch dup length array copy\n";
- Prolog += " }\n";
- Prolog += " ifelse\n";
- Prolog += " newfont 3 1 roll put\n";
- Prolog += " }{\n";
- Prolog += " exch newfont 3 1 roll put\n";
- Prolog += " }\n";
- Prolog += " ifelse\n";
- Prolog += " }{\n";
- Prolog += " pop pop\n";
- Prolog += " }\n";
- Prolog += " ifelse\n";
- Prolog += " } forall\n";
- Prolog += " newfont /FontName newfontname put\n";
- Prolog += " newcodesandnames aload pop\n";
- Prolog += " newcodesandnames length 2 idiv\n";
- Prolog += " {\n";
- Prolog += " newfont /Encoding get 3 1 roll put\n";
- Prolog += " } repeat\n";
- Prolog += " newfontname newfont definefont pop\n";
- Prolog += " end\n";
- Prolog += " } def\n";
- Prolog += "/bEPS {\n";
- Prolog += " /b4_Inc_state save def\n";
- Prolog += " /dict_count countdictstack def\n";
- Prolog += " /op_count count 1 sub def\n";
- Prolog += " userdict begin\n";
- Prolog += " /showpage { } def\n";
- Prolog += " 0 setgray 0 setlinecap\n";
- Prolog += " 1 setlinewidth 0 setlinejoin\n";
- Prolog += " 10 setmiterlimit [ ] 0 setdash newpath\n";
- Prolog += " /languagelevel where\n";
- Prolog += " {pop languagelevel\n";
- Prolog += " 1 ne\n";
- Prolog += " {false setstrokeadjust false setoverprint\n";
- Prolog += " } if } if } bind def\n";
- Prolog += "/eEPS { count op_count sub {pop} repeat\n";
- Prolog += " countdictstack dict_count sub {end} repeat\n";
- Prolog += " b4_Inc_state restore } bind def\n";
- Prolog += " end\n";
- Prolog += "%%EndProlog\n";
-}
-PSLib::~PSLib()
-{
-}
-
-void PSLib::PutSeite(QString c)
-{
- QTextStream t(&Spool);
- t.writeRawBytes(c, c.length());
-}
-
-void PSLib::PutDoc(QString c)
-{
- QTextStream t(&Spool);
- t.writeRawBytes(c, c.length());
-}
-
-QString PSLib::ToStr(float c)
-{
- QString cc;
- return cc.setNum(c);
-}
-
-QString PSLib::IToStr(int c)
-{
- QString cc;
- return cc.setNum(c);
-}
-
-void PSLib::PS_set_Info(QString art, QString was)
-{
- if (art == "Author")
- User = was;
- if (art == "Creator")
- Creator = was;
- if (art == "Title")
- Titel = was;
-}
-
-bool PSLib::PS_set_file(QString fn)
-{
- Spool.setName(fn);
- return Spool.open(IO_WriteOnly);
-}
-
-void PSLib::PS_begin_doc(int Ori, float breite, float hoehe, int numpage)
-{
- PutDoc(Header);
- PutDoc("%%For: " + User + "\n");
- PutDoc("%%Title: " + Titel + "\n");
- PutDoc("%%Creator: " + Creator + "\n");
- PutDoc("%%Pages: " + IToStr(numpage) + "\n");
- BBox = "%%BoundingBox: 0 0 " + IToStr(qRound(breite)) + " " + IToStr(qRound(hoehe)) + "\n";
- BBoxH = "%%HiResBoundingBox: 0 0 " + ToStr(breite) + " " + ToStr(hoehe) + "\n";
- if (!Art)
- {
- PutDoc(BBox);
- PutDoc(BBoxH);
- }
- PutDoc(FNamen);
- PutDoc(Farben);
- PutDoc("%%LanguageLevel: 3\n");
- PutDoc("%%EndComments\n");
- PutDoc(Prolog);
- PutDoc("%%BeginSetup\n");
- PutDoc("/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse\n");
- if (FontDesc != "")
- {
- PutDoc(FontDesc);
- }
- PutDoc("Scribusdict begin\n");
- PutDoc(Fonts);
- if (GraySc)
- PutDoc(GrayCalc);
- PutDoc("%%EndSetup\n");
- if ((Art) && (Ori != 0))
- {
- PutSeite("<< /PageSize [ "+ToStr(breite)+" "+ToStr(hoehe)+" ]\n");
-// if (Ori != 0)
- PutSeite("/Orientation 3\n");
- PutSeite(">> setpagedevice\n");
- }
- Prolog = "";
- FontDesc = "";
-}
-
-QString PSLib::PSEncode(QString in)
-{
- QString tmp = "";
- QString cc;
- for (uint d = 0; d < in.length(); ++d)
- {
- cc = in.at(d);
- if ((cc == "(") || (cc == ")") || (cc == "\\"))
- tmp += "\\";
- tmp += cc;
- }
- tmp = tmp.simplifyWhiteSpace().replace( QRegExp("\\s"), "" );
- return tmp;
-}
-
-void PSLib::PS_TemplateStart(QString Name, float breite, float hoehe)
-{
- PutDoc("/"+PSEncode(Name)+"\n<<\n");
- PutDoc("/FormType 1\n");
- PutDoc("/BBox [0 0 "+ToStr(breite)+" "+ToStr(hoehe)+"]\n");
- PutDoc("/Matrix [1 0 0 1 0 0]\n");
- PutDoc("/PaintProc\n{\n");
-}
-
-void PSLib::PS_UseTemplate(QString Name)
-{
- PutDoc(PSEncode(Name)+" execform\n");
-}
-
-void PSLib::PS_TemplateEnd()
-{
- PutDoc("pop } bind\n");
- PutDoc(">> def\n");
-}
-
-void PSLib::PS_begin_page(float breite, float hoehe, struct Margs* Ma)
-{
- PDev = ToStr(Ma->Left) + " " + ToStr(Ma->Bottom) + " m\n";
- PDev += ToStr(breite - Ma->Right) + " " + ToStr(Ma->Bottom) + " li\n";
- PDev += ToStr(breite - Ma->Right) + " " + ToStr(hoehe - Ma->Top) + " li\n";
- PDev += ToStr(Ma->Left) + " " + ToStr(hoehe - Ma->Top) + " li cl clip newpath\n";
- Seiten++;
- PutSeite("%%Page: " + IToStr(Seiten) + " " + IToStr(Seiten) + "\nsave\n" + PDev);
- PutSeite("/DeviceCMYK setcolorspace\n");
-}
-
-void PSLib::PS_end_page()
-{
- PutSeite("%%PageTrailer\nrestore\nsp\n");
-}
-
-void PSLib::PS_rect(float x, float y, float b, float h)
-{
- PutSeite(ToStr(x) + " " + ToStr(y) + " m\n");
- PutSeite(ToStr(x) + " " + ToStr(y+h) + " li\n");
- PutSeite(ToStr(x+b) + " " + ToStr(y+h) + " li\n");
- PutSeite(ToStr(x+b) + " " + ToStr(y) + " li\n");
- PutSeite("cl\n");
-}
-
-void PSLib::PS_RoundRect(float x, float y, float b, float h, float r)
-{
- PutSeite(ToStr(x+r) + " " + ToStr(y) + " m\n");
- PutSeite(ToStr(x+b) + " " + ToStr(y) + " " + ToStr(x+b) + " " + ToStr(y+h) + " " + ToStr(r) + " arct\n");
- PutSeite(ToStr(x+b) + " " + ToStr(y+h) + " " + ToStr(x) + " " + ToStr(y+h) + " " + ToStr(r) + " arct\n");
- PutSeite(ToStr(x) + " " + ToStr(y+h) + " " + ToStr(x) + " " + ToStr(y) + " " + ToStr(r) + " arct\n");
- PutSeite(ToStr(x) + " " + ToStr(y) + " " + ToStr(x+b) + " " + ToStr(y) + " " + ToStr(r) + " arct\n");
- PutSeite("cl\n");
-}
-
-void PSLib::PS_circle(float r, float r2)
-{
- PutSeite("/cmtx matrix currentmatrix def\n");
- PutSeite(ToStr(r) + " " + ToStr(r2) + " scale ci\n");
- PutSeite("cmtx setmatrix\n");
-}
-
-void PSLib::PS_curve(float x1, float y1, float x2, float y2, float x3, float y3)
-{
- PutSeite(ToStr(x1) + " " + ToStr(y1) + " " + ToStr(x2) + " " + ToStr(y2) + " " + ToStr(x3) + " " + ToStr(y3) + " curveto\n");
-}
-
-void PSLib::PS_moveto(float x, float y)
-{
- PutSeite(ToStr(x) + " " + ToStr(y) + " m\n");
-}
-
-void PSLib::PS_lineto(float x, float y)
-{
- PutSeite(ToStr(x) + " " + ToStr(y) + " li\n");
-}
-
-void PSLib::PS_closepath()
-{
- PutSeite("cl\n");
-}
-
-void PSLib::PS_translate(float x, float y)
-{
- PutSeite(ToStr(x) + " " + ToStr(y) + " tr\n");
-}
-
-void PSLib::PS_scale(float x, float y)
-{
- PutSeite(ToStr(x) + " " + ToStr(y) + " sc\n");
-}
-
-void PSLib::PS_rotate(float x)
-{
- PutSeite(ToStr(x) + " ro\n");
-}
-
-void PSLib::PS_clip(bool mu)
-{
- if (mu)
- PutSeite("eoclip newpath\n");
- else
- PutSeite("clip newpath\n");
-}
-
-void PSLib::PS_save()
-{
- PutSeite("gs\n");
-}
-
-void PSLib::PS_restore()
-{
- PutSeite("gr\n");
-}
-
-void PSLib::PS_setcmykcolor_fill(float c, float m, float y, float k)
-{
- FillColor = ToStr(c) + " " + ToStr(m) + " " + ToStr(y) + " " + ToStr(k);
-}
-
-void PSLib::PS_setcmykcolor_dummy()
-{
- PutSeite("0 0 0 0 cmyk\n");
-}
-
-void PSLib::PS_setcmykcolor_stroke(float c, float m, float y, float k)
-{
- StrokeColor = ToStr(c) + " " + ToStr(m) + " " + ToStr(y) + " " + ToStr(k);
-}
-
-void PSLib::PS_setlinewidth(float w)
-{
- PutSeite(ToStr(w) + " sw\n");
- LineW = w;
-}
-
-void PSLib::PS_setdash(Qt::PenStyle st, Qt::PenCapStyle ca, Qt::PenJoinStyle jo)
-{
- QString Dt = ToStr(QMAX(LineW, 1));
- QString Da = ToStr(QMAX(3*LineW, 1));
- switch (st)
- {
- case Qt::SolidLine:
- PutSeite("[] 0 setdash\n");
- break;
- case Qt::DashLine:
- PutSeite("["+Da+" "+Dt+"] 0 setdash\n");
- break;
- case Qt::DotLine:
- PutSeite("["+Dt+"] 0 setdash\n");
- break;
- case Qt::DashDotLine:
- PutSeite("["+Da+" "+Dt+" "+Dt+" "+Dt+"] 0 setdash\n");
- break;
- case Qt::DashDotDotLine:
- PutSeite("["+Da+" "+Dt+" "+Dt+" "+Dt+" "+Dt+" "+Dt+"] 0 setdash\n");
- break;
- default:
- PutSeite("[] 0 setdash\n");
- break;
- }
- switch (ca)
- {
- case Qt::FlatCap:
- PutSeite("0 setlinecap\n");
- break;
- case Qt::SquareCap:
- PutSeite("2 setlinecap\n");
- break;
- case Qt::RoundCap:
- PutSeite("1 setlinecap\n");
- break;
- default:
- PutSeite("0 setlinecap\n");
- break;
- }
- switch (jo)
- {
- case Qt::MiterJoin:
- PutSeite("0 setlinejoin\n");
- break;
- case Qt::BevelJoin:
- PutSeite("2 setlinejoin\n");
- break;
- case Qt::RoundJoin:
- PutSeite("1 setlinejoin\n");
- break;
- default:
- PutSeite("0 setlinejoin\n");
- break;
- }
-}
-
-void PSLib::PS_selectfont(QString f, int s)
-{
- PutSeite(UsedFonts[f] + " " + IToStr(s) + " se\n");
-}
-
-void PSLib::PS_fill(bool mu)
-{
- if (mu)
- PutSeite(FillColor + " cmyk eofill\n");
- else
- PutSeite(FillColor + " cmyk fi\n");
-}
-
-void PSLib::PS_stroke()
-{
- PutSeite(StrokeColor + " cmyk st\n");
-}
-
-void PSLib::PS_fill_stroke(bool mu)
-{
- PS_save();
- PS_fill(mu);
- PS_restore();
- PS_stroke();
-}
-
-void PSLib::PS_newpath()
-{
- PutSeite("newpath\n");
-}
-
-void PSLib::PS_GradientCol1(float c, float m, float y, float k)
-{
- GrColor1 = ToStr(c) + " " + ToStr(m) + " " + ToStr(y) + " " + ToStr(k);
-}
-
-void PSLib::PS_GradientCol2(float c, float m, float y, float k)
-{
- GrColor2 = ToStr(c) + " " + ToStr(m) + " " + ToStr(y) + " " + ToStr(k);
-}
-
-void PSLib::PS_LinGradient(float w, float h, int item, int grad, bool mu)
-{
- if (item == 1)
- PutSeite("-"+ToStr(w / 2.0)+" "+ToStr(-h / 2.0)+" tr\n");
- if (mu)
- PutSeite("eoclip\n");
- else
- PutSeite("clip\n");
- PutSeite("<<\n");
- PutSeite("/ShadingType 2\n");
- if (DoSep)
- PutSeite("/ColorSpace /DeviceGray\n");
- else
- PutSeite("/ColorSpace /DeviceCMYK\n");
- switch (grad)
- {
- case 1:
- PutSeite("/Coords [0 "+ToStr(h / 2.0)+" "+ToStr(w)+" "+ToStr(h / 2.0)+"]\n");
- break;
- case 2:
- PutSeite("/Coords ["+ToStr(w / 2.0)+" 0 "+ToStr(w / 2.0)+" "+ToStr(h)+"]\n");
- break;
- case 3:
- PutSeite("/Coords [0 0 "+ToStr(w)+" "+ToStr(h)+"]\n");
- break;
- case 4:
- PutSeite("/Coords ["+ToStr(w)+" 0 0 "+ToStr(h)+"]\n");
- break;
- }
- PutSeite("/BBox [0 "+ToStr(h)+" "+ToStr(w)+" 0]\n");
- if (DoSep)
- PutSeite("/Background [0]\n");
- else
- PutSeite("/Background ["+FillColor+"]\n");
- PutSeite("/Extend [false false]\n");
- PutSeite("/Function\n");
- PutSeite("<<\n");
- PutSeite("/FunctionType 2\n");
- PutSeite("/Domain [0 1]\n");
- if (DoSep)
- {
- int pla = Plate - 1;
- if (pla < 0)
- pla = 3;
- QStringList cols1 = QStringList::split(" ", GrColor2);
- QStringList cols2 = QStringList::split(" ", GrColor1);
- PutSeite("/C1 ["+ToStr(1-cols1[pla].toFloat())+"]\n");
- PutSeite("/C0 ["+ToStr(1-cols2[pla].toFloat())+"]\n");
- }
- else
- {
- PutSeite("/C0 ["+GrColor1+"]\n");
- PutSeite("/C1 ["+GrColor2+"]\n");
- }
- PutSeite("/N 1\n");
- PutSeite(">>\n");
- PutSeite(">>\n");
- PutSeite("shfill\n");
-}
-
-void PSLib::PS_RadGradient(float w, float h, int item, bool mu)
-{
- float w2, h2, rad;
- w2 = w / 2.0;
- h2 = h / 2.0;
- rad = QMIN(w, fabs(h)) / 2.0;
- PutSeite("/cmtx matrix currentmatrix def\n");
- if (mu)
- PutSeite("eoclip\n");
- else
- PutSeite("clip\n");
- PutSeite("<<\n");
- PutSeite("/ShadingType 3\n");
- if (DoSep)
- PutSeite("/ColorSpace /DeviceGray\n");
- else
- PutSeite("/ColorSpace /DeviceCMYK\n");
- PutSeite("/Coords ["+ToStr(w2)+" "+ToStr(h2)+" 0 "+ToStr(w2)+" "+ToStr(h2)+" "+ToStr(rad)+"]\n");
- PutSeite("/BBox [0 "+ToStr(h)+" "+ToStr(w)+" 0]\n");
- if (DoSep)
- PutSeite("/Background [0]\n");
- else
- PutSeite("/Background ["+FillColor+"]\n");
- PutSeite("/Extend [true true]\n");
- PutSeite("/Function\n");
- PutSeite("<<\n");
- PutSeite("/FunctionType 2\n");
- PutSeite("/Domain [0 1]\n");
- if (DoSep)
- {
- int pla = Plate - 1;
- if (pla < 0)
- pla = 3;
- QStringList cols1 = QStringList::split(" ", GrColor2);
- QStringList cols2 = QStringList::split(" ", GrColor1);
- PutSeite("/C0 ["+ToStr(1-cols1[pla].toFloat())+"]\n");
- PutSeite("/C1 ["+ToStr(1-cols2[pla].toFloat())+"]\n");
- }
- else
- {
- PutSeite("/C0 ["+GrColor2+"]\n");
- PutSeite("/C1 ["+GrColor1+"]\n");
- }
- PutSeite("/N 1\n");
- PutSeite(">>\n");
- PutSeite(">>\n");
- if (item == 1)
- {
- if (w > fabs(h))
- PutSeite("-"+ToStr(w2*(w2 / rad))+" "+ToStr(fabs(h2))+" tr\n");
- else
- PutSeite("-"+ToStr(w2*(w2 / rad))+" "+ToStr(fabs(h2)*(fabs(h2) /rad))+" tr\n");
- }
- else
- {
- if (w > fabs(h))
- PutSeite("-"+ToStr(w2*(w2 / rad)-w2)+" 0 tr\n");
- else
- {
- if (w < fabs(h))
- PutSeite("0 "+ToStr(fabs(h2)*(fabs(h2) /rad)-fabs(h2))+" tr\n");
- }
- }
- PutSeite(ToStr(w2 / rad)+" "+ToStr(fabs(h2) / rad)+" scale\n");
- PutSeite("shfill\n");
- PutSeite("cmtx setmatrix\n");
-}
-
-void PSLib::PS_underline(QCString ch, float x, float y)
-{
- PS_moveto(x, y);
- PutSeite("("+QString(ch)+") srt\n");
-}
-
-void PSLib::PS_strikeout(QCString ch, float x, float y)
-{
- PS_moveto(x, y);
- PutSeite("("+QString(ch)+") srd\n");
-}
-
-void PSLib::PS_show_xy(QCString ch, float x, float y)
-{
- PutSeite("("+QString(ch)+") "+ToStr(x)+" "+ToStr(y)+" "+StrokeColor+" shm\n");
-}
-
-void PSLib::PS_show_xyG(QString font, QString ch, float x, float y)
-{
- QString Name;
- uint cc = ch[0].unicode();
- if (GlyphsOfFont[font].contains(cc))
- Name = GlyphsOfFont[font][cc];
- else
- Name = ".notdef";
- PutSeite("/"+Name+" "+ToStr(x)+" "+ToStr(y)+" "+StrokeColor+" shg\n");
-}
-
-void PSLib::PS_show(float x, float y)
-{
- PS_moveto(x, y);
- PutSeite("/hyphen glyphshow\n");
-}
-
-void PSLib::PS_ImageData(QString fn, QString Name, QString Prof, bool UseEmbedded, bool UseProf)
-{
- QString tmp;
- QFileInfo fi = QFileInfo(fn);
- QString ext = fi.extension(false).lower();
- if (ext == "eps")
- {
- if (loadText(fn, &tmp))
- {
- PutSeite("currentfile 1 (%ENDEPSDATA) /SubFileDecode filter /ReusableStreamDecode filter\n");
- PutSeite("%%BeginDocument: " + fi.fileName() + "\n");
- PutSeite(tmp+"\n");
- PutSeite("%ENDEPSDATA\n");
- PutSeite("%%EndDocument\n");
- PutSeite("/"+PSEncode(Name)+"Bild exch def\n");
- }
- return;
- }
- QString ImgStr = "";
- QImage image;
-#ifdef HAVE_CMS
- QImage image2;
- bool cmy = false;
- if ((CMSuse) && (UseProf))
- {
- image = LoadPict(fn);
- image = image.convertDepth(32);
- image2 = LoadPictCol(fn, Prof, UseEmbedded, &cmy);
- ImgStr = ImageToCMYK_PS(&image2, -1, cmy);
- }
- else
- {
- image = LoadPict(fn);
- ImgStr = ImageToCMYK_PS(&image, -1, false);
- }
-#else
- image = LoadPict(fn);
- image = image.convertDepth(32);
- ImgStr = ImageToCMYK_PS(&image, -1, false);
-#endif
- if (CompAvail)
- {
- PutSeite("currentfile /ASCIIHexDecode filter /FlateDecode filter /ReusableStreamDecode filter\n");
- ImgStr = CompressStr(&ImgStr);
- }
- else
- PutSeite("currentfile /ASCIIHexDecode filter /ReusableStreamDecode filter\n");
- ImgStr = String2Hex(&ImgStr);
- PutSeite(ImgStr);
- PutSeite("\n>\n");
- PutSeite("/"+PSEncode(Name)+"Bild exch def\n");
- ImgStr = "";
- if (image.hasAlphaBuffer())
- {
- QImage iMask = image.createAlphaMask();
- ImgStr = MaskToTxt(&iMask, false);
- if (CompAvail)
- {
- PutSeite("currentfile /ASCIIHexDecode filter /FlateDecode filter /ReusableStreamDecode filter\n");
- ImgStr = CompressStr(&ImgStr);
- }
- else
- PutSeite("currentfile /ASCIIHexDecode filter /ReusableStreamDecode filter\n");
- ImgStr = String2Hex(&ImgStr);
- PutSeite(ImgStr);
- PutSeite("\n>\n");
- PutSeite("/"+PSEncode(Name)+"Mask exch def\n");
- }
-}
-
-void PSLib::PS_image(float x, float y, QString fn, float scalex, float scaley, QString Prof, bool UseEmbedded, bool UseProf, QString Name)
-{
- QString tmp;
- QFileInfo fi = QFileInfo(fn);
- QString ext = fi.extension(false).lower();
- if (ext == "eps")
- {
- if (loadText(fn, &tmp))
- {
- if (Name != "")
- {
- PutSeite("bEPS\n");
- PutSeite(ToStr(scalex) + " " + ToStr(scaley) + " sc\n");
- PutSeite(ToStr(x) + " " + ToStr(y) + " tr\n");
- PutSeite(PSEncode(Name)+"Bild cvx exec\n");
- PutSeite(PSEncode(Name)+"Bild resetfile\n");
- PutSeite("eEPS\n");
- }
- else
- {
- PutSeite("bEPS\n");
- PutSeite(ToStr(scalex) + " " + ToStr(scaley) + " sc\n");
- PutSeite(ToStr(x) + " " + ToStr(y) + " tr\n");
- PutSeite("%%BeginDocument: " + fi.fileName() + "\n");
- PutSeite(tmp+"\n");
- PutSeite("%%EndDocument\n");
- PutSeite("eEPS\n");
- }
- }
- }
- else
- {
- QString ImgStr = "";
- QImage image;
-#ifdef HAVE_CMS
- QImage image2;
- bool cmy = false;
- if ((CMSuse) && (UseProf))
- {
- image = LoadPict(fn);
- image = image.convertDepth(32);
- image2 = LoadPictCol(fn, Prof, UseEmbedded, &cmy);
- }
- else
- {
- image = LoadPict(fn);
- image = image.convertDepth(32);
- }
-#else
- image = LoadPict(fn);
- image = image.convertDepth(32);
-#endif
- int w = image.width();
- int h = image.height();
- PutSeite(ToStr(x*scalex) + " " + ToStr(y*scaley) + " tr\n");
- PutSeite(ToStr(scalex*w) + " " + ToStr(scaley*h) + " sc\n");
- if ((!DoSep) && (!GraySc))
- PutSeite("/DeviceCMYK setcolorspace\n");
- else
- PutSeite("/DeviceGray setcolorspace\n");
- if (image.hasAlphaBuffer())
- {
- QImage iMask = image.createAlphaMask();
-#ifdef HAVE_CMS
- if ((CMSuse) && (UseProf))
- {
- if (DoSep)
- ImgStr = ImageToCMYK_PS(&image2, Plate, cmy);
- else
- {
- if (GraySc)
- ImgStr = ImageToCMYK_PS(&image2, -2, cmy);
- else
- ImgStr = ImageToCMYK_PS(&image2, -1, cmy);
- }
- }
- else
- {
- if (DoSep)
- ImgStr = ImageToCMYK_PS(&image, Plate, false);
- else
- {
- if (GraySc)
- ImgStr = ImageToCMYK_PS(&image, -2, false);
- else
- ImgStr = ImageToCMYK_PS(&image, -1, false);
- }
- }
-#else
- if (DoSep)
- ImgStr = ImageToCMYK_PS(&image, Plate, false);
- else
- {
- if (GraySc)
- ImgStr = ImageToCMYK_PS(&image, -2, false);
- else
- ImgStr = ImageToCMYK_PS(&image, -1, false);
- }
-#endif
- if (Name == "")
- {
- if (CompAvail)
- {
- PutSeite("currentfile /ASCIIHexDecode filter /FlateDecode filter /ReusableStreamDecode filter\n");
- ImgStr = CompressStr(&ImgStr);
- }
- else
- PutSeite("currentfile /ASCIIHexDecode filter /ReusableStreamDecode filter\n");
- ImgStr = String2Hex(&ImgStr);
- PutSeite(ImgStr);
- ImgStr = "";
- PutSeite("\n>\n");
- PutSeite("/Bild exch def\n");
- ImgStr = MaskToTxt(&iMask, false);
- if (CompAvail)
- {
- PutSeite("currentfile /ASCIIHexDecode filter /FlateDecode filter /ReusableStreamDecode filter\n");
- ImgStr = CompressStr(&ImgStr);
- }
- else
- PutSeite("currentfile /ASCIIHexDecode filter /ReusableStreamDecode filter\n");
- ImgStr = String2Hex(&ImgStr);
- PutSeite(ImgStr);
- PutSeite("\n>\n");
- PutSeite("/Mask exch def\n");
- }
- PutSeite("<<\n");
- PutSeite(" /PaintType 1\n");
- PutSeite(" /PatternType 1\n");
- PutSeite(" /TilingType 3\n");
- PutSeite(" /BBox [ 0 0 1 1 ]\n");
- PutSeite(" /XStep 2\n");
- PutSeite(" /YStep 2\n");
- PutSeite(" /PaintProc {\n");
- PutSeite(" pop\n");
- PutSeite(" 1 1 1 1 setcmykcolor\n");
- PutSeite(" <<\n");
- PutSeite(" /ImageType 1\n");
- PutSeite(" /Height " + IToStr(h) + "\n");
- PutSeite(" /Width " + IToStr(w) + "\n");
- PutSeite(" /ImageMatrix [" + IToStr(w) + " 0 0 " + IToStr(-h) + " 0 " + IToStr(h) +"]\n");
- if (DoSep)
- PutSeite(" /Decode [1 0]\n");
- else
- {
- if (GraySc)
- PutSeite(" /Decode [1 0]\n");
- else
- PutSeite(" /Decode [0 1 0 1 0 1 0 1]\n");
- }
- PutSeite(" /BitsPerComponent 8\n");
- PutSeite(" /DataSource "+PSEncode(Name)+"Bild\n");
- PutSeite(" >>\n");
- PutSeite(" image\n");
- PutSeite(" }\n");
- PutSeite(">> matrix makepattern setpattern\n");
- PutSeite("<< /ImageType 1\n");
- PutSeite(" /Width " + IToStr(w) + "\n");
- PutSeite(" /Height " + IToStr(h) + "\n");
- PutSeite(" /BitsPerComponent 1\n");
- PutSeite(" /Decode [1 0]\n");
- PutSeite(" /ImageMatrix [" + IToStr(w) + " 0 0 " + IToStr(-h) + " 0 " + IToStr(h) + "]\n");
- PutSeite(" /DataSource "+PSEncode(Name)+"Mask\n");
- PutSeite(">>\n");
- PutSeite("imagemask\n");
- if (Name != "")
- {
- PutSeite(PSEncode(Name)+"Bild resetfile\n");
- PutSeite(PSEncode(Name)+"Mask resetfile\n");
- }
- }
- else
- {
- PutSeite("<< /ImageType 1\n");
- PutSeite(" /Width " + IToStr(w) + "\n");
- PutSeite(" /Height " + IToStr(h) + "\n");
- PutSeite(" /BitsPerComponent 8\n");
- if (DoSep)
- PutSeite(" /Decode [1 0]\n");
- else
- {
- if (GraySc)
- PutSeite(" /Decode [1 0]\n");
- else
- PutSeite(" /Decode [0 1 0 1 0 1 0 1]\n");
- }
- PutSeite(" /ImageMatrix [" + IToStr(w) + " 0 0 " + IToStr(-h) + " 0 " + IToStr(h) + "]\n");
- if (Name != "")
- {
- PutSeite(" /DataSource "+PSEncode(Name)+"Bild >>\n");
- PutSeite("image\n");
- PutSeite(PSEncode(Name)+"Bild resetfile\n");
- }
- else
- {
- if (CompAvail)
- PutSeite(" /DataSource currentfile /ASCIIHexDecode filter /FlateDecode filter >>\n");
- else
- PutSeite(" /DataSource currentfile /ASCIIHexDecode filter >>\n");
- PutSeite("image\n");
-#ifdef HAVE_CMS
- if ((CMSuse) && (UseProf))
- {
- if (DoSep)
- ImgStr = ImageToCMYK_PS(&image2, Plate, cmy);
- else
- {
- if (GraySc)
- ImgStr = ImageToCMYK_PS(&image2, -2, cmy);
- else
- ImgStr = ImageToCMYK_PS(&image2, -1, cmy);
- }
- }
- else
- {
- if (DoSep)
- ImgStr = ImageToCMYK_PS(&image, Plate, false);
- else
- {
- if (GraySc)
- ImgStr = ImageToCMYK_PS(&image, -2, false);
- else
- ImgStr = ImageToCMYK_PS(&image, -1, false);
- }
- }
-#else
- if (DoSep)
- ImgStr = ImageToCMYK_PS(&image, Plate, false);
- else
- {
- if (GraySc)
- ImgStr = ImageToCMYK_PS(&image, -2, false);
- else
- ImgStr = ImageToCMYK_PS(&image, -1, false);
- }
-#endif
- if (CompAvail)
- ImgStr = CompressStr(&ImgStr);
- ImgStr = String2Hex(&ImgStr);
- PutSeite(ImgStr);
- PutSeite("\n>\n");
- }
- }
- }
-}
-
-void PSLib::PS_plate(int nr)
-{
- switch (nr)
- {
- case 0:
- PutSeite("%%PlateColor Black\n");
- PutSeite("/setcmykcolor {exch pop exch pop exch pop 1 exch sub oldsetgray} bind def\n");
- PutSeite("/setrgbcolor {pop pop pop 1 oldsetgray} bind def\n");
- break;
- case 1:
- PutSeite("%%PlateColor Cyan\n");
- PutSeite("/setcmykcolor {pop pop pop 1 exch sub oldsetgray} bind def\n");
- PutSeite("/setrgbcolor {pop pop oldsetgray} bind def\n");
- break;
- case 2:
- PutSeite("%%PlateColor Magenta\n");
- PutSeite("/setcmykcolor {pop pop exch pop 1 exch sub oldsetgray} bind def\n");
- PutSeite("/setrgbcolor {pop exch pop oldsetgray} bind def\n");
- break;
- case 3:
- PutSeite("%%PlateColor Yellow\n");
- PutSeite("/setcmykcolor {pop exch pop exch pop 1 exch sub oldsetgray} bind def\n");
- PutSeite("/setrgbcolor {exch pop exch pop oldsetgray} bind def\n");
- break;
- }
- Plate = nr;
- DoSep = true;
-}
-
-void PSLib::PS_setGray()
-{
- GraySc = true;
-}
-
-void PSLib::PDF_Bookmark(QString text, uint Seite)
-{
- PutSeite("[/Title ("+text+") /Page "+IToStr(Seite)+" /View [/Fit]\n");
- PutSeite("/OUT pdfmark\n");
- isPDF = true;
-}
-
-void PSLib::PDF_Annotation(QString text, float x, float y, float b, float h)
-{
- PutSeite("[ /Rect [ "+ToStr(static_cast<int>(x))+" "+ToStr(static_cast<int>(y))+" "+ToStr(static_cast<int>(b))+" "+ToStr(static_cast<int>(h))+" ]\n");
- PutSeite(" /Contents ("+text+")\n /Open false\n");
- PutSeite("/ANN pdfmark\n");
- isPDF = true;
-}
-
-
-void PSLib::PS_close()
-{
- PutDoc("%%Trailer\n");
- PutDoc("end\n");
- PutDoc("%%EOF\n");
- Spool.close();
-}
/start/Scribus/scribus/libpostscript/pslib.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/libpostscript/pslib.h
===================================================================
--- start/Scribus/scribus/libpostscript/pslib.h (revision 427)
+++ start/Scribus/scribus/libpostscript/pslib.h (nonexistent)
@@ -1,119 +0,0 @@
-/***************************************************************************
- pslib.h - description
- -------------------
- begin : Sat May 26 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef PSLIB_H
-#define PSLIB_H
-#include <qstring.h>
-#include <qcstring.h>
-#include <qpen.h>
-#include <qfile.h>
-#include "scribusdoc.h"
-
-/**
- *@author Franz Schmid
- * Diese Klasse erzeugt Postscript-Dateien
- */
-
-class PSLib {
-public:
- PSLib(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf = false);
- virtual ~PSLib();
- virtual bool PS_set_file(QString fn);
- virtual void PS_set_Info(QString art, QString was);
- virtual void PS_begin_doc(int Ori, float breite, float hoehe, int numpage);
- virtual void PS_begin_page(float breite, float hoehe, struct Margs* Ma);
- virtual void PS_end_page();
- virtual void PS_rect(float x, float y, float b, float h);
- virtual void PS_RoundRect(float x, float y, float b, float h, float r);
- virtual void PS_circle(float r, float r2);
- virtual void PS_curve(float x1, float y1, float x2, float y2, float x3, float y3);
- virtual void PS_moveto(float x, float y);
- virtual void PS_lineto(float x, float y);
- virtual void PS_closepath();
- virtual void PS_translate(float x, float y);
- virtual void PS_scale(float x, float y);
- virtual void PS_rotate(float x);
- virtual void PS_clip(bool mu);
- virtual void PS_save();
- virtual void PS_restore();
- virtual void PS_setcmykcolor_fill(float c, float m, float y, float k);
- virtual void PS_setcmykcolor_dummy();
- virtual void PS_setcmykcolor_stroke(float c, float m, float y, float k);
- virtual void PS_setlinewidth(float w);
- virtual void PS_setdash(Qt::PenStyle st, Qt::PenCapStyle ca, Qt::PenJoinStyle jo);
- virtual void PS_selectfont(QString f, int s);
- virtual void PS_fill(bool mu);
- virtual void PS_stroke();
- virtual void PS_fill_stroke(bool mu);
- virtual void PS_newpath();
- virtual void PS_GradientCol1(float c, float m, float y, float k);
- virtual void PS_GradientCol2(float c, float m, float y, float k);
- virtual void PS_LinGradient(float w, float h, int item, int grad, bool mu);
- virtual void PS_RadGradient(float w, float h, int item, bool mu);
- virtual void PS_underline(QCString ch, float x, float y);
- virtual void PS_strikeout(QCString ch, float x, float y);
- virtual void PS_show_xy(QCString ch, float x, float y);
- virtual void PS_show(float x, float y);
- virtual void PS_show_xyG(QString font, QString ch, float x, float y);
- virtual void PS_image(float x, float y, QString fn, float scalex, float scaley, QString Prof, bool UseEmbedded, bool UseProf, QString Name = "");
- virtual void PS_plate(int nr);
- virtual void PS_setGray();
- virtual void PDF_Bookmark(QString text, uint Seite);
- virtual void PDF_Annotation(QString text, float x, float y, float b, float h);
- virtual void PS_close();
- virtual void PS_TemplateStart(QString Name, float breite, float hoehe);
- virtual void PS_TemplateEnd();
- virtual void PS_UseTemplate(QString Name);
- virtual void PS_ImageData(QString fn, QString Name, QString Prof, bool UseEmbedded, bool UseProf);
-private:
- void PutSeite(QString c);
- void PutDoc(QString c);
- QString ToStr(float c);
- QString IToStr(int c);
- QString PSEncode(QString in);
- bool Art;
- QString Prolog;
- QString Header;
- QString Creator;
- QString User;
- QString Titel;
- QString BBox;
- QString BBoxH;
- QString Farben;
- QString FNamen;
- QString PDev;
- QString GrayCalc;
- bool GraySc;
- int Seiten;
- QString FillColor;
- QString StrokeColor;
- QString GrColor1;
- QString GrColor2;
- float LineW;
- QString Fonts;
- QString FontDesc;
- QMap<QString, QString> UsedFonts;
- typedef QMap<uint, QString> GListe;
- QMap<QString, GListe> GlyphsOfFont;
- bool isPDF;
- QFile Spool;
- bool CompAvail;
- int Plate;
- bool DoSep;
-};
-
-#endif
/start/Scribus/scribus/libpostscript/pslib.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/spalette.cpp
===================================================================
--- start/Scribus/scribus/spalette.cpp (revision 427)
+++ start/Scribus/scribus/spalette.cpp (nonexistent)
@@ -1,59 +0,0 @@
-/***************************************************************************
- spalette.cpp - description
- -------------------
- begin : Wed Apr 25 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include "spalette.h"
-#include "spalette.moc"
-
-Spalette::Spalette(QWidget* parent) : QListBox(parent, "Sfloat")
-{
- setMinimumSize(QSize(10,80));
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
- insertItem(tr("No Style"));
- doc = 0;
- connect(this, SIGNAL(clicked(QListBoxItem*)), this, SLOT(selFormat(QListBoxItem*)));
- connect(this, SIGNAL(selected(int)), this, SIGNAL(EditSt()));
-}
-
-void Spalette::SetFormats(ScribusDoc *dd)
-{
- doc = dd;
- updateFList();
-}
-
-void Spalette::updateFList()
-{
- clear();
- if (doc != 0)
- {
- insertItem(tr("No Style"));
- for (uint x = 5; x < doc->Vorlagen.count(); ++x)
- {
- insertItem(doc->Vorlagen[x].Vname);
- }
- setSelected(currentItem(), false);
- }
-}
-
-void Spalette::selFormat(QListBoxItem *c)
-{
- if (c == NULL)
- return;
- if (c->listBox()->currentItem() > 0)
- emit NewStyle(c->listBox()->currentItem()+4);
- else
- emit NewStyle(c->listBox()->currentItem());
-}
/start/Scribus/scribus/spalette.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/hyask.h
===================================================================
--- start/Scribus/scribus/hyask.h (revision 427)
+++ start/Scribus/scribus/hyask.h (nonexistent)
@@ -1,41 +0,0 @@
-#ifndef HYASK_H
-#define HYASK_H
-
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-
-class WortEdit : public QLineEdit
-{
- Q_OBJECT
-public:
- WortEdit(QWidget* parent);
- ~WortEdit() {};
- void keyPressEvent(QKeyEvent *k);
-};
-
-class HyAsk : public QDialog
-{
- Q_OBJECT
-
-public:
- HyAsk( QWidget* parent, QString HWort );
- ~HyAsk() {};
-
- WortEdit* Wort;
- QPushButton* OK;
- QPushButton* Skip;
- QPushButton* Cancel;
-
-public slots:
- void Check();
- void DoSkip();
-
-protected:
- QVBoxLayout* HyAskLayout;
- QHBoxLayout* Layout1;
-};
-
-#endif // HYASK_H
/start/Scribus/scribus/hyask.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/iso8859-9ps.enc
===================================================================
--- start/Scribus/scribus/iso8859-9ps.enc (revision 427)
+++ start/Scribus/scribus/iso8859-9ps.enc (nonexistent)
@@ -1,96 +0,0 @@
-16#A0 /space
-16#A1 /exclamdown
-16#A2 /cent
-16#A3 /sterling
-16#A4 /currency
-16#A5 /yen
-16#A6 /brokenbar
-16#A7 /section
-16#A8 /dieresis
-16#A9 /copyright
-16#AA /ordfeminine
-16#AB /guillemotleft
-16#AC /logicalnot
-16#AD /hyphen
-16#AE /registered
-16#AF /macron
-16#B0 /degree
-16#B1 /plusminus
-16#B2 /twosuperior
-16#B3 /threesuperior
-16#B4 /acute
-16#B5 /mu
-16#B6 /paragraph
-16#B7 /bullet
-16#B8 /cedilla
-16#B9 /onesuperior
-16#BA /ordmasculine
-16#BB /guillemotright
-16#BC /onequarter
-16#BD /onehalf
-16#BE /threequarters
-16#BF /questiondown
-16#C0 /Agrave
-16#C1 /Aacute
-16#C2 /Acircumflex
-16#C3 /Atilde
-16#C4 /Adieresis
-16#C5 /Aring
-16#C6 /AE
-16#C7 /Ccedilla
-16#C8 /Egrave
-16#C9 /Eacute
-16#CA /Ecircumflex
-16#CB /Edieresis
-16#CC /Igrave
-16#CD /Iacute
-16#CE /Icircumflex
-16#CF /Idieresis
-16#D0 /Gbreve
-16#D1 /Ntilde
-16#D2 /Ograve
-16#D3 /Oacute
-16#D4 /Ocircumflex
-16#D5 /Otilde
-16#D6 /Odieresis
-16#D7 /multiply
-16#D8 /Oslash
-16#D9 /Ugrave
-16#DA /Uacute
-16#DB /Ucircumflex
-16#DC /Udieresis
-16#DD /Idotaccent
-16#DE /Scedilla
-16#DF /germandbls
-16#E0 /agrave
-16#E1 /aacute
-16#E2 /acircumflex
-16#E3 /atilde
-16#E4 /adieresis
-16#E5 /aring
-16#E6 /ae
-16#E7 /ccedilla
-16#E8 /egrave
-16#E9 /eacute
-16#EA /ecircumflex
-16#EB /edieresis
-16#EC /igrave
-16#ED /iacute
-16#EE /icircumflex
-16#EF /idieresis
-16#F0 /gbreve
-16#F1 /ntilde
-16#F2 /ograve
-16#F3 /oacute
-16#F4 /ocircumflex
-16#F5 /otilde
-16#F6 /odieresis
-16#F7 /divide
-16#F8 /oslash
-16#F9 /ugrave
-16#FA /uacute
-16#FB /ucircumflex
-16#FC /udieresis
-16#FD /dotlessi
-16#FE /scedilla
-16#FF /ydieresis
/start/Scribus/scribus/iso8859-9ps.enc
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/bookmwin.cpp
===================================================================
--- start/Scribus/scribus/bookmwin.cpp (revision 427)
+++ start/Scribus/scribus/bookmwin.cpp (nonexistent)
@@ -1,522 +0,0 @@
-/***************************************************************************
- bookmwin.cpp - description
- -------------------
- begin : Mon Feb 11 2002
- copyright : (C) 2002 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include "bookmwin.h"
-#include "bookmwin.moc"
-#include <qpixmap.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-extern QPixmap loadIcon(QString nam);
-
-BookMItem::BookMItem(QListViewItem* parent, struct ScribusDoc::BookMa *Bm) : QListViewItem(parent)
-{
- SetUp(Bm);
-}
-
-BookMItem::BookMItem(QListViewItem* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm) : QListViewItem(parent, after)
-{
- SetUp(Bm);
-}
-
-BookMItem::BookMItem(QListView* parent, QListViewItem* after, struct ScribusDoc::BookMa *Bm) : QListViewItem(parent, after)
-{
- SetUp(Bm);
-}
-
-BookMItem::BookMItem(QListView* parent, struct ScribusDoc::BookMa *Bm) : QListViewItem(parent)
-{
- SetUp(Bm);
-}
-
-BookMItem::BookMItem(QListView* parent, QListViewItem* after, int nr, int s, int el) : QListViewItem(parent, after)
-{
- ItemNr = nr;
- Seite = s;
- Element = el;
- PdfObj = 0;
- Action = "";
- First = 0;
- Last = 0;
- Prev = 0;
- Next = 0;
- Pare = 0;
-}
-
-BookMItem::BookMItem(QListView* parent, int nr, int s, int el) : QListViewItem(parent)
-{
- ItemNr = nr;
- Seite = s;
- Element = el;
- PdfObj = 0;
- Action = "";
- First = 0;
- Last = 0;
- Prev = 0;
- Next = 0;
- Pare = 0;
-}
-
-void BookMItem::SetUp(struct ScribusDoc::BookMa *Bm)
-{
- ItemNr = Bm->ItemNr;
- Seite = Bm->Seite;
- Element = Bm->Element;
- PdfObj = 0;
- Action = Bm->Aktion;
- First = Bm->First;
- Last = Bm->Last;
- Prev = Bm->Prev;
- Next = Bm->Next;
- Pare = Bm->Parent;
- Titel = Bm->Title;
- setText(0, Bm->Text);
-}
-
-QString BookMItem::key(int, bool) const
-{
- QString tmp;
- tmp.sprintf("%5d", ItemNr);
- return tmp;
-}
-
-
-BookMView::BookMView(QWidget* parent) : QListView(parent)
-{
- NrItems = 0;
- Mpressed = false;
- DraggedI = 0;
- First = 1;
- Last = 0;
- setAcceptDrops(true);
- viewport()->setAcceptDrops(true);
- setRootIsDecorated(true);
- addColumn(tr("Bookmarks"));
- setResizeMode(QListView::AllColumns);
- setSelectionMode(QListView::NoSelection);
- setSorting(-1,1);
-}
-
-void BookMView::AddPageItem(PageItem* ite)
-{
- QString bm = "";
- QString bm2 = "";
- QString cc;
- for (uint d = 0; d < ite->Ptext.count(); ++d)
- {
- cc = ite->Ptext.at(d)->ch;
- if ((cc == QChar(13)) || (cc == QChar(10)))
- break;
- if ((cc == "(") || (cc == ")") || (cc == "\\"))
- bm2 += "\\";
- bm += cc;
- bm2 += cc;
- }
- AddItem(bm, bm2, ite->OwnPage->PageNr, ite->ItemNr);
- ite->BMnr = NrItems;
- Last = NrItems;
-}
-
-void BookMView::contentsMouseReleaseEvent(QMouseEvent *)
-{
- Mpressed = false;
-}
-
-void BookMView::contentsMousePressEvent(QMouseEvent* e)
-{
- QListView::contentsMousePressEvent(e);
- QListViewItem *i = itemAt(contentsToViewport(e->pos()));
- if (i)
- {
- Mpos = e->pos();
- Mpressed = true;
- }
-}
-
-void BookMView::contentsMouseMoveEvent(QMouseEvent* e)
-{
- if ((Mpressed) && ((Mpos - e->pos()).manhattanLength() > 4))
- {
- Mpressed = false;
- QListViewItem *i = itemAt(contentsToViewport(Mpos));
- if (i)
- {
- DraggedI = (BookMItem*)i;
- QDragObject *dr = new QTextDrag(i->text(0), this, "BMD");
- dr->drag();
- }
- }
-}
-
-void BookMView::contentsDropEvent(QDropEvent *e)
-{
- QString text;
- int ins, mov, mret;
- QListViewItem *pp;
- QListViewItem *lv;
- BookMItem *ip;
- BookMItem *ip2;
- BookMItem *ite;
- if (!QTextDrag::decode(e, text))
- {
- e->ignore();
- return;
- }
- QListViewItem *item = itemAt(contentsToViewport(e->pos()));
- BookMItem *Bite = (BookMItem*)item;
- if ((item) && (DraggedI != 0))
- {
- if ((BookMItem*)item != DraggedI)
- {
- pp = item->parent();
- while (pp)
- {
- if (pp == DraggedI)
- return;
- pp = pp->parent();
- }
- QPopupMenu *pmenu = new QPopupMenu();
- mov = pmenu->insertItem(tr("Move Bookmark"));
- ins = pmenu->insertItem(tr("Insert Bookmark"));
- pmenu->insertItem(tr("Cancel"));
- mret = pmenu->exec(QCursor::pos());
- if (mret == ins)
- {
- lv = DraggedI->parent();
- lv = lv ? lv->firstChild() : firstChild();
- if (!DraggedI->Prev == 0)
- {
- while (lv)
- {
- ip = (BookMItem*)lv;
- if (ip->ItemNr == DraggedI->Prev)
- break;
- lv = lv->nextSibling();
- }
- ip = (BookMItem*)lv;
- lv = DraggedI->nextSibling();
- if (lv)
- {
- ip2 = (BookMItem*)lv;
- ip2->Prev = ip->ItemNr;
- ip->Next = ip2->ItemNr;
- }
- else
- ip->Next = 0;
- }
- lv = DraggedI->parent();
- item->insertItem(DraggedI);
- lv ? lv = lv->firstChild() : lv = firstChild();
- if (DraggedI->Prev == 0)
- {
- ip = (BookMItem*)lv;
- ip->Prev = 0;
- }
- QListViewItemIterator it(this);
- for ( ; it.current(); ++it)
- {
- ite = (BookMItem*)it.current();
- if (ite->ItemNr == DraggedI->ItemNr)
- DraggedI = ite;
- }
- DraggedI->Pare = Bite->ItemNr;
- ip = (BookMItem*)item->firstChild();
- Bite->First = ip->ItemNr;
- lv = item->firstChild();
- while (lv)
- {
- if (!lv->nextSibling())
- {
- ip = (BookMItem*)lv;
- Bite->Last = ip->ItemNr;
- break;
- }
- lv = lv->nextSibling();
- }
- if (DraggedI->nextSibling())
- {
- ip = (BookMItem*)DraggedI->nextSibling();
- DraggedI->Next = ip->ItemNr;
- ip->Prev = DraggedI->ItemNr;
- }
- else
- DraggedI->Next = 0;
- if (DraggedI != item->firstChild())
- {
- ip = (BookMItem*)DraggedI->itemAbove();
- DraggedI->Prev = ip->ItemNr;
- ip->Next = DraggedI->ItemNr;
- }
- else
- DraggedI->Prev = 0;
- }
- if (mret == mov)
- {
- lv = DraggedI->parent();
- lv ? lv = lv->firstChild() : lv = firstChild();
- if (DraggedI->Prev == 0)
- {
- ip = (BookMItem*)lv->nextSibling();
- ip->Prev = 0;
- }
- else
- {
- while (lv)
- {
- ip = (BookMItem*)lv;
- if (ip->ItemNr == DraggedI->Prev)
- break;
- lv = lv->nextSibling();
- }
- }
- ip = (BookMItem*)lv;
- lv = DraggedI->nextSibling();
- if (lv)
- {
- ip2 = (BookMItem*)lv;
- ip2->Prev = ip->ItemNr;
- ip->Next = ip2->ItemNr;
- }
- else
- ip->Next = 0;
- lv = DraggedI->parent();
- DraggedI->moveItem(item);
- lv ? lv = lv->firstChild() : lv = firstChild();
- if (DraggedI->Prev == 0)
- {
- ip = (BookMItem*)lv;
- ip->Prev = 0;
- }
- QListViewItemIterator it2(this);
- for ( ; it2.current(); ++it2)
- {
- ite = (BookMItem*)it2.current();
- if (ite->ItemNr == DraggedI->ItemNr)
- DraggedI = ite;
- }
- ip = (BookMItem*)item;
- DraggedI->Pare = ip->Pare;
- DraggedI->Prev = ip->ItemNr;
- ip->Next = DraggedI->ItemNr;
- if (DraggedI->nextSibling())
- {
- ip = (BookMItem*)DraggedI->nextSibling();
- DraggedI->Next = ip->ItemNr;
- ip->Prev = DraggedI->ItemNr;
- }
- else
- DraggedI->Next = 0;
- lv = item->parent();
- if (lv)
- {
- ip = (BookMItem*)lv->firstChild();
- ip2 = (BookMItem*)lv;
- ip2->First = ip->ItemNr;
- lv = lv->firstChild();
- while (lv)
- {
- if (!lv->nextSibling())
- {
- ip = (BookMItem*)lv;
- ip2->Last = ip->ItemNr;
- break;
- }
- lv = lv->nextSibling();
- }
- }
- }
- delete pmenu;
- DraggedI = 0;
- emit MarkMoved();
- }
- }
-}
-
-void BookMView::contentsDragMoveEvent(QDragMoveEvent *e)
-{
- QString text;
- if (!QTextDrag::decode(e, text))
- {
- e->ignore();
- return;
- }
- QListViewItem *item = itemAt(contentsToViewport(e->pos()));
- if (item)
- {
- setSelected(item, true);
- e->accept();
- }
- else
- e->ignore();
-}
-
-void BookMView::AddItem(QString text, QString Tit, int s, int el)
-{
- QListViewItem *lv = firstChild();
- while (lv)
- {
- if (!lv->nextSibling())
- break;
- lv = lv->nextSibling();
- }
- BookMItem *ip;
- BookMItem *ite;
- if (lv)
- ite = new BookMItem(this, lv, NrItems+1, s, el);
- else
- ite = new BookMItem(this, NrItems+1, s, el);
- ite->setText(0, text);
- ite->Titel = Tit;
- ite->Next = 0;
- if (lv)
- {
- ip = (BookMItem*)lv;
- ip->Next = ite->ItemNr;
- ite->Prev = ip->ItemNr;
- }
- NrItems++;
-}
-
-void BookMView::DeleteItem(int nr)
-{
- BookMItem *ite;
- BookMItem *ite2 = 0;
- BookMItem *ite3;
- BookMItem *ite4;
- QListViewItemIterator it(this);
- for ( ; it.current(); ++it)
- {
- ite = (BookMItem*)it.current();
- if (ite->Next == nr)
- ite2 = ite;
- if (ite->ItemNr == nr)
- {
- QListViewItem *pp = ite->firstChild();
- QListViewItem *ppn = ite->nextSibling();
- if ((ite->parent()) && (ite2 == 0) && (ppn))
- {
- ite3 = (BookMItem*)ite->parent();
- ite4 = (BookMItem*)ppn;
- ite3->First = ite4->ItemNr;
- }
- while (pp)
- {
- ite->parent() ? ite->parent()->insertItem(pp) : pp->moveItem(ite);
- pp = ite->firstChild();
- }
- if (ppn)
- {
- ite3 = (BookMItem*)ppn;
- if (ite2)
- {
- ite2->Next = ite3->ItemNr;
- ite3->Prev = ite2->ItemNr;
- }
- else
- ite3->Prev = 0;
- }
- else
- if (ite2)
- ite2->Next = 0;
- delete ite;
- }
- }
- QMap<int,int> Tabl;
- Tabl.clear();
- Tabl[0] = 0;
- int Counter = 1;
- QListViewItemIterator itn(this);
- for ( ; itn.current(); ++itn)
- {
- ite = (BookMItem*)itn.current();
- Tabl[ite->ItemNr] = Counter;
- Counter++;
- }
- QListViewItemIterator itnf(this);
- for ( ; itnf.current(); ++itnf)
- {
- ite = (BookMItem*)itnf.current();
- ite->ItemNr = Tabl[ite->ItemNr];
- ite->Pare = Tabl[ite->Pare];
- ite->Next = Tabl[ite->Next];
- ite->Prev = Tabl[ite->Prev];
- ite->First = Tabl[ite->First];
- ite->Last = Tabl[ite->Last];
- emit ChangeBMNr(ite->Seite, ite->Element, ite->ItemNr);
- }
-}
-
-void BookMView::ChangeItem(int nr, int itnr)
-{
- BookMItem *ite;
- QListViewItemIterator it(this);
- for ( ; it.current(); ++it)
- {
- ite = (BookMItem*)it.current();
- if (ite->ItemNr == nr)
- {
- ite->Element = itnr;
- break;
- }
- }
-}
-
-void BookMView::SetAction(int nr, QString Act)
-{
- BookMItem *ite;
- QListViewItemIterator it(this);
- for ( ; it.current(); ++it)
- {
- ite = (BookMItem*)it.current();
- if (ite->ItemNr == nr)
- {
- ite->Action = Act;
- break;
- }
- }
-}
-
-void BookMView::ChangeText(PageItem *b)
-{
- BookMItem *ite;
- QString bm = "";
- QString bm2 = "";
- QString cc;
- int nr = b->BMnr;
- for (uint d = 0; d < b->Ptext.count(); ++d)
- {
- cc = b->Ptext.at(d)->ch;
- if ((cc == QChar(13)) || (cc == QChar(10)))
- break;
- if ((cc == "(") || (cc == ")") || (cc == "\\"))
- bm2 += "\\";
- bm += cc;
- bm2 += cc;
- }
- QListViewItemIterator it(this);
- for ( ; it.current(); ++it)
- {
- ite = (BookMItem*)it.current();
- if (ite->ItemNr == nr)
- {
- ite->setText(0, bm);
- ite->Titel = bm2;
- break;
- }
- }
-}
-
/start/Scribus/scribus/bookmwin.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/hyphenator.h
===================================================================
--- start/Scribus/scribus/hyphenator.h (revision 427)
+++ start/Scribus/scribus/hyphenator.h (nonexistent)
@@ -1,31 +0,0 @@
-#ifndef HYPLUG_H
-#define HYPLUG_H
-
-#include <qobject.h>
-#include "hyphen.h"
-class ScribusDoc;
-class ScribusApp;
-class PageItem;
-
-class Hyphenator : public QObject
-{
- Q_OBJECT
-
-public:
- Hyphenator(QWidget* parent, ScribusDoc *dok, ScribusApp* app);
- ~Hyphenator();
- int MinWordLen;
- QString Language;
- bool Automatic;
- bool AutoCheck;
- HyphenDict *hdict;
- ScribusDoc *doc;
- ScribusApp *Sap;
-
-public slots:
- void slotNewDict(QString name);
- void slotNewSettings(int Wordlen, bool Autom, bool ACheck);
- void slotHyphenateWord(PageItem* it, QString text, int firstC);
- void slotHyphenate(PageItem *it);
-};
-#endif
/start/Scribus/scribus/hyphenator.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/cmsprefs.h
===================================================================
--- start/Scribus/scribus/cmsprefs.h (revision 427)
+++ start/Scribus/scribus/cmsprefs.h (nonexistent)
@@ -1,65 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'CMSpref.ui'
-**
-** Created: Tue Jan 1 10:37:11 2002
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef CMSPREFS_H
-#define CMSPREFS_H
-
-#include <qdialog.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include "scribusdoc.h"
-
-class CMSPrefs : public QDialog
-{
- Q_OBJECT
-
-public:
- CMSPrefs( QWidget* parent, CMSset *Vor,
- ProfilesL *InputProfiles, ProfilesL *PrinterProfiles, ProfilesL *MonitorProfiles);
- ~CMSPrefs() {};
-
- QCheckBox* CheckBox1;
- QGroupBox* SysProfiles;
- QLabel* Text2;
- QLabel* Text1;
- QLabel* Text3;
- QLabel* Text4;
- QComboBox* InputP;
- QComboBox* InputP2;
- QComboBox* MonitorP;
- QComboBox* PrinterP;
- QGroupBox* Render;
- QLabel* Text22;
- QComboBox* MonitorI;
- QComboBox* PrinterI;
- QLabel* Text21;
- QCheckBox* Simulate;
- QCheckBox* GamutC;
- QPushButton* Cancel;
- QPushButton* OK;
- CMSset *Prefs;
- bool Changed;
-
-public slots:
- virtual void slotCMSon();
- virtual void SetValues();
- virtual void slotSimula();
-
-protected:
- QVBoxLayout* CMSPrefsLayout;
- QGridLayout* SysProfilesLayout;
- QGridLayout* RenderLayout;
- QHBoxLayout* Layout1;
-};
-
-#endif // CMSPREFS_H
/start/Scribus/scribus/cmsprefs.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/rc4.c
===================================================================
--- start/Scribus/scribus/rc4.c (revision 427)
+++ start/Scribus/scribus/rc4.c (nonexistent)
@@ -1,145 +0,0 @@
-/*
- * "$Id$"
- *
- * RC4 functions for HTMLDOC.
- *
- * Original code by Tim Martin
- * Copyright 1999 by Carnegie Mellon University, All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Carnegie Mellon
- * University not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission.
- *
- * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Contents:
- *
- * rc4_init() - Initialize an RC4 context with the specified key.
- * rc4_encrypt() - Encrypt the given buffer.
- */
-
-#include "rc4.h"
-
-
-/*
- * 'rc4_init()' - Initialize an RC4 context with the specified key.
- */
-
-void
-rc4_init(rc4_context_t *text, /* IO - Context */
- const unsigned char *key, /* I - Key */
- unsigned keylen) /* I - Length of key */
-{
- int i, j; /* Looping vars */
- unsigned char tmp; /* Temporary variable */
-
-
- /*
- * Fill in linearly s0=0, s1=1, ...
- */
-
- for (i = 0; i < 256; i ++)
- text->sbox[i] = i;
-
- for (i = 0, j = 0; i < 256; i ++)
- {
- /*
- * j = (j + Si + Ki) mod 256
- */
-
- j = (j + text->sbox[i] + key[i % keylen]) & 255;
-
- /*
- * Swap Si and Sj...
- */
-
- tmp = text->sbox[i];
- text->sbox[i] = text->sbox[j];
- text->sbox[j] = tmp;
- }
-
- /*
- * Initialized counters to 0 and return...
- */
-
- text->i = 0;
- text->j = 0;
-}
-
-
-/*
- * 'rc4_encrypt()' - Encrypt the given buffer.
- */
-
-void
-rc4_encrypt(rc4_context_t *text, /* I - Context */
- const unsigned char *input, /* I - Input buffer */
- unsigned char *output, /* O - Output buffer */
- unsigned len) /* I - Size of buffers */
-{
- unsigned char tmp; /* Swap variable */
- int i, j; /* Looping vars */
- int t; /* Current S box */
-
-
- /*
- * Loop through the entire buffer...
- */
-
- i = text->i;
- j = text->j;
-
- while (len > 0)
- {
- /*
- * Get the next S box indices...
- */
-
- i = (i + 1) & 255;
- j = (j + text->sbox[i]) & 255;
-
- /*
- * Swap Si and Sj...
- */
-
- tmp = text->sbox[i];
- text->sbox[i] = text->sbox[j];
- text->sbox[j] = tmp;
-
- /*
- * Get the S box index for this byte...
- */
-
- t = (text->sbox[i] + text->sbox[j]) & 255;
-
- /*
- * Encrypt using the S box...
- */
-
- *output++ = *input++ ^ text->sbox[t];
- len --;
- }
-
- /*
- * Copy current S box indices back to context...
- */
-
- text->i = i;
- text->j = j;
-}
-
-
-/*
- * End of "$Id$".
- */
/start/Scribus/scribus/rc4.c
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/Makefile.am
===================================================================
--- start/Scribus/scribus/Makefile.am (revision 427)
+++ start/Scribus/scribus/Makefile.am (nonexistent)
@@ -1,183 +0,0 @@
-bin_PROGRAMS = scribus
-
-scribus_SOURCES = mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp kimageeffect.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scfonts_encoding.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp modify.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
-SOURCES = libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp kimageeffect.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scfonts_encoding.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp modify.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
-INTERFACES =
-TRANSLATIONS =
-
-SUBDIRS = icons libabout libprefs plugins libpostscript profiles libpdf dicts po qm
-
-EXTRA_DIST = main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h pageback.cpp pageback.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h modify.cpp modify.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h ISOenc.txt frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h TTFenc.txt Stdenc.txt scfonts_encoding.cpp scfonts_encoding.h scfonts_ttf.cpp scfonts_ttf.h scfonts_ttftypes.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h icc34.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h kimageeffect.cpp kimageeffect.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h iso8859-2.enc iso8859-13.enc iso8859-15.enc iso8859-2ps.enc iso8859-3ps.enc iso8859-4ps.enc iso8859-5ps.enc iso8859-7ps.enc iso8859-9ps.enc iso8859-10ps.enc iso8859-13ps.enc koi8ps.enc
-
-install-data-local:
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scribus.h $(prefix)/include/scribus/scribus.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scribusdoc.h $(prefix)/include/scribus/scribusdoc.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scribusview.h $(prefix)/include/scribus/scribusview.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/pageitem.h $(prefix)/include/scribus/pageitem.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/hruler.h $(prefix)/include/scribus/hruler.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/vruler.h $(prefix)/include/scribus/vruler.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/colorm.h $(prefix)/include/scribus/colorm.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/query.h $(prefix)/include/scribus/query.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/cpalette.h $(prefix)/include/scribus/cpalette.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/tree.h $(prefix)/include/scribus/tree.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/modify.h $(prefix)/include/scribus/modify.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/mspinbox.h $(prefix)/include/scribus/mspinbox.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/helpbrowser.h $(prefix)/include/scribus/helpbrowser.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/linkbutton.h $(prefix)/include/scribus/linkbutton.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/linecombo.h $(prefix)/include/scribus/linecombo.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/cmykcolor.h $(prefix)/include/scribus/cmykcolor.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/spalette.h $(prefix)/include/scribus/spalette.h
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/ISOenc.txt $(prefix)/lib/scribus/ISOenc.txt
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/frameedit.h $(prefix)/include/scribus/frameedit.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scfonts.h $(prefix)/include/scribus/scfonts.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scrap.h $(prefix)/include/scribus/scrap.h
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/TTFenc.txt $(prefix)/lib/scribus/TTFenc.txt
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/Stdenc.txt $(prefix)/lib/scribus/Stdenc.txt
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scfonts_encoding.h $(prefix)/include/scribus/scfonts_encoding.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/muster.h $(prefix)/include/scribus/muster.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/customfdialog.h $(prefix)/include/scribus/customfdialog.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/bookmwin.h $(prefix)/include/scribus/bookmwin.h
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-15.enc $(prefix)/lib/scribus/iso8859-15.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-2.enc $(prefix)/lib/scribus/iso8859-2.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-13.enc $(prefix)/lib/scribus/iso8859-13.enc
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/werktoolb.h $(prefix)/include/scribus/werktoolb.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/mpalette.h $(prefix)/include/scribus/mpalette.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/layers.h $(prefix)/include/scribus/layers.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/page.h $(prefix)/include/scribus/page.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/fpoint.h $(prefix)/include/scribus/fpoint.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/fpointarray.h $(prefix)/include/scribus/fpointarray.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/seiten.h $(prefix)/include/scribus/seiten.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/hyphen.h $(prefix)/include/scribus/hyphen.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/hyphenator.h $(prefix)/include/scribus/hyphenator.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/scribuswin.h $(prefix)/include/scribus/scribuswin.h
- $(mkinstalldirs) $(prefix)/include/scribus/
- $(INSTALL_DATA) $(srcdir)/bookpalette.h $(prefix)/include/scribus/bookpalette.h
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-2ps.enc $(prefix)/lib/scribus/iso8859-2ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-3ps.enc $(prefix)/lib/scribus/iso8859-3ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-4ps.enc $(prefix)/lib/scribus/iso8859-4ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-5ps.enc $(prefix)/lib/scribus/iso8859-5ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-7ps.enc $(prefix)/lib/scribus/iso8859-7ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-9ps.enc $(prefix)/lib/scribus/iso8859-9ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-10ps.enc $(prefix)/lib/scribus/iso8859-10ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/iso8859-13ps.enc $(prefix)/lib/scribus/iso8859-13ps.enc
- $(mkinstalldirs) $(prefix)/lib/scribus/
- $(INSTALL_DATA) $(srcdir)/koi8ps.enc $(prefix)/lib/scribus/koi8ps.enc
-
-uninstall-local:
- -rm -f $(prefix)/include/scribus/scribus.h
- -rm -f $(prefix)/include/scribus/scribusdoc.h
- -rm -f $(prefix)/include/scribus/scribusview.h
- -rm -f $(prefix)/include/scribus/pageitem.h
- -rm -f $(prefix)/include/scribus/hruler.h
- -rm -f $(prefix)/include/scribus/vruler.h
- -rm -f $(prefix)/include/scribus/colorm.h
- -rm -f $(prefix)/include/scribus/query.h
- -rm -f $(prefix)/include/scribus/cpalette.h
- -rm -f $(prefix)/include/scribus/tree.h
- -rm -f $(prefix)/include/scribus/modify.h
- -rm -f $(prefix)/include/scribus/mspinbox.h
- -rm -f $(prefix)/include/scribus/helpbrowser.h
- -rm -f $(prefix)/include/scribus/linkbutton.h
- -rm -f $(prefix)/include/scribus/linecombo.h
- -rm -f $(prefix)/include/scribus/cmykcolor.h
- -rm -f $(prefix)/include/scribus/spalette.h
- -rm -f $(prefix)/lib/scribus/ISOenc.txt
- -rm -f $(prefix)/include/scribus/frameedit.h
- -rm -f $(prefix)/include/scribus/scfonts.h
- -rm -f $(prefix)/include/scribus/scrap.h
- -rm -f $(prefix)/lib/scribus/TTFenc.txt
- -rm -f $(prefix)/lib/scribus/Stdenc.txt
- -rm -f $(prefix)/include/scribus/scfonts_encoding.h
- -rm -f $(prefix)/include/scribus/muster.h
- -rm -f $(prefix)/include/scribus/customfdialog.h
- -rm -f $(prefix)/include/scribus/bookmwin.h
- -rm -f $(prefix)/lib/scribus/iso8859-15.enc
- -rm -f $(prefix)/lib/scribus/iso8859-2.enc
- -rm -f $(prefix)/lib/scribus/iso8859-13.enc
- -rm -f $(prefix)/include/scribus/werktoolb.h
- -rm -f $(prefix)/include/scribus/mpalette.h
- -rm -f $(prefix)/include/scribus/layers.h
- -rm -f $(prefix)/include/scribus/page.h
- -rm -f $(prefix)/include/scribus/fpoint.h
- -rm -f $(prefix)/include/scribus/fpointarray.h
- -rm -f $(prefix)/include/scribus/seiten.h
- -rm -f $(prefix)/include/scribus/hyphen.h
- -rm -f $(prefix)/include/scribus/hyphenator.h
- -rm -f $(prefix)/include/scribus/scribuswin.h
- -rm -f $(prefix)/include/scribus/bookpalette.h
- -rm -f $(prefix)/lib/scribus/iso8859-2ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-3ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-4ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-5ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-7ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-9ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-10ps.enc
- -rm -f $(prefix)/lib/scribus/iso8859-13ps.enc
- -rm -f $(prefix)/lib/scribus/koi8ps.enc
-
-scribus_LDADD = $(LIBFREETYPE_LIBS) $(LIBCUPS) $(LIBLCMS) $(LIBDL) $(LIBDL2) $(LIBTIFF) -lm $(LIB_QT) -lXext -lX11 $(LIBSOCKET)
-AM_LDFLAGS = -export-dynamic -s
-# set the include path for X, qt and KDE
-INCLUDES= $(LIBFREETYPE_CFLAGS) $(all_includes)
-
-scribus_METASOURCES = AUTO
-
-# the library search path.
-scribus_LDFLAGS = $(all_libraries)
-
-# them while "make clean", use CLEANFILES
-DISTCLEANFILES = $(scribus_METASOURCES)
-
-# this is to enable Qt behavoir of am_edit
-KDE_OPTIONS = qtonly
-
-
-
/start/Scribus/scribus/Makefile.am
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/newfile.cpp
===================================================================
--- start/Scribus/scribus/newfile.cpp (revision 427)
+++ start/Scribus/scribus/newfile.cpp (nonexistent)
@@ -1,566 +0,0 @@
-#include "newfile.h"
-#include "newfile.moc"
-extern QPixmap loadIcon(QString nam);
-
-NewDoc::NewDoc( QWidget* parent, preV *Vor )
- : QDialog( parent, "newDoc", true, 0 )
-{
- switch (Vor->Einheit)
- {
- case 0:
- Umrech = 1.0;
- ein = " pt";
- break;
- case 1:
- Umrech = 0.3527777;
- ein = " mm";
- break;
- case 2:
- Umrech = 1.0 / 72.0;
- ein = " in";
- break;
- case 3:
- Umrech = 1.0 / 12.0;
- ein = " p";
- break;
- }
- einheit = Vor->Einheit;
- Orient = 0;
- setCaption( tr( "New Document" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- NewDocLayout = new QHBoxLayout( this, 10, 5, "NewDocLayout");
- Layout9 = new QVBoxLayout(0, 0, 5, "Layout9");
-
- ButtonGroup1_2 = new QButtonGroup(this, "ButtonGroup1_2" );
- ButtonGroup1_2->setTitle(tr( "Page Size" ));
- ButtonGroup1_2->setColumnLayout(0, Qt::Vertical);
- ButtonGroup1_2->layout()->setSpacing(6);
- ButtonGroup1_2->layout()->setMargin(10);
- ButtonGroup1_2Layout = new QVBoxLayout(ButtonGroup1_2->layout());
- ButtonGroup1_2Layout->setAlignment(Qt::AlignTop);
- Layout6 = new QGridLayout(0, 1, 1, 0, 6, "Layout6");
- TextLabel1 = new QLabel( ButtonGroup1_2, "TextLabel1" );
- TextLabel1->setText(tr( "Size:" ));
- Layout6->addWidget( TextLabel1, 0, 0 );
- ComboBox1 = new QComboBox( true, ButtonGroup1_2, "ComboBox1" );
- ComboBox1->insertItem( tr( "A0" ) );
- ComboBox1->insertItem( tr( "A1" ) );
- ComboBox1->insertItem( tr( "A2" ) );
- ComboBox1->insertItem( tr( "A3" ) );
- ComboBox1->insertItem( tr( "A4" ) );
- ComboBox1->insertItem( tr( "A5" ) );
- ComboBox1->insertItem( tr( "A6" ) );
- ComboBox1->insertItem( tr( "A7" ) );
- ComboBox1->insertItem( tr( "A8" ) );
- ComboBox1->insertItem( tr( "A9" ) );
- ComboBox1->insertItem( tr( "B0" ) );
- ComboBox1->insertItem( tr( "B1" ) );
- ComboBox1->insertItem( tr( "B2" ) );
- ComboBox1->insertItem( tr( "B3" ) );
- ComboBox1->insertItem( tr( "B4" ) );
- ComboBox1->insertItem( tr( "B5" ) );
- ComboBox1->insertItem( tr( "B6" ) );
- ComboBox1->insertItem( tr( "B7" ) );
- ComboBox1->insertItem( tr( "B8" ) );
- ComboBox1->insertItem( tr( "B9" ) );
- ComboBox1->insertItem( tr( "B10" ) );
- ComboBox1->insertItem( tr( "C5E" ) );
- ComboBox1->insertItem( tr( "Comm10E" ) );
- ComboBox1->insertItem( tr( "DLE" ) );
- ComboBox1->insertItem( tr( "Executive" ) );
- ComboBox1->insertItem( tr( "Folio" ) );
- ComboBox1->insertItem( tr( "Ledger" ) );
- ComboBox1->insertItem( tr( "Legal" ) );
- ComboBox1->insertItem( tr( "Letter" ) );
- ComboBox1->insertItem( tr( "Tabloid" ) );
- ComboBox1->insertItem( tr( "Custom" ) );
- ComboBox1->setEditable(false);
- Layout6->addWidget(ComboBox1, 0, 1 );
- TextLabel2 = new QLabel( ButtonGroup1_2, "TextLabel2" );
- TextLabel2->setText(tr( "Orientation:" ));
- Layout6->addWidget( TextLabel2, 1, 0 );
- ComboBox2 = new QComboBox( true, ButtonGroup1_2, "ComboBox2" );
- ComboBox2->insertItem( tr( "Portrait" ) );
- ComboBox2->insertItem( tr( "Landscape" ) );
- ComboBox2->setEditable(false);
- ComboBox2->setCurrentItem(Vor->Ausrichtung);
- Layout6->addWidget( ComboBox2, 1, 1 );
- ButtonGroup1_2Layout->addLayout( Layout6 );
-
- Layout5 = new QHBoxLayout( 0, 0, 6, "Layout5");
- TextLabel1_2 = new QLabel( ButtonGroup1_2, "TextLabel1_2" );
- TextLabel1_2->setText( tr( "Width:" ) );
- Layout5->addWidget( TextLabel1_2 );
- Breite = new MSpinBox( ButtonGroup1_2, 2 );
- Breite->setEnabled( false );
- Breite->setMinimumSize( QSize( 70, 20 ) );
- Breite->setSuffix(ein);
- Breite->setMaxValue( 1000000 );
- Breite->setMinValue( 1 );
- Layout5->addWidget( Breite );
- TextLabel2_2 = new QLabel( ButtonGroup1_2, "TextLabel2_2" );
- TextLabel2_2->setText( tr( "Height:" ) );
- Layout5->addWidget( TextLabel2_2 );
- Hoehe = new MSpinBox( ButtonGroup1_2, 2 );
- Hoehe->setEnabled( false );
- Hoehe->setMinimumSize( QSize( 70, 20 ) );
- Hoehe->setSuffix(ein);
- Hoehe->setMaxValue( 1000000 );
- Hoehe->setMinValue( 1 );
- Layout5->addWidget( Hoehe );
- ButtonGroup1_2Layout->addLayout( Layout5 );
- Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
- Doppelseiten = new QCheckBox( ButtonGroup1_2, "Doppelseiten" );
- Doppelseiten->setText( tr( "Facing Pages" ) );
- Doppelseiten->setChecked(Vor->DoppelSeiten);
- Layout8->addWidget( Doppelseiten );
- ErsteSeite = new QCheckBox( ButtonGroup1_2, "CheckBox3" );
- ErsteSeite->setText( tr( "Left Page first" ) );
- ErsteSeite->setChecked(Vor->ErsteLinks);
- Layout8->addWidget( ErsteSeite );
- ButtonGroup1_2Layout->addLayout( Layout8 );
- Layout9->addWidget( ButtonGroup1_2 );
- ComboBox1->setCurrentItem(Vor->PageFormat);
- Breite->setValue(qRound(Vor->PageBreite * Umrech) * 100);
- Hoehe->setValue(qRound(Vor->PageHoehe * Umrech) * 100);
- setSize(Vor->PageFormat);
- Breite->setLineStep(100);
- Hoehe->setLineStep(100);
-
- GroupBox7 = new QGroupBox( this, "GroupBox7" );
- GroupBox7->setTitle( tr( "Margin Guides" ) );
- GroupBox7->setColumnLayout(0, Qt::Vertical );
- GroupBox7->layout()->setSpacing( 0 );
- GroupBox7->layout()->setMargin( 0 );
- GroupBox7Layout = new QHBoxLayout( GroupBox7->layout() );
- GroupBox7Layout->setAlignment( Qt::AlignTop );
- GroupBox7Layout->setSpacing( 5 );
- GroupBox7Layout->setMargin( 10 );
- Layout3 = new QGridLayout;
- Layout3->setSpacing( 6 );
- Layout3->setMargin( 5 );
- TextLabel6 = new QLabel( GroupBox7, "TextLabel6" );
- TextLabel6->setText( tr( "Left:" ) );
- Layout3->addWidget( TextLabel6, 0, 2 );
- TextLabel8 = new QLabel( GroupBox7, "TextLabel8" );
- TextLabel8->setText( tr( "Right:" ) );
- Layout3->addWidget( TextLabel8, 1, 2 );
- TextLabel5 = new QLabel( GroupBox7, "TextLabel5" );
- TextLabel5->setText( tr( "Top:" ) );
- Layout3->addWidget( TextLabel5, 0, 0 );
- TextLabel7 = new QLabel( GroupBox7, "TextLabel7" );
- TextLabel7->setText( tr( "Bottom:" ) );
- Layout3->addWidget( TextLabel7, 1, 0 );
- TopR = new MSpinBox( GroupBox7, 2 );
- TopR->setMinimumSize( QSize( 70, 20 ) );
- TopR->setMaxValue( 100000 );
- TopR->setMinValue( 0 );
- TopR->setSuffix( ein );
- TopR->setValue( qRound(Vor->RandOben * Umrech * 100));
- Top = Vor->RandOben;
- Layout3->addWidget( TopR, 0, 1 );
- BottomR = new MSpinBox( GroupBox7, 2 );
- BottomR->setMinimumSize( QSize( 70, 20 ) );
- BottomR->setSuffix( ein );
- BottomR->setMaxValue( 100000 );
- BottomR->setMinValue( 0 );
- BottomR->setValue( qRound(Vor->RandUnten * Umrech * 100) );
- Bottom = Vor->RandUnten;
- Layout3->addWidget( BottomR, 1, 1 );
- LeftR = new MSpinBox( GroupBox7, 2 );
- LeftR->setMinimumSize( QSize( 70, 20 ) );
- LeftR->setSuffix( ein );
- LeftR->setMaxValue( 100000 );
- LeftR->setMinValue( 0 );
- LeftR->setValue( qRound(Vor->RandLinks * Umrech * 100) );
- Left = Vor->RandLinks;
- Layout3->addWidget( LeftR, 0, 3 );
- RightR = new MSpinBox( GroupBox7, 2 );
- RightR->setMinimumSize( QSize( 70, 20 ) );
- RightR->setSuffix( ein );
- RightR->setMaxValue( 100000 );
- RightR->setMinValue( 0 );
- RightR->setValue( qRound(Vor->RandRechts * Umrech * 100) );
- Right = Vor->RandRechts;
- Layout3->addWidget( RightR, 1, 3 );
- GroupBox7Layout->addLayout( Layout3 );
- Layout9->addWidget( GroupBox7 );
- NewDocLayout->addLayout( Layout9 );
- setDS();
- TopR->setDecimals(100);
- LeftR->setDecimals(100);
- RightR->setDecimals(100);
- BottomR->setDecimals(100);
-
- Layout10 = new QVBoxLayout( 0, 0, 6, "Layout10");
-
- GroupBox3 = new QGroupBox( this, "GroupBox3" );
- GroupBox3->setTitle( tr( "Options" ) );
- GroupBox3->setColumnLayout(0, Qt::Vertical );
- GroupBox3->layout()->setSpacing( 5 );
- GroupBox3->layout()->setMargin( 10 );
- GroupBox3Layout = new QGridLayout( GroupBox3->layout() );
- GroupBox3Layout->setAlignment( Qt::AlignTop );
- TextLabel1_3 = new QLabel( GroupBox3, "TextLabel1_3" );
- TextLabel1_3->setText( tr( "First Pagenumber:" ) );
- GroupBox3Layout->addMultiCellWidget( TextLabel1_3, 0, 0, 0, 1 );
- PgNr = new QSpinBox( GroupBox3, "PgNr" );
- PgNr->setMaxValue( 1000 );
- PgNr->setMinValue( 1 );
- GroupBox3Layout->addWidget( PgNr, 0, 2, Qt::AlignRight );
- TextLabel2_3 = new QLabel( GroupBox3, "TextLabel2_3" );
- TextLabel2_3->setText( tr( "Default Unit:" ) );
- GroupBox3Layout->addWidget( TextLabel2_3, 1, 0 );
- ComboBox3 = new QComboBox( true, GroupBox3, "ComboBox3" );
- ComboBox3->insertItem( tr( "Points (pts)" ) );
- ComboBox3->insertItem( tr( "Millimeters (mm)" ) );
- ComboBox3->insertItem( tr( "Inches (in)" ) );
- ComboBox3->insertItem( tr( "Picas (p)" ) );
- ComboBox3->setCurrentItem(einheit);
- ComboBox3->setEditable(false);
- GroupBox3Layout->addMultiCellWidget( ComboBox3, 1, 1, 1, 2 );
- Layout10->addWidget( GroupBox3 );
-
- AutoFrame = new QCheckBox( this, "AutoFrame" );
- AutoFrame->setText( tr( "Autom. Textframes" ) );
- Layout10->addWidget( AutoFrame );
-
- GroupBox4 = new QGroupBox( this, "GroupBox4" );
- GroupBox4->setTitle( tr( "Column Guides" ) );
- GroupBox4->setColumnLayout(0, Qt::Vertical );
- GroupBox4->layout()->setSpacing( 0 );
- GroupBox4->layout()->setMargin( 0 );
- GroupBox4Layout = new QHBoxLayout( GroupBox4->layout() );
- GroupBox4Layout->setAlignment( Qt::AlignTop );
- GroupBox4Layout->setSpacing( 5 );
- GroupBox4Layout->setMargin( 10 );
- Layout2 = new QGridLayout;
- Layout2->setSpacing( 6 );
- Layout2->setMargin( 5 );
- TextLabel4 = new QLabel( GroupBox4, "TextLabel4" );
- TextLabel4->setText( tr( "Gutter Width:" ) );
- Layout2->addWidget( TextLabel4, 1, 0 );
- TextLabel3 = new QLabel( GroupBox4, "TextLabel3" );
- TextLabel3->setText( tr( "Columns:" ) );
- Layout2->addWidget( TextLabel3, 0, 0 );
- Distance = new MSpinBox( GroupBox4, 2 );
-// Distance->setMinimumSize( QSize( 70, 20 ) );
- Distance->setSuffix( ein );
- Distance->setMaxValue( 100000 );
- Distance->setValue( qRound(11 * Umrech * 100) );
- Dist = 11;
- Layout2->addWidget( Distance, 1, 1, Qt::AlignLeft );
- SpinBox10 = new QSpinBox( GroupBox4, "SpinBox10" );
-// SpinBox10->setMinimumSize( QSize( 70, 20 ) );
- SpinBox10->setButtonSymbols( QSpinBox::UpDownArrows );
- SpinBox10->setMinValue( 1 );
- SpinBox10->setValue( 1 );
- Layout2->addWidget( SpinBox10, 0, 1, Qt::AlignLeft );
- GroupBox4Layout->addLayout( Layout2 );
- Layout10->addWidget( GroupBox4 );
- GroupBox4->setEnabled(false);
-
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- OKButton = new QPushButton( this, "OKButton" );
- OKButton->setText( tr( "OK" ) );
- OKButton->setDefault( true );
- Layout1->addWidget( OKButton );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
- CancelB = new QPushButton( this, "CancelB" );
- CancelB->setText( tr( "Cancel" ) );
- CancelB->setAutoDefault( false );
- Layout1->addWidget( CancelB );
- Layout10->addLayout( Layout1 );
- NewDocLayout->addLayout( Layout10 );
-
- setMinimumSize(sizeHint());
-
- // signals and slots connections
- connect( OKButton, SIGNAL( clicked() ), this, SLOT( ExitOK() ) );
- connect( CancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( Doppelseiten, SIGNAL( clicked() ), this, SLOT( setDS() ) );
- connect( AutoFrame, SIGNAL( clicked() ), this, SLOT( setAT() ) );
- connect(ComboBox1, SIGNAL(activated(int)), this, SLOT(setPGsize()));
- connect(ComboBox2, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
- connect(ComboBox3, SIGNAL(activated(int)), this, SLOT(setUnit(int)));
- connect(TopR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
- connect(BottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
- connect(LeftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
- connect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
- connect(Distance, SIGNAL(valueChanged(int)), this, SLOT(setDist(int)));
-}
-
-void NewDoc::setTop(int v)
-{
- Top = v / Umrech / 100.0;
-}
-
-void NewDoc::setBottom(int v)
-{
- Bottom = v / Umrech / 100.0;
-}
-
-void NewDoc::setLeft(int v)
-{
- Left = v / Umrech / 100.0;
-}
-
-void NewDoc::setRight(int v)
-{
- Right = v / Umrech / 100.0;
-}
-
-void NewDoc::setDist(int v)
-{
- Dist = v / Umrech / 100.0;
-}
-
-void NewDoc::setUnit(int u)
-{
- switch (u)
- {
- case 0:
- Umrech = 1.0;
- ein = " pt";
- break;
- case 1:
- Umrech = 0.3527777;
- ein = " mm";
- break;
- case 2:
- Umrech = 1.0 / 72.0;
- ein = " in";
- break;
- case 3:
- Umrech = 1.0 / 12.0;
- ein = " p";
- break;
- }
- einheit = u;
- TopR->setValue(qRound(Top * Umrech * 100));
- BottomR->setValue(qRound(Bottom * Umrech * 100));
- LeftR->setValue(qRound(Left * Umrech * 100));
- RightR->setValue(qRound(Right * Umrech * 100));
- Distance->setValue(qRound(Dist * Umrech * 100));
- setSize(ComboBox1->currentItem());
- TopR->setSuffix(ein);
- BottomR->setSuffix(ein);
- LeftR->setSuffix(ein);
- RightR->setSuffix(ein);
- Breite->setSuffix(ein);
- Hoehe->setSuffix(ein);
- Distance->setSuffix( ein );
-}
-
-void NewDoc::ExitOK()
-{
- if (ComboBox1->currentItem() == 30)
- {
- Pagebr = Breite->value() / 100.0 / Umrech;
- Pageho = Hoehe->value() / 100.0 / Umrech;
- }
- if (Orient == 1)
- {
- float br = Pagebr;
- Pagebr = Pageho;
- Pageho = br;
- }
- accept();
-}
-
-void NewDoc::setOrien(int ori)
-{
- int br;
- setSize(ComboBox1->currentItem());
- if (ori == 0)
- {
- if (ComboBox1->currentItem() == 30)
- {
- br = Breite->value();
- Breite->setValue(Hoehe->value());
- Hoehe->setValue(br);
- }
- Orient = 0;
- }
- else
- {
- Orient = 1;
- br = Breite->value();
- Breite->setValue(Hoehe->value());
- Hoehe->setValue(br);
- }
-}
-
-void NewDoc::setPGsize()
-{
- if (ComboBox1->currentItem() == 30)
- setSize(ComboBox1->currentItem());
- else
- setOrien(ComboBox2->currentItem());
-}
-
-void NewDoc::setSize(int gr)
-{
- Pagebr = Breite->value() / 100.0;
- Pageho = Hoehe->value() / 100.0;
- Breite->setEnabled(false);
- Hoehe->setEnabled(false);
- switch (gr)
- {
- case 0: // A0
- Pagebr = 2380;
- Pageho = 3368;
- break;
- case 1: // A1
- Pagebr = 1684;
- Pageho = 2380;
- break;
- case 2: // A2
- Pagebr = 1190;
- Pageho = 1684;
- break;
- case 3: // A3
- Pagebr = 842;
- Pageho = 1190;
- break;
- case 4: // A4
- Pagebr = 595;
- Pageho = 842;
- break;
- case 5: // A5
- Pagebr = 421;
- Pageho = 595;
- break;
- case 6: // A6
- Pagebr = 297;
- Pageho = 421;
- break;
- case 7: // A7
- Pagebr = 210;
- Pageho = 297;
- break;
- case 8: // A8
- Pagebr = 148;
- Pageho = 210;
- break;
- case 9: // A9
- Pagebr = 105;
- Pageho = 148;
- break;
- case 10: // B0
- Pagebr = 2836;
- Pageho = 4008;
- break;
- case 11: // B1
- Pagebr = 2004;
- Pageho = 2836;
- break;
- case 12: // B2
- Pagebr = 1418;
- Pageho = 2004;
- break;
- case 13: // B3
- Pagebr = 1002;
- Pageho = 1418;
- break;
- case 14: // B4
- Pagebr = 709;
- Pageho = 1002;
- break;
- case 15: // B5
- Pagebr = 501;
- Pageho = 709;
- break;
- case 16: // B6
- Pagebr = 355;
- Pageho = 501;
- break;
- case 17: // B7
- Pagebr = 250;
- Pageho = 355;
- break;
- case 18: // B8
- Pagebr = 178;
- Pageho = 250;
- break;
- case 19: // B9
- Pagebr = 125;
- Pageho = 178;
- break;
- case 20: // B10
- Pagebr = 89;
- Pageho = 125;
- break;
- case 21: // C5E
- Pagebr = 462;
- Pageho = 649;
- break;
- case 22: // Comm10E
- Pagebr = 298;
- Pageho = 683;
- break;
- case 23: // DLE
- Pagebr = 312;
- Pageho = 624;
- break;
- case 24: // Executive
- Pagebr = 542;
- Pageho = 720;
- break;
- case 25: // Folio
- Pagebr = 595;
- Pageho = 935;
- break;
- case 26: // Ledger
- Pagebr = 1224;
- Pageho = 792;
- break;
- case 27: // Legal
- Pagebr = 612;
- Pageho = 1008;
- break;
- case 28: // Letter
- Pagebr = 612;
- Pageho = 792;
- break;
- case 29: // Tabloid
- Pagebr = 792;
- Pageho = 1224;
- break;
- case 30: // Custom
- Breite->setEnabled(true);
- Hoehe->setEnabled(true);
- break;
- }
- Breite->setValue(qRound(Pagebr * Umrech * 100));
- Hoehe->setValue(qRound(Pageho * Umrech * 100));
-}
-
-void NewDoc::setAT()
-{
- if (AutoFrame->isChecked())
- GroupBox4->setEnabled(true);
- else
- GroupBox4->setEnabled(false);
-}
-
-void NewDoc::setDS()
-{
- if (Doppelseiten->isChecked())
- {
- TextLabel6->setText( tr( "Inside:" ) );
- TextLabel8->setText( tr( "Outside:" ) );
- ErsteSeite->setEnabled(true);
- }
- else
- {
- TextLabel6->setText( tr( "Left:" ) );
- TextLabel8->setText( tr( "Right:" ) );
- ErsteSeite->setEnabled(false);
- }
-}
-
-
/start/Scribus/scribus/newfile.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/navigator.cpp
===================================================================
--- start/Scribus/scribus/navigator.cpp (revision 427)
+++ start/Scribus/scribus/navigator.cpp (nonexistent)
@@ -1,81 +0,0 @@
-/***************************************************************************
- navigator.cpp - description
- -------------------
- begin : Fri Feb 22 2002
- copyright : (C) 2002 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include "navigator.h"
-#include "navigator.moc"
-
-Navigator::Navigator(QWidget *parent, int Size, int Seite, ScribusView* vie) : QLabel(parent)
-{
- setScaledContents(false);
- setAlignment(static_cast<int>( QLabel::AlignLeft | QLabel::AlignTop) );
- pmx = vie->PageToPixmap(Seite, Size);
- resize(pmx.width(), pmx.height());
- Xp = 0;
- Yp = 0;
- drawMark(0, 0);
- view = vie;
-}
-
-void Navigator::mouseMoveEvent(QMouseEvent *m)
-{
- drawMark(m->x(), m->y());
- emit Coords(static_cast<float>(m->x())/static_cast<float>(width()),
- static_cast<float>(m->y())/static_cast<float>(height()));
-}
-
-void Navigator::mousePressEvent(QMouseEvent *m)
-{
- drawMark(m->x(), m->y());
- emit Coords(static_cast<float>(m->x())/static_cast<float>(width()),
- static_cast<float>(m->y())/static_cast<float>(height()));
-}
-
-void Navigator::mouseReleaseEvent(QMouseEvent *m)
-{
- emit Coords(static_cast<float>(m->x())/static_cast<float>(width()),
- static_cast<float>(m->y())/static_cast<float>(height()));
-}
-
-void Navigator::paintEvent(QPaintEvent *e)
-{
- QPainter p;
- p.begin(this);
- p.setClipRect(e->rect());
- drawMark(Xp, Yp);
- p.end();
-}
-
-void Navigator::drawMark(int x, int y)
-{
- QPainter p;
- p.begin(this);
- p.drawPixmap(0, 0, pmx);
- p.setPen(QPen(QColor(black), 1, SolidLine, FlatCap, MiterJoin));
- p.drawLine(x-5, y-5, x-1, y-1);
- p.drawLine(x-5, y+5, x-1, y+1);
- p.drawLine(x+2, y+2, x+6, y+6);
- p.drawLine(x+2, y-2, x+6, y-6);
- p.end();
-}
-
-void Navigator::SetSeite(int Seite, int Size)
-{
- pmx = view->PageToPixmap(Seite, Size);
- resize(pmx.width(), pmx.height());
- repaint();
-}
-
/start/Scribus/scribus/navigator.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/helpbrowser.cpp
===================================================================
--- start/Scribus/scribus/helpbrowser.cpp (revision 427)
+++ start/Scribus/scribus/helpbrowser.cpp (nonexistent)
@@ -1,428 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Help.ui'
-**
-** Created: Tue Jul 3 21:51:52 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "helpbrowser.h"
-#include "helpbrowser.moc"
-#include <qpushbutton.h>
-#include <qtextbrowser.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtextcodec.h>
-#include <qfileinfo.h>
-#include <config.h>
-extern QPixmap loadIcon(QString nam);
-
-static const char* const image0_data[] = {
-"16 16 85 2",
-"Qt c None",
-".c c #000000",
-".a c #181418",
-".K c #201c20",
-".z c #202020",
-".p c #292429",
-".b c #292829",
-".k c #312829",
-".2 c #313031",
-"#q c #313431",
-".T c #393031",
-"#r c #393431",
-"#s c #393439",
-".# c #393839",
-"#p c #393c39",
-".U c #410808",
-".3 c #413c41",
-".l c #414441",
-".G c #4a484a",
-"#n c #521c08",
-".F c #524c52",
-".y c #525052",
-".g c #525552",
-".o c #5a595a",
-".n c #625d62",
-".d c #626162",
-".E c #626562",
-".7 c #6a2400",
-".0 c #6a2808",
-"#k c #6a2c00",
-".u c #6a656a",
-".r c #6a696a",
-".H c #6a6d6a",
-"#h c #732400",
-".P c #732808",
-".q c #737173",
-"#e c #7b4410",
-"#a c #834818",
-".j c #838183",
-".8 c #8b5929",
-".m c #8b898b",
-".X c #946941",
-".O c #946d41",
-".S c #948d94",
-".4 c #9c6d4a",
-".i c #9c959c",
-".f c #9c999c",
-".L c #9c9d9c",
-"#m c #a44000",
-".t c #a4a1a4",
-".V c #a4a5a4",
-"#g c #ac4800",
-".s c #acaaac",
-"#l c #b44400",
-"#d c #b4aeb4",
-".h c #b4b2b4",
-".J c #b4b6b4",
-"#. c #bd5500",
-".x c #bdb6bd",
-".I c #bdbabd",
-".v c #bdbebd",
-"#c c #c55900",
-".e c #c5c2c5",
-".Q c #d5beb4",
-".N c #d5bebd",
-".6 c #de6500",
-"#f c #de7931",
-"#b c #de955a",
-"#o c #ded6d5",
-"#i c #ded6de",
-"#j c #dedade",
-".R c #dedede",
-".9 c #e6a57b",
-".Z c #e6baa4",
-".5 c #e6c6b4",
-".W c #e6dee6",
-".M c #e6e2e6",
-".1 c #e6e6e6",
-"## c #eee2e6",
-".D c #eee6ee",
-".w c #eeeaee",
-".Y c #f6e2d5",
-".A c #f6f2f6",
-".B c #fffaff",
-".C c #ffffff",
-"QtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQt",
-"QtQtQt.b.cQt.d.e.f.#QtQtQtQtQtQt",
-"QtQtQt.b.c.g.e.h.i.j.bQtQtQtQtQt",
-"QtQtQt.k.l.e.m.n.o.d.j.pQtQtQtQt",
-"QtQtQt.g.e.q.r.s.t.u.g.j.pQtQtQt",
-"QtQt.g.e.q.r.v.w.w.x.r.y.j.zQtQt",
-"Qt.d.e.q.u.v.A.B.C.D.x.E.F.j.pQt",
-".G.e.H.u.I.A.B.B.B.B.A.J.d.G.j.K",
-"Qt.b.b.L.M.B.N.O.P.Q.C.R.S.T.UQt",
-"QtQt.b.V.W.B.X.Y.Z.0.B.1.i.2QtQt",
-"QtQt.3.s.1.B.4.5.6.7.C.M.s.bQtQt",
-"QtQt.#.s.M.B.8.9#..7.B##.s.bQtQt",
-"QtQt.3.s.D.B#a#b#c.7.C.M#d.bQtQt",
-"QtQt.#.s.M.B#e#f#g#h.B.M.s.bQtQt",
-"QtQt.3.t#i#j#k#l#m#n#j#o.t.bQtQt",
-"QtQtQt#p#q#r.b.b.b.b.2#s.b.bQtQt"};
-
-static const char* const image1_data[] = {
-"16 16 95 2",
-"Qt c None",
-"#w c None",
-".n c None",
-"#q c None",
-".k c None",
-".l c None",
-".p c None",
-".r c None",
-".j c None",
-".g c None",
-".w c None",
-"#b c None",
-"#e c None",
-".s c None",
-"#v c None",
-".A c None",
-".d c None",
-"#B c None",
-".h c None",
-".# c None",
-".B c None",
-".U c None",
-"#x c None",
-"#r c None",
-"#A c None",
-"#C c None",
-".q c None",
-"#c c None",
-".b c None",
-".i c None",
-".F c None",
-".a c None",
-"#d c None",
-".m c None",
-".c c None",
-".f c None",
-".e c None",
-".v c None",
-"#u c None",
-".G c None",
-".z c #000000",
-"#z c #081020",
-".T c #081829",
-"#y c #081831",
-"#a c #081c29",
-".2 c #081c31",
-"#f c #082031",
-"#n c #082439",
-"#p c #082839",
-".Y c #0895bd",
-".3 c #101420",
-"#o c #102841",
-".K c #104462",
-".t c #104c73",
-".o c #105073",
-"#s c #105573",
-".L c #10557b",
-"#l c #10597b",
-"#m c #106183",
-"#k c #1081a4",
-".0 c #1095bd",
-".Z c #1099bd",
-".X c #1099c5",
-".7 c #10a1cd",
-".H c #18486a",
-".C c #184c6a",
-".x c #184c73",
-".M c #185573",
-".4 c #18597b",
-"#j c #1891b4",
-".5 c #1891bd",
-".W c #18b2cd",
-".O c #18b6d5",
-".u c #203852",
-"#h c #2095b4",
-"#t c #20a5cd",
-"#i c #2999b4",
-".8 c #29bede",
-"## c #29cad5",
-".6 c #39dae6",
-".9 c #41d6e6",
-"#. c #4adae6",
-"#g c #4adeee",
-".1 c #5aaec5",
-".J c #5ac6de",
-".N c #7bd6e6",
-".y c #83a1bd",
-".D c #83a1c5",
-".S c #83c6e6",
-".P c #a4e2f6",
-".Q c #cdeeff",
-".R c #d5eeff",
-".V c #deeeff",
-".E c #e6f2ff",
-".I c #ffffff",
-"Qt.#Qt.#.a.b.c.d.e.f.g.d.e.f.g.d",
-".h.g.i.j.k.l.m.n.oQt.p.n.p.gQt.j",
-"Qt.#Qt.#.q.r.s.t.u.rQt.rQt.rQt.r",
-".v.j.w.gQt.j.x.y.z.jQt.gQt.j.A.g",
-".g.r.B.rQt.C.D.E.zQt.g.r.g.r.F.r",
-"QtQt.G.B.H.y.I.J.K.L.o.L.o.LQtQt",
-"Qt.rQt.M.D.I.N.O.P.Q.I.R.S.T.U.#",
-".GQt.t.y.V.J.W.X.Y.Z.0.Z.1.2Qt.g",
-".U.#.3.4.5.6.7.X.8.9#.##.8#a#b#c",
-"#dQt#e#f.L.5#g.7.Z#h#i#j#k.z.p.j",
-".g.r.g.r.T#l.5.6#m#n#o#p.z.z#qQt",
-".p.j.p.g#r.T#s#t.zQt.pQt.p#u.pQt",
-"#v.rQt.r#w#x#y#s.z.r.g.r.g.c.g.r",
-".p.g.A#c#dQt#e#z.z.g.p.j#A.g.p.j",
-".g.r#B.r.g.r.g.r.z.r.g.r.g.r.g.r",
-".p.j.p#C.p.j.p.g#e.j.p.g.p.jQtQt"};
-
-static const char* const image2_data[] = {
-"16 16 87 2",
-".b c None",
-".z c None",
-"#u c None",
-".i c None",
-".j c None",
-".o c None",
-".g c None",
-".e c None",
-".B c None",
-".w c None",
-".E c None",
-".u c None",
-".d c None",
-".c c None",
-".h c None",
-".D c None",
-".q c None",
-".f c None",
-".p c None",
-".v c None",
-".x c None",
-".m c None",
-".a c None",
-".# c None",
-".y c None",
-".t c None",
-".C c None",
-".n c None",
-".G c None",
-".F c None",
-".k c None",
-"Qt c None",
-"#t c #000000",
-"## c #000408",
-"#p c #000810",
-"#i c #000c18",
-"#n c #080c10",
-"#r c #081018",
-"#k c #081420",
-"#l c #081820",
-"#s c #082841",
-".Y c #088db4",
-".W c #0895c5",
-"#j c #103452",
-".l c #103852",
-".s c #10385a",
-"#q c #10405a",
-"#o c #104462",
-".K c #104c6a",
-".r c #104c73",
-"#m c #10597b",
-"#h c #10658b",
-".1 c #10698b",
-"#. c #106994",
-".X c #1095bd",
-"#f c #1099bd",
-".Z c #1099c5",
-".U c #109dc5",
-".7 c #10a1c5",
-".0 c #10a5cd",
-".V c #10aecd",
-"#g c #10c2de",
-"#a c #18405a",
-".O c #185073",
-"#e c #1895b4",
-".9 c #18a1c5",
-".6 c #18bad5",
-".H c #204862",
-".L c #294c6a",
-"#c c #2991ac",
-"#d c #2995b4",
-".A c #317d9c",
-".J c #3181a4",
-".4 c #41d2de",
-".5 c #4adeee",
-".8 c #4ae2ee",
-".T c #5ac2de",
-"#b c #6aa5c5",
-".3 c #94ceee",
-".P c #a4cee6",
-".M c #acdeee",
-".S c #c5e2f6",
-".2 c #d5e6f6",
-".I c #e6f2ff",
-".Q c #e6f6ff",
-".R c #f6f6ff",
-".N c #ffffff",
-"Qt.#Qt.a.b.c.d.e.f.c.d.e.b.c.g.e",
-".b.h.i.h.j.h.k.l.m.h.n.h.o.h.b.h",
-".f.e.p.c.#.e.q.r.s.e.t.c.u.e.v.c",
-".w.h.x.h.y.h.z.r.A.l.B.h.C.h.e.h",
-".D.c.E.e.F.#.G.H.I.J.s.e.D.c.D.e",
-".e.h.K.r.r.r.H.L.M.N.A.l.e.h.e.h",
-".D.e.O.P.Q.R.Q.S.T.U.N.J.s.e.D.c",
-".e.h.r.R.T.V.W.X.Y.Z.0.I.1.l.e.h",
-".D.c.L.2.3.4.5.6.Z.7.8.9#.##.D.e",
-".e.h#a#b#c#d#e#f#g.8.9#h#i.h.e.h",
-".D.e#j#k#k#k#l#m.8.9#.#n.D.e.D.c",
-".e.h.e.h.e.h.e#o.9#h#p.h.e.h.e.h",
-".D.c.D.e.D.c.D#q#.#r.D.e.D.c.D.e",
-".e.h.e.h.e.h.e#s##.h.e.h.e.h.e.h",
-".D.e.D.c.D.e.D#t.D.e.D.c.D.e.D.c",
-".e.h#u.h.B.#.B.#.e.h.e.h.e.h.e.h"};
-
-
-/*
- * Constructs a HelpBrowser which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-HelpBrowser::HelpBrowser( QWidget* parent, QString Capt, QString Datei )
- : QWidget( parent, "Help", WType_TopLevel | WDestructiveClose )
-{
- QPixmap image0( ( const char** ) image0_data );
- QPixmap image1( ( const char** ) image1_data );
- QPixmap image2( ( const char** ) image2_data );
- resize( 547, 450 );
- setCaption( Capt );
- setIcon(loadIcon("AppIcon.xpm"));
- HelpBrowserLayout = new QVBoxLayout( this );
- HelpBrowserLayout->setSpacing( 2 );
- HelpBrowserLayout->setMargin( 2 );
-
- Layout13 = new QHBoxLayout;
- Layout13->setSpacing( 6 );
- Layout13->setMargin( 0 );
-
- HomeB = new QToolButton( this, "HomeB" );
- HomeB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, HomeB->sizePolicy().hasHeightForWidth() ) );
- HomeB->setMinimumSize( QSize( 0, 0 ) );
- HomeB->setMaximumSize( QSize( 32767, 32767 ) );
- HomeB->setText( tr( "" ) );
- HomeB->setPixmap( image0 );
- Layout13->addWidget( HomeB );
-
- BackB = new QToolButton( this, "BackB" );
- BackB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, BackB->sizePolicy().hasHeightForWidth() ) );
- BackB->setMinimumSize( QSize( 0, 0 ) );
- BackB->setMaximumSize( QSize( 32767, 32767 ) );
- BackB->setPixmap( image1 );
- Layout13->addWidget( BackB );
-
- ForwB = new QToolButton( this, "ForwB" );
- ForwB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, ForwB->sizePolicy().hasHeightForWidth() ) );
- ForwB->setMinimumSize( QSize( 0, 0 ) );
- ForwB->setMaximumSize( QSize( 32767, 32767 ) );
- ForwB->setPixmap( image2 );
- Layout13->addWidget( ForwB );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout13->addItem( spacer );
- HelpBrowserLayout->addLayout( Layout13 );
-
- Anzeige = new QTextBrowser( this, "Anzeige" );
- Anzeige->setFrameShape( QTextBrowser::StyledPanel );
- QString pfad = PREL;
- QString pfad2;
- bool Avail = true;
- if (Datei == "")
- pfad2 = pfad + "/lib/scribus/doc/"+QString(QTextCodec::locale()).left(2)+"/index.html";
- else
- pfad2 = Datei;
- QFileInfo fi;
- fi = QFileInfo(pfad2);
- if (!fi.exists())
- {
- pfad2 = pfad + "/lib/scribus/doc/en/index.html";
- fi = QFileInfo(pfad2);
- if (!fi.exists())
- {
- Anzeige->setText("<h2>"+tr("Sorry, no Manual available!")+"</h2>");
- Avail = false;
- }
- }
- if (Avail)
- Anzeige->setSource(pfad2);
- HelpBrowserLayout->addWidget( Anzeige );
-
- // signals and slots connections
- connect( HomeB, SIGNAL( clicked() ), Anzeige, SLOT( home() ) );
- connect( ForwB, SIGNAL( clicked() ), Anzeige, SLOT( forward() ) );
- connect( BackB, SIGNAL( clicked() ), Anzeige, SLOT( backward() ) );
-}
-
/start/Scribus/scribus/helpbrowser.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/iso8859-10ps.enc
===================================================================
--- start/Scribus/scribus/iso8859-10ps.enc (revision 427)
+++ start/Scribus/scribus/iso8859-10ps.enc (nonexistent)
@@ -1,96 +0,0 @@
-16#A0 /space
-16#A1 /Aogonek
-16#A2 /Emacron
-16#A3 /Gcedilla
-16#A4 /Imacron
-16#A5 /Itilde
-16#A6 /Kcedilla
-16#A7 /Lcedilla
-16#A8 /acute
-16#A9 /Rcedilla
-16#AA /Scaron
-16#AB /Tbar
-16#AC /Zcaron
-16#AD /hyphen
-16#AE /kra
-16#AF /Eng
-16#B0 /Dbar
-16#B1 /aogonek
-16#B2 /emacron
-16#B3 /gcedilla
-16#B4 /imacron
-16#B5 /itilde
-16#B6 /kcedilla
-16#B7 /lcedilla
-16#B8 /nacute
-16#B9 /rcedilla
-16#BA /scaron
-16#BB /tbar
-16#BC /zcaron
-16#BD /section
-16#BE /germandbls
-16#BF /eng
-16#C0 /Amacron
-16#C1 /Aacute
-16#C2 /Acircumflex
-16#C3 /Atilde
-16#C4 /Adieresis
-16#C5 /Aring
-16#C6 /AE
-16#C7 /Iogonek
-16#C8 /Ccaron
-16#C9 /Eacute
-16#CA /Eogonek
-16#CB /Edieresis
-16#CC /Edotaccent
-16#CD /Iacute
-16#CE /Icircumflex
-16#CF /Idieresis
-16#D0 /Dbar
-16#D1 /Ncedilla
-16#D2 /Omacron
-16#D3 /Oacute
-16#D4 /Ocircumflex
-16#D5 /Otilde
-16#D6 /Odieresis
-16#D7 /Utilde
-16#D8 /Oslash
-16#D9 /Uogonek
-16#DA /Uacute
-16#DB /Ucircumflex
-16#DC /Udieresis
-16#DD /Yacute
-16#DE /Thorn
-16#DF /Umacron
-16#E0 /amacron
-16#E1 /aacute
-16#E2 /acircumflex
-16#E3 /atilde
-16#E4 /adieresis
-16#E5 /aring
-16#E6 /ae
-16#E7 /iogonek
-16#E8 /ccaron
-16#E9 /eacute
-16#EA /eogonek
-16#EB /edieresis
-16#EC /edotaccent
-16#ED /iacute
-16#EE /icircumflex
-16#EF /idieresis
-16#F0 /eth
-16#F1 /ncedilla
-16#F2 /omacron
-16#F3 /oacute
-16#F4 /ocircumflex
-16#F5 /otilde
-16#F6 /odieresis
-16#F7 /utilde
-16#F8 /oslash
-16#F9 /uogonek
-16#FA /uacute
-16#FB /ucircumflex
-16#FC /udieresis
-16#FD /yacute
-16#FE /thorn
-16#FF /umacron
/start/Scribus/scribus/iso8859-10ps.enc
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/scfonts_ttf.cpp
===================================================================
--- start/Scribus/scribus/scfonts_ttf.cpp (revision 427)
+++ start/Scribus/scribus/scfonts_ttf.cpp (nonexistent)
@@ -1,1187 +0,0 @@
-
-#include <qapplication.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qptrvector.h>
-#include <qmemarray.h>
-#include <qregexp.h>
-
-#include <iostream>
-#include <sys/types.h>
-
-#include "scfonts_ttf.h"
-#include "scfonts_ttftypes.h"
-#include "scfonts_encoding.h"
-#include "config.h"
-#ifdef HAVE_FREETYPE
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
-#include FT_GLYPH_H
-#endif
-// #define doPost
-
-QString showTag(u_int32_t tag)
-{
- char tmp[5];
- tmp[0]=(tag>>24) & 255;
- tmp[1]=(tag>>16) & 255;
- tmp[2]=(tag>>8) & 255;
- tmp[3]=tag & 255;
- tmp[4]=0;
- return(tmp);
-}
-
-enum sc_TTFontError {sc_TTFOK,sc_TTFNoFile,sc_TTFFileError,sc_TTFNoMemory,sc_TTFBadFile};
-
-using namespace std;
-
-class sc_TTFont
-{
- public:
- sc_TTFont(QString filename, SCFonts_Encoding &encoding);
- ~sc_TTFont();
- QString RealName();
- bool ReadMetrics(float *charwidths);
- bool EmbedFont(QString &str);
- bool Type42Metrics(QString *fb, QString *as, QString *ds, QString *it, bool *fp);
- void DumpEncoding()
- {
- for(int i=0;i<nGlyphs;++i)
- {
- if(OwnEncoding.present(i))
- std::cout << i << " -> " << OwnEncoding[i] << endl;
- }
- }
- void MapEncoding()
- {
- for(int i=0; i<256; ++i)
- {
- if(Encoding.present(i))
- {
- QString &glyph=Encoding[i];
- if(OwnEncoding.present(glyph))
- {
- std::cout << i << ": " << glyph << " -> " << OwnEncoding[glyph] << endl;
- }
- }
- }
- }
- sc_TTFontError GetError()
- {
- return(error);
- }
- private:
- bool Type42Header(QString &str);
- bool Type42Data(QString &str);
- bool Type42Trailer(QString &str);
- SCFonts_Encoding &Encoding;
- SCFonts_Encoding OwnEncoding;
- SCFonts_Encoding PostEncoding;
- sc_TTFontError error;
- u_int16_t readBEUInt16();
- u_int32_t readBEUInt32();
-
- bool readHeaders();
- bool readOffsetTable();
- bool readTableDirEntry(struct TableDirEntry *o);
- bool readNamingTable();
- bool readnGlyphs();
- bool readHeadTable();
- bool readPostTable();
- bool readLocaTable();
- bool readHheaTable();
- bool readHmtxTable();
- bool readCmapTable();
-
- QString readUnicode(char *str,int len);
-
- QFile file;
- QVector<QString> NamingTable;
- bool NamingTableRead;
-
- OffsetTable Offsets;
- bool OffsetsRead;
-
- HeadTable Head;
- bool HeadRead;
-
- TableDirEntry *entries;
-
- PostTable Post;
- bool PostTableRead;
-
- HheaTable Hhea;
- bool HheaRead;
-
-#ifdef doPost
- QVector<Post_GlyphName> GlyphNames;
- bool GlyphNamesRead;
-#endif
-
- QArray<u_int32_t> Loca;
- bool LocaRead;
-
- QArray<tt_longHorMetric> Hmtx;
- bool HmtxRead;
-
- bool CmapRead;
-
- int nGlyphs;
- bool nGlyphsRead;
-
- int o_maxp,o_head,o_post,o_name,o_loca,o_glyf,o_hhea,o_hmtx,o_kern,o_cmap;
-};
-
-
-sc_TTFont::sc_TTFont(QString filename, SCFonts_Encoding &encoding) :
- Encoding(encoding), file(filename), nGlyphs(0)
-{
- NamingTableRead=OffsetsRead=HeadRead=PostTableRead=nGlyphsRead=false;
- LocaRead=HheaRead=HmtxRead=CmapRead=false;
- o_maxp=o_head=o_post=o_name=o_loca=o_glyf=o_hhea=o_hmtx=o_kern=o_cmap=-1;
- entries=0;
- error=sc_TTFOK;
- if(!(file.exists()))
- error=sc_TTFNoFile;
- if(!(NamingTable.resize(8)))
- error=sc_TTFNoMemory;
- NamingTable.setAutoDelete(true);
-#ifdef doPost
- GlyphNamesRead=false;
- GlyphNames.setAutoDelete(true);
-#endif
-}
-
-
-sc_TTFont::~sc_TTFont()
-{
- if(file.isOpen())
- file.close();
- if(entries)
- delete entries;
-}
-
-
-QString sc_TTFont::RealName()
-{
- bool success=true;
- if(!(file.open(IO_ReadOnly)))
- {
- error=sc_TTFNoFile;
- return(0);
- }
- success&=readHeaders();
- success&=readNamingTable();
- file.close();
- if(NamingTable[6])
- return(*NamingTable[6]);
- else
- return(0);
-}
-
-
-bool sc_TTFont::ReadMetrics(float *charwidths)
-{
- bool success=true;
- if(!(file.open(IO_ReadOnly)))
- {
- error=sc_TTFNoFile;
- return(false);
- }
- success&=readHeaders();
- success&=readHeadTable();
- success&=readnGlyphs();
- success&=readHheaTable();
- success&=readHmtxTable();
- success&=readCmapTable();
-//#ifdef doPost
- success&=readPostTable();
-//#endif
- file.close();
-
- if(success)
- {
- if(Hhea.metricDataFormat!=0)
- {
- error=sc_TTFBadFile;
- return(false);
- }
-
- float ndw=Hmtx[0].advanceWidth+Hmtx[0].lsb;
- ndw/=float(Head.unitsPerEm);
-
- for(int i=0; i<256; ++i)
- {
- if(Encoding.present(i))
- {
- QString &glyph=Encoding[i];
- if(OwnEncoding.present(glyph))
- {
- int gn=OwnEncoding[glyph];
- if(gn>=Hhea.numberOfHMetrics)
- gn=Hhea.numberOfHMetrics-1;
- float cw=Hmtx[gn].advanceWidth+Hmtx[gn].lsb;
- charwidths[i]=cw/float(Head.unitsPerEm);
- }
- else
- charwidths[i]=ndw;
- }
- else
- charwidths[i]=ndw;
- }
- return(true);
- }
- else
- return(false);
-}
-
-
-/***************************************************************************/
-
-
-QString sc_TTFont::readUnicode(char *str,int len)
-{
- QString result;
- unsigned char *t=reinterpret_cast<unsigned char *>(str);
- for (int i=0; i<len; i+=2)
- {
- int c=t[i]<<8|t[i+1];
- result+=QChar(c);
- }
- return(result);
-}
-
-
-u_int16_t sc_TTFont::readBEUInt16()
-{
- u_int16_t result=0;
- unsigned char tmp[2];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,2)==2)
- result=tmp[0]<<8|tmp[1];
- else
- error=sc_TTFBadFile;
- return(result);
-}
-
-
-u_int32_t sc_TTFont::readBEUInt32()
-{
- u_int32_t result=0;
- unsigned char tmp[4];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,4)==4)
- result=tmp[0]<<24|tmp[1]<<16|tmp[2]<<8|tmp[3];
- else
- error=sc_TTFBadFile;
- return(result);
-}
-
-
-bool sc_TTFont::readHeaders()
-{
- if(OffsetsRead)
- return(true);
- if(readOffsetTable())
- {
- if(!(entries=new TableDirEntry[Offsets.numTables]))
- {
- error=sc_TTFNoMemory;
- return(false);
- }
-
- for(int i=0; i<Offsets.numTables; ++i)
- {
- TableDirEntry *tde=&entries[i];
- if(!(readTableDirEntry(tde)))
- {
- return(false);
- }
-
- switch(tde->tag)
- {
- case MAKE_ID('m','a','x','p'):
- o_maxp=i; break;
- case MAKE_ID('h','e','a','d'):
- o_head=i; break;
- case MAKE_ID('p','o','s','t'):
- o_post=i; break;
- case MAKE_ID('n','a','m','e'):
- o_name=i; break;
- case MAKE_ID('l','o','c','a'):
- o_loca=i; break;
- case MAKE_ID('g','l','y','f'):
- o_glyf=i; break;
- case MAKE_ID('h','h','e','a'):
- o_hhea=i; break;
- case MAKE_ID('h','m','t','x'):
- o_hmtx=i; break;
- case MAKE_ID('k','e','r','n'):
- o_kern=i; break;
- case MAKE_ID('c','m','a','p'):
- o_cmap=i; break;
- }
- }
- if(o_maxp<0 || o_head<0 || o_post<0 || o_name<0)
- {
- error=sc_TTFBadFile;
- return(false);
- }
- return(true);
- }
- else
- return(false);
-}
-
-
-bool sc_TTFont::readTableDirEntry(struct TableDirEntry *o)
-{
- unsigned char tmp[sizeof(struct TableDirEntry)];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,sizeof(struct TableDirEntry))==sizeof(struct TableDirEntry))
- {
- o->tag=tmp[0]<<24|tmp[1]<<16|tmp[2]<<8|tmp[3];
- o->checkSum=tmp[4]<<24|tmp[5]<<16|tmp[6]<<8|tmp[7];
- o->offset=tmp[8]<<24|tmp[9]<<16|tmp[10]<<8|tmp[11];
- o->length=tmp[12]<<24|tmp[13]<<16|tmp[14]<<8|tmp[16];
- return(true);
- }
- else
- {
- error=sc_TTFFileError;
- return(false);
- }
-}
-
-
-bool sc_TTFont::readOffsetTable()
-{
- if(OffsetsRead)
- return(true);
- unsigned char tmp[sizeof(struct OffsetTable)];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,sizeof(struct OffsetTable))==sizeof(struct OffsetTable))
- {
- Offsets.version.mantissa=tmp[0]<<8|tmp[1];
- Offsets.version.fraction=tmp[2]<<8|tmp[3];
- Offsets.numTables=tmp[4]<<8|tmp[5];
- Offsets.searchRange=tmp[6]<<8|tmp[7];
- Offsets.entrySelector=tmp[7]<<8|tmp[8];
- Offsets.rangeShift=tmp[9]<<8|tmp[10];
- OffsetsRead=true;
- return(true);
- }
- else
- {
- error=sc_TTFFileError;
- return(false);
- }
-}
-
-
-bool sc_TTFont::readNamingTable()
-{
- if(NamingTableRead)
- return(true);
- unsigned int format;
- unsigned int nrecords;
- size_t offset;
-
- file.at(entries[o_name].offset);
- format=readBEUInt16();
- if(format!=0)
- {
- error=sc_TTFBadFile;
- return(false);
- }
- nrecords=readBEUInt16();
- offset=readBEUInt16();
-
- NameRecord *nr=new NameRecord[nrecords];
- if(!(nr))
- {
- error=sc_TTFNoMemory;
- return(false);
- }
-
- for(uint i=0; i<nrecords; ++i)
- {
- unsigned char tmp[sizeof(NameRecord)];
- char *t=reinterpret_cast<char *>(tmp);
- if(!(file.readBlock(t,sizeof(NameRecord))))
- {
- error=sc_TTFFileError;
- return(false);
- }
-
- nr[i].platformID=tmp[0]<<8|tmp[1];
- nr[i].encodingID=tmp[2]<<8|tmp[3];
- nr[i].languageID=tmp[4]<<8|tmp[5];
- nr[i].nameID=tmp[6]<<8|tmp[7];
- nr[i].length=tmp[8]<<8|tmp[9];
- nr[i].offset=tmp[10]<<8|tmp[11];
- }
-
- file.at(entries[o_name].offset+offset);
-
- for(uint i=0; i<nrecords; ++i)
- {
- if(nr[i].platformID==3 // Microsoft
- && nr[i].encodingID==1 // UGL
- && nr[i].languageID==0x0409 // US English
- && nr[i].nameID<=7)
- {
- char *tmpstr=new char[nr[i].length];
- if(!(tmpstr))
- {
- error=sc_TTFNoMemory;
- delete nr;
- return(false);
- }
- file.at(entries[o_name].offset+offset+nr[i].offset);
- file.readBlock(reinterpret_cast<char *>(tmpstr),nr[i].length);
- NamingTable.insert(nr[i].nameID,new QString(readUnicode(tmpstr,nr[i].length)));
- }
- }
- OffsetsRead=true;
- return(true);
-}
-
-
-bool sc_TTFont::readnGlyphs()
-{
- if(nGlyphsRead)
- return(true);
- struct {
- fxp16_16_t version;
- u_int16_t nglyphs;
- } data;
- file.at(entries[o_maxp].offset);
-
- unsigned char tmp[sizeof(data)];
- char *t=reinterpret_cast<char *>(tmp);
-
- if(file.readBlock(t,sizeof(data)))
- {
- nGlyphs=tmp[4]<<8|tmp[5];
- nGlyphsRead=true;
- return(true);
- }
- else
- {
- error=sc_TTFBadFile;
- return(false);
- }
-}
-
-
-bool sc_TTFont::readHeadTable()
-{
- if(HeadRead)
- return(true);
-
- file.at(entries[o_head].offset);
- unsigned char tmp[sizeof(HeadTable)];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,sizeof(HeadTable)))
- {
- Head.version.mantissa=tmp[0]<<8|tmp[1];
- Head.version.fraction=tmp[2]<<8|tmp[3];
- Head.fontRevision.mantissa=tmp[4]<<8|tmp[5];
- Head.fontRevision.fraction=tmp[6]<<8|tmp[7];
- Head.checkSumAdjustment=tmp[8]<<24|tmp[9]<<16|tmp[10]<<8|tmp[11];
- Head.magicNumber=tmp[12]<<24|tmp[13]<<16|tmp[14]<<8|tmp[15];
- Head.flags=tmp[16]<<8|tmp[17];
- Head.unitsPerEm=tmp[18]<<8|tmp[19];
- // skip creation and modification dates - 16 bytes in total.
- Head.xMin=tmp[36]<<8|tmp[37];
- Head.yMin=tmp[38]<<8|tmp[39];
- Head.xMax=tmp[40]<<8|tmp[41];
- Head.yMax=tmp[42]<<8|tmp[43];
- Head.macStyle=tmp[44]<<8|tmp[45];
- Head.lowestRecPPEM=tmp[46]<<8|tmp[47];
- Head.fontDirectionHint=tmp[48]<<8|tmp[49];
- Head.indexToLocFormat=tmp[50]<<8|tmp[51];
- Head.glyphDataFormat=tmp[52]<<8|tmp[53];
-
- if(Head.magicNumber!=0x5F0F3CF5)
- {
- error=sc_TTFBadFile;
- return(false);
- }
- HeadRead=true;
- return(true);
- }
- else
- {
- error=sc_TTFFileError;
- return(false);
- }
-}
-
-
-bool sc_TTFont::readPostTable()
-{
- if(PostTableRead)
- return(true);
- file.at(entries[o_post].offset);
- unsigned char tmp[sizeof(PostTable)];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,sizeof(PostTable)))
- {
- Post.formatType.mantissa=tmp[0]<<8|tmp[1];
- Post.formatType.fraction=tmp[2]<<8|tmp[3];
- Post.italicAngle.mantissa=tmp[4]<<8|tmp[5];
- Post.italicAngle.fraction=tmp[6]<<8|tmp[7];
- Post.underlinePosition=tmp[8]<<8|tmp[9];
- Post.underlineThickness=tmp[10]<<8|tmp[11];
- Post.isFixedPitch=tmp[12]<<24|tmp[13]<<16|tmp[14]<<8|tmp[15];
- Post.minMemType42=tmp[16]<<24|tmp[17]<<16|tmp[18]<<8|tmp[19];
- Post.maxMemType42=tmp[20]<<24|tmp[21]<<16|tmp[22]<<8|tmp[23];
- Post.minMemType1=tmp[24]<<24|tmp[25]<<16|tmp[26]<<8|tmp[27];
- Post.maxMemType1=tmp[28]<<24|tmp[29]<<16|tmp[30]<<8|tmp[31];
-
- PostTableRead=true;
- return(true);
-
- if(Post.formatType.mantissa==1)
- {
-// OwnEncoding.read("TTFenc.txt"); // uses standard TTF encoding
- PostTableRead=true;
- return(true);
- }
- else if(Post.formatType.mantissa==2) // has encoding table
- {
- SCFonts_Encoding tmpEncoding("TTFenc.txt");
-
- if(Post.formatType.fraction!=0)
- {
- error=sc_TTFBadFile;
- return(false);
- }
- u_int16_t nglyphsps = readBEUInt16();
- if(nglyphsps!=nGlyphs)
- std::cout << "Warning: nGlyphs should be consistent between head and post" << endl;
-
-#ifdef doPost
- GlyphNames.resize(nglyphsps);
-
- int maxindex=0;
- for(int i=0;i<nglyphsps;++i)
- {
- int idx=readBEUInt16();
- GlyphNames.insert(i,new Post_GlyphName);
- if(idx>=258)
- {
- if((idx-258)>maxindex)
- maxindex=idx-258;
- GlyphNames[i]->index=idx;
- GlyphNames[i]->type=1;
- }
- else
- {
- GlyphNames[i]->index=idx;
- GlyphNames[i]->type=0;
- }
- }
- QVector<QString> NamesByIndex(maxindex+1);
- for(int i=0; i<=maxindex; ++i)
- {
- int numchars=file.getch();
- char *tmp=new char[numchars+1];
- file.readBlock(tmp,numchars);
- tmp[numchars]=0;
- NamesByIndex.insert(i,new QString(tmp));
- delete tmp;
- }
- for(int i=0; i<nglyphsps; ++i)
- {
- int idx=GlyphNames[i]->index;
- if(GlyphNames[i]->type==1)
- {
- GlyphNames[i]->name=NamesByIndex[idx-258];
- PostEncoding[i]=*(GlyphNames[i]->name);
- PostEncoding[*(GlyphNames[i]->name)]=i;
- }
- else
- {
- if(tmpEncoding.present(idx))
- {
- QString gn=tmpEncoding[idx];
- PostEncoding[i]=gn;
- PostEncoding[gn]=i;
- }
- }
- }
- QString tmp=".notdef";
- PostEncoding[0]=tmp;
- PostEncoding[tmp]=0;
- if(!(OwnEncoding.present(1)))
- {
- QString tmp=".null";
- PostEncoding[1]=tmp;
- PostEncoding[tmp]=1;
- }
-#endif
- }
- PostTableRead=true;
- return(true);
- }
- else
- {
- error=sc_TTFFileError;
- return(false);
- }
-}
-
-
-bool sc_TTFont::readLocaTable()
-{
- if(Head.indexToLocFormat>1);
- {
- error=sc_TTFBadFile;
- return(false);
- }
- if(nGlyphs)
- {
- file.at(entries[o_loca].offset);
- Loca.resize(nGlyphs);
- for(int i=0; i<nGlyphs; ++i)
- {
- if(Head.indexToLocFormat==0)
- {
- Loca[i]=readBEUInt16();
- }
- else
- {
- Loca[i]=readBEUInt32();
- }
- }
- return(true);
- }
- return(false);
-}
-
-
-bool sc_TTFont::readHheaTable()
-{
- if(HheaRead)
- return(true);
- file.at(entries[o_hhea].offset);
- unsigned char tmp[sizeof(HheaTable)];
- char *t=reinterpret_cast<char *>(tmp);
- if(file.readBlock(t,sizeof(HheaTable)))
- {
- Hhea.version.fraction=tmp[0]<<8|tmp[1];
- Hhea.version.mantissa=tmp[2]<<8|tmp[3];
- Hhea.Ascender=tmp[4]<<8|tmp[5];
- Hhea.Descender=tmp[6]<<8|tmp[7];
- Hhea.LineGap=tmp[8]<<8|tmp[9];
- Hhea.advanceWidthMax=tmp[10]<<8|tmp[11];
- Hhea.minLeftSideBearing=tmp[12]<<8|tmp[13];
- Hhea.minRightSideBearing=tmp[14]<<8|tmp[15];
- Hhea.xMaxExtent=tmp[16]<<8|tmp[17];
- Hhea.caretSlopeRise=tmp[18]<<8|tmp[19];
- Hhea.caretSlopeRun=tmp[20]<<8|tmp[21];
- Hhea.metricDataFormat=tmp[32]<<8|tmp[33];
- Hhea.numberOfHMetrics=tmp[34]<<8|tmp[35];
- HheaRead=true;
- return(true);
- }
- else
- {
- error=sc_TTFFileError;
- return(false);
- }
-}
-
-
-bool sc_TTFont::readHmtxTable() // Assumes that Head, nGlyphs, Hhea have already been read.
-{
- if(HmtxRead)
- return(true);
- if(nGlyphs)
- {
- file.at(entries[o_hmtx].offset);
- if(!(Hmtx.resize(nGlyphs)))
- {
- error=sc_TTFNoMemory;
- return(false);
- }
- for(int i=0; i<Hhea.numberOfHMetrics; ++i)
- {
- Hmtx[i].advanceWidth=readBEUInt16();
- Hmtx[i].lsb=readBEUInt16();
- }
- HmtxRead=true;
- return(true);
- }
- return(false);
-}
-
-
-bool sc_TTFont::readCmapTable()
-{
- if(CmapRead)
- return(true);
-
- file.at(entries[o_cmap].offset);
-
- CmapTable tt;
- tt.version=readBEUInt16();
- tt.numTables=readBEUInt16();
- if(tt.version != 0)
- return(false);
-
- long macOffset=-1;
- long windozeOffset=-1;
-
- CmapHeader th;
- for(int i=0;i<tt.numTables;++i)
- {
- th.platformID=readBEUInt16();
- th.encodingID=readBEUInt16();
- th.offset=readBEUInt32();
- if((th.platformID==1) && (th.encodingID==0))
- macOffset=th.offset;
- if((th.platformID==3) && (th.encodingID<2))
- {
- long fpos=file.at();
-
- file.at(entries[o_cmap].offset+th.offset);
- int format=readBEUInt16();
- if(format==4)
- windozeOffset=th.offset;
- file.at(fpos);
- }
- }
-
- if((windozeOffset<0) && (macOffset>0))
- {
- std::cout << "Using Mac encoding table" << endl;
- return(false);
-#if 0 // Need to implement Mac encoding sometime...
-struct CmapFormat0
-{
- u_int16_t format;
- u_int16_t length;
- u_int16_t language;
- char glyphIdArray[256];
-};
-#endif
- }
- else if(windozeOffset>0)
- {
- file.at(entries[o_cmap].offset+windozeOffset);
- CmapFormat4 tcm;
- tcm.format=readBEUInt16();
- tcm.length=readBEUInt16();
- tcm.language=readBEUInt16();
- tcm.segCountX2=readBEUInt16();
- tcm.searchRange=readBEUInt16();
- tcm.entrySelector=readBEUInt16();
- tcm.rangeShift=readBEUInt16();
-
- if(error)
- return(false);
-
- if(tcm.segCountX2==0)
- {
- error=sc_TTFBadFile;
- return(false);
- }
-
- int segCount=tcm.segCountX2/2;
- u_int16_t *data=new u_int16_t[segCount*4];
-
- if(!(data))
- {
- error=sc_TTFNoMemory;
- return(false);
- }
-
- for(int i=0;i<segCount;++i)
- data[i]=readBEUInt16();
-
- int junk; junk=readBEUInt16();
-
- for(int i=0;i<segCount;++i)
- data[i+segCount]=readBEUInt16();
- for(int i=0;i<segCount;++i)
- data[i+segCount*2]=readBEUInt16();
- for(int i=0;i<segCount;++i)
- {
- // Convert silly byte indexing from each offset's own address
- // to conventional array indices...
- int tmp=readBEUInt16();
- if(tmp)
- tmp=(tmp/2)-(segCount-i);
- else
- tmp=65535; // 0 is now a valid value, so need to use
- // something else for null.
- data[i+segCount*3]=tmp;
- }
-
- tcm.endCount=&data[0];
- tcm.startCount=&data[segCount];
- tcm.idDelta=&data[segCount*2];
- tcm.idRangeOffset=&data[segCount*3];
-
- int idarraylength=(tcm.length-(16+8*segCount))/2;
-
- u_int16_t *idarray = new u_int16_t[idarraylength];
- for(int i=0;i<idarraylength;++i)
- idarray[i]=readBEUInt16();
- if(error)
- return(false);
-
-#if 0
- for(int i=0;i<segCount;++i)
- {
- std::cout << i << endl;
- std::cout << " " << tcm.startCount[i] << " - " << tcm.endCount[i] << endl;
- std::cout << " " << tcm.idDelta[i] << " : " << tcm.idRangeOffset[i] << endl;
- }
-#endif
-
- bool encoded=false;
- for(int i=0;i<256;++i)
- {
- if(Encoding.present(i))
- {
- int k=i;
- if(th.encodingID==0)
- k+=0xf000; // *HACK!* Supports symbol/dingbat fonts...
- for(int j=0;j<segCount;++j)
- {
- if((tcm.endCount[j]>=k)&&(tcm.startCount[j]<=k))
- {
- int result=k;
- if(tcm.idRangeOffset[j]!=65535)
- {
- result=idarray[tcm.idRangeOffset[j]+k-tcm.startCount[j]];
- }
- if(result)
- {
- result+=tcm.idDelta[j];
- result&=65535;
- QString gn=Encoding[i];
- OwnEncoding[gn]=result;
- OwnEncoding[result]=gn;
- encoded=true;
- }
- }
- }
- }
- }
- QString gn(".notdef");
- OwnEncoding[0]=gn;
- OwnEncoding[gn]=0;
- if(idarray)
- delete idarray;
- delete data;
- return(encoded);
- }
- else
- {
- return(false);
- // cout << "No suitable table found - relying on Post table" << endl;
- }
-}
-
-
-bool sc_TTFont::EmbedFont(QString &str)
-{
- bool success=true;
- if(!(file.open(IO_ReadOnly)))
- {
- error=sc_TTFNoFile;
- return(false);
- }
- success&=readHeaders();
- success&=readHeadTable();
- success&=readnGlyphs();
- success&=readNamingTable();
- success&=readPostTable();
- success&=readHheaTable();
- success&=readHmtxTable();
- success&=readCmapTable();
- if(success)
- {
- Type42Header(str);
- Type42Data(str);
- Type42Trailer(str);
- file.close();
- return(true);
- }
- else
- {
- file.close();
- return(false);
- }
-};
-
-
-bool sc_TTFont::Type42Header(QString &str)
-{
- QString tmp,tmp2;
- str+="%!PS-TrueTypeFont\n";
- if(Post.maxMemType42)
- {
- str+="%%%%VMUsage: ";
- long num=Post.minMemType42;
- tmp.setNum(num);
- str+=tmp + " ";
- num=Post.maxMemType42;
- tmp.setNum(num);
- str+=tmp + "\n";
- }
- str+="11 dict begin\n";
- if(NamingTable[6])
- tmp2=*NamingTable[6];
- else
- {
- QFileInfo fi(file);
- tmp2=fi.fileName();
- }
- tmp2 = tmp2.simplifyWhiteSpace();
- tmp2.replace(QRegExp(" "), "");
- str+="/FontName /" + tmp2 + " def\n";
- str+="/Encoding /ISOLatin1Encoding where {pop ISOLatin1Encoding} {StandardEncoding} ifelse def\n";
- str+="/PaintType 0 def\n/FontMatrix [1 0 0 1 0 0] def\n";
- tmp.sprintf("/FontBBox [%ld %ld %ld %ld] def\n",
- Head.xMin*1000L/Head.unitsPerEm,
- Head.yMin*1000L/Head.unitsPerEm,
- Head.xMax*1000L/Head.unitsPerEm,
- Head.yMax*1000L/Head.unitsPerEm);
- str+=tmp;
- str+="/FontType 42 def\n";
- str+="/FontInfo 8 dict dup begin\n";
- tmp.sprintf("/version (%d.%d) def\n",
- Head.fontRevision.mantissa,
- Head.fontRevision.fraction);
- str+=tmp;
- if(NamingTable[0])
- str+="/Notice (" + *NamingTable[0] + ") def\n";
- if(NamingTable[4])
- str+="/FullName (" + *NamingTable[4] + ") def\n";
- if(NamingTable[1])
- str+="/FamilyName (" + *NamingTable[1] + ") def\n";
- str+="/isFixedPitch ";
- if(Post.isFixedPitch)
- str+="true";
- else
- str+="false";
- str+=" def\n";
-
- long num=Post.underlinePosition*1000L/Head.unitsPerEm;
- tmp.sprintf("/UnderlinePosition %ld def\n",num);
- str+=tmp;
- num=Post.underlineThickness*1000L/Head.unitsPerEm;
- tmp.sprintf("/UnderlineThickness %ld def\n",num);
- str+=tmp;
- str+="end readonly def\n";
-
- return(true);
-}
-
-
-bool sc_TTFont::Type42Trailer(QString &str)
-{
- QString tmp;
-#ifdef HAVE_FREETYPE
- QString tmp2 = "";
- QString tmp3 = "";
- bool error;
- int counter = 0;
- char *buf[50];
- FT_Library library;
- FT_Face face;
- FT_ULong charcode;
- FT_UInt gindex;
- error = FT_Init_FreeType(&library);
- error = FT_New_Face(library, file.name(), 0, &face);
- charcode = FT_Get_First_Char(face, &gindex );
- while (gindex != 0)
- {
- FT_Get_Glyph_Name(face, gindex, buf, 50);
- tmp2 += "/"+QString((char*)buf)+" "+tmp3.setNum(gindex)+" def\n";
- charcode = FT_Get_Next_Char(face, charcode, &gindex );
- counter++;
- }
- FT_Done_FreeType( library );
- tmp.setNum(counter);
- str += "/CharStrings " + tmp + " dict dup begin\n"+tmp2;
-#else
- tmp.setNum(nGlyphs+1);
- str += "/CharStrings " + tmp + " dict dup begin\n";
- QMap<int,QString>::Iterator it;
- for(it=OwnEncoding.beginByCode(); it!=OwnEncoding.endByCode(); ++it)
- {
- tmp.setNum(it.key());
- str+="/"+it.data()+" "+tmp+" def\n";
- }
- str +="/Euro 188 def\n"; // Dirty Hack for the Euro
- QMap<QString,int>::Iterator it2;
- for(it2=Encoding.beginByName(); it2!=Encoding.endByName(); ++it2)
- {
- QString gn=it2.key();
- if(!(OwnEncoding.present(gn)))
- {
- str+="/"+gn+" 0 def\n";
- }
- }
-#endif
- str += "end readonly def\n";
- str += "FontName currentdict end definefont pop\n";
- return(true);
-}
-
-
-bool sc_TTFont::Type42Data(QString &str)
-{
- char *tmp = new char[65535];
- int length;
- char linebuf[80];
-
- str += "/sfnts [";
-
- file.at(0);
- int poso=0;
-
- do
- {
- int posi=0;
- length=file.readBlock(tmp,65534);
- if(length)
- {
- str+="\n<";
- for (int j = 0; j < length; j++)
- {
- unsigned char u=tmp[posi];
- linebuf[poso]=((u >> 4) & 15) + '0';
- if(u>0x9f) linebuf[poso]+='a'-':';
- ++poso;
- u&=15; linebuf[poso]=u + '0';
- if(u>0x9) linebuf[poso]+='a'-':';
- ++posi;
- ++poso;
- if (poso > 70)
- {
- linebuf[poso++]='\n';
- linebuf[poso++]=0;
- str += linebuf;
- poso = 0;
- }
- }
- linebuf[poso++]=0;
- str += linebuf;
- poso = 0;
- str += "00>";
- }
- } while (length==65534);
-
- str += "\n] def\n";
- delete tmp;
- return(true);
-}
-
-bool sc_TTFont::Type42Metrics(QString *fb, QString *as, QString *ds, QString *it, bool *fp)
-{
- QString tmp = "";
- tmp.sprintf("%ld %ld %ld %ld",
- Head.xMin*1000L/Head.unitsPerEm,
- Head.yMin*1000L/Head.unitsPerEm,
- Head.xMax*1000L/Head.unitsPerEm,
- Head.yMax*1000L/Head.unitsPerEm);
- *fb = tmp;
- *as = tmp.setNum(static_cast<int>(Hhea.Ascender*1000L/Head.unitsPerEm));
- *ds = tmp.setNum(static_cast<int>(Hhea.Descender*1000L/Head.unitsPerEm));
- tmp.sprintf("%d.%d",Post.italicAngle.mantissa,Post.italicAngle.fraction);
- *it = tmp;
- *fp = static_cast<int>(Post.isFixedPitch);
- return true;
-}
-
-QString Foi_ttf::RealName()
-{
- if(cached_RealName)
- return(cached_RealName);
- sc_TTFont ft(Datei,Encoding);
- QString result=ft.RealName();
- if(result==0)
- {
- QFile tf(Datei);
- QFileInfo fi(tf);
- result=fi.fileName();
- }
- return(result);
-}
-
-bool Foi_ttf::ReadMetrics()
-{
- Ascent = "0";
- CapHeight = "0";
- Descender = "0";
- ItalicAngle = "0";
- StdVW = "1";
- FontBBox = "0 0 0 0";
- IsFixedPitch = false;
- if(metricsread)
- return(true);
-#ifdef HAVE_FREETYPE
- CharWidth.clear();
- QString tmp;
- bool error;
- FT_Library library;
- FT_ULong charcode;
- FT_UInt gindex;
- FT_Face face;
- error = FT_Init_FreeType( &library );
- error = FT_New_Face( library, Datei, 0, &face );
- uniEM = static_cast<float>(face->units_per_EM);
- HasKern = FT_HAS_KERNING(face);
- Ascent = tmp.setNum(face->ascender * 1000 / uniEM);
- Descender = tmp.setNum(face->descender * 1000 / uniEM);
- CapHeight = Ascent;
- ItalicAngle = "0";
- StdVW = "1";
- FontBBox = tmp.setNum(face->bbox.xMin * 1000 / uniEM)+" "+tmp.setNum(face->bbox.yMin * 1000 / uniEM)+" "+tmp.setNum(face->bbox.xMax * 1000 / uniEM)+" "+tmp.setNum(face->bbox.yMax * 1000 / uniEM);
- IsFixedPitch = face->face_flags & 4;
- gindex = 0;
- charcode = FT_Get_First_Char( face, &gindex );
- while ( gindex != 0 )
- {
- FT_Load_Glyph( face, gindex, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP );
- CharWidth.insert(charcode, face->glyph->metrics.horiAdvance / uniEM);
- charcode = FT_Get_Next_Char( face, charcode, &gindex );
- }
- FT_Done_FreeType( library );
- HasMetrics=true;
- metricsread=true;
-#else
- for(int i=0;i<256;++i)
- CharWidth[i]=0;
- sc_TTFont ft(Datei,Encoding);
- if(ft.ReadMetrics(CharWidth))
- HasMetrics=true;
- else
- HasMetrics=false;
- metricsread=true;
- if (HasMetrics)
- ft.Type42Metrics(&FontBBox, &Ascent, &Descender, &ItalicAngle, &IsFixedPitch);
- CapHeight = Ascent;
-#endif
- return(HasMetrics);
-}
-
-bool Foi_ttf::EmbedFont(QString &str)
-{
- sc_TTFont ft(Datei,Encoding);
- bool success=true;
- success&=ft.EmbedFont(str);
- return(success);
-}
-
/start/Scribus/scribus/scfonts_ttf.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/rc4.h
===================================================================
--- start/Scribus/scribus/rc4.h (revision 427)
+++ start/Scribus/scribus/rc4.h (nonexistent)
@@ -1,63 +0,0 @@
-/*
- * "$Id$"
- *
- * RC4 functions for HTMLDOC.
- *
- * Original code by Rob Earhart
- * Copyright 1999 by Carnegie Mellon University, All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Carnegie Mellon
- * University not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission.
- *
- * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _RC4_H_
-# define _RC4_H_
-
-# ifdef __cplusplus
-extern "C" {
-# endif /* __cplusplus */
-
-
-/*
- * RC4 context...
- */
-
-typedef struct
-{
- unsigned char sbox[256]; /* S boxes for encryption */
- int i, j; /* Current indices into S boxes */
-} rc4_context_t;
-
-
-/*
- * Prototypes...
- */
-
-extern void rc4_init(rc4_context_t *context, const unsigned char *key,
- unsigned keylen);
-extern void rc4_encrypt(rc4_context_t *context, const unsigned char *input,
- unsigned char *output, unsigned len);
-
-# ifdef __cplusplus
-}
-# endif /* __cplusplus */
-
-#endif /* !_RC4_H_ */
-
-/*
- * End of "$Id$".
- */
/start/Scribus/scribus/rc4.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/scribuswin.h
===================================================================
--- start/Scribus/scribus/scribuswin.h (revision 427)
+++ start/Scribus/scribus/scribuswin.h (nonexistent)
@@ -1,63 +0,0 @@
-/***************************************************************************
- scribuswin.h - description
- -------------------
- begin : Mit Nov 6 2002
- copyright : (C) 2002 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef SCRIBUSWIN_H
-#define SCRIBUSWIN_H
-
-#include <qmainwindow.h>
-#include <qmessagebox.h>
-#include "scribusview.h"
-#include "scribusdoc.h"
-#include "muster.h"
-/**
- *@author Franz Schmid
- */
-
-class ScribusWin : public QMainWindow
-{
- Q_OBJECT
-
-public:
- ScribusWin(QWidget* parent, ScribusDoc* ddoc);
- ~ScribusWin() {};
- void setView(ScribusView* dview);
- void closeEvent(QCloseEvent *ce);
- void OpenCMSProfiles(ProfilesL InPo, ProfilesL MoPo, ProfilesL PrPo);
- void CloseCMSProfiles();
- ScribusView* view;
- ScribusDoc* doc;
- MusterSeiten* muster;
- bool MenuStat[7];
-#ifdef HAVE_CMS
- cmsHTRANSFORM stdTrans;
- cmsHTRANSFORM stdProof;
- cmsHTRANSFORM stdTransImg;
- cmsHTRANSFORM stdProofImg;
- bool SoftProofing;
- bool Gamut;
- int IntentMonitor;
- int IntentPrinter;
-#endif
- int NrItems;
- int First;
- int Last;
-signals:
- void Schliessen();
- void SaveAndClose();
-};
-
-#endif
/start/Scribus/scribus/scribuswin.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/colorchart.cpp
===================================================================
--- start/Scribus/scribus/colorchart.cpp (revision 427)
+++ start/Scribus/scribus/colorchart.cpp (nonexistent)
@@ -1,110 +0,0 @@
-/***************************************************************************
- colorchart.cpp - description
- -------------------
- begin : Sat Sep 15 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include "colorchart.h"
-#include "colorchart.moc"
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpainter.h>
-extern QImage ProofImage(QImage *Im);
-
-ColorChart::ColorChart(QWidget *parent) : QLabel(parent)
-{
- setScaledContents( true );
- setAlignment( static_cast<int>( QLabel::AlignCenter ) );
- Xp = 0;
- Yp = 0;
- setBackgroundMode(NoBackground);
- drawPalette(255);
-}
-
-void ColorChart::mouseMoveEvent(QMouseEvent *m)
-{
- drawMark(m->x(), m->y());
- emit ColorVal(m->x() * 359 / width(), m->y() * 255 / height(), false);
-}
-
-void ColorChart::mousePressEvent(QMouseEvent *m)
-{
- drawMark(m->x(), m->y());
- emit ColorVal(m->x() * 359 / width(), m->y() * 255 / height(), false);
-}
-
-void ColorChart::mouseReleaseEvent(QMouseEvent *m)
-{
- drawMark(m->x(), m->y());
- emit ColorVal(m->x() * 359 / width(), m->y() * 255 / height(), true);
-}
-
-void ColorChart::paintEvent(QPaintEvent *e)
-{
- QPainter p;
- p.begin(this);
- p.setClipRect(e->rect());
- p.drawPixmap(0, 0, pmx);
- drawMark(Xp, Yp);
- p.end();
-}
-
-void ColorChart::drawMark(int x, int y)
-{
- QPainter p;
- p.begin(this);
- p.setRasterOp(XorROP);
- p.setPen(QPen(QColor(white), 1, SolidLine, FlatCap, MiterJoin));
- p.drawLine(Xp-5, Yp-5, Xp-1, Yp-1);
- p.drawLine(Xp-5, Yp+5, Xp-1, Yp+1);
- p.drawLine(Xp+2, Yp+2, Xp+6, Yp+6);
- p.drawLine(Xp+2, Yp-2, Xp+6, Yp-6);
- if (!((Xp == x) && (Yp == y)))
- {
- Xp = x;
- Yp = y;
- p.drawLine(Xp-5, Yp-5, Xp-1, Yp-1);
- p.drawLine(Xp-5, Yp+5, Xp-1, Yp+1);
- p.drawLine(Xp+2, Yp+2, Xp+6, Yp+6);
- p.drawLine(Xp+2, Yp-2, Xp+6, Yp-6);
- }
- p.end();
-}
-
-void ColorChart::setMark(int h, int s)
-{
- drawMark(h * width() / 359, (255-s) * height() / 255);
-}
-
-void ColorChart::drawPalette(int val)
-{
- int xSize = width();
- int ySize = height();
- QImage image(xSize, ySize, 32);
- QColor color;
- int x;
- int y;
- for (y = 0; y < ySize; ++y)
- {
- unsigned int* p = (unsigned int*)(image.scanLine(y));
- for(x = 0; x < xSize; ++x)
- {
- color.setHsv(360*x/xSize, 256*( ySize - 1 - y )/ySize, val);
- *p = color.rgb();
- ++p;
- }
- }
- pmx.convertFromImage(ProofImage(&image));
- setPixmap(pmx);
-}
/start/Scribus/scribus/colorchart.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/hruler.cpp
===================================================================
--- start/Scribus/scribus/hruler.cpp (revision 427)
+++ start/Scribus/scribus/hruler.cpp (nonexistent)
@@ -1,135 +0,0 @@
-/***************************************************************************
- hruler.cpp - description
- -------------------
- begin : Tue Apr 10 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include "hruler.h"
-#include "hruler.moc"
-#include "page.h"
-#include <qcursor.h>
-Hruler::Hruler(QScrollView *pa, ScribusDoc *doc) : QWidget(pa)
-{
- setEraseColor(QColor(255,255,255));
- doku = doc;
- rfont = font();
- rfont.setPointSize(9);
- offs = -10;
- Markp = 0;
- repX = false;
- Mpressed = false;
-}
-
-void Hruler::mousePressEvent(QMouseEvent *)
-{
- Mpressed = true;
- qApp->setOverrideCursor(QCursor(SplitHCursor), true);
-}
-
-void Hruler::mouseReleaseEvent(QMouseEvent *m)
-{
- Mpressed = false;
- doku->ActPage->DrHY = -1;
- doku->ActPage->SetYGuide(m);
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
-}
-
-void Hruler::mouseMoveEvent(QMouseEvent *m)
-{
- if ((Mpressed) && (m->pos().y() > height()))
- doku->ActPage->FromHRuler(m);
-}
-
-void Hruler::paintEvent(QPaintEvent *)
-{
- int pc, xx;
- float of, xl, iter, iter2;
- float sc = doku->Scale;
- switch (doku->Einheit)
- {
- case 0:
- iter = 10.0;
- iter2 = iter * 10.0;
- break;
- case 1:
- iter = (10.0 / 25.4) * 72.0;
- iter2 = iter * 10.0;
- break;
- case 2:
- iter = 18.0;
- iter2 = 72.0;
- break;
- case 3:
- iter = 12.0;
- iter2 = 120.0;
- break;
- }
- QPainter p;
- p.begin(this);
- p.drawLine(0, 24, width(), 24);
- p.translate(-offs, 0);
- if (repX)
- {
- p.setPen(red);
- p.setBrush(red);
- QPointArray cr;
- cr.setPoints(3, Markp, 9, Markp+2, 0, Markp-2, 0);
- p.drawPolygon(cr);
- p.end();
- repX = false;
- return;
- }
- p.setBrush(black);
- p.setPen(black);
- p.setFont(rfont);
- p.scale(sc, 1.0);
- ((doku->PageFP) && (doku->PagesSbS)) ? pc = 2 : pc = 1;
- if (doku->MasterP)
- pc = 1;
- for (xx = 0; xx < pc; ++xx)
- {
- of = xx * (doku->PageB+30.0);
- for (xl = 0; xl < doku->PageB; xl += iter)
- {
- p.drawLine(static_cast<int>(xl+of), 18, static_cast<int>(xl+of), 24);
- }
- for (xl = 0; xl < doku->PageB+(iter2/2); xl += iter2)
- {
- p.drawLine(static_cast<int>(xl+of), 11, static_cast<int>(xl+of), 24);
- p.save();
- p.scale(1.0 / sc, 1.0);
- switch (doku->Einheit)
- {
- case 2:
- p.drawText(static_cast<int>((xl+of+qRound(2/sc)) * sc), 17, QString::number(xl / iter2));
- break;
- case 3:
- p.drawText(static_cast<int>((xl+of+qRound(2/sc)) * sc), 17, QString::number(xl / iter));
- break;
- default:
- p.drawText(static_cast<int>((xl+of+qRound(2/sc)) * sc), 17, QString::number(xl / iter * 10));
- break;
- }
- p.restore();
- }
- }
-}
-
-/** Zeichnet den Pfeil */
-void Hruler::Draw(int wo)
-{
- repX = true;
- Markp = wo-qRound(10*doku->Scale);
- repaint(QRect(0, 0, width(), 9));
-}
/start/Scribus/scribus/hruler.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/mspinbox.h
===================================================================
--- start/Scribus/scribus/mspinbox.h (revision 427)
+++ start/Scribus/scribus/mspinbox.h (nonexistent)
@@ -1,40 +0,0 @@
-/***************************************************************************
- mspinbox.h - description
- -------------------
- begin : Sat Jun 16 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef MSPINBOX_H
-#define MSPINBOX_H
-
-#include <qspinbox.h>
-
-/**
- *@author Franz Schmid
- */
-
-class MSpinBox : public QSpinBox {
-public:
- MSpinBox(QWidget *pa, int s);
- ~MSpinBox() {};
- QString mapValueToText(int value);
- int mapTextToValue(bool *ok);
- int Decimals;
- int Width;
- void setDecimals( int deci );
-protected:
- bool eventFilter( QObject* ob, QEvent* ev );
-};
-
-#endif
/start/Scribus/scribus/mspinbox.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/icons5.h
===================================================================
--- start/Scribus/scribus/icons5.h (revision 427)
+++ start/Scribus/scribus/icons5.h (nonexistent)
@@ -1,59 +0,0 @@
-static const char *dashdotL[]={
-"73 7 2 1",
-". c None",
-"# c #000000",
-".........................................................................",
-".........................................................................",
-"..#########...###...#########...###...#########...###...#########...###..",
-"..#########...###...#########...###...#########...###...#########...###..",
-"..#########...###...#########...###...#########...###...#########...###..",
-".........................................................................",
-"........................................................................."};
-
-static const char *dashdotdotL[]={
-"73 7 2 1",
-". c None",
-"# c #000000",
-".........................................................................",
-".........................................................................",
-"..#########...###...###...#########...###...###...#########...###...###..",
-"..#########...###...###...#########...###...###...#########...###...###..",
-"..#########...###...###...#########...###...###...#########...###...###..",
-".........................................................................",
-"........................................................................."};
-
-static const char *dotL[]={
-"73 7 2 1",
-". c None",
-"# c #000000",
-".........................................................................",
-".........................................................................",
-"..###...###...###...###...###...###...###...###...###...###...###...###..",
-"..###...###...###...###...###...###...###...###...###...###...###...###..",
-"..###...###...###...###...###...###...###...###...###...###...###...###..",
-".........................................................................",
-"........................................................................."};
-
-static const char *solidL[]={
-"73 7 2 1",
-". c None",
-"# c #000000",
-".........................................................................",
-".........................................................................",
-"..#####################################################################..",
-"..#####################################################################..",
-"..#####################################################################..",
-".........................................................................",
-"........................................................................."};
-
-static const char *dashL[]={
-"73 7 2 1",
-". c None",
-"# c #000000",
-".........................................................................",
-".........................................................................",
-"..#########...#########...#########...#########...#########...#########..",
-"..#########...#########...#########...#########...#########...#########..",
-"..#########...#########...#########...#########...#########...#########..",
-".........................................................................",
-"........................................................................."};
/start/Scribus/scribus/icons5.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/query.cpp
===================================================================
--- start/Scribus/scribus/query.cpp (revision 427)
+++ start/Scribus/scribus/query.cpp (nonexistent)
@@ -1,66 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Query.ui'
-**
-** Created: Mon Apr 23 20:49:10 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "query.h"
-extern QPixmap loadIcon(QString nam);
-
-#include <qtooltip.h>
-/*
- * Constructs a Query which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-Query::Query( QWidget* parent, const char* name, bool modal, WFlags fl, QString text, QString titel )
- : QDialog( parent, name, modal, fl )
-{
- if ( !name )
- setName( "Query" );
- setCaption( tr( titel ) );
- setIcon(loadIcon("AppIcon.xpm"));
- QueryLayout = new QVBoxLayout( this );
- QueryLayout->setSpacing( 6 );
- QueryLayout->setMargin( 11 );
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 6 );
- Layout2->setMargin( 0 );
- Frage = new QLabel( this, "Frage" );
- Frage->setFrameShape( QLabel::MShape );
- Frage->setFrameShadow( QLabel::MShadow );
- Frage->setText( tr( text ) );
- Frage->adjustSize();
- Layout2->addWidget( Frage );
- Answer = new QLineEdit( this, "Answer" );
- Layout2->addWidget( Answer );
- QueryLayout->addLayout( Layout2 );
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "OK" ) );
- PushButton1->setDefault( true );
- Layout1->addWidget( PushButton1 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
- PushButton2 = new QPushButton( this, "PushButton2" );
- PushButton2->setText( tr( "Cancel" ) );
- Layout1->addWidget( PushButton2 );
- QueryLayout->addLayout( Layout1 );
- setMaximumSize(sizeHint());
- Answer->setFocus();
-
- // signals and slots connections
- connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
- // tab order
- setTabOrder( Answer, PushButton1 );
- setTabOrder( PushButton1, PushButton2 );
-}
-
/start/Scribus/scribus/query.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/scribus.cpp
===================================================================
--- start/Scribus/scribus/scribus.cpp (revision 427)
+++ start/Scribus/scribus/scribus.cpp (nonexistent)
@@ -1,6313 +0,0 @@
-/***************************************************************************
- scribus.cpp - description
- -------------------
- begin : Fre Apr 6 21:09:31 CEST 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include <qaccel.h>
-#include <qapplication.h>
-#include <qcolordialog.h>
-#include <qcolor.h>
-#include <qiconset.h>
-#include <qtextstream.h>
-#include <qstylefactory.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qcursor.h>
-#include <qvbox.h>
-#include <cstdio>
-#include <cstdlib>
-#include <dlfcn.h>
-#include <iostream>
-#include "scribus.h"
-#include "scribus.moc"
-#include "newfile.h"
-#include "page.h"
-#include "query.h"
-#include "mdup.h"
-#include "docinfo.h"
-#include "reformdoc.h"
-#include "serializer.h"
-#include "align.h"
-#include "fmitem.h"
-#include "fontprefs.h"
-#include "libprefs/prefs.h"
-#include "pdfopts.h"
-#include "inspage.h"
-#include "delpages.h"
-#include "movepage.h"
-#include "helpbrowser.h"
-#include "scribusXml.h"
-#include "libabout/about.h"
-#include "druck.h"
-#include "editformats.h"
-#include "muster.h"
-#include "applytemplate.h"
-#include "picstatus.h"
-#include "customfdialog.h"
-#include "cmsprefs.h"
-#include "annot.h"
-#include "annota.h"
-#include "javadocs.h"
-#include "config.h"
-#include "fpoint.h"
-#include "fpointarray.h"
-#include "hysettings.h"
-#include "guidemanager.h"
-#include "mergedoc.h"
-extern QPixmap loadIcon(QString nam);
-
-using namespace std;
-
-#ifdef HAVE_CMS
-cmsHPROFILE CMSoutputProf;
-cmsHPROFILE CMSprinterProf;
-cmsHTRANSFORM stdTrans;
-cmsHTRANSFORM stdProof;
-cmsHTRANSFORM stdTransImg;
-cmsHTRANSFORM stdProofImg;
-bool SoftProofing;
-bool Gamut;
-bool CMSuse;
-int IntentMonitor;
-int IntentPrinter;
-#endif
-bool CMSavail;
-ProfilesL InputProfiles;
-int PolyC;
-int PolyFd;
-float PolyF;
-bool PolyS;
-float PolyR;
-float UmReFaktor;
-QString DocDir;
-
-ScribusApp::ScribusApp()
-{
- setCaption(tr("Scribus " VERSION));
- setIcon(loadIcon("AppIcon.xpm"));
- initMenuBar();
- initStatusBar();
- WerkTools2 = new QToolBar(tr("File"), this);
- DatNeu = new QToolButton(loadIcon("DateiNeu.xpm"), tr("Creates a new Document"), QString::null, this, SLOT(slotFileNew()), WerkTools2);
- DatOpe = new QToolButton(loadIcon("DateiOpen.xpm"), tr("Opens a Document"), QString::null, this, SLOT(slotDocOpen()), WerkTools2);
- DatSav = new QToolButton(loadIcon("DateiSave.xpm"), tr("Saves the current Document"), QString::null, this, SLOT(slotFileSave()), WerkTools2);
- DatClo = new QToolButton(loadIcon("DateiClos.xpm"), tr("Closes the current Document"), QString::null, this, SLOT(slotFileClose()), WerkTools2);
- DatPri = new QToolButton(loadIcon("DateiPrint.xpm"), tr("Prints the current Document"), QString::null, this, SLOT(slotFilePrint()), WerkTools2);
- DatPDF = new QToolButton(loadIcon("acrobat.png"), tr("Saves the current Document as PDF"), QString::null, this, SLOT(SaveAsPDF()), WerkTools2);
- DatSav->setEnabled(false);
- DatClo->setEnabled(false);
- DatPri->setEnabled(false);
- DatPDF->setEnabled(false);
- DatOpe->setPopup(recentMenu);
- WerkTools = new WerkToolB(this);
- setDockEnabled(WerkTools, DockLeft, false);
- setDockEnabled(WerkTools, DockRight, false);
- WerkTools->setEnabled(false);
- QString Pff = QString(getenv("HOME"))+"/.scribus";
- QFileInfo Pffi = QFileInfo(Pff);
- if (Pffi.exists())
- {
- if (Pffi.isDir())
- PrefsPfad = Pff;
- else
- PrefsPfad = QString(getenv("HOME"));
- }
- else
- {
- QDir di = QDir();
- di.mkdir(Pff);
- PrefsPfad = Pff;
- QString OldPR = QString(getenv("HOME"))+"/.scribus.rc";
- QFileInfo OldPi = QFileInfo(OldPR);
- if (OldPi.exists())
- {
- system("mv " + OldPR + " " + Pff+"/scribus.rc");
- }
- QString OldPR2 = QString(getenv("HOME"))+"/.scribusfont.rc";
- QFileInfo OldPi2 = QFileInfo(OldPR2);
- if (OldPi2.exists())
- {
- system("mv " + OldPR2 + " " + Pff+"/scribusfont.rc");
- }
- QString OldPR3 = QString(getenv("HOME"))+"/.scribusscrap.scs";
- QFileInfo OldPi3 = QFileInfo(OldPR3);
- if (OldPi3.exists())
- {
- system("mv " + OldPR3 + " " + Pff+"/scrap.scs");
- }
- }
- /** Erstelle Fontliste */
- NoFonts = false;
- BuFromApp = false;
- GetAllFonts();
- if (NoFonts)
- {
- QString mess = tr("There are no Postscript-Fonts on your System");
- mess += "\n" + tr("Exiting now");
- QMessageBox::critical(this, tr("Fatal Error"), mess, 1, 0, 0);
- }
- else
- {
- HaveDoc = 0;
- BuildFontMenu();
- SCFontsIterator it(Prefs.AvailFonts);
- Prefs.DefFont = it.currentKey();
- Prefs.DefSize = 12;
- Prefs.AppFontSize = 12;
- /** Default Farbenliste */
- Prefs.DColors.clear();
- Prefs.DColors.insert("White", CMYKColor(0, 0, 0, 0));
- Prefs.DColors.insert("Black", CMYKColor(0, 0, 0, 255));
- Prefs.DColors.insert("Blue", CMYKColor(255, 255, 0, 0));
- Prefs.DColors.insert("Cyan", CMYKColor(255, 0, 0, 0));
- Prefs.DColors.insert("Green", CMYKColor(255, 0, 255, 0));
- Prefs.DColors.insert("Red", CMYKColor(0, 255, 255, 0));
- Prefs.DColors.insert("Yellow", CMYKColor(0, 0, 255, 0));
- Prefs.DColors.insert("Magenta", CMYKColor(0, 255, 0, 0));
- DispX = 10;
- DispY = 10;
- Prefs.Wheelval = 40;
- Prefs.GrabRad = 4;
- Prefs.GuideRad = 10;
- Prefs.DminGrid = 20;
- Prefs.DmajGrid = 100;
- DocNr = 1;
- Prefs.DminColor = QColor(green);
- Prefs.DmajColor = QColor(green);
- Prefs.DpapColor = QColor(white);
- Prefs.DmargColor = QColor(blue);
- Prefs.guideColor = QColor(darkBlue);
- Prefs.DVHoch = 33;
- Prefs.DVHochSc = 100;
- Prefs.DVTief = 33;
- Prefs.DVTiefSc = 100;
- Prefs.DVKapit = 75;
- Prefs.GUI = "Default";
- Prefs.Dpen = "Black";
- Prefs.Dbrush = "Black";
- Prefs.Dshade = 100;
- Prefs.Dshade2 = 100;
- Prefs.DLineArt = SolidLine;
- Prefs.Dwidth = 1;
- Prefs.DpenLine = "Black";
- Prefs.DpenText = "Black";
- Prefs.DshadeLine = 100;
- Prefs.DLstyleLine = SolidLine;
- Prefs.DwidthLine = 1;
- Prefs.MagMin = 10;
- Prefs.MagMax = 800;
- Prefs.MagStep = 25;
- Prefs.DbrushPict = "White";
- Prefs.ShadePict = 100;
- Prefs.ScaleX = 1;
- Prefs.ScaleY = 1;
- Prefs.Before = true;
- Prefs.Einheit = 0;
- UmReFaktor = 1.0;
- PolyC = 4;
- PolyF = 0.5;
- PolyS = false;
- PolyFd = 0;
- PolyR = 0;
- Prefs.PolyC = PolyC;
- Prefs.PolyF = PolyF;
- Prefs.PolyFd = PolyFd;
- Prefs.PolyS = PolyS;
- Prefs.PolyR = PolyR;
- Prefs.Werkv = true;
- Prefs.Mpalv = false;
- Prefs.Tpalv = false;
- Prefs.SCpalv = false;
- Prefs.Lpalv = false;
- Prefs.Bopalv = false;
- Prefs.PSize = 40;
- Prefs.SaveAtQ = true;
- Prefs.ShFrames = true;
- Prefs.PagesSbS = true;
- Prefs.RecentDocs.clear();
- Prefs.RecentDCount = 5;
- Prefs.RandFarbig = false;
- Prefs.AutoLine = 20;
- Prefs.PageFormat = 4;
- Prefs.Ausrichtung = 0;
- Prefs.PageBreite = 595;
- Prefs.PageHoehe = 842;
- Prefs.RandOben = 9;
- Prefs.RandUnten = 40;
- Prefs.RandLinks = 9;
- Prefs.RandRechts = 9;
- Prefs.DoppelSeiten = false;
- Prefs.ErsteLinks = false;
- Prefs.ScaleType = true;
- Prefs.AspectRatio = true;
- Prefs.MinWordLen = 3;
- Prefs.Language = "";
- Prefs.Automatic = true;
- Prefs.AutoCheck = false;
- Prefs.PDFTransparency = false;
- Prefs.AutoSave = false;
- Prefs.AutoSaveTime = 600000;
- Prefs.DocDir = QString(getenv("HOME"));
- PDFavailable = true;
- PDef.Pname = "";
- PDef.Dname = "";
- PDef.Command = "";
- PrinterUsed = false;
- resize(610, 600);
- QVBox* vb = new QVBox( this );
- vb->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- wsp = new QWorkspace( vb );
- setCentralWidget( vb );
- connect(wsp, SIGNAL(windowActivated(QWidget *)), this, SLOT(newActWin(QWidget *)));
- Tpal = new Tree(this, WStyle_Customize | WStyle_DialogBorder);
- Mpal = new Mpalette(this, FontMenu);
- Mpal->Cpal->SetColors(Prefs.DColors);
- Npal = new NodePalette(this);
- Lpal = new LayerPalette(this);
- ScBook = new Biblio(this, Prefs.AvailFonts, &Prefs);
- Sepal = new SeitenPal(this);
- BookPal = new BookPalette(this);
- CMSavail = false;
- Prefs.DCMSset.DefaultMonitorProfile = "";
- Prefs.DCMSset.DefaultPrinterProfile = "";
- Prefs.DCMSset.DefaultInputProfile = "";
- Prefs.DCMSset.DefaultInputProfile2 = "";
- Prefs.DCMSset.CMSinUse = false;
- Prefs.DCMSset.SoftProofOn = false;
- Prefs.DCMSset.GamutCheck = false;
- Prefs.DCMSset.DefaultIntentMonitor = 1;
- Prefs.DCMSset.DefaultIntentMonitor2 = 1;
- Prefs.DCMSset.DefaultIntentPrinter = 0;
- Prefs.GFontSub.clear();
- SetKeyEntry(56, tr("Smart Hyphen"), 0, ALT+Key_Minus);
- SetKeyEntry(57, tr("Align Left"), 0, CTRL+Key_L);
- SetKeyEntry(58, tr("Align Right"), 0, CTRL+Key_R);
- SetKeyEntry(59, tr("Align Center"), 0, CTRL+Key_E);
- SetKeyEntry(60, tr("Insert Pagenumber"), 0, ALT+Key_NumberSign);
- SetKeyEntry(61, tr("Attach Text to Path"), PfadT, 0);
- SetKeyEntry(62, tr("Show Layers"), viewLpal, 0);
- SetKeyEntry(63, tr("JavaScripts..."), jman, 0);
- SetKeyEntry(64, tr("Undo"), edUndo, CTRL+Key_Z);
- SetKeyEntry(65, tr("Show Page Palette"), viewSepal, 0);
- SetKeyEntry(66, tr("Lock/Unlock"), LockOb, CTRL+Key_H);
- GetCMSProfiles();
- InitHyphenator();
- ReadPrefs();
- Mpal->Cpal->UseTrans(Prefs.PDFTransparency);
- DocDir = Prefs.DocDir;
- SetShortCut();
- if (CMSavail)
- {
- hymen->insertItem(tr("Color Management..."), this , SLOT(SetCMSPrefs()));
- ProfilesL::Iterator ip;
- if ((Prefs.DCMSset.DefaultInputProfile == "") || (!InputProfiles.contains(Prefs.DCMSset.DefaultInputProfile)))
- {
- ip = InputProfiles.begin();
- Prefs.DCMSset.DefaultInputProfile = ip.key();
- }
- if ((Prefs.DCMSset.DefaultInputProfile2 == "") || (!InputProfiles.contains(Prefs.DCMSset.DefaultInputProfile2)))
- {
- ip = InputProfiles.begin();
- Prefs.DCMSset.DefaultInputProfile2 = ip.key();
- }
- if ((Prefs.DCMSset.DefaultMonitorProfile == "") || (!MonitorProfiles.contains(Prefs.DCMSset.DefaultMonitorProfile)))
- {
- ip = MonitorProfiles.begin();
- Prefs.DCMSset.DefaultMonitorProfile = ip.key();
- }
- if ((Prefs.DCMSset.DefaultPrinterProfile == "") || (!PrinterProfiles.contains(Prefs.DCMSset.DefaultPrinterProfile)))
- {
- ip = PrinterProfiles.begin();
- Prefs.DCMSset.DefaultPrinterProfile = ip.key();
- }
-#ifdef HAVE_CMS
- SoftProofing = Prefs.DCMSset.SoftProofOn;
- CMSuse = false;
- IntentPrinter = Prefs.DCMSset.DefaultIntentPrinter;
- IntentMonitor = Prefs.DCMSset.DefaultIntentMonitor;
-#endif
- }
- QString SCf = PrefsPfad+"/scrap.scs";
- QFileInfo SCfi = QFileInfo(SCf);
- if (SCfi.exists())
- {
- ScBook->BibWin->ReadContents(SCf);
- ScBook->ScFilename = SCf;
- }
- ScBook->AdjustMenu();
- HaveGS = system("gs -h > /dev/null 2>&1");
- InitPlugs();
- ClipB = QApplication::clipboard();
- connect(WerkTools, SIGNAL(NewMode(int)), this, SLOT(ModeFromTB(int)));
- connect(WerkTools, SIGNAL(Schliessen()), this, SLOT(ToggleTools()));
- connect(Mpal, SIGNAL(DocChanged()), this, SLOT(slotDocCh()));
- connect(Mpal, SIGNAL(NewAbStyle(int)), this, SLOT(setNewAbStyle(int)));
- connect(Mpal, SIGNAL(BackHome()), this, SLOT(Aktiv()));
- connect(Mpal, SIGNAL(Stellung(int)), this, SLOT(setItemHoch(int)));
- connect(Mpal, SIGNAL(Schliessen()), this, SLOT(ToggleMpal()));
- connect(Mpal, SIGNAL(EditCL()), this, SLOT(ToggleFrameEdit()));
- connect(Mpal->Cpal, SIGNAL(NewPen(QString)), this, SLOT(setPenFarbe(QString)));
- connect(Mpal->Cpal, SIGNAL(NewBrush(QString)), this, SLOT(setBrushFarbe(QString)));
- connect(Mpal->Cpal, SIGNAL(NewPenShade(int)), this, SLOT(setPenShade(int)));
- connect(Mpal->Cpal, SIGNAL(NewBrushShade(int)), this, SLOT(setBrushShade(int)));
- connect(Mpal->Cpal, SIGNAL(NewTrans(float)), this, SLOT(SetTranspar(float)));
- connect(Mpal->Cpal, SIGNAL(NewGradient(int, QString, int, QString, int)), this, SLOT(setGradFill(int, QString, int, QString, int)));
- connect(Mpal->Cpal, SIGNAL(QueryItem()), this, SLOT(GetBrushPen()));
- connect(Tpal, SIGNAL(Schliessen()), this, SLOT(ToggleTpal()));
- connect(Tpal, SIGNAL(SelectElement(int, int)), this, SLOT(SelectFromOutl(int, int)));
- connect(Tpal, SIGNAL(SelectSeite(int)), this, SLOT(SelectFromOutlS(int)));
- connect(Mpal->Spal, SIGNAL(NewStyle(int)), this, SLOT(setNewAbStyle(int)));
- connect(Mpal->Spal, SIGNAL(EditSt()), this, SLOT(slotEditStyles()));
- connect(Npal, SIGNAL(Schliessen()), this, SLOT(NoFrameEdit()));
- connect(Lpal, SIGNAL(LayerActivated(int)), this, SLOT(changeLayer(int)));
- connect(Lpal, SIGNAL(LayerRemoved(int)), this, SLOT(LayerRemove(int)));
- connect(Lpal, SIGNAL(LayerChanged()), this, SLOT(showLayer()));
- connect(Lpal, SIGNAL(Schliessen()), this, SLOT(ToggleLpal()));
- connect(Sepal, SIGNAL(Schliessen()), this, SLOT(ToggleSepal()));
- connect(ScBook, SIGNAL(Schliessen()), this, SLOT(ToggleBpal()));
- connect(Sepal, SIGNAL(EditTemp(QString)), this, SLOT(ManageTemp(QString)));
- connect(Sepal->PageView, SIGNAL(UseTemp(QString, int)), this, SLOT(Apply_Temp(QString, int)));
- connect(Sepal->PageView, SIGNAL(NewPage(int, QString)), this, SLOT(slotNewPageP(int, QString)));
- connect(Sepal->Trash, SIGNAL(DelPage(int)), this, SLOT(DeletePage2(int)));
- connect(Sepal, SIGNAL(GotoSeite(int)), this, SLOT(SelectFromOutlS(int)));
- connect(BookPal->BView, SIGNAL(MarkMoved()), this, SLOT(StoreBookmarks()));
- connect(BookPal->BView, SIGNAL(ChangeBMNr(int, int, int)), this, SLOT(ChBookmarks(int, int, int)));
- connect(BookPal, SIGNAL(Schliessen()), this, SLOT(ToggleBookpal()));
- connect(recentMenu, SIGNAL(activated(int)), this, SLOT(LoadRecent(int)));
- connect(ColorMenu, SIGNAL(activated(int)), this, SLOT(setItemFarbe(int)));
- connect(ShadeMenu, SIGNAL(activated(int)), this, SLOT(setItemShade(int)));
- connect(FontMenu, SIGNAL(activated(int)), this, SLOT(setItemFont(int)));
- connect(SizeTMenu, SIGNAL(activated(int)), this, SLOT(setItemFSize(int)));
- connect(TypeStyleMenu, SIGNAL(activated(int)), this, SLOT(setItemTypeStyle(int)));
- connect(AliMenu, SIGNAL(activated(int)), this, SLOT(setItemTextAli(int)));
- connect(this, SIGNAL(TextIFont(QString)), this, SLOT(AdjustFontMenu(QString)));
- connect(this, SIGNAL(TextISize(int)), this, SLOT(setFSizeMenu(int)));
- connect(this, SIGNAL(TextISize(int)), Mpal, SLOT(setSize(int)));
- connect(this, SIGNAL(TextUSval(float)), Mpal, SLOT(setExtra(float)));
- connect(this, SIGNAL(TextStil(int)), Mpal, SLOT(setStil(int)));
- connect(this, SIGNAL(TextFarben(QString, QString, int, int)), Mpal->Cpal, SLOT(setActFarben(QString, QString, int, int)));
- connect(ClipB, SIGNAL(dataChanged()), this, SLOT(ClipChange()));
- }
-}
-
-void ScribusApp::initMenuBar()
-{
- int a;
- int MenID;
- QFont tmp;
- recentMenu = new QPopupMenu();
- RecentDocs.clear();
- fileMenu=new QPopupMenu();
- fid12 = fileMenu->insertItem(loadIcon("DateiNeu16.png"), tr("New"), this, SLOT(slotFileNew()), CTRL+Key_N);
- fid13 = fileMenu->insertItem(loadIcon("DateiOpen16.png"), tr("Open..."), this, SLOT(slotDocOpen()), CTRL+Key_O);
- fid14 = fileMenu->insertItem(tr("Recent Documents"), recentMenu);
- SetKeyEntry(0, tr("New"), fid12, CTRL+Key_N);
- SetKeyEntry(1, tr("Open..."), fid13, CTRL+Key_O);
- fileMenu->insertSeparator();
- fid1 = fileMenu->insertItem(loadIcon("DateiClos16.png"), tr("Close"), this, SLOT(slotFileClose()), CTRL+Key_W);
- SetKeyEntry(2, tr("Close"), fid1, CTRL+Key_W);
- fileMenu->setItemEnabled(fid1, 0);
- fid4 = fileMenu->insertItem(loadIcon("DateiSave16.png"), tr("Save"), this, SLOT(slotFileSave()), CTRL+Key_S);
- SetKeyEntry(3, tr("Save"), fid4, CTRL+Key_S);
- fileMenu->setItemEnabled(fid4, 0);
- fid5 = fileMenu->insertItem(tr("Save as..."), this, SLOT(slotFileSaveAs()));
- SetKeyEntry(4, tr("Save as..."), fid5, 0);
- fileMenu->setItemEnabled(fid5, 0);
- fid51 = fileMenu->insertItem(tr("Collect for Output..."), this, SLOT(Collect()));
- fileMenu->setItemEnabled(fid51, 0);
- fileMenu->insertSeparator();
- importMenu = new QPopupMenu();
- fid2 = importMenu->insertItem(tr("Get Text/Picture..."), this, SLOT(slotFileOpen()));
- importMenu->setItemEnabled(fid2, 0);
- fid2a = importMenu->insertItem(tr("Insert Page..."), this, SLOT(slotDocMerge()));
- importMenu->setItemEnabled(fid2a, 0);
- fileMenu->insertItem(tr("Import..."), importMenu);
- exportMenu = new QPopupMenu();
- fid3 = exportMenu->insertItem(tr("Save Text..."), this, SLOT(SaveText()));
- exportMenu->setItemEnabled(fid3, 0);
- fid8 = exportMenu->insertItem(tr("Save Page as EPS..."), this, SLOT(SaveAsEps()));
- exportMenu->setItemEnabled(fid8, 0);
- fid10 = exportMenu->insertItem(tr("Save as PDF..."), this, SLOT(SaveAsPDF()));
- exportMenu->setItemEnabled(fid10, 0);
- fid11 = fileMenu->insertItem(tr("Export..."), exportMenu);
- fileMenu->setItemEnabled(fid11, 0);
- fileMenu->insertSeparator();
- fid6 = fileMenu->insertItem(tr("Document Info..."), this, SLOT(InfoDoc()), CTRL+Key_I);
- fileMenu->setItemEnabled(fid6, 0);
- SetKeyEntry(5, tr("Document Info..."), fid6, CTRL+Key_I);
- fid7 = fileMenu->insertItem(tr("Document Setup..."), this, SLOT(SetupDoc()));
- fileMenu->setItemEnabled(fid7, 0);
- SetKeyEntry(6, tr("Document Setup..."), fid7, 0);
- fid9 = fileMenu->insertItem(loadIcon("DateiPrint16.png"), tr("Print..."), this, SLOT(slotFilePrint()), CTRL+Key_P);
- fileMenu->setItemEnabled(fid9, 0);
- SetKeyEntry(7, tr("Print..."), fid9, CTRL+Key_P);
- fileMenu->insertSeparator();
- MenID = fileMenu->insertItem(loadIcon("exit.png"), tr("Quit"), this, SLOT(slotFileQuit()), CTRL+Key_Q);
- SetKeyEntry(8, tr("Quit"), MenID, CTRL+Key_Q);
- editMenu = new QPopupMenu();
- edUndo = editMenu->insertItem(tr("Undo"), this, SLOT(UnDoAction()), CTRL+Key_Z);
- editMenu->insertSeparator();
- edid1 = editMenu->insertItem(loadIcon("editcut.png"), tr("Cut"), this , SLOT(slotEditCut()), CTRL+Key_X);
- edid2 = editMenu->insertItem(loadIcon("editcopy.png"), tr("Copy"), this , SLOT(slotEditCopy()), CTRL+Key_C);
- edid3 = editMenu->insertItem(loadIcon("editpaste.png"), tr("Paste"), this , SLOT(slotEditPaste()), CTRL+Key_V);
- edid4 = editMenu->insertItem(loadIcon("editdelete.png"), tr("Clear"), this, SLOT(DeleteText()));
- edid5 = editMenu->insertItem(tr("Select all"), this, SLOT(SelectAll()), CTRL+Key_A);
- SetKeyEntry(9, tr("Cut"), edid1, CTRL+Key_X);
- SetKeyEntry(10, tr("Copy"), edid2, CTRL+Key_C);
- SetKeyEntry(11, tr("Paste"), edid3, CTRL+Key_V);
- SetKeyEntry(12, tr("Clear"), edid4, 0);
- SetKeyEntry(13, tr("Select all"), edid5, CTRL+Key_A);
- editMenu->insertSeparator();
- MenID = editMenu->insertItem(tr("Colors..."), this , SLOT(slotEditColors()));
- SetKeyEntry(14, tr("Colors..."), MenID, 0);
- edid6 = editMenu->insertItem(tr("Styles..."), this , SLOT(slotEditStyles()));
- SetKeyEntry(15, tr("Styles..."), edid6, 0);
- tman = editMenu->insertItem(tr("Templates..."), this, SLOT(ManageTemp()));
- SetKeyEntry(16, tr("Templates..."), tman, 0);
- jman = editMenu->insertItem(tr("JavaScripts..."), this, SLOT(ManageJava()));
- hymen = new QPopupMenu();
- MenID = hymen->insertItem(tr("General..."), this , SLOT(slotPrefsOrg()));
- SetKeyEntry(18, tr("Preferences..."), MenID, 0);
- MenID = hymen->insertItem(tr("Fonts..."), this , SLOT(slotFontOrg()));
- SetKeyEntry(17, tr("Fonts..."), MenID, 0);
- hymen->insertItem(tr("Hyphenator..."), this, SLOT(configHyphenator()));
- editMenu->insertItem(tr("Preferences"), hymen);
- editMenu->setItemEnabled(edUndo, 0);
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid2, 0);
- editMenu->setItemEnabled(edid3, 0);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- editMenu->setItemEnabled(edid6, 0);
- editMenu->setItemEnabled(tman, 0);
- editMenu->setItemEnabled(jman, 0);
- StilMenu = new QPopupMenu();
- ObjMenu = new QPopupMenu();
- MenID = ObjMenu->insertItem(tr("Modify..."), this, SLOT(ModifyObject()), CTRL+Key_M);
- SetKeyEntry(19, tr("Modify..."), MenID, CTRL+Key_M);
- MenID = ObjMenu->insertItem(tr("Duplicate"), this, SLOT(ObjektDup()), CTRL+Key_D);
- SetKeyEntry(20, tr("Duplicate"), MenID, CTRL+Key_D);
- MenID = ObjMenu->insertItem(tr("Multiple Duplicate"), this, SLOT(ObjektDupM()));
- SetKeyEntry(21, tr("Multiple Duplicate"), MenID, 0);
- Loesch = ObjMenu->insertItem(tr("Delete"), this, SLOT(DeleteObjekt()), CTRL+Key_K);
- SetKeyEntry(22, tr("Delete"), Loesch, CTRL+Key_K);
- ObjMenu->insertSeparator();
- Gr = ObjMenu->insertItem(tr("Group"), this, SLOT(GroupObj()), CTRL+Key_G);
- SetKeyEntry(23, tr("Group"), Gr, CTRL+Key_G);
- UnGr = ObjMenu->insertItem(tr("Ungroup"), this, SLOT(UnGroupObj()), CTRL+Key_U);
- SetKeyEntry(24, tr("Ungroup"), UnGr, CTRL+Key_U);
- LockOb = ObjMenu->insertItem(tr("Lock"), this, SLOT(ToggleObjLock()), CTRL+Key_H);
- ObjMenu->insertSeparator();
- OBack = ObjMenu->insertItem(tr("Send to Back"), this, SLOT(Objekt2Back()));
- SetKeyEntry(25, tr("Send to Back"), OBack, 0);
- OFront = ObjMenu->insertItem(tr("Bring to Front"), this, SLOT(Objekt2Front()));
- SetKeyEntry(26, tr("Bring to Front"), OFront, 0);
- OLower = ObjMenu->insertItem(tr("Lower"), this, SLOT(ObjektLower()));
- SetKeyEntry(27, tr("Lower"), OLower, 0);
- ORaise = ObjMenu->insertItem(tr("Raise"), this, SLOT(ObjektRaise()));
- SetKeyEntry(28, tr("Raise"), ORaise, 0);
- DistM = ObjMenu->insertItem(tr("Distribute/Align..."), this, SLOT(ObjektAlign()));
- SetKeyEntry(29, tr("Distribute/Align..."), DistM, 0);
- ObjMenu->insertSeparator();
- ShapeMenu = new QPopupMenu();
- ShapeMenu->insertItem(tr("Rectangle"), this, SLOT(RectFrame()));
- ShapeMenu->insertItem(tr("Rounded Rectangle"), this, SLOT(RoundedFrame()));
- ShapeMenu->insertItem(tr("Oval"), this, SLOT(OvalFrame()));
- ShapeEdit = ShapeMenu->insertItem(tr("Edit Frame"), this, SLOT(ToggleFrameEdit()));
- ShapeM = ObjMenu->insertItem(tr("Shape"), ShapeMenu);
- PfadT = ObjMenu->insertItem(tr("Attach Text to Path"), this, SLOT(Pfadtext()));
- PfadV = ObjMenu->insertItem(tr("Combine Polygons"), this, SLOT(UniteOb()));
- PfadS = ObjMenu->insertItem(tr("Split Polygon"), this, SLOT(SplitUniteOb()));
-#ifdef HAVE_FREETYPE
- PfadTP = ObjMenu->insertItem(tr("Convert to Polygon"), this, SLOT(TraceText()));
-#endif
- ObjMenu->setItemEnabled(ShapeM, 0);
- ObjMenu->setItemEnabled(DistM, 0);
- ObjMenu->setItemEnabled(Gr, 0);
- ObjMenu->setItemEnabled(UnGr, 0);
- ObjMenu->setItemEnabled(PfadT, 0);
- ObjMenu->setItemEnabled(PfadV, 0);
- ObjMenu->setItemEnabled(PfadS, 0);
- ObjMenu->setItemEnabled(LockOb, 0);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 0);
-#endif
- pageMenu = new QPopupMenu();
- MenID = pageMenu->insertItem(tr("Insert..."), this, SLOT(slotNewPageM()));
- SetKeyEntry(30, tr("Insert..."), MenID, 0);
- pgmd = pageMenu->insertItem(tr("Delete..."), this, SLOT(DeletePage()));
- SetKeyEntry(31, tr("Delete..."), pgmd, 0);
- MenID = pageMenu->insertItem(tr("Copy")+"...", this, SLOT(CopyPage()));
- SetKeyEntry(61, tr("Copy")+"...", MenID, 0);
- pgmv = pageMenu->insertItem(tr("Move..."), this, SLOT(MovePage()));
- SetKeyEntry(32, tr("Move..."), pgmv, 0);
- MenID = pageMenu->insertItem(tr("Apply Template..."), this, SLOT(ApplyTemp()));
- SetKeyEntry(33, tr("Apply Template..."), MenID, 0);
- MenID = pageMenu->insertItem(tr("Manage Guides..."), this, SLOT(ManageGuides()));
- SetKeyEntry(49, tr("Manage Guides..."), MenID, 0);
- pageMenu->setItemEnabled(pgmd, 0);
- pageMenu->setItemEnabled(pgmv, 0);
- viewMenu=new QPopupMenu();
- MenID = viewMenu->insertItem(tr("Fit in Window"), this, SLOT(slotZoomFit()), CTRL+Key_0);
- SetKeyEntry(34, tr("Fit in Window"), MenID, CTRL+Key_0);
- MenID = viewMenu->insertItem("50%", this, SLOT(slotZoom50()));
- SetKeyEntry(35, tr("50%"), MenID, 0);
- MenID = viewMenu->insertItem("75%", this, SLOT(slotZoom75()));
- SetKeyEntry(36, tr("75%"), MenID, 0);
- MenID = viewMenu->insertItem(tr("Actual Size"), this, SLOT(slotZoom100()), CTRL+Key_1);
- SetKeyEntry(37, tr("Actual Size"), MenID, CTRL+Key_1);
- MenID = viewMenu->insertItem("200%", this, SLOT(slotZoom200()));
- SetKeyEntry(38, tr("200%"), MenID, 0);
- MenID = viewMenu->insertItem(tr("Thumbnails"), this, SLOT(slotZoom20()));
- SetKeyEntry(39, tr("Thumbnails"), MenID, 0);
- viewMenu->insertSeparator();
- Markers = viewMenu->insertItem(tr("Hide Margins"), this, SLOT(ToggleMarks()));
- SetKeyEntry(40, tr("Hide Margins"), Markers, 0);
- FrameDr = viewMenu->insertItem(tr("Hide Frames"), this, SLOT(ToggleFrames()));
- SetKeyEntry(41, tr("Hide Frames"), FrameDr, 0);
- Bilder = viewMenu->insertItem(tr("Hide Images"), this, SLOT(TogglePics()));
- SetKeyEntry(42, tr("Hide Images"), Bilder, 0);
- Ras = viewMenu->insertItem(tr("Show Grid"), this, SLOT(ToggleRaster()));
- SetKeyEntry(43, tr("Show Grid"), Ras, 0);
- uRas = viewMenu->insertItem(tr("Snap to Grid"), this, SLOT(ToggleURaster()));
- SetKeyEntry(44, tr("Snap to Grid"), uRas, 0);
- Guide = viewMenu->insertItem(tr("Hide Guides"), this, SLOT(ToggleGuides()));
- uGuide = viewMenu->insertItem(tr("Snap to Guides"), this, SLOT(ToggleUGuides()));
- for (a=0; a<6; ++a)
- {
- viewMenu->setItemEnabled(viewMenu->idAt(a), 0);
- }
- viewMenu->setItemEnabled(Markers, 0);
- viewMenu->setItemEnabled(FrameDr, 0);
- viewMenu->setItemEnabled(Bilder, 0);
- viewMenu->setItemEnabled(Ras, 0);
- viewMenu->setItemEnabled(uRas, 0);
- viewMenu->setItemEnabled(Guide, 0);
- viewMenu->setItemEnabled(uGuide, 0);
- toolMenu=new QPopupMenu();
- viewTools = toolMenu->insertItem(tr("Hide Tools"), this, SLOT(ToggleTools()));
- SetKeyEntry(45, tr("Hide Tools"), viewTools, 0);
- viewMpal = toolMenu->insertItem(tr("Show Measurements"), this, SLOT(ToggleMpal()));
- SetKeyEntry(46, tr("Show Measurements"), viewMpal, 0);
- viewTpal = toolMenu->insertItem(tr("Show Outline"), this, SLOT(ToggleTpal()));
- SetKeyEntry(47, tr("Show Outline"), viewTpal, 0);
- viewBpal = toolMenu->insertItem(tr("Show Scrapbook"), this, SLOT(ToggleBpal()));
- SetKeyEntry(48, tr("Show Scrapbook"), viewBpal, 0);
- viewLpal = toolMenu->insertItem(tr("Show Layers"), this, SLOT(ToggleLpal()));
- viewSepal = toolMenu->insertItem(tr("Show Page Palette"), this, SLOT(ToggleSepal()));
- viewBopal = toolMenu->insertItem(tr("Show Bookmarks"), this, SLOT(ToggleBookpal()));
- extraMenu=new QPopupMenu();
- MenID = extraMenu->insertItem(tr("Manage Pictures"), this, SLOT(StatusPic()));
- SetKeyEntry(51, tr("Manage Pictures"), MenID, 0);
- hyph = extraMenu->insertItem(tr("Hyphenate Text"), this, SLOT(doHyphenate()));
- extraMenu->setItemEnabled(hyph, 0);
- SetKeyEntry(50, tr("Hyphenate Text"), hyph, 0);
- windowsMenu = new QPopupMenu();
- windowsMenu->setCheckable( true );
- connect(windowsMenu, SIGNAL(aboutToShow()), this, SLOT(windowsMenuAboutToShow()));
- helpMenu=new QPopupMenu();
- MenID = helpMenu->insertItem(tr("About Scribus"), this, SLOT(slotHelpAbout()));
- SetKeyEntry(52, tr("About Scribus"), MenID, 0);
- MenID = helpMenu->insertItem(tr("About Qt"), this, SLOT(slotHelpAboutQt()));
- SetKeyEntry(53, tr("About Qt"), MenID, 0);
- helpMenu->insertSeparator();
- MenID = helpMenu->insertItem(tr("Online-Help..."), this, SLOT(slotOnlineHelp()));
- SetKeyEntry(54, tr("Online-Help..."), MenID, 0);
- tip = helpMenu->insertItem(tr("Tool-Tips"), this, SLOT(ToggleTips()));
- SetKeyEntry(55, tr("Tool-Tips"), tip, 0);
- tipsOn = true;
- helpMenu->setItemChecked(tip, tipsOn);
-// helpMenu->insertItem(tr("Test"), this, SLOT(slotTest()));
-// helpMenu->insertItem(tr("Test2"), this, SLOT(slotTest2()));
- menuBar()->insertItem(tr("File"), fileMenu);
- menuBar()->insertItem(tr("Edit"), editMenu);
- Stm = menuBar()->insertItem(tr("Style"), StilMenu);
- Obm = menuBar()->insertItem(tr("Item"), ObjMenu);
- pgmm = menuBar()->insertItem(tr("Page"), pageMenu);
- menuBar()->setItemEnabled(Obm, 0);
- menuBar()->setItemEnabled(pgmm, 0);
- menuBar()->insertItem(tr("View"), viewMenu);
- menuBar()->insertItem(tr("Tools"), toolMenu);
- exmn = menuBar()->insertItem(tr("Extras"), extraMenu);
- menuBar()->setItemEnabled(exmn, 0);
- menuBar()->insertItem( tr("Windows"), windowsMenu );
- menuBar()->insertSeparator();
- menuBar()->insertItem(tr("Help"), helpMenu);
- AliMenu = new QPopupMenu();
- AliMenu->insertItem(tr("Left"));
- AliMenu->insertItem(tr("Center"));
- AliMenu->insertItem(tr("Right"));
- AliMenu->insertItem(tr("Block"));
- AliMenu->insertItem(tr("Forced"));
- ColorMenu = new QPopupMenu();
- SizeTMenu = new QPopupMenu();
- SizeTMenu->insertItem(tr("Other..."));
- SizeTMenu->insertItem(" 7 pt");
- SizeTMenu->insertItem(" 9 pt");
- SizeTMenu->insertItem("10 pt");
- SizeTMenu->insertItem("12 pt");
- SizeTMenu->insertItem("14 pt");
- SizeTMenu->insertItem("18 pt");
- SizeTMenu->insertItem("24 pt");
- SizeTMenu->insertItem("36 pt");
- SizeTMenu->insertItem("48 pt");
- SizeTMenu->insertItem("60 pt");
- SizeTMenu->insertItem("72 pt");
- ShadeMenu = new QPopupMenu();
- ShadeMenu->insertItem(tr("Other..."));
- ShadeMenu->insertItem("0 %");
- ShadeMenu->insertItem("10 %");
- ShadeMenu->insertItem("20 %");
- ShadeMenu->insertItem("30 %");
- ShadeMenu->insertItem("40 %");
- ShadeMenu->insertItem("50 %");
- ShadeMenu->insertItem("60 %");
- ShadeMenu->insertItem("70 %");
- ShadeMenu->insertItem("80 %");
- ShadeMenu->insertItem("90 %");
- ShadeMenu->insertItem("100 %");
- FStyleMenu = new QPopupMenu();
- FontMenu = new QPopupMenu();
- TypeStyleMenu = new QPopupMenu();
- TypeStyleMenu->insertItem(tr("Normal"));
- tmp = qApp->font();
- tmp = qApp->font();
- tmp.setUnderline(true);
- TypeStyleMenu->insertItem(new FmItem(tr("Underline"), tmp));
- tmp = qApp->font();
- tmp.setStrikeOut(true);
- TypeStyleMenu->insertItem(new FmItem(tr("Strikethru"), tmp));
- TypeStyleMenu->insertItem(tr("Small Caps"));
- TypeStyleMenu->insertItem(tr("Superscript"));
- TypeStyleMenu->insertItem(tr("Subscript"));
-}
-
-void ScribusApp::initStatusBar()
-{
- FMess = new QLabel(statusBar(), "ft");
- FMess->setText(" ");
- statusBar()->addWidget(FMess, 3, true);
- FProg = new QProgressBar(statusBar(), "p");
- FProg->setCenterIndicator(true);
- FProg->setFixedWidth( 100 );
- statusBar()->addWidget(FProg, 0, true);
- FProg->reset();
- XMess = new QLabel(statusBar(), "xt");
- XMess->setText(tr("X-Pos:"));
- statusBar()->addWidget(XMess, 0, true);
- XDat = new QLabel(statusBar(), "dt");
- statusBar()->addWidget(XDat, 1, true);
- XDat->setText(" ");
- YMess = new QLabel(statusBar(), "yt");
- YMess->setText(tr("Y-Pos:"));
- statusBar()->addWidget(YMess, 0, true);
- YDat = new QLabel(statusBar(), "ydt");
- statusBar()->addWidget(YDat, 1, true);
- YDat->setText(" ");
-}
-
-void ScribusApp::ReportMP(float xp, float yp)
-{
- QString tmp, tmp2;
- switch (doc->Einheit)
- {
- case 0:
- tmp2 = " pt";
- break;
- case 1:
- tmp2 = " mm";
- break;
- case 2:
- tmp2 = " in";
- break;
- case 3:
- tmp2 = " p";
- break;
- }
- XDat->setText(tmp.setNum(qRound(xp*UmReFaktor * 100) / 100.0, 'f', 2)+tmp2);
- YDat->setText(tmp.setNum(qRound(yp*UmReFaktor * 100) / 100.0, 'f', 2)+tmp2);
-}
-
-void ScribusApp::SetKeyEntry(int Nr, QString text, int Men, int KeyC)
-{
- Keys ke;
- ke.Name = text;
- ke.MenuID = Men;
- ke.KeyID = KeyC;
- Prefs.KeyActions.insert(Nr, ke);
-}
-
-void ScribusApp::DeleteSel(PageItem *b)
-{
- Pti *it;
- for (it = b->Ptext.first(); it != 0; it = b->Ptext.next())
- {
- if (it->cselect)
- {
- b->Ptext.remove();
- it = b->Ptext.prev();
- if (it == 0)
- {
- it = b->Ptext.first();
- }
- }
- }
- if (b->Ptext.count() != 0)
- {
- if (b->Ptext.first()->cselect)
- {
- b->Ptext.remove();
- b->CPos = 0;
- }
- else
- b->CPos = QMIN(b->CPos, doc->ActPage->oldCp);
- }
- else
- b->CPos = 0;
- b->HasSel = false;
- DisableTxEdit();
-}
-
-void ScribusApp::setTBvals(PageItem *b)
-{
- if (b->Ptext.count() != 0)
- {
- emit TextIFont(b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cfont);
- emit TextISize(b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->csize);
- emit TextUSval(b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cextra);
- emit TextStil(b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cstyle & 127);
- doc->CurrentStyle = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cstyle & 127;
- doc->CurrentABStil = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cab;
- setAbsValue(doc->CurrentABStil);
- Mpal->setAli(doc->CurrentABStil);
- b->IFont = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cfont;
- b->ISize = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->csize;
- emit TextFarben(b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->ccolor,
- b->Pcolor,
- b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cshade,
- b->Shade);
- b->Pcolor2 = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->ccolor;
- b->Shade2 = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cshade;
- }
-}
-
-void ScribusApp::wheelEvent(QWheelEvent *w)
-{
- if (HaveDoc)
- {
- if (w->delta() < 0)
- view->scrollBy(0, Prefs.Wheelval);
- else
- view->scrollBy(0, -Prefs.Wheelval);
- w->accept();
- }
-}
-
-void ScribusApp::keyPressEvent(QKeyEvent *k)
-{
- struct Pti *hg;
- int kk = k->key();
- int as = k->ascii();
- float altx, alty;
- QString uc = k->text();
- QString cr, Tcha, Twort;
- uint Tcoun;
- switch (k->state())
- {
- case ShiftButton:
- KeyMod = 0x00200000;
- break;
- case AltButton:
- KeyMod = 0x00800000;
- break;
- case ControlButton:
- KeyMod = 0x00400000;
- break;
- default:
- KeyMod = 0;
- }
- if ((HaveDoc) && (!view->LE->hasFocus()))
- {
- switch (kk)
- {
- case Key_Prior:
- view->scrollBy(0, -Prefs.Wheelval);
- return;
- break;
- case Key_Next:
- view->scrollBy(0, Prefs.Wheelval);
- return;
- break;
- }
- if (doc->ActPage->SelItem.count() != 0)
- {
- PageItem *b = doc->ActPage->SelItem.at(0);
- switch (doc->AppMode)
- {
- case 1:
- switch (kk)
- {
- case Key_Delete:
- if (!doc->EditClip)
- {
- if (!b->Locked)
- doc->ActPage->DeleteItem();
- }
- break;
- case Key_Left:
- if (!k->isAutoRepeat())
- {
- doc->ActPage->storeUndoInf(b);
- doc->UnData.UnCode = 1;
- doc->UnDoValid = true;
- CanUndo();
- }
- if (!b->Locked)
- doc->ActPage->moveGroup(-1, 0);
- break;
- case Key_Right:
- if (!k->isAutoRepeat())
- {
- doc->ActPage->storeUndoInf(b);
- doc->UnData.UnCode = 1;
- doc->UnDoValid = true;
- CanUndo();
- }
- if (!b->Locked)
- doc->ActPage->moveGroup(1, 0);
- break;
- case Key_Up:
- if (!k->isAutoRepeat())
- {
- doc->ActPage->storeUndoInf(b);
- doc->UnData.UnCode = 1;
- doc->UnDoValid = true;
- CanUndo();
- }
- if (!b->Locked)
- doc->ActPage->moveGroup(0, -1);
- break;
- case Key_Down:
- if (!k->isAutoRepeat())
- {
- doc->ActPage->storeUndoInf(b);
- doc->UnData.UnCode = 1;
- doc->UnDoValid = true;
- CanUndo();
- }
- if (!b->Locked)
- doc->ActPage->moveGroup(0, 1);
- default:
- if (b->PType == 4)
- {
- if ((kk + KeyMod) == Prefs.KeyActions[59].KeyID)
- {
- setNewAbStyle(1);
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- }
- if ((kk + KeyMod) == Prefs.KeyActions[58].KeyID)
- {
- setNewAbStyle(2);
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- }
- if ((kk + KeyMod) == Prefs.KeyActions[57].KeyID)
- {
- setNewAbStyle(0);
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- }
- }
- break;
- }
- slotDocCh();
- break;
- case 7:
- if (b->PType == 4)
- {
- doc->ActPage->slotDoCurs(false);
- switch (kk)
- {
- case Key_Down:
- if (b->CPos != static_cast<int>(b->Ptext.count()))
- {
- alty = b->Ptext.at(b->CPos)->yp;
- altx = b->Ptext.at(b->CPos)->xp;
- do
- {
- b->CPos += 1;
- if (b->CPos == static_cast<int>(b->Ptext.count()))
- break;
- if (b->Ptext.at(b->CPos)->yp > alty)
- {
- if (b->Ptext.at(b->CPos)->xp >= altx)
- break;
- }
- }
- while (b->CPos < static_cast<int>(b->Ptext.count()));
- if (b->CPos == static_cast<int>(b->Ptext.count()))
- if (b->NextBox != 0)
- {
- if (b->NextBox->Ptext.count() != 0)
- {
- b->OwnPage->Deselect(true);
- b->NextBox->CPos = 0;
- doc->ActPage = b->NextBox->OwnPage;
- b->NextBox->OwnPage->SelectItemNr(b->NextBox->ItemNr);
- b = b->NextBox;
- }
- }
- }
- else
- {
- if (b->NextBox != 0)
- {
- if (b->NextBox->Ptext.count() != 0)
- {
- b->OwnPage->Deselect(true);
- b->NextBox->CPos = 0;
- doc->ActPage = b->NextBox->OwnPage;
- b->NextBox->OwnPage->SelectItemNr(b->NextBox->ItemNr);
- b = b->NextBox;
- }
- }
- }
- setTBvals(b);
- break;
- case Key_Up:
- if (b->CPos > 0)
- {
- if (b->CPos == static_cast<int>(b->Ptext.count()))
- b->CPos -= 1;
- alty = b->Ptext.at(b->CPos)->yp;
- altx = b->Ptext.at(b->CPos)->xp;
- if (b->CPos > 0)
- {
- do
- {
- b->CPos -= 1;
- if (b->CPos == 0)
- break;
- if (b->Ptext.at(b->CPos)->yp < alty)
- {
- if (b->Ptext.at(b->CPos)->xp <= altx)
- break;
- }
- }
- while (b->CPos > 0);
- }
- if (b->CPos == 0)
- {
- if (b->BackBox != 0)
- {
- b->OwnPage->Deselect(true);
- b->BackBox->CPos = b->BackBox->Ptext.count();
- doc->ActPage = b->BackBox->OwnPage;
- b->BackBox->OwnPage->SelectItemNr(b->BackBox->ItemNr);
- b = b->BackBox;
- }
- }
- }
- else
- {
- b->CPos = 0;
- if (b->BackBox != 0)
- {
- b->OwnPage->Deselect(true);
- b->BackBox->CPos = b->BackBox->Ptext.count();
- doc->ActPage = b->BackBox->OwnPage;
- b->BackBox->OwnPage->SelectItemNr(b->BackBox->ItemNr);
- b = b->BackBox;
- }
- }
- setTBvals(b);
- break;
- case Key_Home:
- b->CPos = 0;
- setTBvals(b);
- break;
- case Key_End:
- b->CPos = static_cast<int>(b->Ptext.count());
- setTBvals(b);
- break;
- case Key_Left:
- b->CPos -= 1;
- if (b->CPos < 0)
- {
- b->CPos = 0;
- if (b->BackBox != 0)
- {
- b->OwnPage->Deselect(true);
- b->BackBox->CPos = b->BackBox->Ptext.count();
- doc->ActPage = b->BackBox->OwnPage;
- b->BackBox->OwnPage->SelectItemNr(b->BackBox->ItemNr);
- b = b->BackBox;
- }
- }
- setTBvals(b);
- break;
- case Key_Right:
- b->CPos += 1;
- if (b->CPos > static_cast<int>(b->Ptext.count()))
- {
- b->CPos -= 1;
- if (b->NextBox != 0)
- {
- if (b->NextBox->Ptext.count() != 0)
- {
- b->OwnPage->Deselect(true);
- b->NextBox->CPos = 0;
- doc->ActPage = b->NextBox->OwnPage;
- b->NextBox->OwnPage->SelectItemNr(b->NextBox->ItemNr);
- b = b->NextBox;
- }
- }
- }
- setTBvals(b);
- break;
- case Key_Delete:
- if (b->CPos == static_cast<int>(b->Ptext.count())) { return; }
- if (b->Ptext.count() == 0) { return; }
- cr = b->Ptext.at(b->CPos)->ch;
- if (b->HasSel)
- {
- DeleteSel(b);
- }
- else
- {
- b->Ptext.remove(b->CPos);
- }
- b->Tinput = false;
- if ((cr == QChar(13)) && (b->Ptext.count() != 0))
- {
- doc->ActPage->chAbStyle(b, b->Ptext.at(QMAX(b->CPos-1,0))->cab);
- b->Tinput = false;
- }
- setTBvals(b);
- b->Dirty = true;
- b->paintObj();
- break;
- case Key_Backspace:
- if (b->CPos == 0)
- return;
- if (b->Ptext.count() == 0) { return; }
- cr = b->Ptext.at(QMAX(b->CPos-1,0))->ch;
- if (b->HasSel)
- {
- DeleteSel(b);
- }
- else
- {
- b->CPos -= 1;
- b->Ptext.remove(b->CPos);
- }
- b->Tinput = false;
- if ((cr == QChar(13)) && (b->Ptext.count() != 0))
- {
- doc->ActPage->chAbStyle(b, b->Ptext.at(QMAX(b->CPos-1,0))->cab);
- b->Tinput = false;
- }
- setTBvals(b);
- b->Dirty = true;
- b->paintObj();
- break;
- default:
- if ((b->HasSel) && (kk < 0x1000))
- {
- DeleteSel(b);
- b->Dirty = true;
- b->paintObj();
- }
- if ((kk + KeyMod) == Prefs.KeyActions[60].KeyID)
- {
- hg = new Pti;
- hg->ch = QString(QChar(30));
- hg->cfont = b->IFont;
- hg->csize = b->ISize;
- hg->ccolor = b->Pcolor2;
- hg->cextra = 0;
- hg->cshade = b->Shade2;
- hg->cselect = false;
- hg->cstyle = doc->CurrentStyle;
- hg->cab = doc->CurrentABStil;
- if (doc->Vorlagen[doc->CurrentABStil].Font != "")
- {
- hg->cfont = doc->Vorlagen[doc->CurrentABStil].Font;
- hg->csize = doc->Vorlagen[doc->CurrentABStil].FontSize;
- }
- hg->xp = 0;
- hg->yp = 0;
- hg->PRot = 0;
- hg->PtransX = 0;
- hg->PtransY = 0;
- b->Ptext.insert(b->CPos, hg);
- b->CPos += 1;
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- break;
- }
- if ((kk + KeyMod) == Prefs.KeyActions[56].KeyID)
- {
- b->Ptext.at(QMAX(b->CPos-1,0))->cstyle ^= 128;
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- break;
- }
- if ((kk + KeyMod) == Prefs.KeyActions[59].KeyID)
- {
- setNewAbStyle(1);
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- break;
- }
- if ((kk + KeyMod) == Prefs.KeyActions[57].KeyID)
- {
- setNewAbStyle(0);
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- break;
- }
- if ((kk + KeyMod) == Prefs.KeyActions[58].KeyID)
- {
- setNewAbStyle(2);
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- break;
- }
-#ifdef HAVE_FREETYPE
- if (((uc[0] > QChar(31)) || (as == 13) || (as == 30)) && ((*doc->AllFonts)[b->IFont]->CharWidth.contains(uc[0].unicode())))
-#else
- if ((uc[0] > QChar(31)) || (as == 13) || (as == 30))
-#endif
- {
- hg = new Pti;
- hg->ch = uc;
- hg->cfont = b->IFont;
- hg->csize = b->ISize;
- hg->ccolor = b->Pcolor2;
- hg->cextra = 0;
- hg->cshade = b->Shade2;
- hg->cselect = false;
- hg->cstyle = doc->CurrentStyle;
- hg->cab = doc->CurrentABStil;
- if (doc->Vorlagen[doc->CurrentABStil].Font != "")
- {
- hg->cfont = doc->Vorlagen[doc->CurrentABStil].Font;
- hg->csize = doc->Vorlagen[doc->CurrentABStil].FontSize;
- }
- hg->xp = 0;
- hg->yp = 0;
- hg->PRot = 0;
- hg->PtransX = 0;
- hg->PtransY = 0;
- b->Ptext.insert(b->CPos, hg);
- b->CPos += 1;
- if ((doc->Trenner->AutoCheck) && (b->CPos > 1))
- {
- Twort = "";
- Tcoun = 0;
- for (int hych = b->CPos-1; hych > -1; hych--)
- {
- Tcha = b->Ptext.at(hych)->ch;
- if (Tcha == " ")
- {
- Tcoun = hych+1;
- break;
- }
- Twort.prepend(Tcha);
- }
- if (Twort != "")
- {
- doc->Trenner->slotHyphenateWord(b, Twort, Tcoun);
- b->Dirty = true;
- }
- }
- if ((b->CPos < static_cast<int>(b->Ptext.count())) || (as == 30))
- b->Dirty = true;
- b->Tinput = true;
- b->paintObj();
- }
- break;
- }
- if (b->Ptext.count() != 0)
- if (b->Ptext.at(QMAX(b->CPos-1, 0))->yp != 0)
- doc->ActPage->slotDoCurs(true);
- if ((kk == Key_Left) || (kk == Key_Right) || (kk == Key_Up) || (kk == Key_Down))
- return;
- }
- slotDocCh(false);
- break;
- }
- }
- }
-}
-
-void ScribusApp::closeEvent(QCloseEvent *ce)
-{
- QWidgetList windows = wsp->windowList();
- ScribusWin* tw;
- if (!windows.isEmpty())
- {
- for ( int i = 0; i < static_cast<int>(windows.count()); ++i )
- {
- newActWin(windows.at(i));
- tw = ActWin;
- ActWin->close();
- if (tw == ActWin)
- {
- ce->ignore();
- return;
- }
- }
- SavePrefs();
- if (Prefs.SaveAtQ)
- {
- if (ScBook->ScFilename.isEmpty())
- ScBook->ScFilename = PrefsPfad+"/scrap.scs";
- ScBook->Save();
- }
- if (ScBook->BibWin->Objekte.count() == 0)
- system("rm -f " + PrefsPfad+"/scrap.scs");
- Prefs.AvailFonts.~SCFonts();
- FinalizePlugs();
- exit(0);
- }
- else
- {
- SavePrefs();
- if (Prefs.SaveAtQ)
- {
- if (ScBook->ScFilename.isEmpty())
- ScBook->ScFilename = PrefsPfad+"/scrap.scs";
- ScBook->Save();
- }
- if (ScBook->BibWin->Objekte.count() == 0)
- system("rm -f " + PrefsPfad+"/scrap.scs");
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
- Prefs.AvailFonts.~SCFonts();
- FinalizePlugs();
- exit(0);
- }
-}
-
-/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
-/////////////////////////////////////////////////////////////////////
-float ScribusApp::mm2pts(int mm)
-{
- return mm / 25.4 * 72;
-}
-
-float ScribusApp::pts2mm(float pts)
-{
- return pts / 72 * 25.4;
-}
-
-bool ScribusApp::slotFileNew()
-{
- float b, h, tpr, lr, rr, br, sp, ab;
- bool fp, atf, ret;
- NewDoc* dia = new NewDoc(this, &Prefs);
- if (dia->exec())
- {
- tpr = dia->Top;
- lr = dia->Left;
- rr = dia->Right;
- br = dia->Bottom;
- ab = dia->Dist;
- b = dia->Pagebr;
- h = dia->Pageho;
- sp = dia->SpinBox10->value();
- atf = dia->AutoFrame->isChecked();
- fp = dia->Doppelseiten->isChecked();
- if (dia->ComboBox3->currentItem() == 1)
- {
- b = mm2pts(qRound(pts2mm(dia->Pagebr)));
- h = mm2pts(qRound(pts2mm(dia->Pageho)));
- }
- ret = doFileNew(b, h, tpr, lr, rr, br, ab, sp, atf, fp, dia->ComboBox3->currentItem(),
- dia->ErsteSeite->isChecked(), dia->Orient, dia->PgNr->value());
- FMess->setText(tr("Ready"));
- }
- else
- ret = false;
- delete dia;
- return ret;
-}
-
-bool ScribusApp::doFileNew(float b, float h, float tpr, float lr, float rr, float br, float ab, float sp,
- bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr)
-{
- QString cc;
- doc = new ScribusDoc();
- doc->Einheit = einh;
- if (fp)
- doc->FirstPageLeft = firstleft;
- doc->PageOri = Ori;
- doc->FirstPnum = SNr;
- doc->AllFonts = &Prefs.AvailFonts;
- doc->AddFont(Prefs.DefFont, Prefs.AvailFonts[Prefs.DefFont]->Font);
- doc->Dfont = Prefs.DefFont;
- doc->Dsize = Prefs.DefSize;
- doc->GrabRad = Prefs.GrabRad;
- doc->GuideRad = Prefs.GuideRad;
- doc->minorGrid = Prefs.DminGrid;
- doc->majorGrid = Prefs.DmajGrid;
- doc->minorColor = Prefs.DminColor;
- doc->majorColor = Prefs.DmajColor;
- doc->papColor = Prefs.DpapColor;
- doc->margColor = Prefs.DmargColor;
- doc->guideColor = Prefs.guideColor;
- doc->VHoch = Prefs.DVHoch;
- doc->VHochSc = Prefs.DVHochSc;
- doc->VTief = Prefs.DVTief;
- doc->VTiefSc = Prefs.DVTiefSc;
- doc->VKapit = Prefs.DVKapit;
- doc->Dpen = Prefs.Dpen;
- doc->DpenText = Prefs.DpenText;
- doc->Dbrush = Prefs.Dbrush;
- doc->Dshade = Prefs.Dshade;
- doc->Dshade2 = Prefs.Dshade2;
- doc->DLineArt = PenStyle(Prefs.DLineArt);
- doc->Dwidth = Prefs.Dwidth;
- doc->DpenLine = Prefs.DpenLine;
- doc->DshadeLine = Prefs.DshadeLine;
- doc->DLstyleLine = PenStyle(Prefs.DLstyleLine);
- doc->DwidthLine = Prefs.DwidthLine;
- doc->MagMin = Prefs.MagMin;
- doc->MagMax = Prefs.MagMax;
- doc->MagStep = Prefs.MagStep;
- doc->DbrushPict = Prefs.DbrushPict;
- doc->ShadePict = Prefs.ShadePict;
- doc->ScaleX = Prefs.ScaleX;
- doc->ScaleY = Prefs.ScaleY;
- doc->ScaleType = Prefs.ScaleType;
- doc->AspectRatio = Prefs.AspectRatio;
- doc->Before = Prefs.Before;
- doc->PagesSbS = Prefs.PagesSbS;
- doc->ShFrames = Prefs.ShFrames;
- doc->RandFarbig = Prefs.RandFarbig;
- doc->AutoLine = Prefs.AutoLine;
- doc->DocName = doc->DocName+cc.setNum(DocNr);
- doc->HasCMS = true;
- doc->CMSSettings.DefaultInputProfile = Prefs.DCMSset.DefaultInputProfile;
- doc->CMSSettings.DefaultInputProfile2 = Prefs.DCMSset.DefaultInputProfile2;
- doc->CMSSettings.DefaultMonitorProfile = Prefs.DCMSset.DefaultMonitorProfile;
- doc->CMSSettings.DefaultPrinterProfile = Prefs.DCMSset.DefaultPrinterProfile;
- doc->CMSSettings.DefaultIntentPrinter = Prefs.DCMSset.DefaultIntentPrinter;
- doc->CMSSettings.DefaultIntentMonitor = Prefs.DCMSset.DefaultIntentMonitor;
- doc->CMSSettings.DefaultIntentMonitor2 = Prefs.DCMSset.DefaultIntentMonitor2;
- doc->CMSSettings.SoftProofOn = Prefs.DCMSset.SoftProofOn;
- doc->CMSSettings.GamutCheck = Prefs.DCMSset.GamutCheck;
- doc->CMSSettings.CMSinUse = Prefs.DCMSset.CMSinUse;
- doc->PDF_Optionen.SolidProf = doc->CMSSettings.DefaultInputProfile2;
- doc->PDF_Optionen.ImageProf = doc->CMSSettings.DefaultInputProfile;
- doc->PDF_Optionen.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
- doc->PDF_Optionen.Intent = doc->CMSSettings.DefaultIntentMonitor;
- doc->PDF_Optionen.Intent2 = doc->CMSSettings.DefaultIntentMonitor2;
- doc->ActiveLayer = 0;
- HaveDoc++;
- DocNr++;
- doc->Scale = 1.0;
- doc->AppMode = 1;
- doc->Language = Prefs.Language;
- doc->MinWordLen = Prefs.MinWordLen;
- doc->Automatic = Prefs.Automatic;
- doc->AutoCheck = Prefs.AutoCheck;
- doc->PageColors = Prefs.DColors;
- ScribusWin* w = new ScribusWin(wsp, doc);
- view = new ScribusView(w, doc, &Prefs);
- w->setView(view);
- ActWin = w;
- w->setCentralWidget(view);
- connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
- connect(w, SIGNAL(SaveAndClose()), this, SLOT(DoSaveClose()));
- if (CMSavail)
- {
-#ifdef HAVE_CMS
- w->SoftProofing = Prefs.DCMSset.SoftProofOn;
- w->Gamut = Prefs.DCMSset.GamutCheck;
- CMSuse = Prefs.DCMSset.CMSinUse;
- w->IntentPrinter = Prefs.DCMSset.DefaultIntentPrinter;
- w->IntentMonitor = Prefs.DCMSset.DefaultIntentMonitor;
- SoftProofing = Prefs.DCMSset.SoftProofOn;
- Gamut = Prefs.DCMSset.GamutCheck;
- IntentPrinter = Prefs.DCMSset.DefaultIntentPrinter;
- IntentMonitor = Prefs.DCMSset.DefaultIntentMonitor;
- w->OpenCMSProfiles(InputProfiles, MonitorProfiles, PrinterProfiles);
- stdProof = w->stdProof;
- stdTrans = w->stdTrans;
- stdProofImg = w->stdProofImg;
- stdTransImg = w->stdTransImg;
- CMSoutputProf = doc->DocOutputProf;
- CMSprinterProf = doc->DocPrinterProf;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigRgbData)
- doc->CMSSettings.ComponentsInput2 = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigCmykData)
- doc->CMSSettings.ComponentsInput2 = 4;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigCmyData)
- doc->CMSSettings.ComponentsInput2 = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigRgbData)
- doc->CMSSettings.ComponentsPrinter = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigCmykData)
- doc->CMSSettings.ComponentsPrinter = 4;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigCmyData)
- doc->CMSSettings.ComponentsPrinter = 3;
- doc->PDF_Optionen.SComp = doc->CMSSettings.ComponentsInput2;
-#endif
- if (Prefs.DCMSset.CMSinUse)
- RecalcColors();
- }
- doc->setPage(b, h, tpr, lr, rr, br, sp, ab, atf, fp);
- slotNewPage(0);
- HaveNewDoc();
- view->Pages.at(0)->parentWidget()->hide();
- view->DocPages = view->Pages;
- view->Pages = view->MasterPages;
- doc->PageC = view->MasterPages.count();
- bool atfb = doc->PageAT;
- doc->PageAT = false;
- slotNewPage(0);
- doc->PageAT = atfb;
- view->MasterNames["Normal"] = 0;
- view->Pages.at(0)->PageNam = "Normal";
- view->Pages.at(0)->parentWidget()->hide();
- view->MasterPages = view->Pages;
- doc->PageC = view->DocPages.count();
- view->Pages = view->DocPages;
- doc->MasterP = false;
- view->Pages.at(0)->MPageNam = "Normal";
- view->Pages.at(0)->parentWidget()->show();
- doc->setUnModified();
- doc->loading = false;
- doc->ActPage = view->Pages.at(0);
- Tpal->BuildTree(view);
- Sepal->Rebuild();
- BookPal->BView->clear();
- if ( wsp->windowList().isEmpty() )
- w->showMaximized();
- else
- w->show();
- view->show();
- connect(doc->ASaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
- doc->AutoSave = Prefs.AutoSave;
- if (doc->AutoSave)
- doc->ASaveTimer->start(Prefs.AutoSaveTime);
- return true;
-}
-
-void ScribusApp::DoSaveClose()
-{
- slotFileSaveAs();
- DoFileClose();
-}
-
-void ScribusApp::windowsMenuAboutToShow()
-{
- windowsMenu->clear();
- int cascadeId = windowsMenu->insertItem(tr("Cascade"), wsp, SLOT(cascade() ) );
- int tileId = windowsMenu->insertItem(tr("Tile"), wsp, SLOT(tile() ) );
- if ( wsp->windowList().isEmpty() )
- {
- windowsMenu->setItemEnabled( cascadeId, false );
- windowsMenu->setItemEnabled( tileId, false );
- }
- windowsMenu->insertSeparator();
- QWidgetList windows = wsp->windowList();
- for ( int i = 0; i < static_cast<int>(windows.count()); ++i )
- {
- int id = windowsMenu->insertItem(windows.at(i)->caption(), this, SLOT(windowsMenuActivated(int)));
- windowsMenu->setItemParameter( id, i );
- windowsMenu->setItemChecked( id, wsp->activeWindow() == windows.at(i) );
- }
-}
-
-void ScribusApp::newActWin(QWidget *w)
-{
- ScribusWin* swin;
- if (w == NULL)
- {
- ActWin = NULL;
- return;
- }
- ActWin = (ScribusWin*)w;
- doc = ActWin->doc;
- view = ActWin->view;
- Sepal->SetView(view);
- if (!doc->loading)
- {
- SwitchWin();
- QWidgetList windows = wsp->windowList();
- for ( int i = 0; i < static_cast<int>(windows.count()); ++i )
- {
- swin = (ScribusWin*)windows.at(i);
- if (swin->muster != NULL)
- swin->muster->hide();
- }
- if (doc->TemplateMode)
- ActWin->muster->show();
- setAppMode(doc->AppMode);
- }
- w->setFocus();
- if (w->isMaximized())
- wsp->setScrollBarsEnabled(false);
- else
- wsp->setScrollBarsEnabled(true);
- Sepal->Rebuild();
- Tpal->BuildTree(view);
- BookPal->BView->NrItems = ActWin->NrItems;
- BookPal->BView->First = ActWin->First;
- BookPal->BView->Last = ActWin->Last;
- RestoreBookMarks();
-}
-
-void ScribusApp::windowsMenuActivated( int id )
-{
- QWidget* w = wsp->windowList().at( id );
- if ( w )
- w->showNormal();
- newActWin(w);
-}
-
-bool ScribusApp::SetupDoc()
-{
- float tpr = doc->PageM.Top;
- float lr = doc->PageM.Left;
- float rr = doc->PageM.Right;
- float br = doc->PageM.Bottom;
- bool fp = doc->PageFP;
- bool fpe = doc->FirstPageLeft;
- float tpr2, lr2, rr2, br2;
- bool ret = false;
- ReformDoc* dia = new ReformDoc(this, tpr, lr, rr, br, fp, fpe, doc->Einheit);
- if (dia->exec())
- {
- tpr2 = dia->TopR->value() / UmReFaktor / 100.0;
- lr2 = dia->LeftR->value() / UmReFaktor / 100.0;
- rr2 = dia->RightR->value() / UmReFaktor / 100.0;
- br2 = dia->BottomR->value() / UmReFaktor / 100.0;
- fp = dia->Doppelseiten->isChecked();
- if (fp)
- doc->FirstPageLeft = dia->ErsteSeite->isChecked();
- doc->resetPage(tpr2, lr2, rr2, br2, fp);
- view->reformPages();
- doc->setModified();
- view->GotoPage(doc->ActPage->PageNr);
- view->DrawNew();
- Sepal->RebuildPage();
- ret = true;
- doc->PDF_Optionen.BleedBottom = doc->PageM.Bottom;
- doc->PDF_Optionen.BleedTop = doc->PageM.Top;
- doc->PDF_Optionen.BleedLeft = doc->PageM.Left;
- doc->PDF_Optionen.BleedRight = doc->PageM.Right;
- }
- delete dia;
- return ret;
-}
-
-void ScribusApp::SwitchWin()
-{
- int a;
- CListe::Iterator it;
- QPixmap pm = QPixmap(15, 15);
- a = 0;
- ColorMenu->clear();
- ColorMenu->insertItem(tr("None"));
- for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
- {
- pm.fill(doc->PageColors[it.key()].getRGBColor());
- ColorMenu->insertItem(QIconSet(pm), it.key());
- if (it.key() == doc->Dbrush)
- {
- ColorMenu->setItemChecked(ColorMenu->idAt(a), true);
- }
- a++;
- }
- BuildFontMenu();
-#ifdef HAVE_CMS
- SoftProofing = ActWin->SoftProofing;
- Gamut = ActWin->Gamut;
- IntentPrinter = ActWin->IntentPrinter;
- IntentMonitor = ActWin->IntentMonitor;
- stdProof = ActWin->stdProof;
- stdTrans = ActWin->stdTrans;
- stdProofImg = ActWin->stdProofImg;
- stdTransImg = ActWin->stdTransImg;
- CMSoutputProf = doc->DocOutputProf;
- CMSprinterProf = doc->DocPrinterProf;
-#endif
- Mpal->Cpal->SetColors(doc->PageColors);
- Mpal->Cpal->ChooseGrad(0);
- ActWin->setCaption(tr(doc->DocName));
- ShadeMenu->setItemChecked(ShadeMenu->idAt(11), true);
- Mpal->SetDoc(doc);
- Sepal->SetView(view);
- Mpal->Spal->SetFormats(doc);
- Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
- view->LaMenu();
- view->setLayMenTxt(doc->ActiveLayer);
- doc->CurrentABStil = 0;
- slotChangeUnit(doc->Einheit);
- if (doc->EditClip)
- {
- doc->EditClip = !doc->EditClip;
- ToggleFrameEdit();
- }
- if (doc->ShFrames)
- viewMenu->changeItem(FrameDr, tr("Hide Frames"));
- else
- viewMenu->changeItem(FrameDr, tr("Show Frames"));
- DatClo->setEnabled(true);
- if (doc->TemplateMode)
- {
- menuBar()->setItemEnabled(pgmm, 0);
- editMenu->setItemEnabled(tman, 0);
- DatNeu->setEnabled(false);
- DatSav->setEnabled(false);
- DatOpe->setEnabled(false);
- DatClo->setEnabled(false);
- fileMenu->setItemEnabled(fid1, 0);
- fileMenu->setItemEnabled(fid4, 0);
- fileMenu->setItemEnabled(fid5, 0);
- fileMenu->setItemEnabled(fid51, 0);
- fileMenu->setItemEnabled(fid12, 0);
- fileMenu->setItemEnabled(fid13, 0);
- fileMenu->setItemEnabled(fid14, 0);
- Sepal->DisablePal();
- }
- else
- {
- menuBar()->setItemEnabled(pgmm, 1);
- editMenu->setItemEnabled(tman, 1);
- DatNeu->setEnabled(true);
- DatOpe->setEnabled(true);
- DatClo->setEnabled(true);
- fileMenu->setItemEnabled(fid1, 1);
- fileMenu->setItemEnabled(fid4, ActWin->MenuStat[2]);
- fileMenu->setItemEnabled(fid5, ActWin->MenuStat[3]);
- fileMenu->setItemEnabled(fid51, ActWin->MenuStat[3]);
- fileMenu->setItemEnabled(fid12, 1);
- fileMenu->setItemEnabled(fid13, 1);
- fileMenu->setItemEnabled(fid14, 1);
- if (view->Pages.count() > 1)
- {
- pageMenu->setItemEnabled(pgmd, 1);
- pageMenu->setItemEnabled(pgmv, 1);
- }
- else
- {
- pageMenu->setItemEnabled(pgmd, 0);
- pageMenu->setItemEnabled(pgmv, 0);
- }
- if (doc->isModified())
- slotDocCh();
- else
- {
- fileMenu->setItemEnabled(fid4, 0);
- DatSav->setEnabled(false);
- }
- fileMenu->setItemEnabled(fid5, 1);
- fileMenu->setItemEnabled(fid51, 1);
- Sepal->EnablePal();
- }
-}
-
-void ScribusApp::HaveNewDoc()
-{
- int a;
- DatPri->setEnabled(true);
- DatPDF->setEnabled(true);
- fileMenu->setItemEnabled(fid1, 1);
- fileMenu->setItemEnabled(fid4, 0);
- fileMenu->setItemEnabled(fid5, 1);
- fileMenu->setItemEnabled(fid51, 1);
- fileMenu->setItemEnabled(fid6, 1);
- fileMenu->setItemEnabled(fid7, 1);
- exportMenu->setItemEnabled(fid8, 1);
- importMenu->setItemEnabled(fid2a, 1);
- fileMenu->setItemEnabled(fid9, 1);
- if (PDFavailable)
- exportMenu->setItemEnabled(fid10, 1);
- fileMenu->setItemEnabled(fid11, 1);
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid2, 0);
- editMenu->setItemEnabled(edid3, 0);
- editMenu->setItemEnabled(edid6, 1);
- for (a=0; a<6; ++a)
- {
- viewMenu->setItemEnabled(viewMenu->idAt(a), 1);
- }
- viewMenu->setItemEnabled(Markers, 1);
- viewMenu->setItemEnabled(FrameDr, 1);
- viewMenu->setItemEnabled(Bilder, 1);
- viewMenu->setItemEnabled(Ras, 1);
- viewMenu->setItemEnabled(uRas, 1);
- viewMenu->setItemChecked(uRas, doc->useRaster);
- viewMenu->setItemEnabled(Guide, 1);
- viewMenu->setItemEnabled(uGuide, 1);
- viewMenu->setItemChecked(uGuide, doc->SnapGuides);
- menuBar()->setItemEnabled(pgmm, 1);
- menuBar()->setItemEnabled(exmn, 1);
- WerkTools->setEnabled(true);
- if (view->Pages.count() > 1)
- {
- pageMenu->setItemEnabled(pgmd, 1);
- pageMenu->setItemEnabled(pgmv, 1);
- }
- else
- {
- pageMenu->setItemEnabled(pgmd, 0);
- pageMenu->setItemEnabled(pgmv, 0);
- }
- editMenu->setItemEnabled(tman, 1);
- editMenu->setItemEnabled(jman, 1);
- CListe::Iterator it;
- QPixmap pm = QPixmap(15, 15);
- a = 0;
- ColorMenu->clear();
- ColorMenu->insertItem(tr("None"));
- for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
- {
- pm.fill(doc->PageColors[it.key()].getRGBColor());
- ColorMenu->insertItem(QIconSet(pm), it.key());
- if (it.key() == doc->Dbrush)
- {
- ColorMenu->setItemChecked(ColorMenu->idAt(a), true);
- }
- a++;
- }
- Mpal->Cpal->SetColors(doc->PageColors);
- Mpal->Cpal->ChooseGrad(0);
- ActWin->setCaption(tr(doc->DocName));
- ShadeMenu->setItemChecked(ShadeMenu->idAt(11), true);
- Mpal->SetDoc(doc);
- Sepal->SetView(view);
- Mpal->Spal->SetFormats(doc);
- Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
- view->LaMenu();
- view->setLayMenTxt(doc->ActiveLayer);
- doc->CurrentABStil = 0;
- slotChangeUnit(doc->Einheit);
- doc->Trenner = new Hyphenator(this, doc, this);
- BuildFontMenu();
- connect(view, SIGNAL(changeUN(int)), this, SLOT(slotChangeUnit(int)));
- connect(view, SIGNAL(changeLA(int)), Lpal, SLOT(MarkActiveLayer(int)));
- doc->PDF_Optionen.BleedBottom = doc->PageM.Bottom;
- doc->PDF_Optionen.BleedTop = doc->PageM.Top;
- doc->PDF_Optionen.BleedLeft = doc->PageM.Left;
- doc->PDF_Optionen.BleedRight = doc->PageM.Right;
-}
-
-void ScribusApp::HaveNewSel(int Nr)
-{
- PageItem *b;
- switch (Nr)
- {
- case -1:
- importMenu->changeItem(fid2, tr("Get Text/Picture..."));
- importMenu->setItemEnabled(fid2, 0);
- exportMenu->setItemEnabled(fid3, 0);
- menuBar()->setItemEnabled(Obm, 0);
- ObjMenu->setItemEnabled(ShapeM, 0);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 0);
-#endif
- ObjMenu->setItemEnabled(LockOb, 0);
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid2, 0);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- extraMenu->setItemEnabled(hyph, 0);
- StilMenu->clear();
- WerkTools->KetteAus->setEnabled(false);
- WerkTools->KetteEin->setEnabled(false);
- WerkTools->Textedit->setEnabled(false);
- WerkTools->Rotiere->setEnabled(false);
- Mpal->Cpal->GradCombo->setCurrentItem(0);
- Mpal->Cpal->ChooseGrad(0);
- break;
- case 2:
- importMenu->changeItem(fid2, tr("Get Picture..."));
- importMenu->setItemEnabled(fid2, 1);
- editMenu->setItemEnabled(edid1, 1);
- editMenu->setItemEnabled(edid2, 1);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- extraMenu->setItemEnabled(hyph, 0);
- menuBar()->setItemEnabled(Obm, 1);
- ObjMenu->setItemEnabled(ShapeM, 1);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 0);
-#endif
- StilMenu->clear();
- StilMenu->insertItem(tr("Color"), ColorMenu);
- StilMenu->insertItem(tr("Invert"));
- WerkTools->KetteAus->setEnabled(false);
- WerkTools->KetteEin->setEnabled(false);
- WerkTools->Textedit->setEnabled(true);
- WerkTools->Rotiere->setEnabled(true);
- Mpal->SetCurItem(doc->ActPage->SelItem.at(0));
- break;
- case 4:
- importMenu->changeItem(fid2, tr("Get Text..."));
- importMenu->setItemEnabled(fid2, 1);
- exportMenu->setItemEnabled(fid3, 1);
- editMenu->setItemEnabled(edid1, 1);
- editMenu->setItemEnabled(edid2, 1);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- extraMenu->setItemEnabled(hyph, 1);
- menuBar()->setItemEnabled(Obm, 1);
- ObjMenu->setItemEnabled(ShapeM, 1);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 1);
-#endif
- StilMenu->clear();
- StilMenu->insertItem(tr("Font"), FontMenu);
- StilMenu->insertItem(tr("Size"), SizeTMenu);
- StilMenu->insertItem(tr("Style"), TypeStyleMenu);
- StilMenu->insertItem(tr("Alignment"), AliMenu);
- StilMenu->insertItem(tr("Color"), ColorMenu);
- StilMenu->insertItem(tr("Shade"), ShadeMenu);
- WerkTools->Rotiere->setEnabled(true);
- b = doc->ActPage->SelItem.at(0);
- if ((b->NextBox != 0) || (b->BackBox != 0))
- {
- WerkTools->KetteAus->setEnabled(true);
- if ((b->BackBox != 0) && (b->Ptext.count() == 0))
- WerkTools->Textedit->setEnabled(false);
- else
- WerkTools->Textedit->setEnabled(true);
- }
- else
- WerkTools->Textedit->setEnabled(true);
- if (b->NextBox == 0)
- WerkTools->KetteEin->setEnabled(true);
- if (doc->MasterP)
- WerkTools->KetteEin->setEnabled(false);
- Mpal->SetCurItem(b);
- doc->CurrentStyle = 0;
- doc->Vorlagen[0].LineSpa = b->LineSp;
- doc->Vorlagen[0].Ausri = b->Ausrich;
- break;
- case 8:
- importMenu->changeItem(fid2, tr("Get Text..."));
- importMenu->setItemEnabled(fid2, 1);
- exportMenu->setItemEnabled(fid3, 1);
- editMenu->setItemEnabled(edid1, 1);
- editMenu->setItemEnabled(edid2, 1);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- extraMenu->setItemEnabled(hyph, 0);
- menuBar()->setItemEnabled(Obm, 1);
- ObjMenu->setItemEnabled(ShapeM, 0);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 0);
-#endif
- StilMenu->clear();
- StilMenu->insertItem(tr("Font"), FontMenu);
- StilMenu->insertItem(tr("Size"), SizeTMenu);
- StilMenu->insertItem(tr("Style"), TypeStyleMenu);
- StilMenu->insertItem(tr("Color"), ColorMenu);
- StilMenu->insertItem(tr("Shade"), ShadeMenu);
- WerkTools->Rotiere->setEnabled(true);
- WerkTools->Textedit->setEnabled(false);
- WerkTools->KetteEin->setEnabled(false);
- WerkTools->KetteAus->setEnabled(false);
- Mpal->SetCurItem(doc->ActPage->SelItem.at(0));
- doc->CurrentStyle = 0;
- break;
- default:
- importMenu->changeItem(fid2, tr("Get Text/Picture..."));
- importMenu->setItemEnabled(fid2, 0);
- exportMenu->setItemEnabled(fid3, 0);
- editMenu->setItemEnabled(edid1, 1);
- editMenu->setItemEnabled(edid2, 1);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- extraMenu->setItemEnabled(hyph, 0);
- menuBar()->setItemEnabled(Obm, 1);
- StilMenu->clear();
- StilMenu->insertItem(tr("Color"), ColorMenu);
- StilMenu->insertItem(tr("Shade"), ShadeMenu);
- WerkTools->KetteAus->setEnabled(false);
- WerkTools->KetteEin->setEnabled(false);
- if (Nr != 5)
- WerkTools->Rotiere->setEnabled(true);
- else
- WerkTools->Rotiere->setEnabled(false);
- Mpal->SetCurItem(doc->ActPage->SelItem.at(0));
- break;
- }
- doc->CurrentSel = Nr;
- Mpal->RotationGroup->setButton(doc->RotMode);
- if (doc->ActPage->SelItem.count() > 1)
- {
- ObjMenu->setItemEnabled(DistM, 1);
- ObjMenu->setItemEnabled(Gr, 1);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 0);
-#endif
- bool hPoly = false;
- if (doc->ActPage->SelItem.at(0)->Groups.count() == 0)
- hPoly = true;
- for (uint b=0; b<doc->ActPage->SelItem.count(); ++b)
- {
- if (doc->ActPage->SelItem.at(b)->PType != 6)
- hPoly = false;
- }
- ObjMenu->setItemEnabled(PfadV, hPoly);
- if (doc->ActPage->SelItem.count() == 2)
- {
- if (((doc->ActPage->SelItem.at(0)->PType == 4) || (doc->ActPage->SelItem.at(1)->PType == 4)) && ((doc->ActPage->SelItem.at(0)->PType == 7) || (doc->ActPage->SelItem.at(1)->PType == 7)))
- ObjMenu->setItemEnabled(PfadT, 1);
- }
- }
- else
- {
- ObjMenu->setItemEnabled(DistM, 0);
- ObjMenu->setItemEnabled(Gr, 0);
- ObjMenu->setItemEnabled(PfadT, 0);
- ObjMenu->setItemEnabled(PfadV, 0);
- }
- if (doc->ActPage->SelItem.count() != 0)
- {
- Mpal->Textflow->setChecked(doc->ActPage->SelItem.at(0)->Textflow);
- ObjMenu->setItemEnabled(LockOb, 1);
- if (doc->ActPage->SelItem.at(0)->Groups.count() != 0)
- ObjMenu->setItemEnabled(UnGr, 1);
- else
- {
- ObjMenu->setItemEnabled(UnGr, 0);
- if ((doc->ActPage->SelItem.at(0)->PType == 6) && (doc->ActPage->SelItem.at(0)->Segments.count() != 0))
- ObjMenu->setItemEnabled(PfadS, 1);
- else
- ObjMenu->setItemEnabled(PfadS, 0);
- }
- if (doc->ActPage->SelItem.at(0)->Locked)
- {
- ObjMenu->setItemEnabled(DistM, 0);
- ObjMenu->setItemEnabled(ShapeM, 0);
-#ifdef HAVE_FREETYPE
- ObjMenu->setItemEnabled(PfadTP, 0);
-#endif
- ObjMenu->setItemEnabled(PfadS, 0);
- ObjMenu->setItemEnabled(PfadT, 0);
- ObjMenu->setItemEnabled(PfadV, 0);
- ObjMenu->setItemEnabled(Loesch, 0);
- ObjMenu->setItemEnabled(OBack, 0);
- ObjMenu->setItemEnabled(OFront, 0);
- ObjMenu->setItemEnabled(ORaise, 0);
- ObjMenu->setItemEnabled(OLower, 0);
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid4, 0);
- WerkTools->Rotiere->setEnabled(false);
- ObjMenu->changeItem(LockOb, tr("Unlock"));
- }
- else
- {
- ObjMenu->changeItem(LockOb, tr("Lock"));
- ObjMenu->setItemEnabled(OBack, 1);
- ObjMenu->setItemEnabled(OFront, 1);
- ObjMenu->setItemEnabled(ORaise, 1);
- ObjMenu->setItemEnabled(OLower, 1);
- }
- }
-}
-
-void ScribusApp::slotDocCh(bool reb)
-{
- if (reb)
- Tpal->BuildTree(view);
- if (!doc->isModified())
- doc->setModified();
- ActWin->setCaption(tr(doc->DocName) + "*");
- if ((!doc->DocName.startsWith("Document")) && (!doc->TemplateMode))
- {
- fileMenu->setItemEnabled(fid4, 1);
- DatSav->setEnabled(true);
- DatClo->setEnabled(true);
- }
- else
- {
- fileMenu->setItemEnabled(fid4, 0);
- DatSav->setEnabled(false);
- }
- if (!doc->TemplateMode)
- {
- fileMenu->setItemEnabled(fid5, 1);
- fileMenu->setItemEnabled(fid51, 1);
- }
- ActWin->MenuStat[0] = DatSav->isEnabled();
- ActWin->MenuStat[1] = fileMenu->isItemEnabled(fid1);
- ActWin->MenuStat[2] = fileMenu->isItemEnabled(fid4);
- ActWin->MenuStat[3] = fileMenu->isItemEnabled(fid5);
-}
-
-void ScribusApp::UpdateRecent(QString fn)
-{
- recentMenu->clear();
- if (RecentDocs.findIndex(fn) == -1)
- RecentDocs.prepend(fn);
- else
- {
- RecentDocs.remove(fn);
- RecentDocs.prepend(fn);
- }
- uint max = QMIN(Prefs.RecentDCount, RecentDocs.count());
- for (uint m = 0; m < max; ++m)
- {
- recentMenu->insertItem(RecentDocs[m]);
- }
-}
-
-void ScribusApp::LoadRecent(int id)
-{
- QString fn = recentMenu->text(id);
- QFileInfo fd(fn);
- if (!fd.exists())
- {
- RecentDocs.remove(fn);
- recentMenu->clear();
- uint max = QMIN(Prefs.RecentDCount, RecentDocs.count());
- for (uint m = 0; m < max; ++m)
- {
- recentMenu->insertItem(RecentDocs[m]);
- }
- return;
- }
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- LadeDoc(recentMenu->text(id));
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
-}
-
-bool ScribusApp::slotDocOpen()
-{
- bool ret = false;
-#ifdef HAVE_LIBZ
- QString fileName = CFileDialog(tr("Open"),tr("Documents (*.sla *.sla.gz *.scd *.scd.gz);; All Files (*)"));
-#else
- QString fileName = CFileDialog(tr("Open"),tr("Documents (*.sla *.scd);; All Files (*)"));
-#endif
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- ret = LadeDoc(fileName);
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- return ret;
-}
-
-bool ScribusApp::slotDocMerge()
-{
- bool ret = false;
- MergeDoc *dia = new MergeDoc(this);
- if (dia->exec())
- {
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- ret = LadeSeite(dia->Filename->text(), dia->PageNr->value()-1);
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- ret = true;
- }
- delete dia;
- return ret;
-}
-
-bool ScribusApp::LadeSeite(QString fileName, int Nr)
-{
- bool ret = false;
- if (!fileName.isEmpty())
- {
- doc->loading = true;
- ScriXmlDoc *ss = new ScriXmlDoc();
- if(!ss->ReadPage(fileName, Prefs.AvailFonts, doc, view, Nr))
- {
- delete ss;
- doc->loading = false;
- return false;
- }
- delete ss;
- if (CMSavail)
- {
- if (doc->CMSSettings.CMSinUse)
- {
- RecalcColors();
- view->RecalcPictures(&InputProfiles);
- }
- }
- for (uint azz = 0; azz < doc->ActPage->Items.count(); ++azz)
- {
- PageItem *ite = doc->ActPage->Items.at(azz);
- if ((ite->PType == 4) && (ite->isBookmark))
- BookPal->BView->AddPageItem(ite);
- }
- Mpal->Cpal->SetColors(doc->PageColors);
- slotDocCh();
- doc->loading = false;
- ret = true;
- }
- Sepal->Rebuild();
- doc->ActPage->update();
- return ret;
-}
-
-bool ScribusApp::LadeDoc(QString fileName)
-{
- bool ret = false;
- if (!fileName.isEmpty())
- {
- QFileInfo fi(fileName);
- QDir::setCurrent(fi.dirPath(true));
- doc=new ScribusDoc();
- doc->AllFonts = &Prefs.AvailFonts;
- doc->Dsize = Prefs.DefSize;
- doc->GrabRad = Prefs.GrabRad;
- doc->GuideRad = Prefs.GuideRad;
- doc->minorGrid = Prefs.DminGrid;
- doc->majorGrid = Prefs.DmajGrid;
- doc->minorColor = Prefs.DminColor;
- doc->majorColor = Prefs.DmajColor;
- doc->papColor = Prefs.DpapColor;
- doc->margColor = Prefs.DmargColor;
- doc->guideColor = Prefs.guideColor;
- doc->Dpen = Prefs.Dpen;
- doc->DpenText = Prefs.DpenText;
- doc->Dbrush = Prefs.Dbrush;
- doc->Dshade = Prefs.Dshade;
- doc->Dshade2 = Prefs.Dshade2;
- doc->DLineArt = PenStyle(Prefs.DLineArt);
- doc->Dwidth = Prefs.Dwidth;
- doc->DpenLine = Prefs.DpenLine;
- doc->DshadeLine = Prefs.DshadeLine;
- doc->DLstyleLine = PenStyle(Prefs.DLstyleLine);
- doc->DwidthLine = Prefs.DwidthLine;
- doc->MagMin = Prefs.MagMin;
- doc->MagMax = Prefs.MagMax;
- doc->MagStep = Prefs.MagStep;
- doc->DbrushPict = Prefs.DbrushPict;
- doc->ShadePict = Prefs.ShadePict;
- doc->ScaleX = Prefs.ScaleX;
- doc->ScaleY = Prefs.ScaleY;
- doc->ScaleType = Prefs.ScaleType;
- doc->AspectRatio = Prefs.AspectRatio;
- doc->Before = Prefs.Before;
- doc->Einheit = Prefs.Einheit;
- doc->PagesSbS = Prefs.PagesSbS;
- doc->ShFrames = Prefs.ShFrames;
- doc->RandFarbig = Prefs.RandFarbig;
- doc->AutoLine = Prefs.AutoLine;
- doc->Scale = 1.0;
- doc->AppMode = 1;
- doc->HasCMS = false;
- doc->ActiveLayer = 0;
- doc->Language = Prefs.Language;
- doc->MinWordLen = Prefs.MinWordLen;
- doc->Automatic = Prefs.Automatic;
- doc->AutoCheck = Prefs.AutoCheck;
- doc->loading = true;
- FMess->setText(tr("Loading..."));
- FProg->reset();
- ScribusWin* w = new ScribusWin(wsp, doc);
- view = new ScribusView(w, doc, &Prefs);
- w->setView(view);
- ActWin = w;
- w->setCentralWidget(view);
- ScriXmlDoc *ss = new ScriXmlDoc();
- connect(ss, SIGNAL(NewPage(int)), this, SLOT(slotNewPage(int)));
-#ifdef HAVE_CMS
- w->SoftProofing = false;
- w->Gamut = false;
- bool cmsu = CMSuse;
- CMSuse = false;
-#endif
- if(!ss->ReadDoc(fileName, Prefs.AvailFonts, doc, view, FProg))
- {
-// w->close();
- view->close();
- disconnect(ss, SIGNAL(NewPage(int)), this, SLOT(slotNewPage(int)));
- delete ss;
- delete view;
- delete doc;
- delete w;
- FMess->setText("");
- FProg->reset();
- ActWin = NULL;
- return false;
- }
- delete ss;
- FMess->setText("");
- FProg->reset();
-#ifdef HAVE_CMS
- CMSuse = cmsu;
-#endif
- HaveDoc++;
- connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
- connect(w, SIGNAL(SaveAndClose()), this, SLOT(DoSaveClose()));
- if (!doc->HasCMS)
- {
- doc->CMSSettings.DefaultInputProfile = Prefs.DCMSset.DefaultInputProfile;
- doc->CMSSettings.DefaultInputProfile2 = Prefs.DCMSset.DefaultInputProfile2;
- doc->CMSSettings.DefaultMonitorProfile = Prefs.DCMSset.DefaultMonitorProfile;
- doc->CMSSettings.DefaultPrinterProfile = Prefs.DCMSset.DefaultPrinterProfile;
- doc->CMSSettings.DefaultIntentPrinter = Prefs.DCMSset.DefaultIntentPrinter;
- doc->CMSSettings.DefaultIntentMonitor = Prefs.DCMSset.DefaultIntentMonitor;
- doc->CMSSettings.DefaultIntentMonitor2 = Prefs.DCMSset.DefaultIntentMonitor2;
- doc->CMSSettings.SoftProofOn = Prefs.DCMSset.SoftProofOn;
- doc->CMSSettings.GamutCheck = Prefs.DCMSset.GamutCheck;
- doc->CMSSettings.CMSinUse = false;
- }
- if (CMSavail)
- {
- if (!InputProfiles.contains(doc->CMSSettings.DefaultInputProfile))
- doc->CMSSettings.DefaultInputProfile = Prefs.DCMSset.DefaultInputProfile;
- if (!InputProfiles.contains(doc->CMSSettings.DefaultInputProfile2))
- doc->CMSSettings.DefaultInputProfile2 = Prefs.DCMSset.DefaultInputProfile2;
- if (!MonitorProfiles.contains(doc->CMSSettings.DefaultMonitorProfile))
- doc->CMSSettings.DefaultMonitorProfile = Prefs.DCMSset.DefaultMonitorProfile;
- if (!PrinterProfiles.contains(doc->CMSSettings.DefaultPrinterProfile))
- doc->CMSSettings.DefaultPrinterProfile = Prefs.DCMSset.DefaultPrinterProfile;
- if (!PrinterProfiles.contains(doc->PDF_Optionen.PrintProf))
- doc->PDF_Optionen.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
- if (!InputProfiles.contains(doc->PDF_Optionen.ImageProf))
- doc->PDF_Optionen.ImageProf = doc->CMSSettings.DefaultInputProfile;
- if (!InputProfiles.contains(doc->PDF_Optionen.SolidProf))
- doc->PDF_Optionen.SolidProf = doc->CMSSettings.DefaultInputProfile2;
-#ifdef HAVE_CMS
- w->SoftProofing = doc->CMSSettings.SoftProofOn;
- w->Gamut = doc->CMSSettings.GamutCheck;
- CMSuse = doc->CMSSettings.CMSinUse;
- w->IntentPrinter = doc->CMSSettings.DefaultIntentPrinter;
- w->IntentMonitor = doc->CMSSettings.DefaultIntentMonitor;
- SoftProofing = doc->CMSSettings.SoftProofOn;
- Gamut = doc->CMSSettings.GamutCheck;
- IntentPrinter = doc->CMSSettings.DefaultIntentPrinter;
- IntentMonitor = doc->CMSSettings.DefaultIntentMonitor;
- w->OpenCMSProfiles(InputProfiles, MonitorProfiles, PrinterProfiles);
- stdProof = w->stdProof;
- stdTrans = w->stdTrans;
- stdProofImg = w->stdProofImg;
- stdTransImg = w->stdTransImg;
- CMSoutputProf = doc->DocOutputProf;
- CMSprinterProf = doc->DocPrinterProf;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigRgbData)
- doc->CMSSettings.ComponentsInput2 = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigCmykData)
- doc->CMSSettings.ComponentsInput2 = 4;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigCmyData)
- doc->CMSSettings.ComponentsInput2 = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigRgbData)
- doc->CMSSettings.ComponentsPrinter = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigCmykData)
- doc->CMSSettings.ComponentsPrinter = 4;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigCmyData)
- doc->CMSSettings.ComponentsPrinter = 3;
- doc->PDF_Optionen.SComp = doc->CMSSettings.ComponentsInput2;
-#endif
- if (doc->CMSSettings.CMSinUse)
- {
- RecalcColors();
- view->RecalcPictures(&InputProfiles);
- }
- }
- Mpal->Cpal->SetColors(doc->PageColors);
- Mpal->Cpal->ChooseGrad(0);
- doc->DocName = fileName;
- doc->MasterP = false;
- HaveNewDoc();
- doc->hasName = true;
- if (view->MasterPages.count() == 0)
- {
- for (uint ax=0; ax<view->Pages.count(); ++ax)
- {
- view->Pages.at(ax)->parentWidget()->hide();
- }
- view->DocPages = view->Pages;
- view->Pages = view->MasterPages;
- doc->PageC = view->MasterPages.count();
- bool atf = doc->PageAT;
- doc->PageAT = false;
- slotNewPage(0);
- doc->PageAT = atf;
- view->MasterNames["Normal"] = 0;
- view->Pages.at(0)->PageNam = "Normal";
- view->Pages.at(0)->parentWidget()->hide();
- view->MasterPages = view->Pages;
- doc->PageC = view->DocPages.count();
- view->Pages = view->DocPages;
- doc->MasterP = false;
- for (uint ay=0; ay<view->Pages.count(); ++ay)
- {
- view->Pages.at(ay)->parentWidget()->show();
- }
- }
- doc->setUnModified();
- doc->loading = false;
- view->GotoPage(0);
- doc->RePos = true;
- for (uint az=0; az<view->MasterPages.count(); az++)
- {
- for (uint azz=0; azz<view->MasterPages.at(az)->Items.count(); ++azz)
- {
- PageItem *ite = view->MasterPages.at(az)->Items.at(azz);
- if (ite->PType == 4)
- ite->paintObj();
- }
- }
- for (uint az=0; az<view->Pages.count(); az++)
- {
- for (uint azz=0; azz<view->Pages.at(az)->Items.count(); ++azz)
- {
- PageItem *ite = view->Pages.at(az)->Items.at(azz);
- if (ite->PType == 4)
- ite->paintObj();
- if (doc->OldBM)
- {
- if ((ite->PType == 4) && (ite->isBookmark))
- BookPal->BView->AddPageItem(ite);
- }
- else
- {
- if ((ite->PType == 4) && (ite->isBookmark))
- BookPal->BView->ChangeItem(ite->BMnr, ite->ItemNr);
- }
- }
- }
- if (doc->OldBM)
- StoreBookmarks();
- doc->RePos = false;
- UpdateRecent(fileName);
- FMess->setText(tr("Ready"));
- ret = true;
- if ((wsp->windowList().isEmpty()) || (wsp->windowList().count() == 1))
- w->showMaximized();
- else
- w->show();
- view->show();
- newActWin(w);
- connect(doc->ASaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
- doc->AutoSave = Prefs.AutoSave;
- if (doc->AutoSave)
- doc->ASaveTimer->start(Prefs.AutoSaveTime);
- }
- else
- {
- Sepal->Vie = 0;
- }
- Sepal->Rebuild();
- return ret;
-}
-
-void ScribusApp::slotFileOpen()
-{
- if (doc->ActPage->SelItem.count() != 0)
- {
- PageItem *b = doc->ActPage->SelItem.at(0);
- if (b->PType == 2)
- {
- QString formats = "";
- QString form = "";
- for ( uint i = 0; i < QImageIO::inputFormats().count(); ++i )
- {
- form = QString(QImageIO::inputFormats().at(i)).lower();
- if (form == "jpeg")
- form = "jpg";
- formats += "*."+form+" ";
- }
- formats += "*.tif";
- QString fileName = CFileDialog(tr("Open"),tr("Images")+" ("+formats+tr(");;Postscript (*.eps);;All Files (*)"), "", true);
- if (!fileName.isEmpty())
- {
- b->EmProfile = "";
- b->UseEmbedded = true;
- b->IProfile = doc->CMSSettings.DefaultInputProfile;
- b->IRender = doc->CMSSettings.DefaultIntentMonitor2;
- doc->ActPage->LoadPict(fileName, b->ItemNr);
- doc->ActPage->AdjustPictScale(b);
- doc->ActPage->AdjustPreview(b);
- doc->ActPage->update();
- Mpal->Cpal->SetColors(doc->PageColors);
- slotDocCh();
- }
- }
- if (b->PType == 4)
- {
- QString fileName = CFileDialog(tr("Open"),tr("Textfiles (*.txt);;All Files (*)"));
- if (!fileName.isEmpty())
- {
- Serializer *ss = new Serializer(fileName);
- if (ss->Read())
- {
- ss->GetText(b, doc->CurrentABStil);
- }
- delete ss;
- if (doc->Trenner->AutoCheck)
- doc->Trenner->slotHyphenate(b);
- doc->ActPage->update();
- slotDocCh();
- }
- }
- }
-}
-
-void ScribusApp::slotAutoSave()
-{
- if ((doc->hasName) && (doc->isModified()) && (!doc->TemplateMode))
- {
- system("mv -f " + doc->DocName + " " + doc->DocName+".bak");
- DoFileSave(doc->DocName);
- }
-}
-
-void ScribusApp::slotFileSave()
-{
- QString fn = doc->DocName;
- if (!DoFileSave(fn))
- QMessageBox::warning(this, tr("Warning"), tr("Can't write the File: \n%1").arg(fn), tr("OK"));
-}
-
-void ScribusApp::slotFileSaveAs()
-{
- QString fna;
- if (doc->hasName)
- {
- QFileInfo fi(doc->DocName);
- fna = fi.dirPath()+"/"+fi.baseName()+".sla";
- }
- else
- {
- QDir di = QDir();
- fna = di.currentDirPath()+"/"+doc->DocName+".sla";
- }
-#ifdef HAVE_LIBZ
- QString fn = CFileDialog(tr("Save as"), tr("Documents (*.sla *.sla.gz *.scd *scd.gz);; All Files (*)"), fna, false, false, true);
-#else
- QString fn = CFileDialog(tr("Save as"), tr("Documents (*.sla *.scd);; All Files (*)"), fna, false, false, false);
-#endif
- if (!fn.isEmpty())
- {
- QFile f(fn);
- if (f.exists())
- {
- int exit=QMessageBox::warning(this,
- tr("Warning"),
- tr("Do you really want to overwrite the File:\n%1 ?").arg(fn),
- tr("No"),
- tr("Yes"),
- 0, 0, 1);
- if (exit != 1)
- return;
- }
- if (!DoFileSave(fn))
- QMessageBox::warning(this, tr("Warning"), tr("Can't write the File: \n%1").arg(fn), tr("OK"));
- }
- FMess->setText(tr("Ready"));
-}
-
-bool ScribusApp::DoFileSave(QString fn)
-{
- bool ret = true;
- FMess->setText(tr("Saving..."));
- FProg->reset();
- QFileInfo fi(fn);
- QDir::setCurrent(fi.dirPath(true));
- ScriXmlDoc *ss = new ScriXmlDoc();
- qApp->processEvents();
- ret = ss->WriteDoc(fn, doc, view, FProg);
- delete ss;
- if (ret)
- {
- doc->setUnModified();
- ActWin->setCaption(fn);
- doc->DocName = fn;
- fileMenu->setItemEnabled(fid4, 0);
- DatSav->setEnabled(false);
- UpdateRecent(fn);
- }
- FMess->setText("");
- FProg->reset();
- return ret;
-}
-
-bool ScribusApp::slotFileClose()
-{
- ScribusWin* tw = ActWin;
- ActWin->close();
- if (tw == ActWin)
- return false;
- else
- return true;
-}
-
-bool ScribusApp::DoFileClose()
-{
- uint a;
- doc->ASaveTimer->stop();
- disconnect(doc->ASaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
- if ((doc->UnData.UnCode == 0) && (doc->UnDoValid))
- delete doc->UnData.Item;
- if (CMSavail)
- ActWin->CloseCMSProfiles();
- Mpal->NewSel(-1);
- Mpal->UnsetDoc();
- Sepal->Vie = 0;
- Sepal->Rebuild();
- Mpal->Spal->SetFormats(0);
- if (doc->EditClip)
- Npal->doc = 0;
- BookPal->BView->clear();
- BookPal->BView->NrItems = 0;
- BookPal->BView->First = 1;
- BookPal->BView->Last = 0;
- if ((wsp->windowList().isEmpty()) || (wsp->windowList().count() == 1))
- {
- fileMenu->setItemEnabled(fid1, 0);
- importMenu->setItemEnabled(fid2, 0);
- exportMenu->setItemEnabled(fid3, 0);
- fileMenu->setItemEnabled(fid4, 0);
- fileMenu->setItemEnabled(fid5, 0);
- fileMenu->setItemEnabled(fid51, 0);
- fileMenu->setItemEnabled(fid6, 0);
- fileMenu->setItemEnabled(fid7, 0);
- exportMenu->setItemEnabled(fid8, 0);
- importMenu->setItemEnabled(fid2a, 0);
- fileMenu->setItemEnabled(fid9, 0);
- exportMenu->setItemEnabled(fid10, 0);
- fileMenu->setItemEnabled(fid11, 0);
- editMenu->setItemEnabled(edUndo, 0);
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid2, 0);
- editMenu->setItemEnabled(edid3, 0);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- editMenu->setItemEnabled(edid6, 0);
- extraMenu->setItemEnabled(hyph, 0);
- for (int a=0; a<6; ++a)
- {
- viewMenu->setItemEnabled(viewMenu->idAt(a), 0);
- }
- viewMenu->setItemEnabled(Markers, 0);
- viewMenu->setItemEnabled(FrameDr, 0);
- viewMenu->setItemEnabled(Bilder, 0);
- viewMenu->setItemEnabled(Ras, 0);
- viewMenu->setItemEnabled(uRas, 0);
- viewMenu->setItemChecked(uRas, false);
- viewMenu->setItemEnabled(Guide, 0);
- viewMenu->setItemEnabled(uGuide, 0);
- viewMenu->setItemChecked(uGuide, false);
- viewMenu->changeItem(Markers, tr("Hide Margins"));
- viewMenu->changeItem(FrameDr, tr("Hide Frames"));
- viewMenu->changeItem(Bilder, tr("Hide Images"));
- viewMenu->changeItem(Ras, tr("Show Grid"));
- viewMenu->changeItem(Guide, tr("Hide Guides"));
- editMenu->setItemEnabled(tman, 0);
- editMenu->setItemEnabled(jman, 0);
- menuBar()->setItemEnabled(pgmm, 0);
- menuBar()->setItemEnabled(exmn, 0);
- menuBar()->setItemEnabled(Obm, 0);
- WerkTools->setEnabled(false);
- ColorMenu->clear();
- Mpal->Cpal->SetColors(Prefs.DColors);
- Mpal->Cpal->ChooseGrad(0);
- FMess->setText(tr("Ready"));
- Tpal->ListView1->clear();
- Lpal->ClearInhalt();
- DatPri->setEnabled(false);
- DatPDF->setEnabled(false);
- DatSav->setEnabled(false);
- DatClo->setEnabled(false);
- PrinterUsed = false;
-#ifdef HAVE_CMS
- CMSuse = false;
- SoftProofing = Prefs.DCMSset.SoftProofOn;
- IntentPrinter = Prefs.DCMSset.DefaultIntentPrinter;
- IntentMonitor = Prefs.DCMSset.DefaultIntentMonitor;
-#endif
- }
- view->close();
- for (a = 0; a<view->Pages.count(); ++a)
- {
- delete view->Pages.at(a);
- }
- HaveDoc--;
- view = NULL;
- delete doc;
- doc = NULL;
- ActWin = NULL;
- return true;
-}
-
-void ScribusApp::slotFilePrint()
-{
- QString fna, prn, cmd, scmd, cc, data, SepNam;
- int Anf, Ende, Nr;
- bool fil, sep, farbe, PSfile, mirrorH, mirrorV, useICC;
- PSfile = false;
- FMess->setText(tr("Printing..."));
- if (PrinterUsed)
- {
- prn = PDef.Pname;
- fna = PDef.Dname;
- }
- else
- {
- prn = "";
- if (!doc->DocName.startsWith("Document"))
- {
- QFileInfo fi(doc->DocName);
- fna = fi.dirPath()+"/"+fi.baseName()+".ps";
- }
- else
- {
- QDir di = QDir();
- fna = di.currentDirPath()+"/"+doc->DocName+".ps";
- }
- }
- scmd = PDef.Command;
- Druck *printer = new Druck(this, fna, prn, scmd);
- printer->setMinMax(1, view->Pages.count());
- printer->setFromTo(1, view->Pages.count());
- if (printer->exec())
- {
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- prn = printer->printerName();
- fna = printer->outputFileName();
- fil = printer->outputToFile();
- Anf = printer->fromPage();
- Ende = printer->toPage();
- Nr = printer->numCopies();
- sep = printer->outputSeparations();
- SepNam = printer->separationName();
- farbe = printer->color();
- mirrorH = printer->MirrorH;
- mirrorV = printer->MirrorV;
- useICC = printer->ICCinUse;
- PDef.Pname = prn;
- PDef.Dname = fna;
- if (printer->OtherCom->isChecked())
- PDef.Command = printer->Command->text();
- PrinterUsed = true;
- PSLib *dd = getPSDriver(true, Prefs.AvailFonts, doc->UsedFonts, doc->PageColors, false);
- if (dd != NULL)
- {
- if (fil)
- PSfile = dd->PS_set_file(fna);
- else
- PSfile = dd->PS_set_file(PrefsPfad+"/tmp.ps");
- if (PSfile)
- {
- if (printer->pageOrder() == 0)
- view->CreatePS(dd, Anf-1, Ende, 1, sep, SepNam, farbe, mirrorH, mirrorV, useICC);
- else
- view->CreatePS(dd, Ende-1, Anf-2, -1, sep, SepNam, farbe, mirrorH, mirrorV, useICC);
- if (!fil)
- {
- if (printer->OtherCom->isChecked())
- {
- cmd = printer->Command->text()+ " "+PrefsPfad+"/tmp.ps";
- system(cmd);
- }
- else
- {
- cmd = "lpr -P" + prn;
- if (Nr > 1)
- cmd += " -#" + cc.setNum(Nr);
-#ifdef HAVE_CUPS
- cmd += printer->PrinterOpts;
-#endif
- cmd += " "+PrefsPfad+"/tmp.ps";
- system(cmd);
- }
- system("rm -f "+PrefsPfad+"/tmp.ps");
- }
- }
- else
- QMessageBox::warning(this, tr("Warning"), tr("Printing failed!"), tr("OK"));
- delete dd;
- closePSDriver();
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- }
- }
- delete printer;
- FMess->setText(tr("Ready"));
-}
-
-void ScribusApp::slotFileQuit()
-{
- Mpal->UnsetDoc();
- close();
-}
-
-void ScribusApp::slotEditCut()
-{
- uint a;
- NoFrameEdit();
- QString BufferI = "";
- if ((HaveDoc) && (doc->ActPage->SelItem.count() != 0))
- {
- Buffer2 = "<SCRIBUSTEXT>";
- PageItem *b = doc->ActPage->SelItem.at(0);
- if ((doc->AppMode == 7) && (b->HasSel))
- {
- for (a = 0; a < b->Ptext.count(); ++a)
- {
- if (b->Ptext.at(a)->cselect)
- {
- if (b->Ptext.at(a)->ch == QChar(13))
- {
- Buffer2 += QChar(5);
- BufferI += QChar(10);
- }
- else
- {
- Buffer2 += b->Ptext.at(a)->ch;
- BufferI += b->Ptext.at(a)->ch;
- }
- Buffer2 += "\t";
- Buffer2 += b->Ptext.at(a)->cfont+"\t";
- Buffer2 += QString::number(b->Ptext.at(a)->csize)+"\t";
- Buffer2 += b->Ptext.at(a)->ccolor+"\t";
- Buffer2 += QString::number(b->Ptext.at(a)->cextra)+"\t";
- Buffer2 += QString::number(b->Ptext.at(a)->cshade)+'\t';
- Buffer2 += QString::number(b->Ptext.at(a)->cstyle)+'\t';
- Buffer2 += QString::number(b->Ptext.at(a)->cab)+'\n';
- }
- }
- DeleteSel(b);
- b->Dirty = true;
- b->paintObj();
- }
- else
- {
- ScriXmlDoc *ss = new ScriXmlDoc();
- Buffer2 = ss->WriteElem(&doc->ActPage->SelItem, doc);
- doc->ActPage->DeleteItem();
- }
- slotDocCh();
- editMenu->setItemEnabled(edid3, 1);
- ClipB->setText(BufferI);
- BuFromApp = true;
- }
-}
-
-void ScribusApp::slotEditCopy()
-{
- uint a;
- NoFrameEdit();
- QString BufferI = "";
- if ((HaveDoc) && (doc->ActPage->SelItem.count() != 0))
- {
- Buffer2 = "<SCRIBUSTEXT>";
- PageItem *b = doc->ActPage->SelItem.at(0);
- if ((doc->AppMode == 7) && (b->HasSel))
- {
- Buffer2 += "";
- for (a = 0; a < b->Ptext.count(); ++a)
- {
- if (b->Ptext.at(a)->cselect)
- {
- if (b->Ptext.at(a)->ch == QChar(13))
- {
- Buffer2 += QChar(5);
- BufferI += QChar(10);
- }
- else
- {
- Buffer2 += b->Ptext.at(a)->ch;
- BufferI += b->Ptext.at(a)->ch;
- }
- Buffer2 += "\t";
- Buffer2 += b->Ptext.at(a)->cfont+"\t";
- Buffer2 += QString::number(b->Ptext.at(a)->csize)+"\t";
- Buffer2 += b->Ptext.at(a)->ccolor+"\t";
- Buffer2 += QString::number(b->Ptext.at(a)->cextra)+"\t";
- Buffer2 += QString::number(b->Ptext.at(a)->cshade)+'\t';
- Buffer2 += QString::number(b->Ptext.at(a)->cstyle)+'\t';
- Buffer2 += QString::number(b->Ptext.at(a)->cab)+'\n';
- }
- }
- }
- else
- {
- ScriXmlDoc *ss = new ScriXmlDoc();
- Buffer2 = ss->WriteElem(&doc->ActPage->SelItem, doc);
- delete ss;
- }
- editMenu->setItemEnabled(edid3, 1);
- ClipB->setText(BufferI);
- BuFromApp = true;
- }
-}
-
-void ScribusApp::slotEditPaste()
-{
- struct Pti *hg;
- NoFrameEdit();
- if (HaveDoc)
- {
- if (!BuFromApp)
- Buffer2 = ClipB->text();
- if (Buffer2.isNull())
- return;
- if (doc->AppMode == 7)
- {
- PageItem *b = doc->ActPage->SelItem.at(0);
- if (Buffer2.startsWith("<SCRIBUSTEXT>"))
- {
- Buffer2.remove(0, 13);
- QTextStream t(&Buffer2, IO_ReadOnly);
- QString cc;
- while (!t.atEnd())
- {
- cc = t.readLine();
- QStringList wt;
- QStringList::Iterator it;
- wt = QStringList::split("\t", cc);
- it = wt.begin();
- hg = new Pti;
- hg->ch = (*it);
- if (hg->ch == QChar(5))
- hg->ch = QChar(13);
- it++;
- hg->cfont = *it;
- it++;
- hg->csize = (*it).toInt();
- it++;
- hg->ccolor = *it;
- it++;
- hg->cextra = (*it).toInt();
- it++;
- hg->cshade = (*it).toInt();
- hg->cselect = false;
- it++;
- hg->cstyle = (*it).toInt();
- it++;
- hg->cab = (*it).toInt();
- b->Ptext.insert(b->CPos, hg);
- b->CPos += 1;
- hg->PRot = 0;
- hg->PtransX = 0;
- hg->PtransY = 0;
- }
- }
- else
- {
- Serializer *ss = new Serializer("");
- ss->Objekt = Buffer2;
- ss->GetText(b, doc->CurrentABStil, true);
- delete ss;
- if (doc->Trenner->AutoCheck)
- doc->Trenner->slotHyphenate(b);
- }
- if (b->CPos < static_cast<int>(b->Ptext.count())) { b->Dirty = true; }
- b->paintObj();
- }
- else
- {
- if (Buffer2.startsWith("<SCRIBUSELEM"))
- {
- doc->ActPage->Deselect(true);
- slotElemRead(Buffer2, 0, 0, false, true, doc);
- doc->ActPage->SelectItemNr(doc->ActPage->Items.count()-1);
- PageItem *b = doc->ActPage->SelItem.at(0);
- b->AnName = tr("Copy of")+" "+b->AnName;
- }
- }
- slotDocCh(false);
- }
-}
-
-void ScribusApp::SelectAll()
-{
- uint a;
- PageItem *b = doc->ActPage->SelItem.at(0);
- for (a = 0; a < b->Ptext.count(); ++a)
- {
- b->Ptext.at(a)->cselect = true;
- }
- b->HasSel = true;
- b->Dirty = true;
- b->paintObj();
- EnableTxEdit();
-}
-
-void ScribusApp::ClipChange()
-{
- QString cc;
- cc = ClipB->text();
- editMenu->setItemEnabled(edid3, 0);
- if (!cc.isNull())
- {
- BuFromApp = false;
- if (cc.startsWith("<SCRIBUSELEM"))
- {
- if (doc->AppMode != 7)
- editMenu->setItemEnabled(edid3, 1);
- }
- else
- {
- if (doc->AppMode == 7)
- editMenu->setItemEnabled(edid3, 1);
- }
- }
-}
-
-void ScribusApp::DeleteText()
-{
- PageItem *b = doc->ActPage->SelItem.at(0);
- DeleteSel(b);
- b->Dirty = true;
- b->paintObj();
- slotDocCh();
-}
-
-void ScribusApp::EnableTxEdit()
-{
- editMenu->setItemEnabled(edid1, 1);
- editMenu->setItemEnabled(edid2, 1);
- editMenu->setItemEnabled(edid4, 1);
-}
-
-void ScribusApp::DisableTxEdit()
-{
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid2, 0);
- editMenu->setItemEnabled(edid4, 0);
-}
-
-void ScribusApp::slotHelpAbout()
-{
- void *mo;
- char *error;
- typedef About* (*sdem)(QWidget *d);
- sdem demo;
- QString pfad = PREL;
- pfad += "/lib/scribus/libs/libabout.so";
- mo = dlopen(pfad, RTLD_LAZY);
- if (!mo)
- {
- std::cout << "Can't find Plugin" << endl;
- return;
- }
- dlerror();
- demo = (sdem)dlsym(mo, "Run");
- if ((error = dlerror()) != NULL)
- {
- std::cout << "Can't find Symbol" << endl;
- dlclose(mo);
- return;
- }
- About* dia = (*demo)(this);
- dia->exec();
- delete dia;
- dlclose(mo);
-}
-
-void ScribusApp::slotHelpAboutQt()
-{
- QMessageBox::aboutQt(this,tr("About Qt"));
-}
-
-void ScribusApp::slotOnlineHelp()
-{
- HelpBrowser *dia = new HelpBrowser(this, tr("Scribus Manual"));
- dia->show();
-}
-
-void ScribusApp::ToggleTips()
-{
- tipsOn = !tipsOn;
- helpMenu->setItemChecked(tip, tipsOn);
- QToolTip::setEnabled(tipsOn);
-}
-
-void ScribusApp::SaveText()
-{
- QString fn = CFileDialog(tr("Save as"), tr("Textfiles (*.txt);;All Files (*)"), "", false, false);
- if (!fn.isEmpty())
- {
- Serializer *se = new Serializer(fn);
- se->PutText(doc->ActPage->SelItem.at(0));
- se->Write();
- delete se;
- }
-}
-
-void ScribusApp::applyNewMaster(QString name)
-{
- Apply_Temp(name, doc->ActPage->PageNr);
-}
-
-void ScribusApp::slotNewPageP(int wo, QString templ)
-{
- NoFrameEdit();
- doc->ActPage->Deselect(true);
- doc->UnDoValid = false;
- CanUndo();
- slotNewPage(wo);
- applyNewMaster(templ);
- Sepal->RebuildPage();
-}
-
-/** Erzeugt eine neue Seite */
-void ScribusApp::slotNewPageM()
-{
- int wo, cc;
- NoFrameEdit();
- doc->ActPage->Deselect(true);
- InsPage *dia = new InsPage(this, view, doc->ActPage->PageNr, view->Pages.count(), doc->PageFP);
- if (dia->exec())
- {
- doc->UnDoValid = false;
- CanUndo();
- wo = dia->ActualPage->value();
- switch (dia->Where->currentItem())
- {
- case 0:
- wo -= 1;
- for (cc = 0; cc < dia->NumPages->value(); ++cc)
- {
- slotNewPage(wo);
- if (doc->PageFP)
- {
- if ((doc->ActPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
- applyNewMaster(dia->Based->currentText());
- if ((doc->ActPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
- applyNewMaster(dia->Based2->currentText());
- if ((doc->ActPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
- applyNewMaster(dia->Based2->currentText());
- if ((doc->ActPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
- applyNewMaster(dia->Based->currentText());
- }
- else
- applyNewMaster(dia->Based->currentText());
- wo ++;
- }
- break;
- case 1:
- for (cc = 0; cc < dia->NumPages->value(); ++cc)
- {
- slotNewPage(wo);
- if (doc->PageFP)
- {
- if ((doc->ActPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
- applyNewMaster(dia->Based->currentText());
- if ((doc->ActPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
- applyNewMaster(dia->Based2->currentText());
- if ((doc->ActPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
- applyNewMaster(dia->Based2->currentText());
- if ((doc->ActPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
- applyNewMaster(dia->Based->currentText());
- }
- else
- applyNewMaster(dia->Based->currentText());
- wo ++;
- }
- break;
- case 2:
- for (cc = 0; cc < dia->NumPages->value(); ++cc)
- {
- slotNewPage(view->Pages.count());
- if (doc->PageFP)
- {
- if ((doc->ActPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
- applyNewMaster(dia->Based->currentText());
- if ((doc->ActPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
- applyNewMaster(dia->Based2->currentText());
- if ((doc->ActPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
- applyNewMaster(dia->Based2->currentText());
- if ((doc->ActPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
- applyNewMaster(dia->Based->currentText());
- }
- else
- applyNewMaster(dia->Based->currentText());
- }
- break;
- }
- Sepal->RebuildPage();
- }
- delete dia;
-}
-
-void ScribusApp::slotNewPageT(int w)
-{
- if (doc->TemplateMode)
- slotNewPage(w);
-}
-
-void ScribusApp::slotNewPage(int w)
-{
- view->addPage(w);
- if (view->Pages.count() > 1)
- {
- pageMenu->setItemEnabled(pgmd, 1);
- pageMenu->setItemEnabled(pgmv, 1);
- }
- AdjustBM();
- connect(doc->ActPage, SIGNAL(Amode(int)), this, SLOT(setAppMode(int)));
- connect(doc->ActPage, SIGNAL(PaintingDone()), this, SLOT(slotSelect()));
- connect(doc->ActPage, SIGNAL(HaveSel(int)), this, SLOT(HaveNewSel(int)));
- connect(doc->ActPage, SIGNAL(DocChanged()), this, SLOT(slotDocCh()));
- connect(doc->ActPage, SIGNAL(ClipPo(float, float)), Npal, SLOT(SetXY(float, float)));
- connect(doc->ActPage, SIGNAL(HavePoint(bool, bool)), Npal, SLOT(HaveNode(bool, bool)));
- connect(doc->ActPage, SIGNAL(PolyOpen()), Npal, SLOT(IsOpen()));
- connect(doc->ActPage, SIGNAL(PStatus(int, uint)), Npal, SLOT(PolyStatus(int, uint)));
- connect(doc->ActPage, SIGNAL(MousePos(float, float)), this, SLOT(ReportMP(float, float)));
- connect(doc->ActPage, SIGNAL(ItemPos(float, float)), Mpal, SLOT(setXY(float, float)));
- connect(doc->ActPage, SIGNAL(ItemGeom(float, float)), Mpal, SLOT(setBH(float, float)));
- connect(doc->ActPage, SIGNAL(SetAngle(float)), Mpal, SLOT(setR(float)));
- connect(doc->ActPage, SIGNAL(ItemRadius(float)), Mpal, SLOT(setRR(float)));
- connect(doc->ActPage, SIGNAL(ItemTextAttr(float)), Mpal, SLOT(setLsp(float)));
- connect(doc->ActPage, SIGNAL(ItemTextSize(int)), Mpal, SLOT(setSize(int)));
- connect(doc->ActPage, SIGNAL(ItemTextUSval(float)), Mpal, SLOT(setExtra(float)));
- connect(doc->ActPage, SIGNAL(HaveSel(int)), Mpal, SLOT(NewSel(int)));
- connect(doc->ActPage, SIGNAL(SetLocalValues(float, float, float, float)), Mpal, SLOT(setLvalue(float, float, float, float)));
- connect(doc->ActPage, SIGNAL(SetSizeValue(float)), Mpal, SLOT(setSvalue(float)));
- connect(doc->ActPage, SIGNAL(ItemTextStil(int)), Mpal, SLOT(setStil(int)));
- connect(doc->ActPage, SIGNAL(ItemTextAbs(int)), Mpal, SLOT(setAli(int)));
- connect(doc->ActPage, SIGNAL(RotMode(int)), Mpal, SLOT(setRM(int)));
- connect(doc->ActPage, SIGNAL(SetLineArt(PenStyle, PenCapStyle, PenJoinStyle)), Mpal, SLOT( setLIvalue(PenStyle, PenCapStyle, PenJoinStyle)));
- connect(doc->ActPage, SIGNAL(ItemFarben(QString, QString, int, int)), this, SLOT(setCSMenu(QString, QString, int, int)));
- connect(doc->ActPage, SIGNAL(ItemFarben(QString, QString, int, int)), Mpal->Cpal, SLOT(setActFarben(QString, QString, int, int)));
- connect(doc->ActPage, SIGNAL(ItemGradient(QString, QString, int, int, int)), Mpal->Cpal, SLOT(setActGradient(QString, QString, int, int, int)));
- connect(doc->ActPage, SIGNAL(ItemTrans(float)), Mpal->Cpal, SLOT(setActTrans(float)));
- connect(doc->ActPage, SIGNAL(ItemTextFont(QString)), this, SLOT(AdjustFontMenu(QString)));
- connect(doc->ActPage, SIGNAL(ItemTextSize(int)), this, SLOT(setFSizeMenu(int)));
- connect(doc->ActPage, SIGNAL(ItemTextStil(int)), this, SLOT(setStilvalue(int)));
- connect(doc->ActPage, SIGNAL(ItemTextAbs(int)), this, SLOT(setAbsValue(int)));
- connect(doc->ActPage, SIGNAL(HasTextSel()), this, SLOT(EnableTxEdit()));
- connect(doc->ActPage, SIGNAL(HasNoTextSel()), this, SLOT(DisableTxEdit()));
- connect(doc->ActPage, SIGNAL(CopyItem()), this, SLOT(slotEditCopy()));
- connect(doc->ActPage, SIGNAL(CutItem()), this, SLOT(slotEditCut()));
- connect(doc->ActPage, SIGNAL(LoadPic()), this, SLOT(slotFileOpen()));
- connect(doc->ActPage, SIGNAL(ModifyIt()), this, SLOT(ModifyObject()));
- connect(doc->ActPage, SIGNAL(AnnotProps()), this, SLOT(ModifyAnnot()));
- connect(doc->ActPage, SIGNAL(ToScrap(QString)), this, SLOT(PutScrap(QString)));
- connect(doc->ActPage, SIGNAL(UndoAvail()), this, SLOT(CanUndo()));
- connect(doc->ActPage, SIGNAL(EditGuides()), this, SLOT(ManageGuides()));
- connect(doc->ActPage, SIGNAL(LoadElem(QString, int ,int, bool, bool, ScribusDoc *)), this, SLOT(slotElemRead(QString, int, int, bool, bool, ScribusDoc *)));
- connect(doc->ActPage, SIGNAL(AddBM(PageItem *)), this, SLOT(AddBookMark(PageItem *)));
- connect(doc->ActPage, SIGNAL(DelBM(PageItem *)), this, SLOT(DelBookMark(PageItem *)));
- connect(doc->ActPage, SIGNAL(ChBMText(PageItem *)), this, SLOT(BookMarkTxT(PageItem *)));
- connect(doc->ActPage, SIGNAL(NewBMNr(int, int)), BookPal->BView, SLOT(ChangeItem(int, int)));
- slotDocCh(!doc->loading);
-}
-
-/** Ansicht absolut zoomen */
-void ScribusApp::slotZoomAbs(float z)
-{
- doc->Scale = z;
- view->slotDoZoom();
-}
-
-void ScribusApp::slotZoomFit()
-{
- float dx = (view->width()-50) / (doc->PageB+30);
- float dy = (view->height()-70) / (doc->PageH+30);
- if (dx > dy)
- {
- slotZoomAbs(dy);
- }
- else
- {
- slotZoomAbs(dx);
- }
-}
-
-/** Ansicht 20 % */
-void ScribusApp::slotZoom20()
-{
- slotZoomAbs(0.2);
-}
-
-/** Ansicht 50 % */
-void ScribusApp::slotZoom50()
-{
- slotZoomAbs(0.5);
-}
-
-/** Ansicht 75 % */
-void ScribusApp::slotZoom75()
-{
- slotZoomAbs(0.75);
-}
-
-/** Ansicht 100 % */
-void ScribusApp::slotZoom100()
-{
- slotZoomAbs(1.0);
-}
-
-/** Ansicht 200 % */
-void ScribusApp::slotZoom200()
-{
- slotZoomAbs(2.0);
-}
-
-void ScribusApp::ToggleMarks()
-{
- if (doc->Marks)
- {
- doc->Marks = false;
- viewMenu->changeItem(Markers, tr("Show Margins"));
- }
- else
- {
- doc->Marks = true;
- viewMenu->changeItem(Markers, tr("Hide Margins"));
- }
- view->DrawNew();
-}
-
-void ScribusApp::ToggleFrames()
-{
- if (doc->ShFrames)
- {
- doc->ShFrames = false;
- viewMenu->changeItem(FrameDr, tr("Show Frames"));
- }
- else
- {
- doc->ShFrames = true;
- viewMenu->changeItem(FrameDr, tr("Hide Frames"));
- }
- view->DrawNew();
-}
-
-void ScribusApp::ToggleMpal()
-{
- if (Mpal->isVisible())
- {
- Prefs.Mpalx = Mpal->pos().x();
- Prefs.Mpaly = Mpal->pos().y();
- Mpal->hide();
- toolMenu->changeItem(viewMpal, tr("Show Measurements"));
- }
- else
- {
- Mpal->show();
- Mpal->TabStack->raiseWidget(0);
- toolMenu->changeItem(viewMpal, tr("Hide Measurements"));
- }
-}
-
-void ScribusApp::ToggleTpal()
-{
- if (Tpal->isVisible())
- {
- Prefs.Tpalx = Tpal->pos().x();
- Prefs.Tpaly = Tpal->pos().y();
- Tpal->close();
- toolMenu->changeItem(viewTpal, tr("Show Outline"));
- }
- else
- {
- if (HaveDoc)
- Tpal->BuildTree(view);
- Tpal->show();
- toolMenu->changeItem(viewTpal, tr("Hide Outline"));
- }
-}
-
-void ScribusApp::ToggleBpal()
-{
- if (ScBook->isVisible())
- {
- Prefs.SCpalx = ScBook->pos().x();
- Prefs.SCpaly = ScBook->pos().y();
- Prefs.SCpalw = ScBook->size().width();
- Prefs.SCpalh = ScBook->size().height();
- ScBook->close();
- toolMenu->changeItem(viewBpal, tr("Show Scrapbook"));
- }
- else
- {
- ScBook->show();
- toolMenu->changeItem(viewBpal, tr("Hide Scrapbook"));
- }
-}
-
-void ScribusApp::ToggleLpal()
-{
- if (Lpal->isVisible())
- {
- Prefs.Lpalx = Lpal->pos().x();
- Prefs.Lpaly = Lpal->pos().y();
- Lpal->close();
- toolMenu->changeItem(viewLpal, tr("Show Layers"));
- }
- else
- {
- if (HaveDoc)
- Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
- Lpal->show();
- toolMenu->changeItem(viewLpal, tr("Hide Layers"));
- }
-}
-
-void ScribusApp::ToggleSepal()
-{
- if (Sepal->isVisible())
- {
- Prefs.Sepalx = Sepal->pos().x();
- Prefs.Sepaly = Sepal->pos().y();
- Prefs.SepalT = Sepal->TemplList->Thumb;
- Prefs.SepalN = Sepal->PageView->Namen;
- Sepal->close();
- toolMenu->changeItem(viewSepal, tr("Show Page Palette"));
- }
- else
- {
- Sepal->show();
- toolMenu->changeItem(viewSepal, tr("Hide Page Palette"));
- }
-}
-
-void ScribusApp::ToggleBookpal()
-{
- if (BookPal->isVisible())
- {
- Prefs.Bopalx = BookPal->pos().x();
- Prefs.Bopaly = BookPal->pos().y();
- BookPal->hide();
- toolMenu->changeItem(viewBopal, tr("Show Bookmarks"));
- }
- else
- {
- BookPal->show();
- toolMenu->changeItem(viewBopal, tr("Hide Bookmarks"));
- }
-}
-
-void ScribusApp::ToggleTools()
-{
- if (WerkTools->Sichtbar)
- {
- WerkTools->hide();
- WerkTools->Sichtbar = false;
- toolMenu->changeItem(viewTools, tr("Show Tools"));
- }
- else
- {
- WerkTools->show();
- WerkTools->Sichtbar = true;
- toolMenu->changeItem(viewTools, tr("Hide Tools"));
- }
-}
-
-void ScribusApp::TogglePics()
-{
- uint a, b;
- if (doc->ShowPic)
- {
- viewMenu->changeItem(Bilder, tr("Show Images"));
- doc->ShowPic = false;
- }
- else
- {
- viewMenu->changeItem(Bilder, tr("Hide Images"));
- doc->ShowPic = true;
- }
- for (a=0; a<view->Pages.count(); ++a)
- {
- for (b=0; b<view->Pages.at(a)->Items.count(); ++b)
- {
- if (view->Pages.at(a)->Items.at(b)->PType == 2)
- {
- view->Pages.at(a)->Items.at(b)->PicArt = doc->ShowPic;
- }
- }
- view->Pages.at(a)->update();
- }
-}
-
-void ScribusApp::ToggleRaster()
-{
- uint a;
- if (doc->Raster)
- {
- viewMenu->changeItem(Ras, tr("Show Grid"));
- doc->Raster = false;
- }
- else
- {
- viewMenu->changeItem(Ras, tr("Hide Grid"));
- doc->Raster = true;
- }
- for (a=0; a<view->Pages.count(); ++a)
- {
- view->Pages.at(a)->update();
- }
-}
-
-void ScribusApp::ToggleURaster()
-{
- doc->useRaster = !doc->useRaster;
- viewMenu->setItemChecked(uRas, doc->useRaster);
-}
-
-void ScribusApp::ToggleGuides()
-{
- uint a;
- if (doc->Guides)
- {
- viewMenu->changeItem(Guide, tr("Show Guides"));
- doc->Guides = false;
- }
- else
- {
- viewMenu->changeItem(Guide, tr("Hide Guides"));
- doc->Guides = true;
- }
- for (a=0; a<view->Pages.count(); ++a)
- {
- view->Pages.at(a)->update();
- }
-}
-
-void ScribusApp::ToggleUGuides()
-{
- doc->SnapGuides = !doc->SnapGuides;
- viewMenu->setItemChecked(uGuide, doc->SnapGuides);
-}
-
-void ScribusApp::ToggleFrameEdit()
-{
- if (doc->EditClip)
- {
- NoFrameEdit();
- }
- else
- {
- Npal->setDoc(doc);
- Npal->MoveN();
- Npal->HaveNode(false, false);
- Npal->MoveNode->setOn(true);
- Npal->show();
- doc->EditClipMode = 0;
- doc->EditClip = true;
- WerkTools->Select->setEnabled(false);
- WerkTools->Rotiere->setEnabled(false);
- WerkTools->Textedit->setEnabled(false);
- WerkTools->Zoom->setEnabled(false);
- WerkTools->Texte->setEnabled(false);
- WerkTools->BildB->setEnabled(false);
- WerkTools->Rechteck->setEnabled(false);
- WerkTools->Kreis->setEnabled(false);
- WerkTools->Linien->setEnabled(false);
- WerkTools->Polygon->setEnabled(false);
- WerkTools->PolyLin->setEnabled(false);
- WerkTools->KetteEin->setEnabled(false);
- WerkTools->KetteAus->setEnabled(false);
- WerkTools->PDFTool->setEnabled(false);
- WerkTools->PDFaTool->setEnabled(false);
- ObjMenu->setItemEnabled(Loesch, false);
- if (doc->ActPage->SelItem.count() != 0)
- {
- doc->ActPage->MarkClip(doc->ActPage->SelItem.at(0));
- Npal->PolyStatus(doc->ActPage->SelItem.at(0)->PType, doc->ActPage->SelItem.at(0)->PoLine.size());
- }
- }
- ShapeMenu->setItemChecked(ShapeEdit, doc->EditClip);
-}
-
-void ScribusApp::NoFrameEdit()
-{
- Prefs.Npalx = Npal->pos().x();
- Prefs.Npaly = Npal->pos().y();
- Npal->hide();
- WerkTools->Select->setEnabled(true);
- WerkTools->Select->setOn(true);
- WerkTools->Zoom->setEnabled(true);
- WerkTools->Texte->setEnabled(true);
- WerkTools->BildB->setEnabled(true);
- WerkTools->Rechteck->setEnabled(true);
- WerkTools->Kreis->setEnabled(true);
- WerkTools->Linien->setEnabled(true);
- WerkTools->Polygon->setEnabled(true);
- WerkTools->PolyLin->setEnabled(true);
- WerkTools->PDFTool->setEnabled(true);
- WerkTools->PDFaTool->setEnabled(true);
- WerkTools->Textedit->setOn(false);
- ObjMenu->setItemEnabled(Loesch, true);
- ShapeMenu->setItemChecked(ShapeEdit, false);
- if (HaveDoc)
- {
- doc->EditClip = false;
- if (doc->ActPage->SelItem.count() != 0)
- {
- HaveNewSel(doc->ActPage->SelItem.at(0)->PType);
- doc->ActPage->RefreshItem(doc->ActPage->SelItem.at(0));
- }
- else
- HaveNewSel(-1);
- }
-}
-
-void ScribusApp::slotSelect()
-{
- WerkTools->Select->setOn(true);
- WerkTools->Rotiere->setOn(false);
- WerkTools->Textedit->setOn(false);
- WerkTools->Zoom->setOn(false);
- WerkTools->Texte->setOn(false);
- WerkTools->BildB->setOn(false);
- WerkTools->Rechteck->setOn(false);
- WerkTools->Kreis->setOn(false);
- WerkTools->Linien->setOn(false);
- WerkTools->Polygon->setOn(false);
- WerkTools->PolyLin->setOn(false);
- WerkTools->KetteEin->setOn(false);
- WerkTools->KetteAus->setOn(false);
- WerkTools->PDFTool->setOn(false);
- WerkTools->PDFaTool->setOn(false);
- setAppMode(1);
-}
-
-void ScribusApp::ModeFromTB(int m)
-{
- if (m == 10)
- doc->ElemToLink = doc->ActPage->SelItem.at(0);
- if (doc->AppMode == 13)
- return;
- setAppMode(m);
-}
-
-void ScribusApp::setAppMode(int mode)
-{
- PageItem *b;
- setActiveWindow();
- if (HaveDoc)
- {
- if (doc->ActPage->SelItem.count() != 0)
- b = doc->ActPage->SelItem.at(0);
- else
- b = 0;
- int oldMode = doc->AppMode;
- doc->AppMode = mode;
- if (oldMode == 7)
- {
- disconnect(CurTimer, SIGNAL(timeout()), doc->ActPage, SLOT(BlinkCurs()));
- CurTimer->stop();
- delete CurTimer;
- menuBar()->setItemEnabled(Obm, 1);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 0);
- doc->ActPage->slotDoCurs(false);
- if (b != 0)
- doc->ActPage->RefreshItem(b);
- }
- if (mode == 7)
- {
- if (b != 0)
- {
- if ((b->PType == 6) || (b->PType == 7) || (b->PType == 8))
- {
- doc->AppMode = 1;
- ToggleFrameEdit();
- return;
- }
- }
- WerkTools->Select->setOn(false);
- WerkTools->Textedit->setOn(true);
- doc->ActPage->slotDoCurs(true);
- menuBar()->setItemEnabled(Obm, 0);
- CurTimer = new QTimer(doc->ActPage);
- connect(CurTimer, SIGNAL(timeout()), doc->ActPage, SLOT(BlinkCurs()));
- CurTimer->start(500);
- if (b != 0)
- {
- if (b->HasSel)
- {
- editMenu->setItemEnabled(edid1, 1);
- editMenu->setItemEnabled(edid2, 1);
- editMenu->setItemEnabled(edid4, 1);
- editMenu->setItemEnabled(edid5, 1);
- }
- else
- {
- editMenu->setItemEnabled(edid1, 0);
- editMenu->setItemEnabled(edid2, 0);
- editMenu->setItemEnabled(edid4, 0);
- editMenu->setItemEnabled(edid5, 1);
- }
- doc->ActPage->RefreshItem(b);
- }
- }
- if (mode == 13)
- {
- if (doc->ActPage->SelItem.count() != 0)
- doc->ActPage->Deselect(true);
- }
- if (mode == 6)
- qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true);
- else
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
- }
-}
-
-void ScribusApp::Aktiv()
-{
- setActiveWindow();
- raise();
-}
-
-void ScribusApp::setItemTypeStyle(int id)
-{
- int a = TypeStyleMenu->indexOf(id);
- int b = 0;
- switch (a)
- {
- case 0:
- b = 4;
- break;
- case 1:
- b = 8;
- break;
- case 2:
- b = 16;
- break;
- case 3:
- b = 64;
- break;
- case 4:
- b = 1;
- break;
- case 5:
- b = 2;
- break;
- }
- setItemHoch(b);
-}
-
-void ScribusApp::setStilvalue(int s)
-{
- uint a;
- doc->CurrentStyle = s;
- for (a = 0; a < TypeStyleMenu->count(); ++a)
- {
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(a), false);
- }
- if (s & 4)
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(0), true);
- if (s & 8)
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(1), true);
- if (s & 16)
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(2), true);
- if (s & 64)
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(3), true);
- if (s & 1)
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(4), true);
- if (s & 2)
- TypeStyleMenu->setItemChecked(TypeStyleMenu->idAt(5), true);
- emit TextStil(s);
-}
-
-void ScribusApp::setItemHoch(int h)
-{
- if (doc->ActPage->SelItem.count() != 0)
- {
- setActiveWindow();
- if (h == 0)
- doc->CurrentStyle = 0;
- else
- {
- doc->CurrentStyle = doc->CurrentStyle ^ h;
- if ((h == 1) && (doc->CurrentStyle & 2))
- doc->CurrentStyle = doc->CurrentStyle & ~2;
- if ((h == 2) && (doc->CurrentStyle & 1))
- doc->CurrentStyle = doc->CurrentStyle & ~1;
- }
- setStilvalue(doc->CurrentStyle);
- doc->ActPage->chTyStyle(h);
- slotDocCh();
- }
-}
-
-void ScribusApp::AdjustBM()
-{
- for (uint a = 0; a < view->Pages.count(); ++a)
- {
- for (uint b = 0; b < view->Pages.at(a)->Items.count(); ++b)
- {
- PageItem* bb = view->Pages.at(a)->Items.at(b);
- if (bb->isBookmark)
- {
- int it = bb->BMnr;
- QListViewItemIterator itn(BookPal->BView);
- for ( ; itn.current(); ++itn)
- {
- BookMItem *ite = (BookMItem*)itn.current();
- if (ite->ItemNr == it)
- {
- ite->Seite = a;
- break;
- }
- }
- }
- }
- }
- StoreBookmarks();
-}
-
-void ScribusApp::DeletePage2(int pg)
-{
- NoFrameEdit();
- if (view->Pages.count() == 1)
- return;
- for (uint d = 0; d < view->Pages.at(pg)->Items.count(); ++d)
- {
- if (view->Pages.at(pg)->Items.at(d)->isBookmark)
- DelBookMark(view->Pages.at(pg)->Items.at(d));
- }
- view->delPage(pg);
- AdjustBM();
- view->reformPages();
- if (view->Pages.count() == 1)
- {
- pageMenu->setItemEnabled(pgmd, 0);
- pageMenu->setItemEnabled(pgmv, 0);
- }
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- Sepal->RebuildPage();
-}
-
-void ScribusApp::DeletePage()
-{
- int a, pg;
- NoFrameEdit();
- DelPages *dia = new DelPages(this, doc->ActPage->PageNr+1, view->Pages.count());
- if (dia->exec())
- {
- pg = dia->FromPage->value()-1;
- for (a = pg; a < dia->ToPage->value(); ++a)
- {
- for (uint d = 0; d < view->Pages.at(pg)->Items.count(); ++d)
- {
- if (view->Pages.at(pg)->Items.at(d)->isBookmark)
- DelBookMark(view->Pages.at(pg)->Items.at(d));
- }
- view->delPage(pg);
- AdjustBM();
- }
- view->reformPages();
- if (view->Pages.count() == 1)
- {
- pageMenu->setItemEnabled(pgmd, 0);
- pageMenu->setItemEnabled(pgmv, 0);
- }
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- Sepal->RebuildPage();
- }
- delete dia;
-}
-
-void ScribusApp::MovePage()
-{
- NoFrameEdit();
- MovePages *dia = new MovePages(this, doc->ActPage->PageNr+1, view->Pages.count(), true);
- if (dia->exec())
- {
- int from = dia->FromPage->value();
- int to = dia->ToPage->value();
- int wie = dia->Where->currentItem();
- int wo = dia->ActualPage->value();
- if (from != wo)
- view->movePage(from-1, to, wo-1, wie);
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- AdjustBM();
- Sepal->RebuildPage();
- }
- delete dia;
-}
-
-void ScribusApp::CopyPage()
-{
- NoFrameEdit();
- MovePages *dia = new MovePages(this, doc->ActPage->PageNr+1, view->Pages.count(), false);
- if (dia->exec())
- {
- Page* from = view->Pages.at(dia->FromPage->value()-1);
- int wo = dia->ActualPage->value();
- switch (dia->Where->currentItem())
- {
- case 0:
- slotNewPage(wo-1);
- break;
- case 1:
- slotNewPage(wo);
- break;
- case 2:
- slotNewPage(view->Pages.count());
- break;
- }
- Page* Ziel = doc->ActPage;
- for (uint ite = 0; ite < from->Items.count(); ++ite)
- {
- from->Items.at(ite)->CopyIt(&Buffer);
- Ziel->PasteItem(&Buffer, true);
- if (from->Items.at(ite)->isBookmark)
- AddBookMark(Ziel->Items.at(Ziel->Items.count()-1));
- }
- Ziel->MPageNam = from->MPageNam;
- Ziel->Deselect(true);
- view->DrawNew();
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- Sepal->RebuildPage();
- AdjustBM();
- }
- delete dia;
-}
-
-void ScribusApp::setItemFont(int id)
-{
- QString nf;
- nf = *FontID[long(id)];
- SetNewFont(nf);
-}
-
-void ScribusApp::SetNewFont(QString nf)
-{
- Aktiv();
- int a;
- if (!doc->UsedFonts.contains(nf))
- {
- doc->AddFont(nf, Prefs.AvailFonts[nf]->Font);
- a = FontMenu->insertItem(new FmItem(nf, Prefs.AvailFonts[nf]->Font));
- FontID.insert(static_cast<long>(a), &Prefs.AvailFonts[nf]->SCName);
- }
- AdjustFontMenu(nf);
- doc->ActPage->ItemFont(nf);
- slotDocCh();
-}
-
-void ScribusApp::AdjustFontMenu(QString nf)
-{
- uint a;
- QString df;
- Mpal->Fonts->setText(nf);
- for (a = 2; a < FontMenu->count(); ++a)
- {
- df = *FontID[long(FontMenu->idAt(a))];
- if (df == nf)
- FontMenu->setItemChecked(FontMenu->idAt(a), true);
- else
- FontMenu->setItemChecked(FontMenu->idAt(a), false);
- }
-}
-
-void ScribusApp::setItemFSize(int id)
-{
- int c = SizeTMenu->indexOf(id);
- bool ok = false;
- if (c > 0)
- doc->ActPage->chFSize(SizeTMenu->text(id).left(2).toInt());
- else
- {
- Query* dia = new Query(this, "New", 1, 0, "Size:", "Size");
- if (dia->exec())
- {
- c = dia->Answer->text().toInt(&ok);
- if ((ok) && (c < 513) && (c > 0))
- doc->ActPage->chFSize(c);
- delete dia;
- }
- }
- slotDocCh();
-}
-
-void ScribusApp::setFSizeMenu(int size)
-{
- uint a;
- for (a = 0; a < SizeTMenu->count(); ++a)
- {
- SizeTMenu->setItemChecked(SizeTMenu->idAt(a), false);
- if (SizeTMenu->text(SizeTMenu->idAt(a)).left(2).toInt() == size)
- {
- SizeTMenu->setItemChecked(SizeTMenu->idAt(a), true);
- }
- }
-}
-
-void ScribusApp::setItemFarbe(int id)
-{
- uint a;
- for (a = 0; a < ColorMenu->count(); ++a)
- {
- ColorMenu->setItemChecked(ColorMenu->idAt(a), false);
- }
- ColorMenu->setItemChecked(id, true);
- doc->ActPage->ItemBrush(ColorMenu->text(id), true);
- slotDocCh();
-}
-
-void ScribusApp::setItemShade(int id)
-{
- int c = ShadeMenu->indexOf(id);
- uint a;
- bool ok = false;
- for (a = 0; a < ShadeMenu->count(); ++a)
- {
- ShadeMenu->setItemChecked(ShadeMenu->idAt(a), false);
- }
- ShadeMenu->setItemChecked(id, true);
- if (c > 0)
- {
- doc->ActPage->ItemBrushShade((c-1) * 10, true);
- }
- else
- {
- Query* dia = new Query(this, "New", 1, 0, "Shade:", "Shade");
- if (dia->exec())
- {
- c = dia->Answer->text().toInt(&ok);
- if (ok)
- {
- doc->ActPage->ItemBrushShade(c);
- }
- delete dia;
- }
- }
- slotDocCh();
-}
-
-void ScribusApp::setCSMenu(QString k, QString l, int lk , int ls)
-{
- uint a;
- QString la;
- int lb;
- if (doc->ActPage->SelItem.count() != 0)
- {
- if (doc->ActPage->SelItem.at(0)->PType == 4)
- {
- la = k;
- lb = lk;
- }
- else
- {
- la = l;
- lb = ls;
- }
- }
- else
- {
- la = l;
- lb = ls;
- }
- if (la == "None")
- la = tr("None");
- for (a = 0; a < ColorMenu->count(); ++a)
- {
- ColorMenu->setItemChecked(ColorMenu->idAt(a), false);
- if (ColorMenu->text(ColorMenu->idAt(a)) == la)
- ColorMenu->setItemChecked(ColorMenu->idAt(a), true);
- }
- for (a = 0; a < ShadeMenu->count(); ++a)
- {
- ShadeMenu->setItemChecked(ShadeMenu->idAt(a), false);
- }
- ShadeMenu->setItemChecked(ShadeMenu->idAt(lb/10+1), true);
-}
-
-void ScribusApp::slotEditStyles()
-{
- QValueList<uint> ers;
- QString nn;
- bool ff;
- uint nr;
- ers.clear();
- if (HaveDoc)
- {
- StilFormate *dia = new StilFormate(this, doc, &Prefs.AvailFonts);
- if (dia->exec())
- {
- for (uint a=0; a<doc->Vorlagen.count(); ++a)
- {
- ff = false;
- nn = doc->Vorlagen[a].Vname;
- for (uint b=0; b<dia->TempVorl.count(); ++b)
- {
- if (nn == dia->TempVorl[b].Vname)
- {
- nr = b;
- ff = true;
- break;
- }
- }
- if (ff)
- ers.append(nr);
- else
- ers.append(0);
- }
- doc->Vorlagen = dia->TempVorl;
- for (uint c=0; c<view->Pages.count(); ++c)
- {
- for (uint d=0; d<view->Pages.at(c)->Items.count(); ++d)
- {
- if (view->Pages.at(c)->Items.at(d)->PType == 4)
- {
- for (uint e=0; e<view->Pages.at(c)->Items.at(d)->Ptext.count(); ++e)
- {
- if (view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab > 4)
- view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab = ers[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab];
- if (doc->Vorlagen[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font != "")
- {
- view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cfont = doc->Vorlagen[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font;
- view->Pages.at(c)->Items.at(d)->Ptext.at(e)->csize = doc->Vorlagen[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab].FontSize;
- }
- }
- }
- }
- }
- for (uint a=0; a<doc->Vorlagen.count(); ++a)
- {
- if (doc->Vorlagen[a].Font != "")
- SetNewFont(doc->Vorlagen[a].Font);
- }
- Mpal->Spal->updateFList();
- view->DrawNew();
- slotDocCh();
- }
- delete dia;
- }
-}
-
-void ScribusApp::setItemTextAli(int id)
-{
- int a = AliMenu->indexOf(id);
- setNewAbStyle(a);
-}
-
-void ScribusApp::setNewAbStyle(int a)
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->SetAbStyle(a);
- doc->CurrentABStil = a;
- Mpal->setAli(a);
- slotDocCh();
- }
-}
-
-void ScribusApp::setAbsValue(int a)
-{
- doc->CurrentABStil = a;
- Mpal->setAli(a);
- for (int b = 0; b < 5; ++b)
- {
- AliMenu->setItemChecked(AliMenu->idAt(b), false);
- }
- if (a < 5)
- {
- Mpal->Spal->setCurrentItem(0);
- AliMenu->setItemChecked(AliMenu->idAt(a), true);
- }
- else
- Mpal->Spal->setCurrentItem(a-4);
-}
-
-void ScribusApp::slotEditColors()
-{
- int a;
- uint b, c, d;
- CListe edc;
- QMap<QString,QString> ers;
- if (HaveDoc)
- {
- edc = doc->PageColors;
- }
- else
- {
- edc = Prefs.DColors;
- }
- Farbmanager* dia = new Farbmanager(this, edc);
- if (dia->exec())
- {
- if (HaveDoc)
- {
- slotDocCh();
- doc->PageColors = dia->EditColors;
- Mpal->Cpal->SetColors(doc->PageColors);
- CListe::Iterator it;
- ColorMenu->clear();
- QPixmap pm = QPixmap(15, 15);
- a = 0;
- ColorMenu->insertItem(tr("None"));
- for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
- {
- pm.fill(doc->PageColors[it.key()].getRGBColor());
- ColorMenu->insertItem(QIconSet(pm), it.key());
- if (it.key() == doc->Dbrush)
- {
- ColorMenu->setItemChecked(ColorMenu->idAt(a), true);
- }
- a++;
- }
- ers = dia->Ersatzliste;
- if (!ers.isEmpty())
- {
- for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
- {
- ers.remove(it.key());
- }
- if (!ers.isEmpty())
- {
- QMap<QString,QString>::Iterator it;
- for (it = ers.begin(); it != ers.end(); ++it)
- {
- for (b=0; b<view->Pages.count(); ++b)
- {
- for (c=0; c<view->Pages.at(b)->Items.count(); ++c)
- {
- if (view->Pages.at(b)->Items.at(c)->PType == 4)
- {
- for (d=0; d<view->Pages.at(b)->Items.at(c)->Ptext.count(); ++d)
- {
- if (it.key() == view->Pages.at(b)->Items.at(c)->Ptext.at(d)->ccolor)
- {
- view->Pages.at(b)->Items.at(c)->Ptext.at(d)->ccolor = it.data();
- }
- }
- }
- if (it.key() == view->Pages.at(b)->Items.at(c)->Pcolor)
- {
- view->Pages.at(b)->Items.at(c)->Pcolor = it.data();
- }
- if (it.key() == view->Pages.at(b)->Items.at(c)->Pcolor2)
- {
- view->Pages.at(b)->Items.at(c)->Pcolor2 = it.data();
- }
- }
- }
- }
- }
- }
- view->DrawNew();
- }
- else
- {
- Prefs.DColors = dia->EditColors;
- Mpal->Cpal->SetColors(Prefs.DColors);
- }
- }
- delete dia;
-}
-
-void ScribusApp::setPenFarbe(QString farbe)
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->ItemPen(farbe);
- slotDocCh();
- }
-}
-
-void ScribusApp::setPenShade(int sh)
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->ItemPenShade(sh);
- slotDocCh();
- }
-}
-
-void ScribusApp::setBrushFarbe(QString farbe)
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->ItemBrush(farbe);
- slotDocCh();
- }
-}
-
-void ScribusApp::setBrushShade(int sh)
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->ItemBrushShade(sh);
- slotDocCh();
- }
-}
-
-void ScribusApp::setGradFill(int typ, QString col1, int sh1, QString col2, int sh2)
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->ItemGradFill(typ, col1, sh1, col2, sh2);
- slotDocCh();
- }
-}
-
-void ScribusApp::GetBrushPen()
-{
- setActiveWindow();
- if (HaveDoc)
- {
- doc->ActPage->QueryFarben();
- slotDocCh();
- }
-}
-
-void ScribusApp::RectFrame()
-{
- doc->ActPage->SetFrameRect();
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::RoundedFrame()
-{
- doc->ActPage->SetFrameRounded();
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::OvalFrame()
-{
- doc->ActPage->SetFrameOval();
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::DeleteObjekt()
-{
- if (!doc->EditClip)
- doc->ActPage->DeleteItem();
-}
-
-void ScribusApp::Objekt2Back()
-{
- doc->ActPage->ToBack();
-}
-
-void ScribusApp::Objekt2Front()
-{
- doc->ActPage->ToFront();
-}
-
-void ScribusApp::ObjektRaise()
-{
- doc->ActPage->RaiseItem();
-}
-
-void ScribusApp::ObjektLower()
-{
- doc->ActPage->LowerItem();
-}
-
-void ScribusApp::ObjektDup()
-{
- slotEditCopy();
- doc->ActPage->Deselect(true);
- slotEditPaste();
- for (uint b=0; b<doc->ActPage->SelItem.count(); ++b)
- {
- doc->ActPage->SelItem.at(b)->Locked = false;
- doc->ActPage->MoveItem(DispX, DispY, doc->ActPage->SelItem.at(b));
- }
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::ObjektDupM()
-{
- NoFrameEdit();
- Mdup *dia = new Mdup(this, DispX * UmReFaktor, DispY * UmReFaktor, doc->Einheit);
- if (dia->exec())
- {
- int anz = dia->Ncopies->value();
- float dH = static_cast<float>(dia->ShiftH->value()) / UmReFaktor / 100.0;
- float dV = static_cast<float>(dia->ShiftV->value()) / UmReFaktor / 100.0;
- int a;
- if (anz>0)
- {
- for (a=0; a<anz; ++a)
- {
- slotEditCopy();
- doc->ActPage->Deselect(true);
- slotEditPaste();
- for (uint b=0; b<doc->ActPage->SelItem.count(); ++b)
- {
- doc->ActPage->SelItem.at(b)->Locked = false;
- doc->ActPage->MoveItem(dH, dV, doc->ActPage->SelItem.at(b));
- }
- DispX = dH;
- DispY = dV;
- }
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- }
- }
- delete dia;
-}
-
-void ScribusApp::SelectFromOutl(int Page, int Item)
-{
- NoFrameEdit();
- setActiveWindow();
- doc->ActPage->Deselect(true);
- view->GotoPage(Page);
- doc->ActPage->SelectItemNr(Item);
-}
-
-void ScribusApp::SelectFromOutlS(int Page)
-{
- NoFrameEdit();
- setActiveWindow();
- doc->ActPage->Deselect(true);
- view->GotoPage(Page);
-}
-
-void ScribusApp::InfoDoc()
-{
- DocInfos *dia = new DocInfos(this, doc->DocAutor, doc->DocTitel, doc->DocComments);
- if (dia->exec())
- {
- doc->DocAutor = dia->AutorInfo->text();
- doc->DocTitel = dia->TitelInfo->text();
- doc->DocComments = dia->MultiLineEdit1->text();
- slotDocCh();
- }
- delete dia;
-}
-
-void ScribusApp::ObjektAlign()
-{
- float xdp, ydp;
- bool xa, ya, Vth, Vtv;
- int xart, yart, ein;
- if (HaveDoc)
- ein = doc->Einheit;
- else
- ein = Prefs.Einheit;
- NoFrameEdit();
- Align *dia = new Align(this, doc->ActPage->SelItem.count(), ein);
- connect(dia, SIGNAL(ApplyDist(bool, bool, bool, bool, float, float, int, int)),
- this, SLOT(DoAlign(bool, bool, bool, bool, float, float, int, int)));
- if (dia->exec())
- {
- xdp = float(dia->AHor->value()) / UmReFaktor / 100.0;
- xa = (dia->CheckH->isChecked() || dia->VerteilenH->isChecked());
- ydp = float(dia->AVert->value()) / UmReFaktor/ 100.0;
- ya = (dia->CheckV->isChecked() || dia->VerteilenV->isChecked());
- xart = dia->VartH->currentItem();
- yart = dia->VartV->currentItem();
- Vth = dia->VerteilenH->isChecked();
- Vtv = dia->VerteilenV->isChecked();
- doc->ActPage->AlignObj(xa, ya, Vth, Vtv, xdp, ydp, xart, yart);
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- }
- delete dia;
-}
-
-void ScribusApp::DoAlign(bool xa, bool ya, bool Vth, bool Vtv, float xdp, float ydp, int xart, int yart)
-{
- doc->ActPage->AlignObj(xa, ya, Vth, Vtv, xdp, ydp, xart, yart);
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::BuildFontMenu()
-{
- QPopupMenu *pm;
- FontID.clear();
- FontMenu->clear();
- FStyleMenu->clear();
- int a;
- QString b = " ";
- QMap<QString,QStrList> Fami;
- SCFontsIterator it(Prefs.AvailFonts);
- for ( ; it.current(); ++it)
- {
- QString family,style;
- if (it.current()->UseFont)
- {
- QString &fn=it.current()->SCName;
- int pos=fn.find(" ");
- family=fn.left(pos);
- style=fn.right(fn.length()-pos);
- Fami[family].inSort(fn);
- }
- }
-
- QMapIterator<QString,QStrList> qmi;
- for (qmi = Fami.begin(); qmi != Fami.end(); ++qmi)
- {
- pm = new QPopupMenu();
- QString family=qmi.key();
- QStrList &qsl=qmi.data();
- for( QStrListIterator sli(qsl) ; sli.current() ; ++sli)
- {
- if (Prefs.AvailFonts[sli.current()]->UseFont)
- {
- QString &fn=Prefs.AvailFonts[sli.current()]->SCName;
- a = pm->insertItem(new FmItem(fn, Prefs.AvailFonts[fn]->Font));
- FontID.insert(long(a), &fn);
- }
- }
- connect(pm, SIGNAL(activated(int)), this, SLOT(setItemFont(int)));
- FStyleMenu->insertItem(family, pm);
- }
- a = FontMenu->insertItem(tr("Face"), FStyleMenu);
-// FontID.insert(long(a), &b);
- a = FontMenu->insertSeparator();
-// FontID.insert(long(a), &b);
- if (!HaveDoc)
- {
- it.toFirst();
- a = FontMenu->insertItem(new FmItem(it.currentKey(), it.current()->Font));
- FontMenu->setItemChecked(a, true);
- FontID.insert(long(a), &it.current()->SCName);
- }
- else
- {
- QMap<QString,QFont>::Iterator it3;
- for (it3 = doc->UsedFonts.begin(); it3 != doc->UsedFonts.end(); ++it3)
- {
- a = FontMenu->insertItem(new FmItem(it3.key(), it3.data()));
- if (it3.key() == doc->Dfont)
- {
- FontMenu->setItemChecked(a, true);
- }
- FontID.insert(long(a), &it3.key());
- }
- }
-}
-
-void ScribusApp::GetAllFonts()
-{
- Prefs.AvailFonts.GetFonts(PrefsPfad);
- if (Prefs.AvailFonts.isEmpty())
- NoFonts = true;
-}
-
-void ScribusApp::slotFontOrg()
-{
- uint a;
- FontPrefs *dia = new FontPrefs(this, Prefs.AvailFonts, HaveDoc, &Prefs, PrefsPfad);
- connect(dia, SIGNAL(ReReadPrefs()), this, SLOT(ReadPrefs()));
- if (dia->exec())
- {
- a = 0;
- SCFontsIterator it(Prefs.AvailFonts);
- for ( ; it.current() ; ++it)
- {
- it.current()->EmbedPS = dia->FlagsPS.at(a)->isChecked();
- it.current()->UseFont = dia->FlagsUse.at(a)->isChecked();
- a++;
- }
- a = 0;
- QMap<QString,QString>::Iterator itfsu;
- Prefs.GFontSub.clear();
- for (itfsu = dia->RList.begin(); itfsu != dia->RList.end(); ++itfsu)
- {
- Prefs.GFontSub[itfsu.key()] = dia->FlagsRepl.at(a)->currentText();
- a++;
- }
- }
- disconnect(dia, SIGNAL(ReReadPrefs()), this, SLOT(ReadPrefs()));
- delete dia;
-}
-
-void ScribusApp::slotPrefsOrg()
-{
- void *mo;
- char *error;
- typedef Preferences* (*sdem)(QWidget *d, preV *Vor);
- sdem demo;
- QString pfad = PREL;
- pfad += "/lib/scribus/libs/libpreferences.so";
- mo = dlopen(pfad, RTLD_LAZY);
- if (!mo)
- {
- std::cout << "Can't find Plugin" << endl;
- return;
- }
- dlerror();
- demo = (sdem)dlsym(mo, "Run");
- if ((error = dlerror()) != NULL)
- {
- std::cout << "Can't find Symbol" << endl;
- dlclose(mo);
- return;
- }
- Preferences *dia = (*demo)(this, &Prefs);
- if (dia->exec())
- {
- Prefs.KeyActions = dia->KKC;
- SetShortCut();
- Prefs.AppFontSize = dia->GFsize->value();
- Prefs.Wheelval = dia->SpinBox3->value();
- Prefs.RecentDCount = dia->Recen->value();
- Prefs.DocDir = dia->Docs->text();
- DocDir = Prefs.DocDir;
- switch (dia->PreviewSize->currentItem())
- {
- case 0:
- Prefs.PSize = 40;
- break;
- case 1:
- Prefs.PSize = 60;
- break;
- case 2:
- Prefs.PSize = 80;
- break;
- }
- Prefs.SaveAtQ = dia->SaveAtQuit->isChecked();
- ScBook->BibWin->RebuildView();
- ScBook->AdjustMenu();
- if (Prefs.GUI != dia->GUICombo->currentText())
- {
- Prefs.GUI = dia->GUICombo->currentText();
- qApp->setStyle(QStyleFactory::create(Prefs.GUI));
- }
- QFont apf = qApp->font();
- apf.setPointSize(Prefs.AppFontSize);
- qApp->setFont(apf,true);
- PolyC = dia->T6_Ecken->value();
- PolyF = dia->PFactor;
- PolyR = dia->T6_Faktor2->value();
- PolyS = dia->T6_Konvex->isChecked();
- PolyFd = dia->T6_Slider1->value();
- Prefs.PolyC = PolyC;
- Prefs.PolyF = PolyF;
- Prefs.PolyFd = PolyFd;
- Prefs.PolyS = PolyS;
- Prefs.PolyR = PolyR;
- Prefs.PageFormat = dia->GZComboF->currentItem();
- Prefs.Ausrichtung = dia->GZComboO->currentItem();
- Prefs.PageBreite = dia->Pagebr;
- Prefs.PageHoehe = dia->Pageho;
- Prefs.RandOben = dia->TopR->value() / UmReFaktor / 100;
- Prefs.RandUnten = dia->BottomR->value() / UmReFaktor / 100;
- Prefs.RandLinks = dia->LeftR->value() / UmReFaktor / 100;
- Prefs.RandRechts = dia->RightR->value() / UmReFaktor / 100;
- Prefs.DoppelSeiten = dia->Doppelseiten->isChecked();
- Prefs.ErsteLinks = dia->Linkszuerst->isChecked();
- Prefs.PDFTransparency = dia->UsePDFTrans->isChecked();
- Mpal->Cpal->UseTrans(Prefs.PDFTransparency);
- if (HaveDoc)
- {
- doc->GrabRad = dia->SpinBox3_2->value();
- doc->GuideRad = dia->SpinBox2g->value() / UmReFaktor / 100;
- doc->Dfont = dia->FontCombo->currentText();
- doc->Dsize = dia->SizeCombo->currentText().left(2).toInt();
- doc->minorGrid = dia->SpinBox1->value() / UmReFaktor / 100;
- doc->majorGrid = dia->SpinBox2->value() / UmReFaktor / 100;
- doc->minorColor = dia->Cmin;
- doc->majorColor = dia->Cmax;
- doc->papColor = dia->Cpaper;
- doc->margColor = dia->Crand;
- doc->guideColor = dia->Cgui;
- doc->VHoch = dia->VHochW->value();
- doc->VHochSc = dia->VHochWSc->value();
- doc->VTief = dia->VTiefW->value();
- doc->VTiefSc = dia->VTiefWSc->value();
- doc->VKapit = dia->SmallCaps->value();
- doc->Dpen = dia->Foreground->currentText();
- if (doc->Dpen == tr("None"))
- doc->Dpen = "None";
- doc->DpenText = dia->ForegroundT->currentText();
- if (doc->DpenText == tr("None"))
- doc->DpenText = "None";
- doc->Dbrush = dia->Background->currentText();
- if (doc->Dbrush == tr("None"))
- doc->Dbrush = "None";
- doc->Dshade = dia->Shade->value();
- doc->Dshade2 = dia->Shade2->value();
- switch (dia->Linestyle->currentItem())
- {
- case 0:
- doc->DLineArt = SolidLine;
- break;
- case 1:
- doc->DLineArt = DashLine;
- break;
- case 2:
- doc->DLineArt = DotLine;
- break;
- case 3:
- doc->DLineArt = DashDotLine;
- break;
- case 4:
- doc->DLineArt = DashDotDotLine;
- break;
- }
- doc->Dwidth = dia->LineW->value()/10;
- doc->DpenLine = dia->Foreground2->currentText();
- if (doc->DpenLine == tr("None"))
- doc->DpenLine = "None";
- doc->DshadeLine = dia->Shade22->value();
- switch (dia->Linestyle2->currentItem())
- {
- case 0:
- doc->DLstyleLine = SolidLine;
- break;
- case 1:
- doc->DLstyleLine = DashLine;
- break;
- case 2:
- doc->DLstyleLine = DotLine;
- break;
- case 3:
- doc->DLstyleLine = DashDotLine;
- break;
- case 4:
- doc->DLstyleLine = DashDotDotLine;
- break;
- }
- doc->DwidthLine = dia->LineW2->value()/10;
- doc->MagMin = dia->MinMag->value();
- doc->MagMax = dia->MaxMag->value();
- doc->MagStep = dia->StepMag->value();
- doc->DbrushPict = dia->BackgroundP->currentText();
- if (doc->DbrushPict == tr("None"))
- doc->DbrushPict = "None";
- doc->ShadePict = dia->ShadeP->value();
- doc->ScaleX = static_cast<float>(dia->XScale->value()) / 100;
- doc->ScaleY = static_cast<float>(dia->YScale->value()) / 100;
- doc->ScaleType = dia->FreeScale->isChecked();
- doc->AspectRatio = dia->Aspect->isChecked();
- doc->Before = dia->RadioButton6->isChecked();
- doc->Einheit = dia->UnitCombo->currentItem();
- switch (doc->Einheit)
- {
- case 0:
- view->UN->setText("pt");
- break;
- case 1:
- view->UN->setText("mm");
- break;
- case 2:
- view->UN->setText("in");
- break;
- case 3:
- view->UN->setText("p");
- break;
- }
- doc->PagesSbS = dia->SidebySide->isChecked();
- doc->ShFrames = dia->FramesVisible->isChecked();
- doc->RandFarbig = dia->RandFarb->isChecked();
- doc->AutoLine = dia->AutoLineV->value();
- doc->AutoSave = dia->ASon->isChecked();
- if (doc->AutoSave)
- {
- doc->ASaveTimer->stop();
- doc->ASaveTimer->start(dia->ASTime->value() * 60 * 1000);
- }
- Mpal->UnitChange();
- view->reformPages();
- view->DrawNew();
- }
- else
- {
- Prefs.GrabRad = dia->SpinBox3_2->value();
- Prefs.GuideRad = dia->SpinBox2g->value() / UmReFaktor / 100;
- Prefs.DefFont = dia->FontCombo->currentText();
- Prefs.DefSize = dia->SizeCombo->currentText().left(2).toInt();
- Prefs.DminGrid = dia->SpinBox1->value() / UmReFaktor / 100;
- Prefs.DmajGrid = dia->SpinBox2->value() / UmReFaktor / 100;
- Prefs.DminColor = dia->Cmin;
- Prefs.DmajColor = dia->Cmax;
- Prefs.DpapColor = dia->Cpaper;
- Prefs.DmargColor = dia->Crand;
- Prefs.guideColor = dia->Cgui;
- Prefs.DVHoch = dia->VHochW->value();
- Prefs.DVHochSc = dia->VHochWSc->value();
- Prefs.DVTief = dia->VTiefW->value();
- Prefs.DVTiefSc = dia->VTiefWSc->value();
- Prefs.DVKapit = dia->SmallCaps->value();
- Prefs.Dpen = dia->Foreground->currentText();
- if (Prefs.Dpen == tr("None"))
- Prefs.Dpen = "None";
- Prefs.DpenText = dia->ForegroundT->currentText();
- if (Prefs.DpenText == tr("None"))
- Prefs.DpenText = "None";
- Prefs.Dbrush = dia->Background->currentText();
- if (Prefs.Dbrush == tr("None"))
- Prefs.Dbrush = "None";
- Prefs.Dshade = dia->Shade->value();
- Prefs.Dshade2 = dia->Shade2->value();
- switch (dia->Linestyle->currentItem())
- {
- case 0:
- Prefs.DLineArt = SolidLine;
- break;
- case 1:
- Prefs.DLineArt = DashLine;
- break;
- case 2:
- Prefs.DLineArt = DotLine;
- break;
- case 3:
- Prefs.DLineArt = DashDotLine;
- break;
- case 4:
- Prefs.DLineArt = DashDotDotLine;
- break;
- }
- Prefs.Dwidth = dia->LineW->value()/10;
- Prefs.DpenLine = dia->Foreground2->currentText();
- if (Prefs.DpenLine == tr("None"))
- Prefs.DpenLine = "None";
- Prefs.DshadeLine = dia->Shade22->value();
- switch (dia->Linestyle2->currentItem())
- {
- case 0:
- Prefs.DLstyleLine = SolidLine;
- break;
- case 1:
- Prefs.DLstyleLine = DashLine;
- break;
- case 2:
- Prefs.DLstyleLine = DotLine;
- break;
- case 3:
- Prefs.DLstyleLine = DashDotLine;
- break;
- case 4:
- Prefs.DLstyleLine = DashDotDotLine;
- break;
- }
- Prefs.DwidthLine = dia->LineW2->value()/10;
- Prefs.MagMin = dia->MinMag->value();
- Prefs.MagMax = dia->MaxMag->value();
- Prefs.MagStep = dia->StepMag->value();
- Prefs.DbrushPict = dia->BackgroundP->currentText();
- if (Prefs.DbrushPict == tr("None"))
- Prefs.DbrushPict = "None";
- Prefs.ShadePict = dia->ShadeP->value();
- Prefs.ScaleX = static_cast<float>(dia->XScale->value()) / 100;
- Prefs.ScaleY = static_cast<float>(dia->YScale->value()) / 100;
- Prefs.ScaleType = dia->FreeScale->isChecked();
- Prefs.AspectRatio = dia->Aspect->isChecked();
- Prefs.Before = dia->RadioButton6->isChecked();
- Prefs.Einheit = dia->UnitCombo->currentItem();
- switch (Prefs.Einheit)
- {
- case 0:
- UmReFaktor = 1.0;
- break;
- case 1:
- UmReFaktor = 1.0 / 72.0 * 25.4;
- break;
- case 2:
- UmReFaktor = 1.0 / 72.0;
- break;
- case 3:
- UmReFaktor = 1.0 / 12.0;
- break;
- }
- Prefs.PagesSbS = dia->SidebySide->isChecked();
- Prefs.ShFrames = dia->FramesVisible->isChecked();
- Prefs.RandFarbig = dia->RandFarb->isChecked();
- Prefs.AutoLine = dia->AutoLineV->value();
- Prefs.AutoSave = dia->ASon->isChecked();
- Prefs.AutoSaveTime = dia->ASTime->value() * 60 * 1000;
- }
- SavePrefs();
- }
- delete dia;
- dlclose(mo);
-}
-
-void ScribusApp::SavePrefs()
-{
- Prefs.MainX = abs(pos().x());
- Prefs.MainY = abs(pos().y());
- Prefs.MainW = size().width();
- Prefs.MainH = size().height();
- Prefs.Werkv = WerkTools->isVisible();
- Prefs.Mpalv = Mpal->isVisible();
- Prefs.Tpalv = Tpal->isVisible();
- Prefs.SCpalv = ScBook->isVisible();
- Prefs.Lpalv = Lpal->isVisible();
- Prefs.Sepalv = Sepal->isVisible();
- if (Mpal->isVisible())
- {
- Prefs.Mpalx = abs(Mpal->pos().x());
- Prefs.Mpaly = abs(Mpal->pos().y());
- }
- if (Tpal->isVisible())
- {
- Prefs.Tpalx = abs(Tpal->pos().x());
- Prefs.Tpaly = abs(Tpal->pos().y());
- }
- if (ScBook->isVisible())
- {
- Prefs.SCpalx = abs(ScBook->pos().x());
- Prefs.SCpaly = abs(ScBook->pos().y());
- Prefs.SCpalw = abs(ScBook->size().width());
- Prefs.SCpalh = abs(ScBook->size().height());
- }
- if (Sepal->isVisible())
- {
- Prefs.Sepalx = abs(Sepal->pos().x());
- Prefs.Sepaly = abs(Sepal->pos().y());
- }
- if (BookPal->isVisible())
- {
- Prefs.Bopalx = abs(BookPal->pos().x());
- Prefs.Bopaly = abs(BookPal->pos().y());
- }
- if (Lpal->isVisible())
- {
- Prefs.Lpalx = abs(Lpal->pos().x());
- Prefs.Lpaly = abs(Lpal->pos().y());
- }
- Prefs.RecentDocs.clear();
- uint max = QMIN(Prefs.RecentDCount, RecentDocs.count());
- for (uint m = 0; m < max; ++m)
- {
- Prefs.RecentDocs.append(RecentDocs[m]);
- }
- Prefs.PrinterName = PDef.Pname;
- Prefs.PrinterFile = PDef.Dname;
- Prefs.PrinterCommand = PDef.Command;
- ScriXmlDoc *ss = new ScriXmlDoc();
- ss->WritePref(&Prefs, PrefsPfad+"/scribus.rc");
- delete ss;
-}
-
-void ScribusApp::ReadPrefs()
-{
- ScriXmlDoc *ss = new ScriXmlDoc();
- bool erg = ss->ReadPref(&Prefs, PrefsPfad+"/scribus.rc");
- delete ss;
- if (!erg)
- return;
- PDef.Pname = Prefs.PrinterName;
- PDef.Dname = Prefs.PrinterFile;
- PDef.Command = Prefs.PrinterCommand;
- PolyC = Prefs.PolyC;
- PolyF = Prefs.PolyF;
- PolyFd = Prefs.PolyFd;
- PolyS = Prefs.PolyS;
- PolyR = Prefs.PolyR;
- recentMenu->clear();
- uint max = QMIN(Prefs.RecentDCount, Prefs.RecentDocs.count());
- for (uint m = 0; m < max; ++m)
- {
- QFileInfo fd(Prefs.RecentDocs[m]);
- if (fd.exists())
- {
- RecentDocs.append(Prefs.RecentDocs[m]);
- recentMenu->insertItem(Prefs.RecentDocs[m]);
- }
- }
- if (!Prefs.Werkv)
- toolMenu->changeItem(viewTools, tr("Show Tools"));
- if (Prefs.Mpalv)
- toolMenu->changeItem(viewMpal, tr("Hide Measurements"));
- if (Prefs.Tpalv)
- toolMenu->changeItem(viewTpal, tr("Hide Outline"));
- if (Prefs.SCpalv)
- toolMenu->changeItem(viewBpal, tr("Hide Scrapbook"));
- if (Prefs.Lpalv)
- toolMenu->changeItem(viewLpal, tr("Hide Layers"));
- if (Prefs.Sepalv)
- toolMenu->changeItem(viewSepal, tr("Hide Page Palette"));
- if (Prefs.Bopalv)
- toolMenu->changeItem(viewBopal, tr("Hide Bookmarks"));
- Mpal->move(Prefs.Mpalx, Prefs.Mpaly);
- Tpal->move(Prefs.Tpalx, Prefs.Tpaly);
- Lpal->move(Prefs.Lpalx, Prefs.Lpaly);
- Sepal->move(Prefs.Sepalx, Prefs.Sepaly);
- BookPal->move(Prefs.Bopalx, Prefs.Bopaly);
- ScBook->move(Prefs.SCpalx, Prefs.SCpaly);
- ScBook->resize(Prefs.SCpalw, Prefs.SCpalh);
- Npal->move(Prefs.Npalx, Prefs.Npaly);
- move(Prefs.MainX, Prefs.MainY);
- resize(Prefs.MainW, Prefs.MainH);
-}
-
-void ScribusApp::ShowSubs()
-{
- QString mess;
- if (HaveGS != 0)
- {
- mess = tr("The following Programs are missing:")+"\n\n";
- if (HaveGS != 0)
- {
- mess += tr("Ghostscript : You cannot use EPS-Images")+"\n\n";
- PDFavailable = false;
- }
- QMessageBox::warning(this, tr("Warning"), mess, 1, 0, 0);
- }
- if (!Prefs.Werkv)
- WerkTools->hide();
- if (Prefs.Mpalv)
- {
- Mpal->show();
- Mpal->TabStack->raiseWidget(2);
- qApp->processEvents();
- Mpal->TabStack->raiseWidget(0);
- }
- if (Prefs.Tpalv)
- Tpal->show();
- if (Prefs.SCpalv)
- ScBook->show();
- if (Prefs.Lpalv)
- Lpal->show();
- if (Prefs.Sepalv)
- Sepal->show();
- if (Prefs.Bopalv)
- BookPal->show();
- setActiveWindow();
- raise();
-}
-
-PSLib* ScribusApp::getPSDriver(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
-{
- char *error;
- typedef PSLib* (*sdem)(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf);
- sdem demo;
- QString pfad = PREL;
- pfad += "/lib/scribus/libs/libpostscript.so";
- PSDriver = dlopen(pfad, RTLD_LAZY);
- if (!PSDriver)
- {
- std::cout << "Can't find Plugin" << endl;
- return NULL;
- }
- dlerror();
- demo = (sdem)dlsym(PSDriver, "Run");
- if ((error = dlerror()) != NULL)
- {
- std::cout << "Can't find Symbol" << endl;
- dlclose(PSDriver);
- return NULL;
- }
- PSLib *dia = (*demo)(psart, AllFonts, DocFonts, DocColors, pdf);
- return dia;
-}
-
-void ScribusApp::closePSDriver()
-{
- dlclose(PSDriver);
-}
-
-PDFlib* ScribusApp::getPDFDriver()
-{
- char *error;
- typedef PDFlib* (*sdem)();
- sdem demo;
- QString pfad = PREL;
- pfad += "/lib/scribus/libs/libpdf.so";
- PDFDriver = dlopen(pfad, RTLD_LAZY);
- if (!PDFDriver)
- {
- std::cout << "Can't find Plugin" << endl;
- return NULL;
- }
- dlerror();
- demo = (sdem)dlsym(PDFDriver, "Run");
- if ((error = dlerror()) != NULL)
- {
- std::cout << "Can't find Symbol" << endl;
- dlclose(PDFDriver);
- return NULL;
- }
- PDFlib *dia = (*demo)();
- return dia;
-}
-
-void ScribusApp::closePDFDriver()
-{
- dlclose(PDFDriver);
-}
-
-bool ScribusApp::DoSaveAsEps(QString fn)
-{
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- PSLib *dd = getPSDriver(false, Prefs.AvailFonts, doc->UsedFonts, doc->PageColors, false);
- if (dd != NULL)
- {
- if (dd->PS_set_file(fn))
- view->CreatePS(dd, doc->ActPage->PageNr, doc->ActPage->PageNr+1, 1, false, tr("All"), true, false, false, false);
- else
- {
- delete dd;
- closePSDriver();
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- return false;
- }
- closePSDriver();
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- return true;
- }
- else
- return false;
-}
-
-void ScribusApp::SaveAsEps()
-{
- QString fna;
- if (!doc->DocName.startsWith("Document"))
- {
- QFileInfo fi(doc->DocName);
- fna = fi.dirPath()+"/"+fi.baseName()+".eps";
- }
- else
- {
- QDir di = QDir();
- fna = di.currentDirPath()+"/"+doc->DocName+".eps";
- }
- QString fn = CFileDialog(tr("Save as"), tr("EPS-Files (*.eps);; All Files (*)"), "", false, false);
- if (!fn.isEmpty())
- {
- if (!DoSaveAsEps(fn))
- QMessageBox::warning(this, tr("Warning"), tr("Can't write the File: \n%1").arg(fn), tr("OK"));
- }
-}
-
-void ScribusApp::SaveAsPDF()
-{
- QString fn;
- uint frPa, toPa;
- int Components;
- QString nam = "";
- QString pfad = PREL;
- pfad += "/lib/scribus/profiles/";
- if (BookPal->BView->childCount() == 0)
- doc->PDF_Optionen.Bookmarks = false;
- PDF_Opts *dia = new PDF_Opts(this, doc->DocName, doc->UsedFonts, view, &doc->PDF_Optionen, doc->PDF_Optionen.PresentVals, &PDFXProfiles, Prefs.AvailFonts);
- if (dia->exec())
- {
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- fn = dia->Datei->text();
- doc->PDF_Optionen.Datei = fn;
- doc->PDF_Optionen.Thumbnails = dia->CheckBox1->isChecked();
- doc->PDF_Optionen.Compress = dia->Compression->isChecked();
- doc->PDF_Optionen.Resolution = dia->Resolution->value();
- doc->PDF_Optionen.EmbedList = dia->FontsToEmbed;
- doc->PDF_Optionen.RecalcPic = dia->DSColor->isChecked();
- doc->PDF_Optionen.PicRes = dia->ValC->value();
- doc->PDF_Optionen.Bookmarks = dia->CheckBM->isChecked();
- doc->PDF_Optionen.Binding = dia->ComboBind->currentItem();
- doc->PDF_Optionen.PresentMode = dia->CheckBox10->isChecked();
- doc->PDF_Optionen.PresentVals = dia->EffVal;
- doc->PDF_Optionen.Articles = dia->Article->isChecked();
- doc->PDF_Optionen.Encrypt = dia->Encry->isChecked();
- if (dia->Encry->isChecked())
- {
- int Perm = -64;
- if (dia->ComboBox1->currentItem() == 1)
- Perm &= ~0x00240000;
- if (dia->PrintSec->isChecked())
- Perm += 4;
- if (dia->ModifySec->isChecked())
- Perm += 8;
- if (dia->CopySec->isChecked())
- Perm += 16;
- if (dia->AddSec->isChecked())
- Perm += 32;
- doc->PDF_Optionen.Permissions = Perm;
- doc->PDF_Optionen.PassOwner = dia->PassOwner->text();
- doc->PDF_Optionen.PassUser = dia->PassUser->text();
- }
- if (dia->ComboBox1->currentItem() == 0)
- doc->PDF_Optionen.Version = 13;
- if (dia->ComboBox1->currentItem() == 1)
- doc->PDF_Optionen.Version = 14;
- if (dia->ComboBox1->currentItem() == 2)
- doc->PDF_Optionen.Version = 12;
- if (dia->OutCombo->currentItem() == 0)
- {
- doc->PDF_Optionen.UseRGB = true;
- doc->PDF_Optionen.UseProfiles = false;
- doc->PDF_Optionen.UseProfiles2 = false;
- }
- else
- {
- doc->PDF_Optionen.UseRGB = false;
-#ifdef HAVE_CMS
- doc->PDF_Optionen.UseProfiles = dia->EmbedProfs->isChecked();
- doc->PDF_Optionen.UseProfiles2 = dia->EmbedProfs2->isChecked();
- doc->PDF_Optionen.Intent = dia->IntendS->currentItem();
- doc->PDF_Optionen.Intent2 = dia->IntendI->currentItem();
- doc->PDF_Optionen.EmbeddedI = dia->NoEmbedded->isChecked();
- doc->PDF_Optionen.SolidProf = dia->SolidPr->currentText();
- doc->PDF_Optionen.ImageProf = dia->ImageP->currentText();
- doc->PDF_Optionen.PrintProf = dia->PrintProfC->currentText();
- if (doc->PDF_Optionen.Version == 12)
- {
- const char *Descriptor;
- cmsHPROFILE hIn;
- hIn = cmsOpenProfileFromFile(pfad+PrinterProfiles[doc->PDF_Optionen.PrintProf], "r");
- Descriptor = cmsTakeProductDesc(hIn);
- nam = QString(Descriptor);
- if ((int) cmsGetColorSpace(hIn) == icSigRgbData)
- Components = 3;
- if ((int)cmsGetColorSpace(hIn) == icSigCmykData)
- Components = 4;
- if ((int)cmsGetColorSpace(hIn) == icSigCmyData)
- Components = 3;
- cmsCloseProfile(hIn);
- doc->PDF_Optionen.Info = dia->InfoString->text();
- doc->PDF_Optionen.BleedTop = float(dia->BleedTop->value())/UmReFaktor/100.0;
- doc->PDF_Optionen.BleedLeft = float(dia->BleedLeft->value())/UmReFaktor/100.0;
- doc->PDF_Optionen.BleedRight = float(dia->BleedRight->value())/UmReFaktor/100.0;
- doc->PDF_Optionen.BleedBottom = float(dia->BleedBottom->value())/UmReFaktor/100.0;
- doc->PDF_Optionen.Encrypt = false;
- doc->PDF_Optionen.PresentMode = false;
- doc->PDF_Optionen.Encrypt = false;
- }
-#else
- doc->PDF_Optionen.UseProfiles = false;
- doc->PDF_Optionen.UseProfiles2 = false;
-#endif
- }
- if (dia->AllPages->isChecked())
- {
- frPa = 0;
- toPa = view->Pages.count();
- }
- else
- {
- frPa = uint(dia->FirstPage->value()-1);
- toPa = uint(dia->LastPage->value());
- }
- QMap<int,QPixmap> thumbs;
- for (uint ap = frPa; ap < toPa; ++ap)
- {
- QPixmap pm(10,10);
- if (doc->PDF_Optionen.Thumbnails)
- pm = view->PageToPixmap(ap, 100);
- thumbs.insert(ap, pm);
- }
- PDFlib *pd = getPDFDriver();
- if (pd->PDF_Begin_Doc(fn, doc, view, &doc->PDF_Optionen, Prefs.AvailFonts, doc->UsedFonts, BookPal->BView))
- {
- for (uint ap = 0; ap < view->MasterPages.count(); ++ap)
- {
- if (view->MasterPages.at(ap)->Items.count() != 0)
- pd->PDF_TemplatePage(view->MasterPages.at(ap));
- }
- for (uint a = frPa; a < toPa; ++a)
- {
- pd->PDF_Begin_Page(view->Pages.at(a), thumbs[a]);
- pd->PDF_ProcessPage(view->Pages.at(a), a);
- pd->PDF_End_Page();
- }
- if (doc->PDF_Optionen.Version == 12)
- pd->PDF_End_Doc(pfad+PrinterProfiles[doc->PDF_Optionen.PrintProf], nam, Components);
- else
- pd->PDF_End_Doc();
- }
- else
- QMessageBox::warning(this, tr("Warning"), tr("Can't write the File: \n%1").arg(fn), tr("OK"));
- delete pd;
- closePDFDriver();
-// BuildFontMenu();
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- }
- delete dia;
-}
-
-void ScribusApp::AddBookMark(PageItem *ite)
-{
- BookPal->BView->AddPageItem(ite);
- StoreBookmarks();
-}
-
-void ScribusApp::DelBookMark(PageItem *ite)
-{
- BookPal->BView->DeleteItem(ite->BMnr);
- StoreBookmarks();
-}
-
-void ScribusApp::BookMarkTxT(PageItem *ite)
-{
- BookPal->BView->ChangeText(ite);
- StoreBookmarks();
-}
-
-void ScribusApp::ChBookmarks(int s, int e, int n)
-{
- view->Pages.at(s)->Items.at(e)->BMnr = n;
-}
-
-void ScribusApp::RestoreBookMarks()
-{
- BookMItem* ip;
- BookMItem* ip2;
- BookMItem* ip3;
- QValueList<ScribusDoc::BookMa>::Iterator it2;
- it2 = doc->BookMarks.begin();
- BookPal->BView->clear();
- if (doc->BookMarks.count() == 0)
- return;
- BookMItem *ite = new BookMItem(BookPal->BView, &(*it2));
- ++it2;
- for( ; it2 != doc->BookMarks.end(); ++it2 )
- {
- if ((*it2).Parent == 0)
- ite = new BookMItem(BookPal->BView, ite, &(*it2));
- else
- {
- QListViewItemIterator it3(BookPal->BView);
- for ( ; it3.current(); ++it3)
- {
- ip = (BookMItem*)it3.current();
- if ((*it2).Parent == ip->ItemNr)
- {
- ip2 = ip;
- break;
- }
- }
- if ((*it2).Prev == 0)
- (void) new BookMItem(ip2, &(*it2));
- else
- {
- QListViewItemIterator it4(BookPal->BView);
- for ( ; it4.current(); ++it4)
- {
- ip = (BookMItem*)it4.current();
- if ((*it2).Prev == ip->ItemNr)
- {
- ip3 = ip;
- break;
- }
- }
- (void) new BookMItem(ip2, ip3, &(*it2));
- }
- }
- }
-}
-
-void ScribusApp::StoreBookmarks()
-{
- doc->BookMarks.clear();
- BookMItem* ip;
- QListViewItemIterator it(BookPal->BView);
- struct ScribusDoc::BookMa Boma;
- for ( ; it.current(); ++it)
- {
- ip = (BookMItem*)it.current();
- Boma.Title = ip->Titel;
- Boma.Text = ip->text(0);
- Boma.Aktion = ip->Action;
- Boma.ItemNr = ip->ItemNr;
- Boma.Seite = ip->Seite;
- Boma.Element = ip->Element;
- Boma.Parent = ip->Pare;
- Boma.First = ip->First;
- Boma.Prev = ip->Prev;
- Boma.Next = ip->Next;
- Boma.Last = ip->Last;
- doc->BookMarks.append(Boma);
- }
- ActWin->NrItems = BookPal->BView->NrItems;
- ActWin->First = BookPal->BView->First;
- ActWin->Last = BookPal->BView->Last;
-}
-
-void ScribusApp::ModifyObject()
-{
- NoFrameEdit();
- PageItem* b = doc->ActPage->SelItem.at(0);
- ModObj *dia = new ModObj(this, b, doc->PageColors, doc, view, &InputProfiles);
- connect(dia, SIGNAL(DocChanged()), this, SLOT(slotDocCh()));
- dia->exec();
- delete dia;
- doc->UnDoValid = false;
- CanUndo();
- Mpal->setLvalue(b->LocalScX, b->LocalScY, b->LocalX, b->LocalY );
-}
-
-void ScribusApp::slotElemRead(QString Name, int x, int y, bool art, bool loca, ScribusDoc* docc)
-{
- NoFrameEdit();
- ScriXmlDoc *ss = new ScriXmlDoc();
- if(ss->ReadElem(Name, Prefs.AvailFonts, docc, x, y, art, loca, Prefs.GFontSub))
- {
- BuildFontMenu();
- Mpal->Spal->updateFList();
- docc->ActPage->update();
- slotDocCh();
- docc->UnDoValid = false;
- CanUndo();
- }
- delete ss;
-}
-
-void ScribusApp::slotChangeUnit(int art)
-{
- doc->Einheit = art;
- switch (art)
- {
- case 0:
- UmReFaktor = 1.0;
- view->UN->setText("pt");
- break;
- case 1:
- UmReFaktor = 0.3527777;
- view->UN->setText("mm");
- break;
- case 2:
- UmReFaktor = 1.0 / 72.0;
- view->UN->setText("in");
- break;
- case 3:
- UmReFaktor = 1.0 / 12.0;
- view->UN->setText("p");
- break;
- }
- Mpal->UnitChange();
- view->DrawNew();
-}
-
-void ScribusApp::ManageJava()
-{
- JavaDocs *dia = new JavaDocs(this, doc, view);
- dia->exec();
- delete dia;
-}
-
-void ScribusApp::ManageTemp(QString temp)
-{
- MusterSeiten *dia = new MusterSeiten(this, doc, view, temp);
- connect(dia, SIGNAL(CreateNew(int)), this, SLOT(slotNewPageT(int)));
- connect(dia, SIGNAL(Fertig()), this, SLOT(ManTempEnd()));
- menuBar()->setItemEnabled(pgmm, 0);
- editMenu->setItemEnabled(tman, 0);
- ActWin->MenuStat[0] = DatSav->isEnabled();
- ActWin->MenuStat[1] = fileMenu->isItemEnabled(fid1);
- ActWin->MenuStat[2] = fileMenu->isItemEnabled(fid4);
- ActWin->MenuStat[3] = fileMenu->isItemEnabled(fid5);
- DatNeu->setEnabled(false);
- DatSav->setEnabled(false);
- DatOpe->setEnabled(false);
- DatClo->setEnabled(false);
-/* fileMenu->setItemEnabled(fid1, 0);
- fileMenu->setItemEnabled(fid4, 0);
- fileMenu->setItemEnabled(fid5, 0);
- fileMenu->setItemEnabled(fid51, 0);
- fileMenu->setItemEnabled(fid12, 0);
- fileMenu->setItemEnabled(fid13, 0);
- fileMenu->setItemEnabled(fid14, 0); */
- fileMenu->setEnabled(false);
- doc->TemplateMode = true;
- Sepal->DisablePal();
- doc->UnDoValid = false;
- CanUndo();
- dia->show();
- ActWin->muster = dia;
-}
-
-void ScribusApp::ManTempEnd()
-{
- view->HideTemplate();
- doc->TemplateMode = false;
- menuBar()->setItemEnabled(pgmm, 1);
- editMenu->setItemEnabled(tman, 1);
- DatNeu->setEnabled(true);
- DatSav->setEnabled(ActWin->MenuStat[0]);
- DatOpe->setEnabled(true);
- DatClo->setEnabled(true);
-/* fileMenu->setItemEnabled(fid1, ActWin->MenuStat[1]);
- fileMenu->setItemEnabled(fid4, ActWin->MenuStat[2]);
- fileMenu->setItemEnabled(fid5, ActWin->MenuStat[3]);
- fileMenu->setItemEnabled(fid12, 1);
- fileMenu->setItemEnabled(fid13, 1);
- fileMenu->setItemEnabled(fid14, 1); */
- fileMenu->setEnabled(true);
- if (view->Pages.count() > 1)
- {
- pageMenu->setItemEnabled(pgmd, 1);
- pageMenu->setItemEnabled(pgmv, 1);
- }
- else
- {
- pageMenu->setItemEnabled(pgmd, 0);
- pageMenu->setItemEnabled(pgmv, 0);
- }
- if (doc->isModified())
- slotDocCh();
- Sepal->EnablePal();
- Sepal->RebuildTemp();
- ActWin->muster = NULL;
-}
-
-void ScribusApp::ApplyTemp()
-{
- QString mna;
- ApplyT *dia = new ApplyT(this, view);
- if (dia->exec())
- {
- mna = dia->Templ->currentText();
- Apply_Temp(mna, doc->ActPage->PageNr);
- }
- delete dia;
-}
-
-void ScribusApp::Apply_Temp(QString in, int Snr)
-{
- QString mna = in;
- if (mna == tr("Normal"))
- mna = "Normal";
- view->Pages.at(Snr)->MPageNam = mna;
- Page* Mp = view->MasterPages.at(view->MasterNames[mna]);
- if (Mp->YGuides.count() != 0)
- {
- for (uint y = 0; y < Mp->YGuides.count(); ++y)
- {
- if (view->Pages.at(Snr)->YGuides.contains(Mp->YGuides[y]) == 0)
- view->Pages.at(Snr)->YGuides.append(Mp->YGuides[y]);
- }
- qHeapSort(view->Pages.at(Snr)->YGuides);
- }
- if (Mp->XGuides.count() != 0)
- {
- for (uint x = 0; x < Mp->XGuides.count(); ++x)
- {
- if (view->Pages.at(Snr)->XGuides.contains(Mp->XGuides[x]) == 0)
- view->Pages.at(Snr)->XGuides.append(Mp->XGuides[x]);
- }
- qHeapSort(view->Pages.at(Snr)->XGuides);
- }
- view->DrawNew();
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
- Sepal->Rebuild();
-}
-
-void ScribusApp::GroupObj()
-{
- PageItem* b;
- float x, y, w, h;
- for (uint a=0; a<doc->ActPage->SelItem.count(); ++a)
- {
- b = doc->ActPage->SelItem.at(a);
- b->Groups.push(doc->GroupCounter);
- }
- doc->GroupCounter++;
- doc->ActPage->getGroupRect(&x, &y, &w, &h);
- doc->ActPage->repaint(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::UnGroupObj()
-{
- PageItem* b;
- for (uint a=0; a<doc->ActPage->SelItem.count(); ++a)
- {
- b = doc->ActPage->SelItem.at(a);
- b->Groups.pop();
- }
- doc->ActPage->Deselect(true);
- slotDocCh();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::StatusPic()
-{
- if (HaveDoc)
- {
- PicStatus *dia = new PicStatus(this, doc, view);
- connect(dia, SIGNAL(GotoSeite(int)), this, SLOT(SelectFromOutlS(int)));
- dia->exec();
- delete dia;
- }
-}
-
-QString ScribusApp::CFileDialog(QString caption, QString filter, QString defNa, bool Pre, bool mod, bool comp)
-{
- CustomFDialog dia(this, caption, filter, Pre, mod, comp);
- if (defNa != "")
- dia.setSelection(defNa);
- if (dia.exec() == QDialog::Accepted)
- return dia.selectedFile();
- else
- return "";
-}
-
-void ScribusApp::RunPlug(int id)
-{
- int a = extraMenu->indexOf(id);
- if (a > 2)
- CallDLL(extraMenu->text(id));
-}
-
-void ScribusApp::RunImportPlug(int id)
-{
- int a = importMenu->indexOf(id);
- if (a > 1)
- CallDLL(importMenu->text(id));
-}
-
-void ScribusApp::RunExportPlug(int id)
-{
- int a = exportMenu->indexOf(id);
- if (a > 2)
- CallDLL(exportMenu->text(id));
-}
-
-void ScribusApp::RunHelpPlug(int id)
-{
- int a = helpMenu->indexOf(id);
- if (a > 4)
-// if (a > 5)
- CallDLL(helpMenu->text(id));
-}
-
-void ScribusApp::FinalizePlugs()
-{
- char *error;
- QMap<QString, PlugData>::Iterator it;
- struct PlugData pda;
- typedef void (*sdem2)();
- sdem2 demo2;
- for (it = PluginMap.begin(); it != PluginMap.end(); ++it)
- {
- if (it.data().Typ == 4)
- {
- dlerror();
- demo2 = (sdem2)dlsym(it.data().Zeiger, "CleanUpPlug");
- if ((error = dlerror()) != NULL)
- {
- dlclose(it.data().Zeiger);
- continue;
- }
- else
- {
- (*demo2)();
- }
- }
- }
-}
-
-void ScribusApp::InitPlugs()
-{
- QString pfad = PREL;
- QString nam = "";
- int ty = 0;
- struct PlugData pda;
- pfad += "/lib/scribus/plugins/";
- QDir d(pfad, "*.so*", QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
- if ((d.exists()) && (d.count() != 0))
- {
- extraMenu->insertSeparator();
- for (uint dc = 0; dc < d.count(); ++dc)
- {
- pda.Zeiger = 0;
- pda.Datei = "";
- pda.Typ = 0;
- if (DLLName(d[dc], &nam, &ty, &pda.Zeiger))
- {
- if (ty == 1)
- extraMenu->insertItem(tr(nam));
- if (ty == 2)
- importMenu->insertItem(tr(nam));
- if (ty == 3)
- exportMenu->insertItem(tr(nam));
- if (ty == 4)
- helpMenu->insertItem(tr(nam));
- pda.Datei = d[dc];
- pda.Typ = ty;
- PluginMap.insert(tr(nam), pda);
- }
- }
- connect(extraMenu, SIGNAL(activated(int)), this, SLOT(RunPlug(int)));
- connect(importMenu, SIGNAL(activated(int)), this, SLOT(RunImportPlug(int)));
- connect(exportMenu, SIGNAL(activated(int)), this, SLOT(RunExportPlug(int)));
- connect(helpMenu, SIGNAL(activated(int)), this, SLOT(RunHelpPlug(int)));
- }
-}
-
-void ScribusApp::CallDLL(QString name)
-{
- void *mo;
- char *error;
- struct PlugData pda;
- pda = PluginMap[name];
- typedef void (*sdem)(QWidget *d, ScribusApp *plug);
- sdem demo;
- QString pfad = PREL;
- if (pda.Typ != 4)
- {
- pfad += "/lib/scribus/plugins/" + pda.Datei;
- mo = dlopen(pfad, RTLD_LAZY | RTLD_GLOBAL);
- if (!mo)
- {
- std::cout << "Can't find Plugin" << endl;
- return;
- }
- }
- else
- mo = pda.Zeiger;
- dlerror();
- demo = (sdem)dlsym(mo, "Run");
- if ((error = dlerror()) != NULL)
- {
- std::cout << "Can't find Symbol" << endl;
- dlclose(mo);
- return;
- }
- (*demo)(this, this);
- if (pda.Typ != 4)
- dlclose(mo);
-}
-
-bool ScribusApp::DLLName(QString name, QString *PName, int *typ, void **Zeig)
-{
- void *mo;
- char *error;
- typedef QString (*sdem0)();
- typedef int (*sdem1)();
- typedef void (*sdem2)(QWidget *d, ScribusApp *plug);
- sdem0 demo;
- sdem1 demo1;
- sdem2 demo2;
- QString pfad = PREL;
- pfad += "/lib/scribus/plugins/" + name;
- mo = dlopen(pfad, RTLD_LAZY | RTLD_GLOBAL);
- if (!mo)
- return false;
- dlerror();
- demo = (sdem0)dlsym(mo, "Name");
- if ((error = dlerror()) != NULL)
- {
- dlclose(mo);
- return false;
- }
- *PName = (*demo)();
- dlerror();
- demo1 = (sdem1)dlsym(mo, "Type");
- if ((error = dlerror()) != NULL)
- {
- dlclose(mo);
- return false;
- }
- *typ = (*demo1)();
- *Zeig = mo;
- if (*typ != 4)
- dlclose(mo);
- else
- {
- dlerror();
- demo2 = (sdem2)dlsym(mo, "InitPlug");
- if ((error = dlerror()) != NULL)
- {
- dlclose(mo);
- return false;
- }
- (*demo2)(this, this);
- }
- return true;
-}
-
-void ScribusApp::GetCMSProfiles()
-{
- MonitorProfiles.clear();
- PrinterProfiles.clear();
- InputProfiles.clear();
-#ifdef HAVE_CMS
- QString pfad = PREL;
- QString nam = "";
- const char *Descriptor;
- cmsHPROFILE hIn;
- pfad += "/lib/scribus/profiles/";
- QDir d(pfad, "*.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
- if ((d.exists()) && (d.count() != 0))
- {
- for (uint dc = 0; dc < d.count(); ++dc)
- {
- QFileInfo fi(pfad + d[dc]);
- QString ext = fi.extension(false).lower();
- if ((ext == "icm") || (ext == "icc"))
- {
- hIn = cmsOpenProfileFromFile(pfad + d[dc], "r");
- Descriptor = cmsTakeProductDesc(hIn);
- nam = QString(Descriptor);
- switch ((int) cmsGetDeviceClass(hIn))
- {
- case icSigInputClass:
- if ((int) cmsGetColorSpace(hIn) == icSigRgbData)
- InputProfiles[nam] = pfad + d[dc];
- break;
- case icSigColorSpaceClass:
- if ((int) cmsGetColorSpace(hIn) == icSigRgbData)
- InputProfiles[nam] = pfad + d[dc];
- break;
- case icSigDisplayClass:
- MonitorProfiles[nam] = d[dc];
- InputProfiles[nam] = pfad + d[dc];
- break;
- case icSigOutputClass:
- PrinterProfiles[nam] = d[dc];
- if ((int) cmsGetColorSpace(hIn) == icSigCmykData)
- PDFXProfiles[nam] = d[dc];
- break;
- }
- cmsCloseProfile(hIn);
- }
- }
- if ((!PrinterProfiles.isEmpty()) && (!InputProfiles.isEmpty()) && (!MonitorProfiles.isEmpty()))
- CMSavail = true;
- }
- else
- CMSavail = false;
-#else
- CMSavail = false;
-#endif
-}
-
-void ScribusApp::SetCMSPrefs()
-{
- struct CMSset *CM;
- if (CMSavail)
- {
- if (HaveDoc)
- CM = &doc->CMSSettings;
- else
- CM = &Prefs.DCMSset;
- CMSPrefs *dia = new CMSPrefs(this, CM, &InputProfiles, &PrinterProfiles, &MonitorProfiles);
- if(dia->exec())
- {
- int cc = Prefs.DColors.count();
- FMess->setText(tr("Adjusting Colors"));
- FProg->reset();
- if (HaveDoc)
- {
- if (dia->Changed)
- {
- cc = doc->PageColors.count() + view->CountElements();
- FProg->setTotalSteps(cc);
- slotDocCh();
-#ifdef HAVE_CMS
- doc->HasCMS = doc->CMSSettings.CMSinUse;
- ActWin->SoftProofing = doc->CMSSettings.SoftProofOn;
- ActWin->Gamut = doc->CMSSettings.GamutCheck;
- CMSuse = doc->CMSSettings.CMSinUse;
- ActWin->IntentPrinter = doc->CMSSettings.DefaultIntentPrinter;
- ActWin->IntentMonitor = doc->CMSSettings.DefaultIntentMonitor;
- SoftProofing = doc->CMSSettings.SoftProofOn;
- Gamut = doc->CMSSettings.GamutCheck;
- IntentPrinter = doc->CMSSettings.DefaultIntentPrinter;
- IntentMonitor = doc->CMSSettings.DefaultIntentMonitor;
- qApp->setOverrideCursor(QCursor(waitCursor), true);
- ActWin->CloseCMSProfiles();
- ActWin->OpenCMSProfiles(InputProfiles, MonitorProfiles, PrinterProfiles);
- stdProof = ActWin->stdProof;
- stdTrans = ActWin->stdTrans;
- stdProofImg = ActWin->stdProofImg;
- stdTransImg = ActWin->stdTransImg;
- CMSoutputProf = doc->DocOutputProf;
- CMSprinterProf = doc->DocPrinterProf;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigRgbData)
- doc->CMSSettings.ComponentsInput2 = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigCmykData)
- doc->CMSSettings.ComponentsInput2 = 4;
- if (static_cast<int>(cmsGetColorSpace(doc->DocInputProf)) == icSigCmyData)
- doc->CMSSettings.ComponentsInput2 = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigRgbData)
- doc->CMSSettings.ComponentsPrinter = 3;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigCmykData)
- doc->CMSSettings.ComponentsPrinter = 4;
- if (static_cast<int>(cmsGetColorSpace(doc->DocPrinterProf)) == icSigCmyData)
- doc->CMSSettings.ComponentsPrinter = 3;
- doc->PDF_Optionen.SComp = doc->CMSSettings.ComponentsInput2;
- doc->PDF_Optionen.SolidProf = doc->CMSSettings.DefaultInputProfile2;
- doc->PDF_Optionen.ImageProf = doc->CMSSettings.DefaultInputProfile;
- doc->PDF_Optionen.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
- doc->PDF_Optionen.Intent = doc->CMSSettings.DefaultIntentMonitor;
- RecalcColors(FProg);
- view->RecalcPictures(&InputProfiles, FProg);
-#endif
- view->DrawNew();
- FProg->setProgress(cc);
- qApp->setOverrideCursor(QCursor(arrowCursor), true);
- }
- }
- FMess->setText("");
- FProg->reset();
- }
- delete dia;
- }
-}
-
-void ScribusApp::RecalcColors(QProgressBar *dia)
-{
- CListe::Iterator it;
- if (HaveDoc)
- {
- ColorMenu->clear();
- QPixmap pm = QPixmap(15, 15);
- int a = 0;
- ColorMenu->insertItem(tr("None"));
- CMYKColor tmp;
- tmp.fromQColor(doc->papColor);
- tmp.RecalcRGB();
- doc->papColor = tmp.getRGBColor();
- for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
- {
- doc->PageColors[it.key()].RecalcRGB();
- pm.fill(doc->PageColors[it.key()].getRGBColor());
- ColorMenu->insertItem(QIconSet(pm), it.key());
- if (it.key() == doc->Dbrush)
- {
- ColorMenu->setItemChecked(ColorMenu->idAt(a), true);
- }
- a++;
- if (dia != NULL)
- dia->setProgress(a);
- }
- Mpal->Cpal->SetColors(doc->PageColors);
- }
-}
-
-void ScribusApp::ModifyAnnot()
-{
- PageItem *b;
- if (doc->ActPage->SelItem.count() != 0)
- {
- b = doc->ActPage->SelItem.at(0);
- if ((b->AnType == 0) || (b->AnType == 1) || (b->AnType > 9))
- {
- Annota *dia = new Annota(this, b, doc->PageC, static_cast<int>(doc->PageB), static_cast<int>(doc->PageH), doc->PageColors, view);
- if (dia->exec())
- slotDocCh();
- delete dia;
- }
- else
- {
- Annot *dia = new Annot(this, b, doc->PageC, static_cast<int>(doc->PageB), static_cast<int>(doc->PageH), doc->PageColors, view);
- if (dia->exec())
- slotDocCh();
- delete dia;
- }
- }
-}
-
-void ScribusApp::SetShortCut()
-{
- uint a;
- for (a = 0; a < 9; ++a)
- {
- fileMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- for (a = 9; a < 19; ++a)
- {
- editMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- for (a = 19; a < 30; ++a)
- {
- ObjMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- for (a = 30; a < 34; ++a)
- {
- pageMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- pageMenu->setAccel(Prefs.KeyActions[61].KeyID, Prefs.KeyActions[61].MenuID);
- for (a = 34; a < 45; ++a)
- {
- viewMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- for (a = 45; a < 49; ++a)
- {
- toolMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- pageMenu->setAccel(Prefs.KeyActions[49].KeyID, Prefs.KeyActions[49].MenuID);
- extraMenu->setAccel(Prefs.KeyActions[50].KeyID, Prefs.KeyActions[50].MenuID);
- extraMenu->setAccel(Prefs.KeyActions[51].KeyID, Prefs.KeyActions[51].MenuID);
- for (a = 52; a < 56; ++a)
- {
- helpMenu->setAccel(Prefs.KeyActions[a].KeyID, Prefs.KeyActions[a].MenuID);
- }
- ObjMenu->setAccel(Prefs.KeyActions[61].KeyID, Prefs.KeyActions[61].MenuID);
- toolMenu->setAccel(Prefs.KeyActions[62].KeyID, Prefs.KeyActions[62].MenuID);
- editMenu->setAccel(Prefs.KeyActions[63].KeyID, Prefs.KeyActions[63].MenuID);
- editMenu->setAccel(Prefs.KeyActions[64].KeyID, Prefs.KeyActions[64].MenuID);
- toolMenu->setAccel(Prefs.KeyActions[65].KeyID, Prefs.KeyActions[65].MenuID);
- ObjMenu->setAccel(Prefs.KeyActions[66].KeyID, Prefs.KeyActions[66].MenuID);
-}
-
-void ScribusApp::PutScrap(QString t)
-{
- ScBook->ObjFromMenu(t);
-}
-
-void ScribusApp::UniteOb()
-{
- doc->ActPage->UniteObj();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::SplitUniteOb()
-{
- doc->ActPage->SplitObj();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::TraceText()
-{
-#ifdef HAVE_FREETYPE
- NoFrameEdit();
- doc->ActPage->TextToPath();
- doc->UnDoValid = false;
- CanUndo();
-#endif
-}
-
-void ScribusApp::Pfadtext()
-{
- doc->ActPage->ToPathText();
- doc->UnDoValid = false;
- CanUndo();
-}
-
-void ScribusApp::changeLayer(int l)
-{
- doc->ActPage->Deselect(true);
- view->setLayMenTxt(l);
- view->LaMenu();
- view->DrawNew();
-}
-
-void ScribusApp::showLayer()
-{
- view->DrawNew();
-}
-
-void ScribusApp::LayerRemove(int l)
-{
- for (uint a = 0; a < view->Pages.count(); ++a)
- {
- for (uint b = 0; b < view->Pages.at(a)->Items.count(); ++b)
- {
- if (view->Pages.at(a)->Items.at(b)->LayerNr == l)
- view->Pages.at(a)->Items.at(b)->LayerNr = 0;
- }
- }
- for (uint a = 0; a < view->MasterPages.count(); ++a)
- {
- for (uint b = 0; b < view->MasterPages.at(a)->Items.count(); ++b)
- {
- if (view->MasterPages.at(a)->Items.at(b)->LayerNr == l)
- view->MasterPages.at(a)->Items.at(b)->LayerNr = 0;
- }
- }
- for (uint a = 0; a < view->DocPages.count(); ++a)
- {
- for (uint b = 0; b < view->DocPages.at(a)->Items.count(); ++b)
- {
- if (view->DocPages.at(a)->Items.at(b)->LayerNr == l)
- view->DocPages.at(a)->Items.at(b)->LayerNr = 0;
- }
- }
- view->LaMenu();
-}
-
-void ScribusApp::UnDoAction()
-{
- PageItem* b;
- uint a;
- bool mp = false;
- if (doc->UnDoValid)
- {
- doc->ActPage->Deselect(true);
- b = doc->UnData.Item;
- b->Select = false;
-// view->Pages.at(doc->UnData.PageNr)->SelItem.clear();
- view->Pages.at(doc->UnData.PageNr)->Deselect(true);
- switch (doc->UnData.UnCode)
- {
- case 0:
- view->Pages.at(doc->UnData.PageNr)->Items.insert(b->ItemNr, b);
- for (a = 0; a < view->Pages.at(doc->UnData.PageNr)->Items.count(); ++a)
- {
- view->Pages.at(doc->UnData.PageNr)->Items.at(a)->ItemNr = a;
- }
- break;
- case 1:
- b->Xpos = doc->UnData.Xpos;
- b->Ypos = doc->UnData.Ypos;
- break;
- case 2:
- b->Xpos = doc->UnData.Xpos;
- b->Ypos = doc->UnData.Ypos;
- b->Rot = doc->UnData.Rot;
- if (b->PType == 5)
- mp = true;
- view->Pages.at(doc->UnData.PageNr)->SizeItem(doc->UnData.Width, doc->UnData.Height, b->ItemNr, mp);
- break;
- case 3:
- b->Rot = doc->UnData.Rot;
- break;
- case 4:
- view->Pages.at(doc->UnData.PageNr)->Items.take(b->ItemNr);
- view->Pages.at(doc->UnData.PageNr)->Items.insert(doc->UnData.ItemNr, b);
- for (a = 0; a < view->Pages.at(doc->UnData.PageNr)->Items.count(); ++a)
- {
- view->Pages.at(doc->UnData.PageNr)->Items.at(a)->ItemNr = a;
- }
- break;
- }
- view->DrawNew();
- doc->UnDoValid = false;
- editMenu->setItemEnabled(edUndo, 0);
- slotDocCh();
- }
-}
-
-void ScribusApp::CanUndo()
-{
- switch (doc->UnData.UnCode)
- {
- case 0:
- editMenu->changeItem(edUndo, tr("Undo Delete Object"));
- break;
- case 1:
- case 4:
- editMenu->changeItem(edUndo, tr("Undo Object Move"));
- break;
- case 2:
- case 3:
- editMenu->changeItem(edUndo, tr("Undo Object Change"));
- break;
- }
- if (doc->UnDoValid)
- editMenu->setItemEnabled(edUndo, 1);
- else
- editMenu->setItemEnabled(edUndo, 0);
-}
-
-void ScribusApp::InitHyphenator()
-{
- QString datein = "";
- QString lang = QString(QTextCodec::locale()).left(2);
- QString pfad = PREL;
- pfad += "/lib/scribus/dicts/";
- QDir d(pfad, "*.dic", QDir::Name, QDir::Files | QDir::NoSymLinks);
- if ((d.exists()) && (d.count() != 0))
- {
- for (uint dc = 0; dc < d.count(); ++dc)
- {
- if (d[dc] == "hyph_en.dic")
- datein = tr("English");
- if (d[dc] == "hyph_de.dic")
- datein = tr("German");
- if (d[dc] == "hyph_es.dic")
- datein = tr("Spanish");
- if (d[dc] == "hyph_it.dic")
- datein = tr("Italian");
- if (d[dc] == "hyph_fr.dic")
- datein = tr("French");
- if (d[dc] == "hyph_ru.dic")
- datein = tr("Russian");
- if (d[dc] == "hyph_da.dic")
- datein = tr("Danish");
- if (d[dc] == "hyph_sk.dic")
- datein = tr("Slovak");
- if (d[dc] == "hyph_hu.dic")
- datein = tr("Hungarian");
- Sprachen.insert(datein, d[dc]);
- if (d[dc] == "hyph_"+lang+".dic")
- Prefs.Language = datein;
- }
- if (datein == "")
- Prefs.Language = tr("English");
- }
-}
-
-void ScribusApp::configHyphenator()
-{
- HySettings *dia = new HySettings(this, &Sprachen);
- if (HaveDoc)
- {
- dia->Verbose->setChecked(doc->Trenner->Automatic);
- dia->Input->setChecked(doc->Trenner->AutoCheck);
- dia->Language->setCurrentText(doc->Trenner->Language);
- dia->WordLen->setValue(doc->Trenner->MinWordLen);
- }
- else
- {
- dia->Verbose->setChecked(Prefs.Automatic);
- dia->Input->setChecked(Prefs.AutoCheck);
- dia->Language->setCurrentText(Prefs.Language);
- dia->WordLen->setValue(Prefs.MinWordLen);
- }
- if (dia->exec())
- {
- if (HaveDoc)
- {
- doc->Trenner->slotNewDict(dia->Language->currentText());
- doc->Trenner->slotNewSettings(dia->WordLen->value(), dia->Verbose->isChecked(), dia->Input->isChecked());
- }
- else
- {
- Prefs.MinWordLen = dia->WordLen->value();
- Prefs.Language = dia->Language->currentText();
- Prefs.Automatic = dia->Verbose->isChecked();
- Prefs.AutoCheck = dia->Input->isChecked();
- }
- }
- delete dia;
-}
-
-void ScribusApp::doHyphenate()
-{
- PageItem *b;
- if (HaveDoc)
- {
- if (doc->ActPage->SelItem.count() != 0)
- {
- b = doc->ActPage->SelItem.at(0);
- doc->Trenner->slotHyphenate(b);
- }
- }
-}
-
-void ScribusApp::ToggleObjLock()
-{
- PageItem *b;
- if (HaveDoc)
- {
- if (doc->ActPage->SelItem.count() != 0)
- {
- b = doc->ActPage->SelItem.at(0);
- doc->ActPage->ToggleLock();
- HaveNewSel(b->PType);
- }
- }
-}
-
-void ScribusApp::ManageGuides()
-{
- if (HaveDoc)
- {
- GuideManager *dia = new GuideManager(this, doc->ActPage, doc->Einheit);
- dia->exec();
- delete dia;
- }
-}
-
-void ScribusApp::SetTranspar(float t)
-{
- PageItem *b;
- if (HaveDoc)
- {
- if (doc->ActPage->SelItem.count() != 0)
- {
- b = doc->ActPage->SelItem.at(0);
- b->Transparency = t;
- view->DrawNew();
- slotDocCh();
- }
- }
-}
-
-void ScribusApp::Collect()
-{
- QString s = QFileDialog::getExistingDirectory(QDir::currentDirPath(), this, "d", tr("Choose a Directory"), true);
- if (s != "")
- {
- if(s.right(1) != "/")
- s += "/";
- QFileInfo fi = QFileInfo(s);
- if (fi.exists())
- {
- if (fi.isDir() && fi.isWritable())
- {
- for (uint a = 0; a < view->MasterPages.count(); ++a)
- {
- for (uint b = 0; b < view->MasterPages.at(a)->Items.count(); ++b)
- {
- PageItem* ite = view->MasterPages.at(a)->Items.at(b);
- if (ite->PType == 2)
- {
- QFileInfo itf = QFileInfo(ite->Pfile);
- if (itf.exists())
- {
- QString cmd = "cp " + ite->Pfile + " " + s + itf.fileName();
- system(cmd);
- ite->Pfile = s + itf.fileName();
- }
- }
- }
- }
- for (uint a = 0; a < view->DocPages.count(); ++a)
- {
- for (uint b = 0; b < view->DocPages.at(a)->Items.count(); ++b)
- {
- PageItem* ite = view->DocPages.at(a)->Items.at(b);
- if (ite->PType == 2)
- {
- QFileInfo itf = QFileInfo(ite->Pfile);
- if (itf.exists())
- {
- QString cmd = "cp " + ite->Pfile + " " + s + itf.fileName();
- system(cmd);
- ite->Pfile = s + itf.fileName();
- }
- }
- }
- }
- QString fn;
- if (doc->hasName)
- {
- QFileInfo fis(doc->DocName);
- fn = s + fis.fileName();
- }
- else
- fn = s + doc->DocName+".scd";
- if (!DoFileSave(fn))
- QMessageBox::warning(this, tr("Warning"), tr("Can't write the File: \n%1").arg(fn), tr("OK"));
- }
- }
- }
-}
-
-void ScribusApp::slotTest()
-{
-}
-
-void ScribusApp::slotTest2()
-{
-}
/start/Scribus/scribus/scribus.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/polyprops.h
===================================================================
--- start/Scribus/scribus/polyprops.h (revision 427)
+++ start/Scribus/scribus/polyprops.h (nonexistent)
@@ -1,67 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'polygonprops.ui'
-**
-** Created: Fre Mai 10 14:30:06 2002
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef POLYGONPROPS_H
-#define POLYGONPROPS_H
-
-#include <qdialog.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qpixmap.h>
-
-class PolygonProps : public QDialog
-{
- Q_OBJECT
-
-public:
- PolygonProps(QWidget* parent = 0);
- ~PolygonProps() {};
- float GetZeroFaktor();
- float GetMaxFaktor();
-
- QLabel* Text1;
- QSpinBox* Ecken;
- QCheckBox* Konvex;
- QLabel* Text2;
- QSpinBox* Faktor;
- QSlider* Slider1;
- QLabel* Preview;
- QLabel* Text2_2;
- QSpinBox* Faktor2;
- QSlider* Slider2;
- QPushButton* PushButton1;
- QPushButton* PushButton2;
- QPixmap* Pre;
- float PFactor;
-
-public slots:
- void UpdatePreView();
- float GetFaktor();
- void ValFromSpin(int a);
- void ValFromSpin2(int a);
-
-protected:
- QVBoxLayout* PolygonPropsLayout;
- QHBoxLayout* Layout11;
- QVBoxLayout* Layout10;
- QHBoxLayout* Layout2;
- QHBoxLayout* Layout9;
- QVBoxLayout* Layout8;
- QHBoxLayout* Layout7;
- QHBoxLayout* Layout1_2;
- QHBoxLayout* Layout9_2;
- QVBoxLayout* Layout8_2;
- QHBoxLayout* Layout7_2;
-};
-
-#endif // POLYGONPROPS_H
/start/Scribus/scribus/polyprops.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: start/Scribus/scribus/hyask.cpp
===================================================================
--- start/Scribus/scribus/hyask.cpp (revision 427)
+++ start/Scribus/scribus/hyask.cpp (nonexistent)
@@ -1,92 +0,0 @@
-#include "hyask.h"
-#include "hyask.moc"
-#include <qpixmap.h>
-#include <qregexp.h>
-extern QPixmap loadIcon(QString nam);
-
-WortEdit::WortEdit(QWidget* parent) : QLineEdit(parent)
-{
-}
-
-void WortEdit::keyPressEvent(QKeyEvent *k)
-{
- int p = cursorPosition();
- QChar cc = text()[p];
- if ((k->key() == Key_Left) || (k->key() == Key_Right))
- QLineEdit::keyPressEvent(k);
- if (k->key() == Key_Delete)
- {
- if (cc == "-")
- QLineEdit::keyPressEvent(k);
- setCursorPosition(p);
- }
- if ((k->key() == Key_Backspace) && (p != 0))
- {
- cc = text()[p-1];
- if (cc == "-")
- QLineEdit::keyPressEvent(k);
- setCursorPosition(p-1);
- }
- if (k->key() == Key_Minus)
- QLineEdit::keyPressEvent(k);
-}
-
-HyAsk::HyAsk( QWidget* parent, QString HWort )
- : QDialog( parent, "name", true, 0 )
-{
- resize( 322, 73 );
- setCaption( tr( "Possible Hyphenation" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- HyAskLayout = new QVBoxLayout( this, 11, 6, "HyAskLayout");
-
- Wort = new WortEdit( this );
- Wort->setMinimumSize( QSize( 300, 0 ) );
- Wort->setDragEnabled( false );
- Wort->setText( HWort );
- HyAskLayout->addWidget( Wort );
-
- Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
-
- OK = new QPushButton( this, "OK" );
- OK->setText( tr( "Accept" ) );
- OK->setDefault( true );
- Layout