Subversion Repositories Scribus

Compare Revisions

Ignore 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/iso8859-7ps.enc
===================================================================
--- start/Scribus/scribus/iso8859-7ps.enc (revision 427)
+++ start/Scribus/scribus/iso8859-7ps.enc (nonexistent)
@@ -1,96 +0,0 @@
-16#A0 /space
-16#A1 /quoteleft
-16#A2 /quoteright
-16#A3 /sterling
-16#A4 /.notdef
-16#A5 /.notdef
-16#A6 /brokenbar
-16#A7 /section
-16#A8 /dieresis
-16#A9 /copyright
-16#AA /.notdef
-16#AB /guillemotleft
-16#AC /logicalnot
-16#AD /hyphen
-16#AE /.notdef
-16#AF /endash
-16#B0 /degree
-16#B1 /plusminus
-16#B2 /twosuperior
-16#B3 /threesuperior
-16#B4 /acute
-16#B5 /dieresisacute
-16#B6 /afii9936
-16#B7 /periodcentered
-16#B8 /afii9937
-16#B9 /afii9938
-16#BA /afii9939
-16#BB /guillemotright
-16#BC /afii9940
-16#BD /onehalf
-16#BE /afii9941
-16#BF /afii9942
-16#C0 /afii9977
-16#C1 /afii9793
-16#C2 /afii9794
-16#C3 /afii9796
-16#C4 /afii9797
-16#C5 /afii9798
-16#C6 /afii9801
-16#C7 /afii9802
-16#C8 /afii9803
-16#C9 /afii9804
-16#CA /afii9805
-16#CB /afii9806
-16#CC /afii9807
-16#CD /afii9808
-16#CE /afii9809
-16#CF /afii9810
-16#D0 /afii9811
-16#D1 /afii9813
-16#D2 /.notdef
-16#D3 /afii9814
-16#D4 /afii9816
-16#D5 /afii9817
-16#D6 /afii9818
-16#D7 /afii9819
-16#D8 /afii9820
-16#D9 /afii9821
-16#DA /afii9943
-16#DB /afii9944
-16#DC /afii9968
-16#DD /afii9969
-16#DE /afii9970
-16#DF /afii9971
-16#E0 /afii9978
-16#E1 /afii9825
-16#E2 /afii9826
-16#E3 /afii9828
-16#E4 /afii9829
-16#E5 /afii9830
-16#E6 /afii9833
-16#E7 /afii9834
-16#E8 /afii9835
-16#E9 /afii9836
-16#EA /afii9837
-16#EB /afii9838
-16#EC /afii9839
-16#ED /afii9840
-16#EE /afii9841
-16#EF /afii9842
-16#F0 /afii9843
-16#F1 /afii9845
-16#F2 /afii9847
-16#F3 /afii9846
-16#F4 /afii9848
-16#F5 /afii9849
-16#F6 /afii9850
-16#F7 /afii9851
-16#F8 /afii9852
-16#F9 /afii9853
-16#FA /afii9975
-16#FB /afii9976
-16#FC /afii9972
-16#FD /afii9973
-16#FE /afii9974
-16#FF /.notdef
/start/Scribus/scribus/iso8859-7ps.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/pdfopts.h
===================================================================
--- start/Scribus/scribus/pdfopts.h (revision 427)
+++ start/Scribus/scribus/pdfopts.h (nonexistent)
@@ -1,201 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'PDFOpts.ui'
-**
-** Created: Mon Jun 4 10:02:30 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef PDF_OPTS_H
-#define PDF_OPTS_H
-
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qtoolbutton.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qmap.h>
-#include <qvaluelist.h>
-#include <qlistbox.h>
-#include "bookmwin.h"
-#include "mspinbox.h"
-
-class PDF_Opts : public QDialog
-{
- Q_OBJECT
-
-public:
- PDF_Opts( QWidget* parent, QString Fname, QMap<QString,QFont> DocFonts, ScribusView *vie, PDFOpt *Optionen, QValueList<PreSet> Eff, ProfilesL *PDFXProfiles, SCFonts &AllFonts );
- ~PDF_Opts();
-
- QLabel* Name;
- QLabel* TextLabel1;
- QTabWidget* Options;
- QWidget* tab;
- QSpinBox* ValC;
- QSpinBox* Resolution;
- QCheckBox* DSColor;
- QCheckBox* Article;
- QCheckBox* Compression;
- QToolButton* FileC;
- QPushButton* OK;
- QPushButton* Cancel;
- QLineEdit* Datei;
- BookMView *BView;
- QGroupBox* GroupBox1;
- QGroupBox* GroupBox2;
- QLabel* TextLabel2;
- QComboBox* ComboBox1;
- QLabel* TextLabel1x;
- QComboBox* ComboBind;
- QCheckBox* CheckBox1;
- QCheckBox* CheckBox10;
- QPushButton* EonAllPg;
- QWidget* tab_3;
- QWidget* tab_5;
- QLabel* TextLabel1e;
- QLabel* TextLabel2e;
- QLabel* TextLabel3e;
- QLabel* TextLabel4e;
- QLabel* TextLabel5e;
- QLabel* TextLabel6e;
- QComboBox* EffectType;
- QComboBox* EDirection;
- QComboBox* EDirection_2;
- QComboBox* EDirection_2_2;
- QSpinBox* PageTime;
- QSpinBox* EffectTime;
- QListBox* Pages;
- QGroupBox* Effects;
- QCheckBox* PagePrev;
- QCheckBox* CheckBM;
- QCheckBox* EmbedFonts;
- QGroupBox* GroupFont;
- QLabel* TextFont1;
- QListBox* AvailFlist;
- QPushButton* ToEmbed;
- QPushButton* FromEmbed;
- QLabel* TextFont1_2;
- QButtonGroup* RangeGroup;
- QRadioButton* AllPages;
- QRadioButton* OnlySome;
- QSpinBox* LastPage;
- QLabel* RText;
- QSpinBox* FirstPage;
- QListBox* EmbedList;
- QWidget* tabcolor;
- QGroupBox* ColorGroup;
- QGroupBox* GroupBox9;
- QLabel* ColorText1;
- QComboBox* OutCombo;
- QCheckBox* EmbedProfs;
- QCheckBox* EmbedProfs2;
- QGroupBox* ProfsGroup;
- QComboBox* SolidPr;
- QLabel* ProfsTxt1;
- QComboBox* ImageP;
- QCheckBox* NoEmbedded;
- QLabel* ProfsTxt3;
- QLabel* ProfsTxt4;
- QLabel* ProfsTxt2;
- QComboBox* IntendS;
- QComboBox* IntendI;
- QWidget* tabpdfx;
- QGroupBox* X3Group;
- QComboBox* PrintProfC;
- QLineEdit* InfoString;
- QLabel* PDFX2;
- QLabel* PDFX1;
- QGroupBox* BleedGroup;
- QLabel* BleedIcon;
- MSpinBox* BleedTop;
- MSpinBox* BleedBottom;
- MSpinBox* BleedRight;
- MSpinBox* BleedLeft;
- QWidget* tabsec;
- QGroupBox* GroupPass;
- QLabel* TextSec2;
- QLabel* TextSec1;
- QLineEdit* PassOwner;
- QLineEdit* PassUser;
- QGroupBox* GroupSecSet;
- QCheckBox* PrintSec;
- QCheckBox* PrintSec2;
- QCheckBox* ModifySec;
- QCheckBox* CopySec;
- QCheckBox* AddSec;
- QCheckBox* Encry;
- QValueList<QString> FontsToEmbed;
- ScribusView *view;
- QValueList<PreSet> EffVal;
- int PgSel;
- int Einheit;
-
-public slots:
- void ToggleEncr();
- void BleedChanged();
- void EnablePDFX(int a);
- void DoDownsample();
- void RemoveEmbed();
- void PutToEmbed();
- void SelAFont(QListBoxItem*);
- void SelEFont(QListBoxItem*);
- void EmbedAll();
- void ChangeFile();
- void PagePr();
- void SetPgEff(int nr);
- void SetEffOpts(int nr);
- void ValidDI(int nr);
- void DoEffects();
- void EffectOnAll();
- void SelRange(bool e);
- void ChFrom();
- void ChTo();
- void EnablePr(int a);
- void EnablePG();
- void EnablePGI();
- void EnablePGI2();
-
-protected:
- QVBoxLayout* PDFOptsLayout;
- QHBoxLayout* Layout5;
- QVBoxLayout* tabLayout;
- QVBoxLayout* Layout3;
- QHBoxLayout* Layout2;
- QVBoxLayout* tabLayout_3;
- QHBoxLayout* GroupFontLayout;
- QVBoxLayout* Layout4_2;
- QVBoxLayout* Layout5_2;
- QVBoxLayout* Layout6;
- QHBoxLayout* Layout7;
- QGridLayout* GroupBox1Layout;
- QGridLayout* GroupBox9Layout;
- QGridLayout* GroupBox2Layout;
- QGridLayout* tabLayout_5;
- QGridLayout* EffectsLayout;
- QHBoxLayout* Layout13;
- QVBoxLayout* RangeGroupLayout;
- QGridLayout* Layout11;
- QVBoxLayout* tabcolorLayout;
- QHBoxLayout* ColorGroupLayout;
- QGridLayout* ProfsGroupLayout;
- QVBoxLayout* tabpdfxLayout;
- QGridLayout* X3GroupLayout;
- QGridLayout* BleedGroupLayout;
- QVBoxLayout* tabsecLayout;
- QGridLayout* GroupPassLayout;
- QVBoxLayout* GroupSecSetLayout;
-
-};
-
-#endif // PDF_OPTS_H
/start/Scribus/scribus/pdfopts.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/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/applytemplate.h
===================================================================
--- start/Scribus/scribus/applytemplate.h (revision 427)
+++ start/Scribus/scribus/applytemplate.h (nonexistent)
@@ -1,31 +0,0 @@
-#ifndef APPLYT_H
-#define APPLYT_H
-
-#include <qdialog.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include "scribusview.h"
-
-class ApplyT : public QDialog
-{
- Q_OBJECT
-
-public:
- ApplyT( QWidget* parent, ScribusView *view);
- ~ApplyT() {};
-
- QLabel* TextLabel1;
- QComboBox* Templ;
- QPushButton* CancelB;
- QPushButton* OKButton;
-
-protected:
- QGridLayout* ApplyTLayout;
- QHBoxLayout* Layout4;
-};
-
-#endif // APPLYT_H
/start/Scribus/scribus/applytemplate.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/inspage.cpp
===================================================================
--- start/Scribus/scribus/inspage.cpp (revision 427)
+++ start/Scribus/scribus/inspage.cpp (nonexistent)
@@ -1,114 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'InsPage.ui'
-**
-** Created: Tue Jun 12 21:21:13 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "inspage.h"
-#include "inspage.moc"
-extern QPixmap loadIcon(QString nam);
-
-InsPage::InsPage( QWidget* parent, ScribusView* view, int act, int max, bool ds)
- : QDialog( parent, "InsPage", true, 0 )
-{
- setCaption( tr( "Insert Page" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- DLayout = new QVBoxLayout( this );
- DLayout->setSpacing( 5 );
- DLayout->setMargin( 10 );
- Layout4 = new QGridLayout;
- Layout4->setSpacing( 6 );
- Layout4->setMargin( 5 );
- TextLabel1 = new QLabel( this, "TextLabel1" );
- TextLabel1->setText( tr( "Inserting" ) );
- Layout4->addWidget( TextLabel1, 0, 0 );
- NumPages = new QSpinBox( this, "NumPages" );
- NumPages->setMinValue( 1 );
- NumPages->setValue( 1 );
- Layout4->addWidget( NumPages, 0, 1 );
- TextLabel2 = new QLabel( this, "TextLabel2" );
- TextLabel2->setText( tr( "page(s)" ) );
- Layout4->addWidget( TextLabel2, 0, 2 );
- Where = new QComboBox( true, this, "Where" );
- Where->insertItem(tr("before Page"));
- Where->insertItem(tr("after Page"));
- Where->insertItem(tr("at End"));
- Where->setEditable(false);
- Where->setCurrentItem(2);
- Layout4->addMultiCellWidget( Where, 1, 1, 0, 1 );
- ActualPage = new QSpinBox( this, "ActualPage" );
- ActualPage->setMinValue( 1 );
- ActualPage->setValue( act+1 );
- ActualPage->setMaxValue(max);
- Layout4->addWidget( ActualPage, 1, 2 );
- Layout4->addColSpacing(0, TextLabel1->fontMetrics().width(tr( "Inserting" )));
- DLayout->addLayout( Layout4 );
- Layout4a = new QHBoxLayout;
- Layout4a->setSpacing( 6 );
- Layout4a->setMargin( 0 );
- TextLabel3 = new QLabel(this, "text");
- if (ds)
- TextLabel3->setText(tr("Template (Left Page):"));
- else
- TextLabel3->setText(tr("Template:"));
- Layout4a->addWidget( TextLabel3 );
- QSpacerItem* spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout4a->addItem( spacer3 );
- Based = new QComboBox(true, this, "BA");
- Based->setEditable(false);
- QMap<QString,int>::Iterator it;
- for (it = view->MasterNames.begin(); it != view->MasterNames.end(); ++it)
- {
- if (it.key() == "Normal")
- Based->insertItem(tr("Normal"));
- else
- Based->insertItem(it.key());
- }
- Layout4a->addWidget(Based);
- DLayout->addLayout(Layout4a);
- if (ds)
- {
- Layout4b = new QHBoxLayout;
- Layout4b->setSpacing( 6 );
- Layout4b->setMargin( 0 );
- TextLabel3a = new QLabel(this, "texta");
- TextLabel3a->setText(tr("Template (Right Page):"));
- Layout4b->addWidget( TextLabel3a );
- QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout4b->addItem( spacer2 );
- Based2 = new QComboBox(true, this, "BaA");
- Based2->setEditable(false);
- QMap<QString,int>::Iterator it2;
- for (it2 = view->MasterNames.begin(); it2 != view->MasterNames.end(); ++it2)
- {
- if (it2.key() == "Normal")
- Based2->insertItem(tr("Normal"));
- else
- Based2->insertItem(it2.key());
- }
- Layout4b->addWidget(Based2);
- DLayout->addLayout(Layout4b);
- }
- Layout3 = new QHBoxLayout;
- Layout3->setSpacing( 6 );
- Layout3->setMargin( 5 );
- PushButton4 = new QPushButton( this, "PushButton4" );
- PushButton4->setText( tr( "OK" ) );
- PushButton4->setDefault( true );
- Layout3->addWidget( PushButton4 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer );
- PushButton4_2 = new QPushButton( this, "PushButton4_2" );
- PushButton4_2->setText( tr( "Cancel" ) );
- Layout3->addWidget( PushButton4_2 );
- DLayout->addLayout( Layout3 );
- setMaximumSize(sizeHint());
-
- // signals and slots connections
- connect( PushButton4, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( PushButton4_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
-}
-
-
/start/Scribus/scribus/inspage.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/cupsoptions.h
===================================================================
--- start/Scribus/scribus/cupsoptions.h (revision 427)
+++ start/Scribus/scribus/cupsoptions.h (nonexistent)
@@ -1,56 +0,0 @@
-/***************************************************************************
- cupsoptions.h - description
- -------------------
- begin : Fre Jan 3 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 CUPSOPTIONS_H
-#define CUPSOPTIONS_H
-
-#include <qdialog.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtable.h>
-#include <qcombobox.h>
-#include <qptrlist.h>
-#include <qmap.h>
-
-/**
- *@author Franz Schmid
- */
-
-class CupsOptions : public QDialog
-{
- Q_OBJECT
-
-public:
- CupsOptions(QWidget* parent, QString Geraet);
- ~CupsOptions() {};
- QPushButton* PushButton1;
- QPushButton* PushButton2;
- QHeader *Header;
- QTable* Table;
- struct OpData { int Cnum;
- QString KeyW;
- };
- QPtrList<QComboBox> FlagsOpt;
- QMap<QString,OpData> KeyToText;
- QMap<QString,QString> KeyToDefault;
-
-protected:
- QVBoxLayout* CupsOptionsLayout;
- QHBoxLayout* Layout2;
-};
-
-#endif
/start/Scribus/scribus/cupsoptions.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-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/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/fpointarray.h
===================================================================
--- start/Scribus/scribus/fpointarray.h (revision 427)
+++ start/Scribus/scribus/fpointarray.h (nonexistent)
@@ -1,53 +0,0 @@
-/***************************************************************************
- fpointarray.h - description
- -------------------
- begin : Mit Jul 24 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 FPOINTARRAY_H
-#define FPOINTARRAY_H
-
-#include <qmemarray.h>
-#include <qwmatrix.h>
-#include <qpoint.h>
-#include "fpoint.h"
-
-/**
- *@author Franz Schmid
- */
-
-class FPointArray : public QMemArray<FPoint>
-{
-public:
- FPointArray() {};
- FPointArray(int size) : QMemArray<FPoint>(size) {};
- void setPoint(uint i, float x, float y);
- void setPoint(uint i, FPoint p);
- bool setPoints( int nPoints, double firstx, double firsty, ... );
- bool putPoints( int index, int nPoints, double firstx, double firsty, ... );
- bool putPoints( int index, int nPoints, const FPointArray & from, int fromIndex = 0 );
- void point(uint i, float *x, float *y);
- FPoint point(uint i);
- QPoint pointQ(uint i);
- void translate( float dx, float dy );
- FPoint WidthHeight();
- void map(QWMatrix m);
- FPointArray &operator=( const FPointArray &a )
- { return (FPointArray&)assign( a ); }
- FPointArray copy() const
- { FPointArray tmp; return *((FPointArray*)&tmp.duplicate(*this)); }
- ~FPointArray() {};
-};
-
-#endif
/start/Scribus/scribus/fpointarray.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/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/bookpalette.cpp
===================================================================
--- start/Scribus/scribus/bookpalette.cpp (revision 427)
+++ start/Scribus/scribus/bookpalette.cpp (nonexistent)
@@ -1,36 +0,0 @@
-/***************************************************************************
- bookpalette.cpp - 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. *
- * *
- ***************************************************************************/
-
-#include "bookpalette.h"
-#include "bookpalette.moc"
-extern QPixmap loadIcon(QString nam);
-
-BookPalette::BookPalette(QWidget* parent) : QDialog( parent, "Books", false, Qt::WStyle_Customize | Qt::WStyle_Title | Qt::WStyle_Tool )
-{
- setIcon(loadIcon("AppIcon.xpm"));
- setCaption( tr( "Bookmarks" ) );
- PaletteLayout = new QVBoxLayout( this, 0, 0, "PaletteLayout");
- BView = new BookMView(this);
- BView->setMinimumSize(QSize(100,150));
- PaletteLayout->addWidget( BView );
-}
-
-void BookPalette::closeEvent(QCloseEvent *ce)
-{
- emit Schliessen();
- ce->accept();
-}
/start/Scribus/scribus/bookpalette.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.h
===================================================================
--- start/Scribus/scribus/werktoolb.h (revision 427)
+++ start/Scribus/scribus/werktoolb.h (nonexistent)
@@ -1,74 +0,0 @@
-/***************************************************************************
- texttoolb.h - 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. *
- * *
- ***************************************************************************/
-
-#ifndef WERKTOOLB_H
-#define WERKTOOLB_H
-
-#include <qtoolbar.h>
-#include <qmainwindow.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
-
-/**
- *@author Franz Schmid
- */
-
-class WerkToolB : public QToolBar {
-
-Q_OBJECT
-
-public:
- WerkToolB(QMainWindow* parent);
- ~WerkToolB() {};
- QToolButton* Select;
- QToolButton* Rotiere;
- QToolButton* Textedit;
- QToolButton* Zoom;
- QToolButton* Texte;
- QToolButton* BildB;
- QToolButton* Linien;
- QToolButton* Kreis;
- QToolButton* Rechteck;
- QToolButton* Polygon;
- QToolButton* PolyLin;
- QPopupMenu* PolyM;
- QToolButton* KetteEin;
- QToolButton* KetteAus;
- QToolButton* PDFTool;
- QPopupMenu* PDFM;
- QToolButton* PDFaTool;
- QPopupMenu* PDFA;
- bool Sichtbar;
- int EdPo;
- int PDFwerkz;
- int PDFnotiz;
-
-public slots:
- void setPDFnotiz(int id);
- void setPDFtool(int id);
- void Docken(QDockWindow::Place p);
- void Verbergen(bool vis);
- void GetPolyProps();
- void ModeFromTB();
-
-signals:
- void Schliessen();
- void NewMode(int);
-};
-
-#endif
/start/Scribus/scribus/werktoolb.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/druck.h
===================================================================
--- start/Scribus/scribus/druck.h (revision 427)
+++ start/Scribus/scribus/druck.h (nonexistent)
@@ -1,132 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'Druck.ui'
-**
-** Created: Mon Sep 17 21:42:05 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef DRUCK_H
-#define DRUCK_H
-
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-
-class AdvOptions : public QDialog
-{
- Q_OBJECT
-
-public:
- AdvOptions(QWidget* parent, bool Hm, bool Vm, bool Ic);
- ~AdvOptions() {};
- QCheckBox* MirrorH;
- QCheckBox* MirrorV;
- QCheckBox* UseICC;
- QPushButton* PushButton1;
- QPushButton* PushButton2;
-
-protected:
- QVBoxLayout* AdvOptionsLayout;
- QHBoxLayout* Layout2;
-};
-
-class Druck : public QDialog
-{
- Q_OBJECT
-
-public:
- Druck( QWidget* parent, QString PDatei, QString PDev, QString PCom );
- ~Druck() {};
- QString printerName();
- QString outputFileName();
- QCheckBox* OtherCom;
- QLabel* OthText;
- QLineEdit* Command;
- bool outputToFile();
- int fromPage();
- int toPage();
- int numCopies();
- int pageOrder();
- bool outputSeparations();
- QString separationName();
- QString PrinterOpts;
- bool color();
- bool MirrorH;
- bool MirrorV;
- bool ICCinUse;
-
-public slots:
- void setMinMax(int min, int max);
- void setFromTo(int min, int max);
-
-protected:
- QVBoxLayout* DruckLayout;
- QGridLayout* DruckerLayout;
- QHBoxLayout* Layout1x;
- QHBoxLayout* Layout1;
- QHBoxLayout* UmfangLayout;
- QGridLayout* ButtonGroup5Layout;
- QGridLayout* ButtonGroup4Layout;
- QVBoxLayout* ButtonGroup3Layout;
- QVBoxLayout* ButtonGroup3_2Layout;
- QGridLayout* OptionenLayout;
- QHBoxLayout* Layout2;
- QHBoxLayout* LayoutCC;
-
-private slots:
- void SetAdvOptions();
- void SetOptions();
- void SelPrinter(const QString& prn);
- void SelRange(bool e);
- void SelMode(bool e);
- void SelFile();
- void SelComm();
-
-private:
- QGroupBox* Drucker;
- QComboBox* PrintDest;
- QLabel* DateiT;
- QLineEdit* LineEdit1;
- QToolButton* ToolButton1;
- QButtonGroup* Umfang;
- QButtonGroup* ButtonGroup5;
- QLabel* TextLabel2_2;
- QSpinBox* To;
- QSpinBox* From;
- QLabel* TextLabel2;
- QRadioButton* RadioButton2;
- QRadioButton* RadioButton1;
- QButtonGroup* ButtonGroup4;
- QRadioButton* FirstPlast;
- QRadioButton* FirstPfirst;
- QLabel* TextLabel3;
- QSpinBox* Copies;
- QButtonGroup* Optionen;
- QButtonGroup* ButtonGroup3;
- QButtonGroup* ButtonGroup3_2;
- QRadioButton* NormalP;
- QRadioButton* PrintSep;
- QRadioButton* PrintGray;
- QRadioButton* PrintGray2;
- QComboBox* SepArt;
- QPushButton* OKButton_2;
- QPushButton* OKButton;
- QPushButton* OptButton;
- QPushButton* AdvOptButton;
- QString Geraet;
- bool ToFile;
- bool ToSeparation;
-};
-
-#endif // DRUCK_H
/start/Scribus/scribus/druck.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/pdfopts.cpp
===================================================================
--- start/Scribus/scribus/pdfopts.cpp (revision 427)
+++ start/Scribus/scribus/pdfopts.cpp (nonexistent)
@@ -1,1167 +0,0 @@
-#include "pdfopts.h"
-#include "pdfopts.moc"
-#include "customfdialog.h"
-#include "config.h"
-extern QPixmap loadIcon(QString nam);
-extern float UmReFaktor;
-extern ProfilesL InputProfiles;
-#ifdef HAVE_CMS
-extern bool CMSuse;
-#endif
-extern bool CMSavail;
-
-PDF_Opts::PDF_Opts( QWidget* parent, QString Fname, QMap<QString,QFont> DocFonts, ScribusView *vie, PDFOpt *Optionen, QValueList<PreSet> Eff, ProfilesL *PDFXProfiles, SCFonts &AllFonts)
- : QDialog( parent, "pdf", true, 0 )
-{
- setCaption( tr( "Create PDF-File" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- FontsToEmbed.clear();
- view = vie;
- EffVal = Eff;
- Einheit = view->Doc->Einheit;
- PDFOptsLayout = new QVBoxLayout( this );
- PDFOptsLayout->setSpacing( 6 );
- PDFOptsLayout->setMargin( 11 );
- Name = new QLabel( this, "Name" );
- Name->setFrameShape( QLabel::NoFrame );
- Name->setText( tr( "Output to File:" ) );
- PDFOptsLayout->addWidget( Name );
- Layout5 = new QHBoxLayout;
- Layout5->setSpacing( 6 );
- Layout5->setMargin( 0 );
- Datei = new QLineEdit( this, "Datei" );
- Datei->setMinimumSize( QSize( 268, 22 ) );
- if (Optionen->Datei != "")
- Datei->setText(Optionen->Datei);
- else
- {
- QFileInfo fi = QFileInfo(Fname);
- Datei->setText(fi.dirPath()+"/"+fi.baseName()+".pdf");
- }
- Layout5->addWidget( Datei );
- FileC = new QToolButton( this, "FileC" );
- FileC->setMinimumSize( QSize( 88, 24 ) );
- FileC->setText( tr( "Change..." ) );
- Layout5->addWidget( FileC );
- PDFOptsLayout->addLayout( Layout5 );
- Options = new QTabWidget( this, "TabWidget2" );
- tab = new QWidget( Options, "tab" );
- tabLayout = new QVBoxLayout( tab );
- tabLayout->setSpacing( 6 );
- tabLayout->setMargin( 11 );
-
- Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13");
-
- RangeGroup = new QButtonGroup( tab, "RangeGroup" );
- RangeGroup->setTitle( tr( "Export Range" ) );
- RangeGroup->setColumnLayout(0, Qt::Vertical );
- RangeGroup->layout()->setSpacing( 6 );
- RangeGroup->layout()->setMargin( 11 );
- RangeGroupLayout = new QVBoxLayout( RangeGroup->layout() );
- RangeGroupLayout->setAlignment( Qt::AlignTop );
- AllPages = new QRadioButton( RangeGroup, "AllPages" );
- AllPages->setText( tr( "All Pages" ) );
- AllPages->setChecked( true );
- RangeGroupLayout->addWidget( AllPages );
- Layout11 = new QGridLayout( 0, 1, 1, 0, 6, "Layout11");
- OnlySome = new QRadioButton( RangeGroup, "OnlySome" );
- OnlySome->setText( tr( "From:" ) );
- Layout11->addWidget( OnlySome, 0, 0 );
- LastPage = new QSpinBox( RangeGroup, "LastPage" );
- LastPage->setMaxValue(view->Pages.count());
- LastPage->setMinValue( 1 );
- Layout11->addWidget( LastPage, 1, 1 );
- RText = new QLabel( RangeGroup, "RText" );
- RText->setText( tr( "to:" ) );
- Layout11->addWidget( RText, 1, 0, AlignRight );
- FirstPage = new QSpinBox( RangeGroup, "FirstPage" );
- FirstPage->setMaxValue(view->Pages.count());
- FirstPage->setMinValue( 1 );
- FirstPage->setValue(1);
- LastPage->setValue(view->Pages.count());
- Layout11->addWidget( FirstPage, 0, 1 );
- RangeGroupLayout->addLayout( Layout11 );
- FirstPage->setEnabled(false);
- LastPage->setEnabled(false);
- RText->setEnabled(false);
- Layout13->addWidget( RangeGroup );
-
- GroupBox1 = new QGroupBox( tab, "GroupBox1" );
- GroupBox1->setTitle( tr( "File Options" ) );
- GroupBox1->setColumnLayout(0, Qt::Vertical );
- GroupBox1->layout()->setSpacing( 0 );
- GroupBox1->layout()->setMargin( 0 );
- GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
- GroupBox1Layout->setAlignment( Qt::AlignTop );
- GroupBox1Layout->setSpacing( 6 );
- GroupBox1Layout->setMargin( 11 );
- TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
- TextLabel1->setText( tr( "Compatibility:" ) );
- TextLabel1->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
- GroupBox1Layout->addWidget( TextLabel1, 0, 0 );
- ComboBox1 = new QComboBox( true, GroupBox1, "ComboBox1" );
- ComboBox1->insertItem("Acrobat 4.0");
- ComboBox1->insertItem("Acrobat 5.0");
-#ifdef HAVE_CMS
- if ((CMSuse) && (CMSavail) && (!PDFXProfiles->isEmpty()))
- ComboBox1->insertItem("PDF/X-3");
-#endif
- ComboBox1->setEditable(false);
-#ifdef HAVE_CMS
- if ((CMSuse) && (CMSavail))
- {
- if (Optionen->Version == 12)
- ComboBox1->setCurrentItem(2);
- }
- else
- ComboBox1->setCurrentItem(0);
-#endif
- if (Optionen->Version == 13)
- ComboBox1->setCurrentItem(0);
- if (Optionen->Version == 14)
- ComboBox1->setCurrentItem(1);
- GroupBox1Layout->addMultiCellWidget( ComboBox1, 0, 0, 1, 2, AlignLeft );
- TextLabel1x = new QLabel( GroupBox1, "TextLabel1" );
- TextLabel1x->setText( tr( "Binding:" ) );
- TextLabel1x->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
- GroupBox1Layout->addWidget( TextLabel1x, 1, 0 );
- ComboBind = new QComboBox( true, GroupBox1, "ComboBind" );
- ComboBind->insertItem(tr("Left Margin"));
- ComboBind->insertItem(tr("Right Margin"));
- ComboBind->setEditable(false);
- ComboBind->setCurrentItem(Optionen->Binding);
- GroupBox1Layout->addMultiCellWidget( ComboBind, 1, 1, 1, 2, AlignLeft );
- CheckBox1 = new QCheckBox( GroupBox1, "CheckBox1" );
- CheckBox1->setText( tr( "Generate Thumbnails" ) );
- CheckBox1->setChecked(Optionen->Thumbnails);
- GroupBox1Layout->addMultiCellWidget( CheckBox1, 2, 2, 0, 2 );
- Article = new QCheckBox( GroupBox1, "CheckBox1" );
- Article->setText( tr( "Save linked Text Frames as PDF-Articles" ) );
- Article->setChecked(Optionen->Articles);
- GroupBox1Layout->addMultiCellWidget( Article, 3, 3, 0, 2 );
- CheckBM = new QCheckBox( GroupBox1, "E" );
- CheckBM->setText( tr( "Include Bookmarks" ) );
- CheckBM->setChecked(Optionen->Bookmarks);
- GroupBox1Layout->addMultiCellWidget( CheckBM, 4, 4, 0, 2 );
- TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
- TextLabel2->setText( tr( "Resolution:" ) );
- TextLabel2->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
- GroupBox1Layout->addWidget( TextLabel2, 5, 0 );
- Resolution = new QSpinBox( GroupBox1, "Resolution" );
- Resolution->setMaxValue( 4000 );
- Resolution->setMinValue( 35 );
- Resolution->setValue(Optionen->Resolution);
- Resolution->setSuffix( tr( " dpi" ) );
- GroupBox1Layout->addWidget( Resolution, 5, 1, AlignLeft );
- Layout13->addWidget( GroupBox1 );
- tabLayout->addLayout( Layout13 );
- GroupBox2 = new QGroupBox( tab, "GroupBox2" );
- GroupBox2->setTitle( tr( "Compression" ) );
- GroupBox2->setColumnLayout(0, Qt::Vertical );
- GroupBox2->layout()->setSpacing( 0 );
- GroupBox2->layout()->setMargin( 0 );
- GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
- GroupBox2Layout->setAlignment( Qt::AlignTop );
- GroupBox2Layout->setSpacing( 6 );
- GroupBox2Layout->setMargin( 11 );
- DSColor = new QCheckBox( GroupBox2, "DSColor" );
- DSColor->setText( tr( "Downsample Images to:" ) );
- DSColor->setChecked(Optionen->RecalcPic);
- GroupBox2Layout->addWidget( DSColor, 1, 0 );
- ValC = new QSpinBox( GroupBox2, "ValC" );
- ValC->setSuffix( tr( " dpi" ) );
- ValC->setMaxValue( 4000 );
- ValC->setMinValue( 35 );
- ValC->setValue(Optionen->PicRes);
- if (DSColor->isChecked())
- ValC->setEnabled(true);
- else
- ValC->setEnabled(false);
- GroupBox2Layout->addWidget( ValC, 1, 1, AlignLeft );
- Compression = new QCheckBox( GroupBox2, "Compression" );
- Compression->setText( tr( "Compress Text and Vector Graphics" ) );
- Compression->setChecked(Optionen->Compress);
- GroupBox2Layout->addMultiCellWidget( Compression, 0, 0, 0, 1 );
- tabLayout->addWidget( GroupBox2 );
- Options->insertTab( tab, tr( "General" ) );
- tab_3 = new QWidget( Options, "tab_3" );
- tabLayout_3 = new QVBoxLayout( tab_3 );
- tabLayout_3->setSpacing( 6 );
- tabLayout_3->setMargin( 11 );
- EmbedFonts = new QCheckBox( tab_3, "EmbedFonts" );
- EmbedFonts->setText( tr( "Embed all Fonts" ) );
- tabLayout_3->addWidget( EmbedFonts );
- GroupFont = new QGroupBox( tab_3, "GroupFont" );
- GroupFont->setTitle( tr( "Embedding" ) );
- GroupFont->setColumnLayout(0, Qt::Vertical );
- GroupFont->layout()->setSpacing( 0 );
- GroupFont->layout()->setMargin( 0 );
- GroupFontLayout = new QHBoxLayout( GroupFont->layout() );
- GroupFontLayout->setAlignment( Qt::AlignTop );
- GroupFontLayout->setSpacing( 6 );
- GroupFontLayout->setMargin( 11 );
- Layout4_2 = new QVBoxLayout;
- Layout4_2->setSpacing( 6 );
- Layout4_2->setMargin( 0 );
- TextFont1 = new QLabel( GroupFont, "TextFont1" );
- TextFont1->setText( tr( "Available Fonts:" ) );
- Layout4_2->addWidget( TextFont1 );
- AvailFlist = new QListBox( GroupFont, "AvailFlist" );
- QMap<QString,QFont>::Iterator it;
- for (it = DocFonts.begin(); it != DocFonts.end(); ++it)
- {
- if (AllFonts[it.key()]->HasMetrics)
- AvailFlist->insertItem(loadIcon("ok.png"), it.key());
- else
- {
- AvailFlist->insertItem(it.key());
- AvailFlist->item(AvailFlist->count()-1)->setSelectable(false);
- }
- }
- AvailFlist->setMinimumSize(QSize(150, 140));
- AvailFlist->setMaximumSize(QSize(150, 140));
- Layout4_2->addWidget( AvailFlist );
- GroupFontLayout->addLayout( Layout4_2 );
- Layout5_2 = new QVBoxLayout;
- Layout5_2->setSpacing( 6 );
- Layout5_2->setMargin( 0 );
- ToEmbed = new QPushButton( GroupFont, "ToEmbed" );
- ToEmbed->setText( tr( ">>" ) );
- ToEmbed->setEnabled(false);
- Layout5_2->addWidget( ToEmbed );
- FromEmbed = new QPushButton( GroupFont, "FromEmbed" );
- FromEmbed->setText( tr( "<<" ) );
- FromEmbed->setEnabled(false);
- Layout5_2->addWidget( FromEmbed );
- GroupFontLayout->addLayout( Layout5_2 );
- Layout6 = new QVBoxLayout;
- Layout6->setSpacing( 6 );
- Layout6->setMargin( 0 );
- TextFont1_2 = new QLabel( GroupFont, "TextFont1_2" );
- TextFont1_2->setText( tr( "Fonts to embed:" ) );
- Layout6->addWidget( TextFont1_2 );
- EmbedList = new QListBox( GroupFont, "EmbedList" );
- EmbedList->setMinimumSize(QSize(150, 140));
- EmbedList->setMaximumSize(QSize(150, 140));
- if (Optionen->EmbedList.count() != 0)
- {
- for (uint efo = 0; efo < Optionen->EmbedList.count(); efo++)
- {
- EmbedList->insertItem(Optionen->EmbedList[efo]);
- FontsToEmbed.append(Optionen->EmbedList[efo]);
- }
- }
- Layout6->addWidget( EmbedList );
- GroupFontLayout->addLayout( Layout6 );
- tabLayout_3->addWidget( GroupFont );
- Options->insertTab( tab_3, tr( "Fonts" ) );
-
- tab_5 = new QWidget( Options, "tab_5" );
- tabLayout_5 = new QGridLayout( tab_5 );
- tabLayout_5->setSpacing( 6 );
- tabLayout_5->setMargin( 11 );
- CheckBox10 = new QCheckBox( tab_5, "CheckBox10" );
- CheckBox10->setText( tr( "Enable Presentation Effects" ) );
- CheckBox10->setChecked(Optionen->PresentMode);
- tabLayout_5->addMultiCellWidget( CheckBox10, 0, 0, 0, 1 );
-
- Pages = new QListBox( tab_5, "Pages" );
- Pages->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, Pages->sizePolicy().hasHeightForWidth() ) );
- QString tmp;
- struct PreSet ef;
- if (EffVal.count() != 0)
- {
- for (uint pg2 = 0; pg2 < vie->Pages.count(); ++pg2)
- {
- Pages->insertItem(tr("Page")+" "+tmp.setNum(pg2+1));
- }
- }
- else
- {
- for (uint pg = 0; pg < vie->Pages.count(); ++pg)
- {
- Pages->insertItem(tr("Page")+" "+tmp.setNum(pg+1));
- ef.EffektLen = 1;
- ef.AnzeigeLen = 1;
- ef.Effekt = 0;
- ef.Dm = 0;
- ef.M = 0;
- ef.Di = 0;
- EffVal.append(ef);
- }
- }
- tabLayout_5->addWidget( Pages, 1, 0 );
- PagePrev = new QCheckBox( tab_5, "CheckBox10" );
- PagePrev->setText( tr( "Show Page Previews" ) );
- PagePrev->setChecked(false);
- tabLayout_5->addWidget( PagePrev, 2, 0 );
-
- Effects = new QGroupBox( tab_5, "Effects" );
- Effects->setTitle( tr( "Effects" ) );
- Effects->setColumnLayout(0, Qt::Vertical );
- Effects->layout()->setSpacing( 0 );
- Effects->layout()->setMargin( 0 );
- EffectsLayout = new QGridLayout( Effects->layout() );
- EffectsLayout->setAlignment( Qt::AlignTop );
- EffectsLayout->setSpacing( 6 );
- EffectsLayout->setMargin( 11 );
- TextLabel1e = new QLabel( Effects, "TextLabel1_2" );
- TextLabel1e->setText( tr( "Display Duration:" ) );
- EffectsLayout->addWidget( TextLabel1e, 0, 0 );
- TextLabel2e = new QLabel( Effects, "TextLabel2_2" );
- TextLabel2e->setText( tr( "Effect Duration:" ) );
- EffectsLayout->addWidget( TextLabel2e, 1, 0 );
- TextLabel3e = new QLabel( Effects, "TextLabel3_2" );
- TextLabel3e->setText( tr( "Effect Type:" ) );
- EffectsLayout->addWidget( TextLabel3e, 2, 0 );
- TextLabel4e = new QLabel( Effects, "TextLabel4_2" );
- TextLabel4e->setText( tr( "Moving Lines:" ) );
- EffectsLayout->addWidget( TextLabel4e, 3, 0 );
- TextLabel5e = new QLabel( Effects, "TextLabel6" );
- TextLabel5e->setText( tr( "from the:" ) );
- EffectsLayout->addWidget( TextLabel5e, 4, 0 );
- TextLabel6e = new QLabel( Effects, "TextLabel5" );
- TextLabel6e->setText( tr( "Direction:" ) );
- EffectsLayout->addWidget( TextLabel6e, 5, 0 );
- PageTime = new QSpinBox( Effects, "PageTime" );
- PageTime->setSuffix( tr( " sec" ) );
- PageTime->setMaxValue( 3600 );
- PageTime->setMinValue( 1 );
- PageTime->setValue(EffVal[0].AnzeigeLen);
- EffectsLayout->addWidget( PageTime, 0, 1 );
- EffectTime = new QSpinBox( Effects, "EffectTime" );
- EffectTime->setSuffix( tr( " sec" ) );
- EffectTime->setMaxValue( 3600 );
- EffectTime->setMinValue( 1 );
- EffectTime->setValue(EffVal[0].EffektLen);
- EffectsLayout->addWidget( EffectTime, 1, 1 );
- EffectType = new QComboBox( true, Effects, "EffectType" );
- EffectType->insertItem( tr( "No Effect" ) );
- EffectType->insertItem( tr( "Blinds" ) );
- EffectType->insertItem( tr( "Box" ) );
- EffectType->insertItem( tr( "Dissolve" ) );
- EffectType->insertItem( tr( "Glitter" ) );
- EffectType->insertItem( tr( "Split" ) );
- EffectType->insertItem( tr( "Wipe" ) );
- EffectType->setEditable(false);
- EffectsLayout->addWidget( EffectType, 2, 1 );
- EDirection = new QComboBox( true, Effects, "EDirection" );
- EDirection->insertItem( tr( "Horizontal" ) );
- EDirection->insertItem( tr( "Vertical" ) );
- EDirection->setEditable(false);
- EffectsLayout->addWidget( EDirection, 3, 1 );
- EDirection_2 = new QComboBox( true, Effects, "EDirection_2" );
- EDirection_2->insertItem( tr( "Inside" ) );
- EDirection_2->insertItem( tr( "Outside" ) );
- EDirection_2->setEditable(false);
- EffectsLayout->addWidget( EDirection_2, 4, 1 );
- EDirection_2_2 = new QComboBox( true, Effects, "EDirection_2_2" );
- EDirection_2_2->insertItem( tr( "Left to Right" ) );
- EDirection_2_2->insertItem( tr( "Top to Bottom" ) );
- EDirection_2_2->insertItem( tr( "Bottom to Top" ) );
- EDirection_2_2->insertItem( tr( "Right to Left" ) );
- EDirection_2_2->insertItem( tr( "Top-Left to Bottom-Right" ) );
- EDirection_2_2->setEditable(false);
- EffectsLayout->addWidget( EDirection_2_2, 5, 1 );
- EonAllPg = new QPushButton( Effects, "Eon" );
- EonAllPg->setText( tr( "Apply Effect on all Pages" ) );
- EffectsLayout->addMultiCellWidget( EonAllPg, 6, 6, 0, 1 );
- tabLayout_5->addMultiCellWidget( Effects, 1, 2, 1, 1 );
- Options->insertTab( tab_5, tr( "Extras" ) );
-
- tabsec = new QWidget( Options, "tabsec" );
- tabsecLayout = new QVBoxLayout( tabsec, 11, 6, "tabsecLayout");
- Encry = new QCheckBox( tabsec, "Enc" );
- Encry->setText( tr( "Use Encryption" ) );
- Encry->setChecked( Optionen->Encrypt );
- tabsecLayout->addWidget( Encry );
- GroupPass = new QGroupBox( tabsec, "GroupPass" );
- GroupPass->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, GroupPass->sizePolicy().hasHeightForWidth() ) );
- GroupPass->setTitle( tr( "Passwords" ) );
- GroupPass->setColumnLayout(0, Qt::Vertical );
- GroupPass->layout()->setSpacing( 6 );
- GroupPass->layout()->setMargin( 11 );
- GroupPassLayout = new QGridLayout( GroupPass->layout() );
- GroupPassLayout->setAlignment( Qt::AlignTop );
- TextSec2 = new QLabel( GroupPass, "TextSec2" );
- TextSec2->setText( tr( "User:" ) );
- GroupPassLayout->addWidget( TextSec2, 1, 0 );
- TextSec1 = new QLabel( GroupPass, "TextSec1" );
- TextSec1->setText( tr( "Owner:" ) );
- GroupPassLayout->addWidget( TextSec1, 0, 0 );
- PassOwner = new QLineEdit( GroupPass, "PassOwner" );
- PassOwner->setEchoMode( QLineEdit::Password );
- PassOwner->setText(Optionen->PassOwner);
- GroupPassLayout->addWidget( PassOwner, 0, 1 );
- PassUser = new QLineEdit( GroupPass, "PassUser" );
- PassUser->setEchoMode( QLineEdit::Password );
- PassUser->setText(Optionen->PassUser);
- GroupPassLayout->addWidget( PassUser, 1, 1 );
- tabsecLayout->addWidget( GroupPass );
-
- GroupSecSet = new QGroupBox( tabsec, "GroupSecSet" );
- GroupSecSet->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, GroupSecSet->sizePolicy().hasHeightForWidth() ) );
- GroupSecSet->setTitle( tr( "Settings" ) );
- GroupSecSet->setColumnLayout(0, Qt::Vertical );
- GroupSecSet->layout()->setSpacing( 6 );
- GroupSecSet->layout()->setMargin( 11 );
- GroupSecSetLayout = new QVBoxLayout( GroupSecSet->layout() );
- GroupSecSetLayout->setAlignment( Qt::AlignTop );
- PrintSec = new QCheckBox( GroupSecSet, "PrintSec" );
- PrintSec->setText( tr( "Allow Printing the Document" ) );
- PrintSec->setChecked( Optionen->Permissions & 4 );
- GroupSecSetLayout->addWidget( PrintSec );
- ModifySec = new QCheckBox( GroupSecSet, "ModifySec" );
- ModifySec->setText( tr( "Allow Changing the Document" ) );
- ModifySec->setChecked( Optionen->Permissions & 8 );
- GroupSecSetLayout->addWidget( ModifySec );
- CopySec = new QCheckBox( GroupSecSet, "CopySec" );
- CopySec->setText( tr( "Copying Text and Graphics is allowed" ) );
- CopySec->setChecked( Optionen->Permissions & 16 );
- GroupSecSetLayout->addWidget( CopySec );
- AddSec = new QCheckBox( GroupSecSet, "AddSec" );
- AddSec->setText( tr( "Adding Annotations and Fields is allowed" ) );
- AddSec->setChecked( Optionen->Permissions & 32 );
- GroupSecSetLayout->addWidget( AddSec );
- tabsecLayout->addWidget( GroupSecSet );
- if (!Encry->isChecked())
- {
- GroupSecSet->setEnabled(false);
- GroupPass->setEnabled(false);
- }
- Options->insertTab( tabsec, tr( "Security" ) );
-
- tabcolor = new QWidget( Options, "tabcolor" );
- tabcolorLayout = new QVBoxLayout( tabcolor, 11, 6, "tabcolorLayout");
- ColorGroup = new QGroupBox( tabcolor, "ColorGroup" );
- ColorGroup->setTitle( tr( "General" ) );
- ColorGroup->setColumnLayout(0, Qt::Vertical );
- ColorGroup->layout()->setSpacing( 6 );
- ColorGroup->layout()->setMargin( 11 );
- ColorGroupLayout = new QHBoxLayout( ColorGroup->layout() );
- ColorGroupLayout->setAlignment( Qt::AlignTop );
- ColorText1 = new QLabel( ColorGroup, "ColorText1" );
- ColorText1->setText( tr( "Output intended for:" ) );
- ColorGroupLayout->addWidget( ColorText1 );
- OutCombo = new QComboBox( true, ColorGroup, "OutCombo" );
- OutCombo->insertItem( tr( "Screen" ) );
- OutCombo->insertItem( tr( "Printer" ) );
- OutCombo->setEditable(false);
- if (Optionen->UseRGB)
- OutCombo->setCurrentItem(0);
- else
- OutCombo->setCurrentItem(1);
- ColorGroupLayout->addWidget( OutCombo );
- tabcolorLayout->addWidget( ColorGroup );
-
- GroupBox9 = new QGroupBox( tabcolor, "GroupBox9" );
- GroupBox9->setTitle( tr( "Solid Colors:" ) );
- GroupBox9->setColumnLayout(0, Qt::Vertical );
- GroupBox9->layout()->setSpacing( 6 );
- GroupBox9->layout()->setMargin( 11 );
- GroupBox9Layout = new QGridLayout( GroupBox9->layout() );
- GroupBox9Layout->setAlignment( Qt::AlignTop );
- EmbedProfs = new QCheckBox( GroupBox9, "EmbedProfs" );
- EmbedProfs->setText( tr( "Use ICC-Profile" ) );
- EmbedProfs->setChecked(Optionen->UseProfiles);
- GroupBox9Layout->addMultiCellWidget( EmbedProfs, 0, 0, 0, 1 );
- ProfsTxt1 = new QLabel(GroupBox9, "ProfsTxt1");
- ProfsTxt1->setText( tr( "Profile:" ) );
- GroupBox9Layout->addWidget( ProfsTxt1, 1, 0 );
- ProfsTxt2 = new QLabel( GroupBox9, "ProfsTxt2_2" );
- ProfsTxt2->setText( tr( "Rendering-Intent:" ) );
- GroupBox9Layout->addWidget( ProfsTxt2, 1, 1 );
- SolidPr = new QComboBox(true, GroupBox9, "SolidPr" );
- SolidPr->setEditable(false);
- GroupBox9Layout->addWidget( SolidPr, 2, 0 );
- IntendS = new QComboBox( true, GroupBox9, "IntendS" );
- IntendS->insertItem( tr( "Perceptual" ) );
- IntendS->insertItem( tr( "Relative Colorimetric" ) );
- IntendS->insertItem( tr( "Saturation" ) );
- IntendS->insertItem( tr( "Absolute Colorimetric" ) );
- IntendS->setEditable(false);
- GroupBox9Layout->addWidget( IntendS, 2, 1 );
- tabcolorLayout->addWidget( GroupBox9 );
- ProfsGroup = new QGroupBox( tabcolor, "ProfsGroup" );
- ProfsGroup->setTitle( tr( "Images:" ) );
- ProfsGroup->setColumnLayout(0, Qt::Vertical );
- ProfsGroup->layout()->setSpacing( 6 );
- ProfsGroup->layout()->setMargin( 11 );
- ProfsGroupLayout = new QGridLayout( ProfsGroup->layout() );
- ProfsGroupLayout->setAlignment( Qt::AlignTop );
- EmbedProfs2 = new QCheckBox( ProfsGroup, "EmbedProfs" );
- EmbedProfs2->setText( tr( "Use ICC-Profile" ) );
- EmbedProfs2->setChecked(Optionen->UseProfiles2);
- ProfsGroupLayout->addMultiCellWidget( EmbedProfs2, 0, 0, 0, 1 );
- NoEmbedded = new QCheckBox( ProfsGroup, "NoEmbedded" );
- NoEmbedded->setText( tr( "Don't use embedded Profiles" ) );
- NoEmbedded->setChecked(Optionen->EmbeddedI);
- ProfsGroupLayout->addMultiCellWidget( NoEmbedded, 1, 1, 0, 1 );
- ProfsTxt3 = new QLabel( ProfsGroup, "ProfsTxt3" );
- ProfsTxt3->setText( tr( "Profile:" ) );
- ProfsGroupLayout->addWidget( ProfsTxt3, 2, 0 );
- ProfsTxt4 = new QLabel( ProfsGroup, "ProfsTxt2_2" );
- ProfsTxt4->setText( tr( "Rendering-Intent:" ) );
- ProfsGroupLayout->addWidget( ProfsTxt4, 2, 1 );
- ImageP = new QComboBox( true, ProfsGroup, "ImageP" );
- ImageP->setEditable(false);
- ProfsGroupLayout->addWidget( ImageP, 3, 0 );
- IntendI = new QComboBox( true, ProfsGroup, "IntendS" );
- IntendI->insertItem( tr( "Perceptual" ) );
- IntendI->insertItem( tr( "Relative Colorimetric" ) );
- IntendI->insertItem( tr( "Saturation" ) );
- IntendI->insertItem( tr( "Absolute Colorimetric" ) );
- IntendI->setEditable(false);
- ProfsGroupLayout->addWidget( IntendI, 3, 1 );
- tabcolorLayout->addWidget( ProfsGroup );
- if (Optionen->UseRGB)
- {
- ProfsGroup->setEnabled(false);
- GroupBox9->setEnabled(false);
- }
- EnablePG();
- EnablePGI();
-#ifdef HAVE_CMS
- QString tp = Optionen->SolidProf;
- if (!InputProfiles.contains(tp))
- tp = vie->Doc->CMSSettings.DefaultInputProfile2;
- ProfilesL::Iterator itp;
- for (itp = InputProfiles.begin(); itp != InputProfiles.end(); ++itp)
- {
- SolidPr->insertItem(itp.key());
- if (itp.key() == tp)
- {
- if ((CMSuse) && (CMSavail))
- SolidPr->setCurrentItem(SolidPr->count()-1);
- }
- }
- if ((CMSuse) && (CMSavail))
- IntendS->setCurrentItem(Optionen->Intent);
- ProfilesL::Iterator itp2;
- QString tp1 = Optionen->ImageProf;
- if (!InputProfiles.contains(tp1))
- tp1 = vie->Doc->CMSSettings.DefaultInputProfile2;
- for (itp2 = InputProfiles.begin(); itp2 != InputProfiles.end(); ++itp2)
- {
- ImageP->insertItem(itp2.key());
- if (itp2.key() == tp1)
- {
- if ((CMSuse) && (CMSavail))
- ImageP->setCurrentItem(ImageP->count()-1);
- }
- }
- if ((CMSuse) && (CMSavail))
- IntendI->setCurrentItem(Optionen->Intent2);
- if ((!CMSuse) || (!CMSavail))
- {
- GroupBox9->hide();
- ProfsGroup->hide();
- }
-#else
- GroupBox9->hide();
- ProfsGroup->hide();
-#endif
- QSpacerItem* spacerCG = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- tabcolorLayout->addItem( spacerCG );
- Options->insertTab( tabcolor, tr( "Color" ) );
-
- tabpdfx = new QWidget( Options, "tabpdfx" );
- tabpdfxLayout = new QVBoxLayout( tabpdfx, 11, 6, "tabpdfxLayout");
- X3Group = new QGroupBox( tabpdfx, "X3Group" );
- X3Group->setTitle( tr( "PDF/X-3 Output Intent" ) );
- X3Group->setColumnLayout(0, Qt::Vertical );
- X3Group->layout()->setSpacing( 6 );
- X3Group->layout()->setMargin( 11 );
- X3GroupLayout = new QGridLayout( X3Group->layout() );
- X3GroupLayout->setAlignment( Qt::AlignTop );
- PrintProfC = new QComboBox( true, X3Group, "PrintProfC" );
- PrintProfC->setEditable(false);
-#ifdef HAVE_CMS
- ProfilesL::Iterator itp3;
- QString tp3 = Optionen->PrintProf;
- if (!PDFXProfiles->contains(tp3))
- tp3 = vie->Doc->CMSSettings.DefaultPrinterProfile;
- for (itp3 = PDFXProfiles->begin(); itp3 != PDFXProfiles->end(); ++itp3)
- {
- PrintProfC->insertItem(itp3.key());
- if (itp3.key() == tp3)
- {
- PrintProfC->setCurrentItem(PrintProfC->count()-1);
- }
- }
-#endif
- X3GroupLayout->addWidget( PrintProfC, 0, 1 );
- InfoString = new QLineEdit( X3Group, "InfoString" );
- InfoString->setText(Optionen->Info);
- X3GroupLayout->addWidget( InfoString, 1, 1 );
- PDFX2 = new QLabel( X3Group, "PDFX2" );
- PDFX2->setText( tr( "Info String:" ) );
- X3GroupLayout->addWidget( PDFX2, 1, 0 );
- PDFX1 = new QLabel( X3Group, "PDFX1" );
- PDFX1->setText( tr( "Output Profile:" ) );
- X3GroupLayout->addWidget( PDFX1, 0, 0 );
- tabpdfxLayout->addWidget( X3Group );
- BleedGroup = new QGroupBox( tabpdfx, "BleedGroup" );
- BleedGroup->setTitle( tr( "Trim Box" ) );
- BleedGroup->setColumnLayout(0, Qt::Vertical );
- BleedGroup->layout()->setSpacing( 6 );
- BleedGroup->layout()->setMargin( 11 );
- BleedGroupLayout = new QGridLayout( BleedGroup->layout() );
- BleedGroupLayout->setAlignment( Qt::AlignTop );
- BleedIcon = new QLabel( BleedGroup, "BleedIcon" );
- BleedIcon->setMinimumSize( QSize( 74, 84 ) );
- BleedIcon->setMaximumSize( QSize( 74, 84 ) );
- BleedIcon->setFrameShape( QLabel::Panel );
- BleedIcon->setFrameShadow( QLabel::Sunken );
- BleedIcon->setScaledContents( false );
- BleedIcon->setAlignment( static_cast<int>( QLabel::AlignCenter ) );
- BleedGroupLayout->addWidget( BleedIcon, 1, 2 );
- BleedTop = new MSpinBox( BleedGroup, 2 );
- BleedGroupLayout->addWidget( BleedTop, 0, 2 );
- BleedBottom = new MSpinBox( BleedGroup, 2 );
- BleedGroupLayout->addWidget( BleedBottom, 2, 2 );
- BleedRight = new MSpinBox( BleedGroup, 2 );
- BleedGroupLayout->addWidget( BleedRight, 1, 3 );
- BleedLeft = new MSpinBox( BleedGroup, 2 );
- BleedGroupLayout->addWidget( BleedLeft, 1, 1 );
- QSpacerItem* spacerPX = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- BleedGroupLayout->addItem( spacerPX, 1, 0 );
- QSpacerItem* spacerPX2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- BleedGroupLayout->addItem( spacerPX2, 1, 4 );
- tabpdfxLayout->addWidget( BleedGroup );
- Options->insertTab( tabpdfx, tr( "PDF/X-3" ) );
- QString EinTxt = "";
- switch (Einheit)
- {
- case 0:
- EinTxt = tr( " pt" );
- break;
- case 1:
- EinTxt = tr( " mm" );
- break;
- case 2:
- EinTxt = tr( " in" );
- break;
- case 3:
- EinTxt = tr( " p" );
- break;
- }
- BleedTop->setSuffix( EinTxt );
- BleedTop->setMinValue(0);
- BleedTop->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100));
- BleedTop->setValue(qRound(Optionen->BleedTop*UmReFaktor*100));
- BleedTop->setLineStep(100);
- BleedBottom->setSuffix( EinTxt );
- BleedBottom->setMinValue(0);
- BleedBottom->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100));
- BleedBottom->setValue(qRound(Optionen->BleedBottom*UmReFaktor*100));
- BleedBottom->setLineStep(100);
- BleedRight->setSuffix( EinTxt );
- BleedRight->setMinValue(0);
- BleedRight->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100));
- BleedRight->setValue(qRound(Optionen->BleedRight*UmReFaktor*100));
- BleedRight->setLineStep(100);
- BleedLeft->setSuffix( EinTxt );
- BleedLeft->setMinValue(0);
- BleedLeft->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100));
- BleedLeft->setValue(qRound(Optionen->BleedLeft*UmReFaktor*100));
- BleedLeft->setLineStep(100);
-#ifdef HAVE_CMS
- if ((!CMSuse) || (!CMSavail))
- Options->setTabEnabled(tabpdfx, false);
- if ((CMSuse) && (CMSavail) && (Optionen->Version == 12) && (!PDFXProfiles->isEmpty()))
- EnablePDFX(2);
- else
- Options->setTabEnabled(tabpdfx, false);
-#else
- Options->setTabEnabled(tabpdfx, false);
-#endif
- BleedChanged();
- PgSel = 0;
- Pages->setCurrentItem(0);
- SetEffOpts(0);
- Pages->setEnabled(false);
- Effects->setEnabled(false);
- PagePrev->setEnabled(false);
- PDFOptsLayout->addWidget( Options );
- DoEffects();
- if (CheckBox10->isChecked())
- {
- PageTime->setValue(EffVal[0].AnzeigeLen);
- EffectTime->setValue(EffVal[0].EffektLen);
- EffectType->setCurrentItem(EffVal[0].Effekt);
- EDirection->setCurrentItem(EffVal[0].Dm);
- EDirection_2->setCurrentItem(EffVal[0].M);
- EDirection_2_2->setCurrentItem(EffVal[0].Di);
- SetEffOpts(EffectType->currentItem());
- }
- Layout7 = new QHBoxLayout;
- Layout7->setSpacing( 6 );
- Layout7->setMargin( 0 );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout7->addItem( spacer_2 );
- OK = new QPushButton( this, "OK" );
- OK->setText( tr( "OK" ) );
- OK->setAutoDefault( true );
- OK->setDefault( true );
- Layout7->addWidget( OK );
- QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout7->addItem( spacer_3 );
- Cancel = new QPushButton( this, "Cancel" );
- Cancel->setText( tr( "Cancel" ) );
- Layout7->addWidget( Cancel );
- QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout7->addItem( spacer_4 );
- PDFOptsLayout->addLayout( Layout7 );
- setMaximumSize( sizeHint() );
-
- // signals and slots connections
- connect( FileC, SIGNAL( clicked() ), this, SLOT( ChangeFile() ) );
- connect( OK, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( Cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect(EmbedFonts, SIGNAL(clicked()), this, SLOT(EmbedAll()));
- connect(AvailFlist, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SelAFont(QListBoxItem*)));
- connect(EmbedList, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SelEFont(QListBoxItem*)));
- connect(ToEmbed, SIGNAL(clicked()), this, SLOT(PutToEmbed()));
- connect(FromEmbed, SIGNAL(clicked()), this, SLOT(RemoveEmbed()));
- connect(DSColor, SIGNAL(clicked()), this, SLOT(DoDownsample()));
-// connect(CheckBM, SIGNAL(clicked()), this, SLOT(ToggleBM()));
- connect(PagePrev, SIGNAL(clicked()), this, SLOT(PagePr()));
- connect(Pages, SIGNAL(highlighted(int)), this, SLOT(SetPgEff(int)));
- connect(EffectType, SIGNAL(activated(int)), this, SLOT(SetEffOpts(int)));
- connect(EDirection_2_2, SIGNAL(activated(int)), this, SLOT(ValidDI(int)));
- connect(CheckBox10, SIGNAL(clicked()), this, SLOT(DoEffects()));
- connect(EonAllPg, SIGNAL(clicked()), this, SLOT(EffectOnAll()));
- connect(AllPages, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
- connect(FirstPage, SIGNAL(valueChanged(int)), this, SLOT(ChFrom()));
- connect(LastPage, SIGNAL(valueChanged(int)), this, SLOT(ChTo()));
- connect(OutCombo, SIGNAL(activated(int)), this, SLOT(EnablePr(int)));
- connect(EmbedProfs, SIGNAL(clicked()), this, SLOT(EnablePG()));
- connect(EmbedProfs2, SIGNAL(clicked()), this, SLOT(EnablePGI()));
- connect(NoEmbedded, SIGNAL(clicked()), this, SLOT(EnablePGI2()));
- connect(ComboBox1, SIGNAL(activated(int)), this, SLOT(EnablePDFX(int)));
- connect(BleedTop, SIGNAL(valueChanged(int)), this, SLOT(BleedChanged()));
- connect(BleedBottom, SIGNAL(valueChanged(int)), this, SLOT(BleedChanged()));
- connect(BleedLeft, SIGNAL(valueChanged(int)), this, SLOT(BleedChanged()));
- connect(BleedRight, SIGNAL(valueChanged(int)), this, SLOT(BleedChanged()));
- connect(Encry, SIGNAL(clicked()), this, SLOT(ToggleEncr()));
-}
-
-/*
- * Destroys the object and frees any allocated resources
- */
-PDF_Opts::~PDF_Opts()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
-void PDF_Opts::ToggleEncr()
-{
- if (Encry->isChecked())
- {
- GroupSecSet->setEnabled(true);
- GroupPass->setEnabled(true);
- }
- else
- {
- GroupSecSet->setEnabled(false);
- GroupPass->setEnabled(false);
- }
-}
-
-void PDF_Opts::BleedChanged()
-{
- BleedTop->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100)-BleedBottom->value());
- BleedBottom->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100)-BleedTop->value());
- BleedRight->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100)-BleedLeft->value());
- BleedLeft->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100)-BleedRight->value());
- QPixmap pm = QPixmap(70,80);
- pm.fill(white);
- QPainter p;
- p.begin(&pm);
- p.setBrush(NoBrush);
- p.setPen(black);
- p.drawRect(0, 0, pm.width(), pm.height());
- p.setPen(QPen(black, 1, DotLine, FlatCap, MiterJoin));
- int x = qRound((BleedLeft->value() / UmReFaktor / 100.0) * (70.0 / view->Doc->PageB));
- int y = qRound((BleedTop->value() / UmReFaktor / 100.0) * (80.0 / view->Doc->PageH));
- int w = qRound((view->Doc->PageB-((BleedLeft->value()+BleedRight->value())/UmReFaktor/100.0))*(70.0/view->Doc->PageB));
- int h = qRound((view->Doc->PageH-((BleedTop->value()+BleedBottom->value())/UmReFaktor/100.0))*(80.0/view->Doc->PageH));
- p.drawRect(x, y, w, h);
- BleedIcon->setPixmap(pm);
- p.end();
-}
-
-void PDF_Opts::EnablePDFX(int a)
-{
- if (a != 2)
- {
- Options->setTabEnabled(tabpdfx, false);
- Options->setTabEnabled(tabsec, true);
- EmbedProfs2->setEnabled(true);
- CheckBox10->setEnabled(true);
- EmbedFonts->setEnabled(true);
- OutCombo->setEnabled(true);
- return;
- }
- EmbedFonts->setChecked(true);
- EmbedAll();
- CheckBox10->setChecked(false);
- OutCombo->setCurrentItem(1);
- OutCombo->setEnabled(false);
- EnablePr(1);
- EmbedProfs2->setChecked(true);
- EmbedProfs2->setEnabled(false);
- CheckBox10->setEnabled(false);
- EmbedFonts->setEnabled(false);
- EnablePGI();
- Options->setTabEnabled(tabpdfx, true);
- Options->setTabEnabled(tabsec, false);
-}
-
-void PDF_Opts::EnablePGI()
-{
- if (EmbedProfs2->isChecked())
- {
- NoEmbedded->setEnabled(true);
- if (NoEmbedded->isChecked())
- {
- ProfsTxt3->setEnabled(true);
- ProfsTxt4->setEnabled(true);
- ImageP->setEnabled(true);
- IntendI->setEnabled(true);
- }
- else
- {
- ProfsTxt3->setEnabled(false);
- ProfsTxt4->setEnabled(false);
- ImageP->setEnabled(false);
- IntendI->setEnabled(false);
- }
- }
- else
- {
- ProfsTxt3->setEnabled(false);
- ProfsTxt4->setEnabled(false);
- ImageP->setEnabled(false);
- IntendI->setEnabled(false);
- NoEmbedded->setEnabled(false);
- }
-}
-
-void PDF_Opts::EnablePGI2()
-{
- if (NoEmbedded->isChecked())
- {
- ProfsTxt3->setEnabled(true);
- ProfsTxt4->setEnabled(true);
- ImageP->setEnabled(true);
- IntendI->setEnabled(true);
- }
- else
- {
- ProfsTxt3->setEnabled(false);
- ProfsTxt4->setEnabled(false);
- ImageP->setEnabled(false);
- IntendI->setEnabled(false);
- }
-}
-
-void PDF_Opts::EnablePG()
-{
- if (EmbedProfs->isChecked())
- {
- ProfsTxt1->setEnabled(true);
- ProfsTxt2->setEnabled(true);
- SolidPr->setEnabled(true);
- IntendS->setEnabled(true);
- }
- else
- {
- ProfsTxt1->setEnabled(false);
- ProfsTxt2->setEnabled(false);
- SolidPr->setEnabled(false);
- IntendS->setEnabled(false);
- }
-}
-
-void PDF_Opts::EnablePr(int a)
-{
- if (a == 1)
- {
- GroupBox9->setEnabled(true);
- ProfsGroup->setEnabled(true);
- }
- else
- {
- GroupBox9->setEnabled(false);
- ProfsGroup->setEnabled(false);
- }
-}
-
-void PDF_Opts::ChFrom()
-{
- disconnect(LastPage, SIGNAL(valueChanged(int)), this, SLOT(ChTo()));
- if (FirstPage->value() > LastPage->value())
- LastPage->setValue(FirstPage->value());
- connect(LastPage, SIGNAL(valueChanged(int)), this, SLOT(ChTo()));
-}
-
-void PDF_Opts::ChTo()
-{
- disconnect(FirstPage, SIGNAL(valueChanged(int)), this, SLOT(ChFrom()));
- if (LastPage->value() < FirstPage->value())
- FirstPage->setValue(LastPage->value());
- connect(FirstPage, SIGNAL(valueChanged(int)), this, SLOT(ChFrom()));
-}
-
-void PDF_Opts::SelRange(bool e)
-{
- if (e)
- {
- RText->setEnabled( false );
- FirstPage->setEnabled( false );
- LastPage->setEnabled( false );
- }
- else
- {
- RText->setEnabled( true );
- FirstPage->setEnabled( true );
- LastPage->setEnabled( true );
- CheckBM->setChecked(false);
-// ToggleBM();
- }
-}
-
-void PDF_Opts::EffectOnAll()
-{
- for (uint pg = 0; pg < view->Pages.count(); pg++)
- {
- EffVal[pg].AnzeigeLen = PageTime->value();
- EffVal[pg].EffektLen = EffectTime->value();
- EffVal[pg].Effekt = EffectType->currentItem();
- EffVal[pg].Dm = EDirection->currentItem();
- EffVal[pg].M = EDirection_2->currentItem();
- EffVal[pg].Di = EDirection_2_2->currentItem();
- }
-}
-
-void PDF_Opts::DoEffects()
-{
- if (CheckBox10->isChecked())
- {
- Pages->setEnabled(true);
- Effects->setEnabled(true);
- PagePrev->setEnabled(true);
- }
- else
- {
- Pages->setEnabled(false);
- Effects->setEnabled(false);
- PagePrev->setEnabled(false);
- }
-}
-
-void PDF_Opts::ValidDI(int nr)
-{
- if (!EDirection_2_2->listBox()->item(nr)->isSelectable())
- EDirection_2_2->setCurrentItem(0);
-}
-
-void PDF_Opts::SetPgEff(int nr)
-{
- if (nr < 0)
- return;
- EffVal[PgSel].AnzeigeLen = PageTime->value();
- EffVal[PgSel].EffektLen = EffectTime->value();
- EffVal[PgSel].Effekt = EffectType->currentItem();
- EffVal[PgSel].Dm = EDirection->currentItem();
- EffVal[PgSel].M = EDirection_2->currentItem();
- EffVal[PgSel].Di = EDirection_2_2->currentItem();
- SetEffOpts(EffectType->currentItem());
- PageTime->setValue(EffVal[nr].AnzeigeLen);
- EffectTime->setValue(EffVal[nr].EffektLen);
- EffectType->setCurrentItem(EffVal[nr].Effekt);
- EDirection->setCurrentItem(EffVal[nr].Dm);
- EDirection_2->setCurrentItem(EffVal[nr].M);
- EDirection_2_2->setCurrentItem(EffVal[nr].Di);
- PgSel = nr;
-}
-
-void PDF_Opts::SetEffOpts(int nr)
-{
- EDirection_2_2->listBox()->item(2)->setSelectable(false);
- EDirection_2_2->listBox()->item(3)->setSelectable(false);
- EDirection_2_2->listBox()->item(4)->setSelectable(false);
- switch (nr)
- {
- case 0:
- case 3:
- EDirection->setEnabled(false);
- EDirection_2->setEnabled(false);
- EDirection_2_2->setEnabled(false);
- break;
- case 1:
- EDirection->setEnabled(true);
- EDirection_2->setEnabled(false);
- EDirection_2_2->setEnabled(false);
- break;
- case 2:
- EDirection->setEnabled(false);
- EDirection_2->setEnabled(true);
- EDirection_2_2->setEnabled(false);
- break;
- case 4:
- case 6:
- EDirection->setEnabled(false);
- EDirection_2->setEnabled(false);
- EDirection_2_2->setEnabled(true);
- if (nr == 6)
- {
- EDirection_2_2->listBox()->item(2)->setSelectable(true);
- EDirection_2_2->listBox()->item(3)->setSelectable(true);
- }
- else
- EDirection_2_2->listBox()->item(4)->setSelectable(true);
- break;
- case 5:
- EDirection->setEnabled(true);
- EDirection_2->setEnabled(true);
- EDirection_2_2->setEnabled(false);
- break;
- }
-}
-
-void PDF_Opts::PagePr()
-{
- QString tmp;
- int ci = Pages->currentItem();
- if (PagePrev->isChecked())
- {
- for (uint pg = 0; pg < view->Pages.count(); pg++)
- {
- Pages->changeItem(view->PageToPixmap(pg, 70), tr("Page")+" "+tmp.setNum(pg+1), pg);
- }
- }
- else
- {
- for (uint pg = 0; pg < view->Pages.count(); pg++)
- {
- Pages->changeItem(tr("Page")+" "+tmp.setNum(pg+1), pg);
- }
- }
- if (ci != -1)
- {
- PgSel = ci;
- Pages->setCurrentItem(ci);
- }
- else
- {
- PgSel = 0;
- Pages->clearSelection();
- }
-}
-/*
-void PDF_Opts::ToggleBM()
-{
- if (CheckBM->isChecked())
- BView->setEnabled(true);
- else
- BView->setEnabled(false);
-} */
-
-void PDF_Opts::DoDownsample()
-{
- if (DSColor->isChecked())
- {
- ValC->setEnabled(true);
- if (ValC->value() > Resolution->value())
- ValC->setValue(Resolution->value());
- ValC->setMaxValue(Resolution->value());
- ValC->setMinValue(35);
- }
- else
- {
- ValC->setEnabled(false);
- }
-}
-
-void PDF_Opts::RemoveEmbed()
-{
- FontsToEmbed.remove(EmbedList->currentText());
- EmbedList->removeItem(EmbedList->currentItem());
- EmbedList->clearSelection();
- if (EmbedList->count() == 0)
- FromEmbed->setEnabled(false);
-}
-
-void PDF_Opts::PutToEmbed()
-{
- if (EmbedList->count() != 0)
- {
- if (EmbedList->findItem(AvailFlist->currentText()) == NULL)
- {
- FontsToEmbed.append(AvailFlist->currentText());
- EmbedList->insertItem(AvailFlist->currentText());
- }
- }
- else
- {
- FontsToEmbed.append(AvailFlist->currentText());
- EmbedList->insertItem(AvailFlist->currentText());
- }
-}
-
-void PDF_Opts::SelAFont(QListBoxItem *c)
-{
- if ((c != NULL) && (!EmbedFonts->isChecked()))
- {
- FromEmbed->setEnabled(false);
- if (c->isSelectable())
- ToEmbed->setEnabled(true);
- EmbedList->clearSelection();
- }
-}
-
-void PDF_Opts::SelEFont(QListBoxItem *c)
-{
- if ((c != NULL) && (!EmbedFonts->isChecked()))
- {
- FromEmbed->setEnabled(true);
- ToEmbed->setEnabled(false);
- AvailFlist->clearSelection();
- }
-}
-
-void PDF_Opts::EmbedAll()
-{
- if (EmbedFonts->isChecked())
- {
- EmbedList->clear();
- FontsToEmbed.clear();
- FromEmbed->setEnabled(false);
- ToEmbed->setEnabled(false);
- for (uint a=0; a < AvailFlist->count(); a++)
- {
- if (AvailFlist->item(a)->isSelectable())
- {
- FontsToEmbed.append(AvailFlist->item(a)->text());
- EmbedList->insertItem(AvailFlist->item(a)->text());
- }
- }
- }
-}
-
-void PDF_Opts::ChangeFile()
-{
- QString fn;
- CustomFDialog dia(this, tr("Save as"), tr("PDF-Files (*.pdf);; All Files (*)"), false, false);
- if (Datei->text() != "")
- dia.setSelection(Datei->text());
- if (dia.exec() == QDialog::Accepted)
- fn = dia.selectedFile();
- else
- return;
- if (!fn.isEmpty())
- Datei->setText(fn);
-}
/start/Scribus/scribus/pdfopts.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/annota.cpp
===================================================================
--- start/Scribus/scribus/annota.cpp (revision 427)
+++ start/Scribus/scribus/annota.cpp (nonexistent)
@@ -1,181 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Annot.ui'
-**
-** Created: Tue Feb 19 22:31:55 2002
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "annota.h"
-#include "annota.moc"
-#include <qstringlist.h>
-
-extern QPixmap loadIcon(QString nam);
-
-Annota::Annota(QWidget* parent, PageItem *it, int Seite, int b, int h, CListe Farben, ScribusView* vie)
- : QDialog( parent, "AN", true, 0 )
-{
- setCaption( tr( "Annotation Properties" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- item = it;
- Breite = b;
- Hoehe = h;
- view = vie;
- QStringList tl;
- if (item->AnActType == 2)
- {
- QString tm = item->AnAction;
- tl = tl.split(" ", tm);
- }
- else
- {
- tl.append("0");
- tl.append("0");
- }
-
- AnnotLayout = new QVBoxLayout( this );
- AnnotLayout->setSpacing( 6 );
- AnnotLayout->setMargin( 11 );
-
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
-
- TextLabel1 = new QLabel( this, "TextLabel1" );
- TextLabel1->setText( tr( "Type:" ) );
- Layout1->addWidget( TextLabel1 );
-
- ComboBox1 = new QComboBox( true, this, "ComboBox1" );
- ComboBox1->insertItem( tr( "Text" ) );
- ComboBox1->insertItem( tr( "Link" ) );
- ComboBox1->setEditable(false);
- Layout1->addWidget( ComboBox1 );
- AnnotLayout->addLayout( Layout1 );
- item->AnType < 2 ? ComboBox1->setCurrentItem(item->AnType) : ComboBox1->setCurrentItem(item->AnType-10);
-
- Fram = new QWidgetStack(this);
- AnnotLayout->addWidget( Fram );
-
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
- GroupBox1->setTitle( tr( "Destination" ) );
- GroupBox1->setColumnLayout(0, Qt::Vertical );
- GroupBox1->layout()->setSpacing( 0 );
- GroupBox1->layout()->setMargin( 0 );
- GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
- GroupBox1Layout->setAlignment( Qt::AlignTop );
- GroupBox1Layout->setSpacing( 6 );
- GroupBox1Layout->setMargin( 11 );
- TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
- TextLabel3->setText( tr( "Page:" ) );
- GroupBox1Layout->addWidget( TextLabel3, 0, 0 );
- SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
- SpinBox1->setMinValue(1);
- SpinBox1->setMaxValue(Seite);
- SpinBox1->setValue(item->AnZiel+1);
- GroupBox1Layout->addWidget( SpinBox1, 0, 1 );
-
- Pg = new Navigator( GroupBox1, 100, item->AnZiel, view);
- Pg->setMinimumSize(QSize(Pg->pmx.width(), Pg->pmx.height()));
- GroupBox1Layout->addMultiCellWidget(Pg, 0, 2, 2, 2);
-
- TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
- TextLabel4->setText( tr( "X-Pos:" ) );
- GroupBox1Layout->addWidget( TextLabel4, 1, 0 );
- SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
- SpinBox2->setSuffix( tr( " pt" ) );
- SpinBox2->setMaxValue(Breite);
- SpinBox2->setValue(tl[0].toInt());
- GroupBox1Layout->addWidget( SpinBox2, 1, 1 );
- TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
- TextLabel5->setText( tr( "Y-Pos:" ) );
- GroupBox1Layout->addWidget( TextLabel5, 2, 0 );
- SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
- SpinBox3->setMaxValue(Hoehe);
- SpinBox3->setSuffix( tr( " pt" ) );
- SpinBox3->setValue(Hoehe-tl[1].toInt());
- GroupBox1Layout->addWidget( SpinBox3, 2, 1 );
- Fram->addWidget(GroupBox1, 1);
-
- Frame9 = new QFrame( this, "Frame7" );
- Frame9->setFrameShape( QFrame::NoFrame );
- Frame9->setFrameShadow( QFrame::Plain );
- Fram->addWidget(Frame9, 2);
-
- SetZiel(item->AnType);
- Layout1_2 = new QHBoxLayout;
- Layout1_2->setSpacing( 6 );
- Layout1_2->setMargin( 0 );
-
- QSpacerItem* spacerr = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1_2->addItem( spacerr );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "OK" ) );
- PushButton1->setDefault( TRUE );
- Layout1_2->addWidget( PushButton1 );
- PushButton2 = new QPushButton( this, "PushButton2" );
- PushButton2->setText( tr( "Cancel" ) );
- Layout1_2->addWidget( PushButton2 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1_2->addItem( spacer );
- AnnotLayout->addLayout( Layout1_2 );
- SetCross();
- connect(PushButton1, SIGNAL(clicked()), this, SLOT(SetVals()));
- connect(PushButton2, SIGNAL(clicked()), this, SLOT(reject()));
- connect(ComboBox1, SIGNAL(activated(int)), this, SLOT(SetZiel(int)));
- connect(SpinBox1, SIGNAL(valueChanged(int)), this, SLOT(SetPg(int)));
- connect(Pg, SIGNAL(Coords(float, float)), this, SLOT(SetCo(float, float)));
- connect(SpinBox2, SIGNAL(valueChanged(int)), this, SLOT(SetCross()));
- connect(SpinBox3, SIGNAL(valueChanged(int)), this, SLOT(SetCross()));
-}
-
-
-void Annota::SetCo(float x, float y)
-{
- SpinBox2->setValue(static_cast<int>(x*Breite));
- SpinBox3->setValue(static_cast<int>(y*Hoehe));
-}
-
-void Annota::SetPg(int v)
-{
- Pg->SetSeite(v-1, 100);
-}
-
-void Annota::SetCross()
-{
- int x,y;
- disconnect(Pg, SIGNAL(Coords(float, float)), this, SLOT(SetCo(float, float)));
- x = static_cast<int>(static_cast<float>(SpinBox2->value())/static_cast<float>(Breite)*Pg->pmx.width());
- y = static_cast<int>(static_cast<float>(SpinBox3->value())/static_cast<float>(Hoehe)*Pg->pmx.height());
- Pg->drawMark(x, y);
- connect(Pg, SIGNAL(Coords(float, float)), this, SLOT(SetCo(float, float)));
-}
-
-void Annota::SetVals()
-{
- QString tmp;
- item->AnZiel = SpinBox1->value()-1;
- item->AnType = ComboBox1->currentItem()+10;
- if (item->AnType == 10)
- item->AnActType = 0;
- if (item->AnType == 11)
- {
- item->AnAction = tmp.setNum(SpinBox2->value())+" "+tmp.setNum(Hoehe-SpinBox3->value())+" 0";
- item->AnActType = 2;
- }
- accept();
-}
-
-void Annota::SetZiel(int it)
-{
- switch (it)
- {
- case 1:
- case 11:
- Fram->raiseWidget(1);
- break;
- default:
- Fram->raiseWidget(2);
- break;
- }
-}
-
/start/Scribus/scribus/annota.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/edit1format.h
===================================================================
--- start/Scribus/scribus/edit1format.h (revision 427)
+++ start/Scribus/scribus/edit1format.h (nonexistent)
@@ -1,71 +0,0 @@
-#ifndef EDITSTYLE_H
-#define EDITSTYLE_H
-
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include "mspinbox.h"
-#include "scribusdoc.h"
-
-class EditStyle : public QDialog
-{
- Q_OBJECT
-
-public:
- EditStyle( QWidget* parent, struct StVorL *vor, QValueList<StVorL> v, bool neu, SCFonts *avail, float au);
- ~EditStyle() {};
-
- QLabel* TextLabel1;
- QLabel* TextLabel1_2;
- QLabel* TextLabel2;
- QLabel* TextLabel3;
- QLabel* TextLabel1_2_2;
- QLabel* TextLabel1_2_3;
- QLineEdit* Name;
- MSpinBox* LineSpVal;
- MSpinBox* LeftInd;
- MSpinBox* FirstLin;
- MSpinBox* AboveV;
- MSpinBox* BelowV;
- QButtonGroup* ButtonGroup1;
- QGroupBox* GroupBox10;
- QGroupBox* AbstandV;
- QRadioButton* Left;
- QRadioButton* Center;
- QRadioButton* Right;
- QRadioButton* Full;
- QRadioButton* Forced;
- QGroupBox* GroupFont;
- QLabel* TextF1;
- QComboBox* FontC;
- QSpinBox* SizeC;
- QLabel* TextF2;
- QPushButton* Cancel;
- QPushButton* OkButton;
- struct StVorL *werte;
- QValueList<StVorL> allV;
- QString OldName;
- bool IsNew;
- float AutoVal;
-
-private slots:
- void Verlassen();
- void FontChange(int val);
-
-protected:
- QHBoxLayout* Layout17;
- QGridLayout* EditStyleLayout;
- QGridLayout* GroupBox10Layout;
- QGridLayout* ButtonGroup1Layout;
- QGridLayout* AbstandVLayout;
- QGridLayout* GroupFontLayout;
-};
-
-#endif // EDITSTYLE_H
/start/Scribus/scribus/edit1format.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/scfonts.h
===================================================================
--- start/Scribus/scribus/scfonts.h (revision 427)
+++ start/Scribus/scribus/scfonts.h (nonexistent)
@@ -1,103 +0,0 @@
-#ifndef SCFONTS_H
-#define SCFONTS_H
-
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qfont.h>
-#include "config.h"
-
-#include "scfonts_encoding.h"
-
-/* Base Class Foi : This is subclassed by a class to handle Type1 fonts, a class
- to handle TrueType fonts, and potentially any other type that becomes appropriate in
- the future.
- Note the virtual destructor, needed to ensure that the correct destructor is called
- for subclasses
-
- The RealName field has been changed from a data member to a member function.
- This is because the only place the PostScript real name of a font is required is
- the printing code, so it's cheaper to extract this information only when it is
- required, for just the used fonts, than for every one of potentially hundreds at
- application startup! This also allows for the fact that truetype fonts will require
- a different method of extracting their names.
-
- One implication of using a base class/subclass model for fonts: It is no longer
- possible to store the Foi structures in a QMap. This is because QMap allocates
- its own structures, and copies the supplied data to them. A QMap<QString,Foi>
- would demote all subclasses to Foi classes, and hence break the polymorphism.
- QDict can be used instead, with very little change to the rest of the code, since
- it stores references to the data instead of copying the data. With AutoDelete set
- to true, it will automatically dispose of all data when its destructor is called,
- so there are no extra cleaning-up chores to take care of.
-*/
-
-class Foi
-{
- public:
- Foi(QString scname, QString path, bool embedps, SCFonts_Encoding &encoding);
- virtual ~Foi() {};
- virtual QString RealName();
- virtual bool EmbedFont(QString &str);
- virtual bool ReadMetrics();
- virtual bool GlNames(QMap<uint, QString> *GList);
- QString SCName;
- QString Datei;
- QFont Font;
- bool EmbedPS;
- SCFonts_Encoding &Encoding;
- static SCFonts_Encoding StdEncoding;
- static SCFonts_Encoding TTFEncoding;
- bool HasMetrics;
-#ifdef HAVE_FREETYPE
- QMap<uint,float> CharWidth;
-#else
- float CharWidth[256];
-#endif
- QString Ascent;
- QString CapHeight;
- QString Descender;
- QString ItalicAngle;
- QString StdVW;
- QString FontEnc;
- bool IsFixedPitch;
- QString FontBBox;
- bool UseFont;
- bool HasKern;
- float uniEM;
-};
-
-
-/* Main class SCFonts.
- Subclass of QDict<Foi>.
- This class replaces the previous SCFonts typedef, and is nearly as convenient.
- The chief difference from the application point of view is that while data can
- still be retrieved with SCFonts[fontname], this cannot be used to add members.
- Since the only piece of code that will generally add members is scfonts.h, this
- is not a major problem.
-*/
-
-class SCFonts : public QDict<Foi>
-{
- public:
- SCFonts() : QDict<Foi>(), FontPath(true), Encoding("ISOenc.txt")
- {
- setAutoDelete(true);
- }
- ~SCFonts();
- void GetFonts(QString pf);
- void FreeExtraFonts();
- private:
- void AddPath(QString p);
- void AddScalableFonts(const QString &path);
- void AddUserPath(QString pf);
- void AddXFontServerPath();
- void AddXFontPath();
- QStrList FontPath;
- QString ExtraPath;
- SCFonts_Encoding Encoding;
-};
-
-typedef QDictIterator<Foi> SCFontsIterator;
-
-#endif
/start/Scribus/scribus/scfonts.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/libprefs/prefs.h
===================================================================
--- start/Scribus/scribus/libprefs/prefs.h (revision 427)
+++ start/Scribus/scribus/libprefs/prefs.h (nonexistent)
@@ -1,321 +0,0 @@
-#ifndef PREFS_H
-#define PREFS_H
-
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qframe.h>
-#include <qcheckbox.h>
-#include <qwidgetstack.h>
-#include <qpixmap.h>
-#include <qslider.h>
-#include <qlineedit.h>
-#include <qfiledialog.h>
-#include "linecombo.h"
-#include "linkbutton.h"
-#include "scribusdoc.h"
-#include "scfonts.h"
-#include "mspinbox.h"
-#include "scribus.h"
-
-class Preferences : public QDialog
-{
- Q_OBJECT
-
-public:
- Preferences( QWidget* parent, preV *Vor);
- ~Preferences();
- float GetZeroFaktor();
- float GetMaxFaktor();
-
- QPushButton* buttonOK;
- QPushButton* buttonCancel;
- QTabWidget* TabWidget3;
- QWidget* tab;
- QGroupBox* Mouse;
- QLabel* TextLabel1_2;
- QLabel* TextLabel1_2_2;
- QSpinBox* SpinBox3;
- QSpinBox* SpinBox3_2;
- QSpinBox* Recen;
- QButtonGroup* ButtonGroup1;
- QLabel* TextGstil;
- QLabel* TextGstil2;
- QSpinBox* GFsize;
- QComboBox* GUICombo;
- QComboBox* UnitCombo;
- QGroupBox* GroupBox20;
- QGroupBox* GroupBox20a;
- QGroupBox* GroupBox20b;
- QGroupBox* GroupBox200;
- QLabel* PfadText;
- QLineEdit* Docs;
- QToolButton* FileC;
- QButtonGroup* ButtonGroup2;
- QButtonGroup* ButtonGroup5;
- QRadioButton* RadioButton6;
- QRadioButton* RadioButton7;
- QWidget* tab_2;
- QGroupBox* GroupBox1;
- QLabel* TextLabel1;
- QLabel* TextLabel2;
- QLabel* TextLabel2g;
- MSpinBox* SpinBox1;
- MSpinBox* SpinBox2;
- MSpinBox* SpinBox2g;
- QGroupBox* GroupBox2;
- QLabel* TextLabel3;
- QLabel* TextLabel4;
- QLabel* TextLabel4a;
- QLabel* TextLabel4b;
- QLabel* TextLabel4c;
- QLabel* TextLabel4g;
- QPushButton* minColor;
- QPushButton* MaxColor;
- QPushButton* GuideColor;
- QPushButton* PapColor;
- QPushButton* RandColor;
- QPushButton* Shorty;
- QWidget* tab_3;
- QWidgetStack* Fram;
- QLabel* TextLabel2_2;
- QLabel* TextLabel1_3;
- QComboBox* FontCombo;
- QComboBox* SizeCombo;
- QComboBox* ForegroundT;
- QLabel* TextLabelT1;
- QLabel* TextLabel1_4;
- QWidget* tab_4;
- QGroupBox* GroupBox4_2;
- QLabel* TextLabel2_3_2;
- QLabel* TextLabel1_5_2;
- QSpinBox* VTiefW;
- QSpinBox* VTiefWSc;
- QGroupBox* GroupBox4;
- QLabel* TextLabel2_3;
- QLabel* TextLabel1_5;
- QSpinBox* VHochW;
- QSpinBox* VHochWSc;
- QGroupBox* GroupBox4_3;
- QLabel* TextLabel2_3_3;
- QSpinBox* SmallCaps;
- QGroupBox* GroupBox4_3a;
- QLabel* TextLabel2_3_3a;
- QSpinBox* AutoLineV;
- QToolButton* TextButton;
- QToolButton* BildButton;
- QToolButton* RectButton;
- QToolButton* OvalButton;
- QToolButton* LineButton;
- QToolButton* ZoomButton;
- QToolButton* PolyButton;
- QFrame* ToolFrame;
- QFrame* ToolFrame2;
- QLabel* TextLabelT21;
- QLabel* TextLabelT22;
- QLabel* TextLabelT23;
- QLabel* TextLabelT24;
- QLabel* TextLabelT25;
- QLabel* TextLabelT26;
- QComboBox* Foreground;
- QSpinBox* Shade2;
- QComboBox* Background;
- QSpinBox* Shade;
- LineCombo* Linestyle;
- MSpinBox* LineW;
- QFrame* ToolFrame3;
- QLabel* TextLabelT31;
- QLabel* TextLabelT32;
- QLabel* TextLabelT35;
- QLabel* TextLabelT36;
- QComboBox* Foreground2;
- QSpinBox* Shade22;
- LineCombo* Linestyle2;
- MSpinBox* LineW2;
- QFrame* ToolFrame4;
- QLabel* TextLabelT42;
- QLabel* TextLabelT43;
- QLabel* TextLabelT44;
- QSpinBox* MinMag;
- QSpinBox* MaxMag;
- QSpinBox* StepMag;
- QButtonGroup* ToolFrame5;
- QLabel* TextLabelT51;
- QLabel* TextLabelT52;
- QLabel* TextLabelT53;
- QLabel* TextLabelT54;
- QRadioButton* FreeScale;
- QRadioButton* FrameScale;
- QCheckBox* Aspect;
- QSpinBox* XScale;
- QSpinBox* YScale;
- LinkButton* Kette;
- QComboBox* BackgroundP;
- QSpinBox* ShadeP;
- QLabel* TextLabelP;
- QWidget* tab_5;
- QGroupBox* Saving;
- QCheckBox* SaveAtQuit;
- QGroupBox* Preview;
- QComboBox* PreviewSize;
- QFrame* Frame6;
- QWidget* tab_6;
- QGroupBox* GroupBox10;
- QCheckBox* FramesVisible;
- QCheckBox* SidebySide;
- QCheckBox* RandFarb;
- QFrame* ToolFrame6;
- QLabel* T6_Text1;
- QSpinBox* T6_Ecken;
- QCheckBox* T6_Konvex;
- QLabel* T6_Text2;
- QSpinBox* T6_Faktor;
- QSlider* T6_Slider1;
- QLabel* T6_Preview;
- QLabel* T6_Text2_2;
- QSpinBox* T6_Faktor2;
- QSlider* T6_Slider2;
- QWidget* tab_7;
- QButtonGroup* GroupSize;
- QLabel* GZText2;
- QComboBox* GZComboF;
- QComboBox* GZComboO;
- QLabel* GZText1;
- QLabel* GZText3;
- QLabel* GZText4;
- MSpinBox* Breite;
- MSpinBox* Hoehe;
- QCheckBox* Doppelseiten;
- QCheckBox* Linkszuerst;
- QGroupBox* GroupRand;
- QLabel* GRText3;
- MSpinBox* TopR;
- MSpinBox* BottomR;
- MSpinBox* RightR;
- MSpinBox* LeftR;
- QLabel* GRText2;
- QLabel* GRText1;
- QLabel* GRText4;
- QCheckBox *UsePDFTrans;
- QGroupBox* GroupAS;
- QCheckBox* ASon;
- QLabel* ASText;
- QSpinBox* ASTime;
-
- SCFonts *fon; // can't use a reference, and can't copy whole structure...
- float Umrech;
- QPixmap* Pre;
- float PFactor;
- QMap<int,Keys> KKC;
- QColor Cmin;
- QColor Cmax;
- QColor Crand;
- QColor Cpaper;
- QColor Cgui;
- float Pagebr;
- float Pageho;
- int Einheit;
- ScribusApp *ap;
-
-public slots:
- virtual void changeMaColor();
- virtual void changeMicolor();
- void ChangeDocs();
- void ChangeScaling();
- void setDS();
- void setBreite(int v);
- void setHoehe(int v);
- void setSize(int gr);
- void setOrien(int ori);
- void changePapColor();
- void changeRandColor();
- void changeGuideColor();
- void DefKB();
- void SetSample();
- void SetTool();
- void ToggleKette();
- void HChange();
- void VChange();
- void UnitChange();
- void UpdatePreView();
- float GetFaktor();
- void ValFromSpin(int a);
- void ValFromSpin2(int a);
-
-protected:
- QVBoxLayout* PrefsLayout;
- QGridLayout* tabLayout;
- QGridLayout* ButtonGroup1Layout;
- QHBoxLayout* GroupBox20Layout;
- QHBoxLayout* GroupBox20aLayout;
- QGridLayout* GroupBox20bLayout;
- QHBoxLayout* GroupBox200Layout;
- QHBoxLayout* MouseLayout;
- QGridLayout* Layout5;
- QGridLayout* tabLayout_2;
- QHBoxLayout* ButtonGroup5Layout;
- QVBoxLayout* Layout7;
- QHBoxLayout* GroupBox1Layout;
- QGridLayout* Layout10;
- QHBoxLayout* GroupBox2Layout;
- QGridLayout* Layout11;
- QGridLayout* tabLayout_3;
- QHBoxLayout* GroupBox4_2Layout;
- QGridLayout* Layout12;
- QHBoxLayout* GroupBox4Layout;
- QGridLayout* Layout13;
- QHBoxLayout* GroupBox4_3Layout;
- QHBoxLayout* Layout14;
- QHBoxLayout* GroupBox4_3aLayout;
- QHBoxLayout* Layout14a;
- QHBoxLayout* tabLayout_4;
- QHBoxLayout* ButtonGroup2Layout;
- QGridLayout* Layout16;
- QHBoxLayout* ToolFrameLayout;
- QHBoxLayout* ToolFrame2Layout;
- QHBoxLayout* ToolFrame3Layout;
- QHBoxLayout* ToolFrame4Layout;
- QHBoxLayout* ToolFrame5Layout;
- QGridLayout* Layout15;
- QGridLayout* Layout15a;
- QGridLayout* Layout15b;
- QGridLayout* Layout15c;
- QGridLayout* Layout15d;
- QGridLayout* tabLayout_5;
- QHBoxLayout* SavingLayout;
- QHBoxLayout* PreviewLayout;
- QHBoxLayout* tabLayout_6;
- QHBoxLayout* Layout_6b;
- QVBoxLayout* GroupBox10Layout;
- QHBoxLayout* Layout3;
- QHBoxLayout* PolygonPropsLayout;
- QHBoxLayout* T6_Layout11;
- QVBoxLayout* T6_Layout10;
- QHBoxLayout* T6_Layout2;
- QHBoxLayout* T6_Layout9;
- QVBoxLayout* T6_Layout8;
- QHBoxLayout* T6_Layout7;
- QHBoxLayout* T6_Layout9_2;
- QVBoxLayout* T6_Layout8_2;
- QHBoxLayout* T6_Layout7_2;
- QHBoxLayout* tabLayout_7;
- QVBoxLayout* Layout21;
- QVBoxLayout* Layout21b;
- QVBoxLayout* GroupSizeLayout;
- QGridLayout* Layout6;
- QHBoxLayout* Layout5_2;
- QHBoxLayout* Layout8;
- QGridLayout* GroupRandLayout;
- QGridLayout* GroupASLayout;
-};
-
-#endif // PREFS_H
/start/Scribus/scribus/libprefs/prefs.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/libprefs/Makefile.am
===================================================================
--- start/Scribus/scribus/libprefs/Makefile.am (revision 427)
+++ start/Scribus/scribus/libprefs/Makefile.am (nonexistent)
@@ -1,15 +0,0 @@
-libdir = $(prefix)/lib/scribus/libs
-AM_CPPFLAGS = -I$(top_builddir)/scribus
-lib_LTLIBRARIES = libpreferences.la
-
-INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes)
-
-libpreferences_la_LDFLAGS = -version-info 0:0:0
-
-libpreferences_la_METASOURCES = AUTO
-
-libpreferences_la_SOURCES = prefs.cpp
-KDE_OPTIONS = qtonly
-
-EXTRA_DIST = prefs.cpp prefs.h
-AM_LDFLAGS = -s $(LIBFREETYPE_LIBS)
/start/Scribus/scribus/libprefs/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/libprefs/prefs.cpp
===================================================================
--- start/Scribus/scribus/libprefs/prefs.cpp (revision 427)
+++ start/Scribus/scribus/libprefs/prefs.cpp (nonexistent)
@@ -1,2057 +0,0 @@
-#include "prefs.h"
-#include "prefs.moc"
-#include "keymanager.h"
-#include <qfont.h>
-#include <qcolordialog.h>
-#include <qcolor.h>
-#include <qstringlist.h>
-#include <qstylefactory.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qwmatrix.h>
-#include <cmath>
-
-extern QPixmap loadIcon(QString nam);
-extern QPointArray RegularPolygon(float w, float h, uint c, bool star, float factor, float rota);
-
-extern "C" void* Run(QWidget *d, preV *Vor);
-
-void* Run(QWidget *d, preV *Vor)
-{
- Preferences *dia = new Preferences(d, Vor);
- return dia;
-}
-
-Preferences::Preferences( QWidget* parent, preV *Vor)
- : QDialog( parent, "pref", true, 0 )
-{
- fon = &Vor->AvailFonts;
- ap = (ScribusApp*)parent;
- Umrech = 1.0;
- if (ap->HaveDoc)
- Einheit = ap->doc->Einheit;
- else
- Einheit = Vor->Einheit;
- KKC = Vor->KeyActions;
- setCaption( tr( "Preferences" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
- PrefsLayout = new QVBoxLayout( this );
- PrefsLayout->setSpacing( 6 );
- PrefsLayout->setMargin( 11 );
- TabWidget3 = new QTabWidget( this, "TabWidget3" );
- TabWidget3->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
- tab = new QWidget( TabWidget3, "tab" );
- tabLayout = new QGridLayout( tab );
- tabLayout->setSpacing( 6 );
- tabLayout->setMargin( 10 );
- ButtonGroup1 = new QButtonGroup( tab, "ButtonGroup1" );
- ButtonGroup1->setTitle( tr( "GUI" ) );
- ButtonGroup1->setColumnLayout(0, Qt::Vertical );
- ButtonGroup1->layout()->setSpacing( 0 );
- ButtonGroup1->layout()->setMargin( 0 );
- ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
- ButtonGroup1Layout->setAlignment( Qt::AlignTop );
- ButtonGroup1Layout->setSpacing( 6 );
- ButtonGroup1Layout->setMargin( 10 );
- TextGstil = new QLabel(ButtonGroup1, "dd");
- TextGstil->setText(tr("Theme"));
- ButtonGroup1Layout->addWidget( TextGstil, 0, 0 );
- GUICombo = new QComboBox( true, ButtonGroup1, "GUICombo" );
- QStringList STtest;
- STtest = QStyleFactory::keys();
- for (uint stt = 0; stt < STtest.count(); ++stt)
- {
- GUICombo->insertItem(STtest[stt]);
- }
- GUICombo->setEditable(false);
- GUICombo->setCurrentText(Vor->GUI);
- ButtonGroup1Layout->addWidget( GUICombo, 0, 1, Qt::AlignRight );
- TextGstil2 = new QLabel(ButtonGroup1, "dd");
- TextGstil2->setText(tr("Fontsize"));
- ButtonGroup1Layout->addWidget( TextGstil2, 1, 0 );
- GFsize = new QSpinBox(ButtonGroup1, "gfs" );
- GFsize->setSuffix( tr( " pts" ) );
- GFsize->setMaxValue( 22 );
- GFsize->setMinValue( 8 );
- GFsize->setValue( Vor->AppFontSize );
- ButtonGroup1Layout->addWidget( GFsize, 1, 1, Qt::AlignRight );
- tabLayout->addWidget( ButtonGroup1, 0, 0 );
- GroupBox20 = new QGroupBox( tab, "GroupBox20" );
- GroupBox20->setTitle( tr( "Units" ) );
- GroupBox20->setColumnLayout(0, Qt::Vertical );
- GroupBox20->layout()->setSpacing( 0 );
- GroupBox20->layout()->setMargin( 0 );
- GroupBox20Layout = new QHBoxLayout( GroupBox20->layout() );
- GroupBox20Layout->setAlignment( Qt::AlignTop );
- GroupBox20Layout->setSpacing( 0 );
- GroupBox20Layout->setMargin( 25 );
- UnitCombo = new QComboBox( true, GroupBox20, "UnitCombo" );
- UnitCombo->insertItem( tr( "Points (pt)" ) );
- UnitCombo->insertItem( tr( "Millimeters (mm)" ) );
- UnitCombo->insertItem( tr( "Inches (in)" ) );
- UnitCombo->insertItem( tr( "Picas (p)" ) );
- UnitCombo->setEditable(false);
- if (ap->HaveDoc)
- UnitCombo->setCurrentItem(ap->doc->Einheit);
- else
- UnitCombo->setCurrentItem(Vor->Einheit);
- GroupBox20Layout->addWidget( UnitCombo );
- tabLayout->addWidget( GroupBox20, 1, 0 );
- Mouse = new QGroupBox( tab, "Mouse" );
- Mouse->setTitle( tr( "Mouse-Settings" ) );
- Mouse->setColumnLayout(0, Qt::Vertical );
- Mouse->layout()->setSpacing( 0 );
- Mouse->layout()->setMargin( 0 );
- MouseLayout = new QHBoxLayout( Mouse->layout() );
- MouseLayout->setAlignment( Qt::AlignTop );
- MouseLayout->setSpacing( 6 );
- MouseLayout->setMargin( 10 );
- Layout5 = new QGridLayout;
- Layout5->setSpacing( 6 );
- Layout5->setMargin( 0 );
- TextLabel1_2 = new QLabel( Mouse, "TextLabel1_2" );
- TextLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel1_2->sizePolicy().hasHeightForWidth() ) );
- TextLabel1_2->setText( tr( "Wheel-Jump" ) );
- Layout5->addWidget( TextLabel1_2, 0, 0 );
- SpinBox3 = new QSpinBox( Mouse, "SpinBox3" );
- SpinBox3->setMaxValue( 1000 );
- SpinBox3->setMinValue( 0 );
- SpinBox3->setLineStep( 10 );
- SpinBox3->setValue( Vor->Wheelval );
- Layout5->addWidget( SpinBox3, 0, 1 );
- TextLabel1_2_2 = new QLabel( Mouse, "TextLabel1_2_2" );
- TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) );
- TextLabel1_2_2->setText( tr( "Grab-Radius" ) );
- Layout5->addWidget( TextLabel1_2_2, 1, 0 );
- SpinBox3_2 = new QSpinBox( Mouse, "SpinBox3_2" );
- SpinBox3_2->setMaxValue( 1000 );
- SpinBox3_2->setMinValue( 1 );
- SpinBox3_2->setLineStep( 1 );
- if (ap->HaveDoc)
- SpinBox3_2->setValue( ap->doc->GrabRad );
- else
- SpinBox3_2->setValue( Vor->GrabRad );
- Layout5->addWidget( SpinBox3_2, 1, 1 );
- MouseLayout->addLayout( Layout5 );
- tabLayout->addWidget( Mouse, 0, 1 );
-
- GroupBox20b = new QGroupBox( tab, "GroupBox20b" );
- GroupBox20b->setTitle( tr( "Menues" ) );
- GroupBox20b->setColumnLayout(0, Qt::Vertical );
- GroupBox20b->layout()->setSpacing( 0 );
- GroupBox20b->layout()->setMargin( 0 );
- GroupBox20bLayout = new QGridLayout( GroupBox20b->layout() );
- GroupBox20bLayout->setAlignment( Qt::AlignTop );
- GroupBox20bLayout->setSpacing( 5 );
- GroupBox20bLayout->setMargin( 10 );
- TextLabel4c = new QLabel( GroupBox20b, "TextLabel4c" );
- TextLabel4c->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel4c->sizePolicy().hasHeightForWidth() ) );
- TextLabel4c->setText( tr( "Recent Documents:" ) );
- GroupBox20bLayout->addWidget( TextLabel4c, 0, 0);
- Recen = new QSpinBox( GroupBox20b, "Recen" );
- Recen->setMaxValue( 30 );
- Recen->setMinValue( 1 );
- Recen->setValue( Vor->RecentDCount );
- GroupBox20bLayout->addWidget( Recen, 0, 1 );
- Shorty = new QPushButton(GroupBox20b, "SH");
- Shorty->setText(tr("Keyboard Shortcuts..."));
- GroupBox20bLayout->addMultiCellWidget( Shorty, 1, 1, 0, 1 );
- tabLayout->addWidget( GroupBox20b, 1, 1 );
-
- GroupBox200 = new QGroupBox( tab, "GroupBox200" );
- GroupBox200->setTitle( tr( "Paths" ) );
- GroupBox200->setColumnLayout(0, Qt::Horizontal );
- GroupBox200->layout()->setSpacing( 0 );
- GroupBox200->layout()->setMargin( 0 );
- GroupBox200Layout = new QHBoxLayout( GroupBox200->layout() );
- GroupBox200Layout->setAlignment( Qt::AlignTop );
- GroupBox200Layout->setSpacing( 0 );
- GroupBox200Layout->setMargin( 5 );
- PfadText = new QLabel( GroupBox200, "Pfadtext" );
- PfadText->setText(tr("Documents:"));
- GroupBox200Layout->addWidget( PfadText );
- Docs = new QLineEdit( GroupBox200, "Datei" );
- Docs->setMinimumSize( QSize( 268, 22 ) );
- Docs->setText(Vor->DocDir);
- GroupBox200Layout->addWidget( Docs );
- FileC = new QToolButton( GroupBox200, "FileC" );
- FileC->setMinimumSize( QSize( 88, 24 ) );
- FileC->setText( tr( "Change..." ) );
- GroupBox200Layout->addWidget( FileC );
- tabLayout->addMultiCellWidget( GroupBox200, 2, 2, 0, 1 );
-
- TabWidget3->insertTab( tab, tr( "General" ) );
-
- tab_7 = new QWidget( TabWidget3, "tab_7" );
- tabLayout_7 = new QHBoxLayout( tab_7, 11, 6, "tabLayout_7");
- Layout21 = new QVBoxLayout( 0, 0, 6, "Layout21");
- GroupSize = new QButtonGroup( tab_7, "GroupSize" );
- GroupSize->setTitle( tr( "Page Size" ) );
- GroupSize->setColumnLayout(0, Qt::Vertical );
- GroupSize->layout()->setSpacing( 6 );
- GroupSize->layout()->setMargin( 10 );
- GroupSizeLayout = new QVBoxLayout( GroupSize->layout() );
- GroupSizeLayout->setAlignment( Qt::AlignTop );
- Layout6 = new QGridLayout( 0, 1, 1, 0, 6, "Layout6");
- GZText2 = new QLabel( GroupSize, "GZText2" );
- GZText2->setText( tr( "Orientation:" ) );
- Layout6->addWidget( GZText2, 1, 0 );
- GZComboF = new QComboBox( true, GroupSize, "GZComboF" );
- GZComboF->insertItem( tr( "A0" ) );
- GZComboF->insertItem( tr( "A1" ) );
- GZComboF->insertItem( tr( "A2" ) );
- GZComboF->insertItem( tr( "A3" ) );
- GZComboF->insertItem( tr( "A4" ) );
- GZComboF->insertItem( tr( "A5" ) );
- GZComboF->insertItem( tr( "A6" ) );
- GZComboF->insertItem( tr( "A7" ) );
- GZComboF->insertItem( tr( "A8" ) );
- GZComboF->insertItem( tr( "A9" ) );
- GZComboF->insertItem( tr( "B0" ) );
- GZComboF->insertItem( tr( "B1" ) );
- GZComboF->insertItem( tr( "B2" ) );
- GZComboF->insertItem( tr( "B3" ) );
- GZComboF->insertItem( tr( "B4" ) );
- GZComboF->insertItem( tr( "B5" ) );
- GZComboF->insertItem( tr( "B6" ) );
- GZComboF->insertItem( tr( "B7" ) );
- GZComboF->insertItem( tr( "B8" ) );
- GZComboF->insertItem( tr( "B9" ) );
- GZComboF->insertItem( tr( "B10" ) );
- GZComboF->insertItem( tr( "C5E" ) );
- GZComboF->insertItem( tr( "Comm10E" ) );
- GZComboF->insertItem( tr( "DLE" ) );
- GZComboF->insertItem( tr( "Executive" ) );
- GZComboF->insertItem( tr( "Folio" ) );
- GZComboF->insertItem( tr( "Ledger" ) );
- GZComboF->insertItem( tr( "Legal" ) );
- GZComboF->insertItem( tr( "Letter" ) );
- GZComboF->insertItem( tr( "Tabloid" ) );
- GZComboF->insertItem( tr( "Custom" ) );
- GZComboF->setEditable(false);
- GZComboF->setCurrentItem(Vor->PageFormat);
- Layout6->addWidget( GZComboF, 0, 1 );
-
- GZComboO = new QComboBox( true, GroupSize, "GZComboO" );
- GZComboO->insertItem( tr( "Portrait" ) );
- GZComboO->insertItem( tr( "Landscape" ) );
- GZComboO->setEditable(false);
- GZComboO->setCurrentItem(Vor->Ausrichtung);
-
- Layout6->addWidget( GZComboO, 1, 1 );
-
- GZText1 = new QLabel( GroupSize, "GZText1" );
- GZText1->setText( tr( "Size:" ) );
-
- Layout6->addWidget( GZText1, 0, 0 );
- GroupSizeLayout->addLayout( Layout6 );
-
- Layout5_2 = new QHBoxLayout( 0, 0, 6, "Layout5_2");
-
- GZText3 = new QLabel( GroupSize, "GZText3" );
- GZText3->setText( tr( "Width:" ) );
- Layout5_2->addWidget( GZText3 );
-
- Breite = new MSpinBox( GroupSize, 2 );
- Breite->setEnabled( false );
- Breite->setMinimumSize( QSize( 70, 20 ) );
- Breite->setMaxValue( 1000000 );
- Breite->setMinValue( 1 );
- Layout5_2->addWidget( Breite );
-
- GZText4 = new QLabel( GroupSize, "GZText4" );
- GZText4->setText( tr( "Height:" ) );
- Layout5_2->addWidget( GZText4 );
-
- Hoehe = new MSpinBox( GroupSize, 2 );
- Hoehe->setEnabled( false );
- Hoehe->setMinimumSize( QSize( 70, 20 ) );
- Hoehe->setMaxValue( 1000000 );
- Hoehe->setMinValue( 1 );
- Layout5_2->addWidget( Hoehe );
- GroupSizeLayout->addLayout( Layout5_2 );
- Breite->setValue(qRound(Vor->PageBreite * Umrech) * 100);
- Hoehe->setValue(qRound(Vor->PageHoehe * Umrech) * 100);
- Breite->setLineStep(100);
- Hoehe->setLineStep(100);
-
- Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
-
- Doppelseiten = new QCheckBox( GroupSize, "Doppelseiten" );
- Doppelseiten->setText( tr( "Facing Pages" ) );
- Doppelseiten->setChecked(Vor->DoppelSeiten);
- Layout8->addWidget( Doppelseiten );
-
- Linkszuerst = new QCheckBox( GroupSize, "Linkszuerst" );
- Linkszuerst->setText( tr( "Left Page first" ) );
- Linkszuerst->setChecked(Vor->ErsteLinks);
- if (!Doppelseiten->isChecked())
- Linkszuerst->setEnabled(false);
- Layout8->addWidget( Linkszuerst );
- GroupSizeLayout->addLayout( Layout8 );
- Layout21->addWidget( GroupSize );
-
- GroupRand = new QGroupBox( tab_7, "GroupRand" );
- GroupRand->setTitle( tr( "Margin Guides" ) );
- GroupRand->setColumnLayout(0, Qt::Vertical );
- GroupRand->layout()->setSpacing( 5 );
- GroupRand->layout()->setMargin( 10 );
- GroupRandLayout = new QGridLayout( GroupRand->layout() );
- GroupRandLayout->setAlignment( Qt::AlignTop );
-
- TopR = new MSpinBox( GroupRand, 2 );
- TopR->setMinimumSize( QSize( 70, 20 ) );
- TopR->setMaxValue( 100000 );
- TopR->setMinValue( 0 );
- TopR->setValue( qRound(Vor->RandOben * Umrech * 100));
- GroupRandLayout->addWidget( TopR, 0, 1 );
- BottomR = new MSpinBox( GroupRand, 2 );
- BottomR->setMinimumSize( QSize( 70, 20 ) );
- BottomR->setMaxValue( 100000 );
- BottomR->setMinValue( 0 );
- BottomR->setValue( qRound(Vor->RandUnten * Umrech * 100));
- GroupRandLayout->addWidget( BottomR, 1, 1 );
- RightR = new MSpinBox( GroupRand, 2 );
- RightR->setMinimumSize( QSize( 70, 20 ) );
- RightR->setMaxValue( 100000 );
- RightR->setMinValue( 0 );
- RightR->setValue( qRound(Vor->RandRechts * Umrech * 100));
- GroupRandLayout->addWidget( RightR, 1, 3 );
- LeftR = new MSpinBox( GroupRand, 2 );
- LeftR->setMinimumSize( QSize( 70, 20 ) );
- LeftR->setMaxValue( 100000 );
- LeftR->setMinValue( 0 );
- LeftR->setValue( qRound(Vor->RandLinks * Umrech * 100));
- GroupRandLayout->addWidget( LeftR, 0, 3 );
- Breite->setLineStep(100);
- Hoehe->setLineStep(100);
- TopR->setLineStep(100);
- LeftR->setLineStep(100);
- RightR->setLineStep(100);
- BottomR->setLineStep(100);
-
- GRText2 = new QLabel( GroupRand, "GRText2" );
- GRText2->setText( tr( "Bottom:" ) );
- GroupRandLayout->addWidget( GRText2, 1, 0 );
- GRText1 = new QLabel( GroupRand, "GRText1" );
- GRText1->setText( tr( "Top:" ) );
- GroupRandLayout->addWidget( GRText1, 0, 0 );
- GRText4 = new QLabel( GroupRand, "GRText4" );
- GRText4->setText( tr( "Right:" ) );
- GroupRandLayout->addWidget( GRText4, 1, 2 );
- GRText3 = new QLabel( GroupRand, "GRText3" );
- GRText3->setText( tr( "Left:" ) );
- GroupRandLayout->addWidget( GRText3, 0, 2 );
-
- Layout21->addWidget( GroupRand );
- tabLayout_7->addLayout( Layout21 );
-
- Layout21b = new QVBoxLayout( 0, 0, 6, "Layout21b");
- GroupAS = new QGroupBox( tab_7, "GroupAS" );
- GroupAS->setTitle( tr( "Autosave" ) );
- GroupAS->setColumnLayout(0, Qt::Vertical );
- GroupAS->layout()->setSpacing( 5 );
- GroupAS->layout()->setMargin( 10 );
- GroupASLayout = new QGridLayout( GroupAS->layout() );
- GroupASLayout->setAlignment( Qt::AlignTop );
- ASon = new QCheckBox( GroupAS, "Enable Autosave" );
- ASon->setText( tr( "Enabled" ) );
- if (ap->HaveDoc)
- ASon->setChecked(ap->doc->AutoSave);
- else
- ASon->setChecked(Vor->AutoSave);
- GroupASLayout->addMultiCellWidget( ASon, 0, 0, 0, 1 );
- ASText = new QLabel( GroupAS, "ASText" );
- ASText->setText( tr( "Intervall:" ) );
- GroupASLayout->addWidget( ASText, 1, 0 );
- ASTime = new QSpinBox( GroupAS, "Time" );
- ASTime->setMaxValue( 60 );
- ASTime->setMinValue( 1 );
- ASTime->setSuffix( " min" );
- ASTime->setValue(Vor->AutoSaveTime / 1000 / 60);
- GroupASLayout->addWidget( ASTime, 1, 1 );
- Layout21b->addWidget( GroupAS );
- QSpacerItem* spacerDocb = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout21b->addItem( spacerDocb );
- tabLayout_7->addLayout( Layout21b );
- TabWidget3->insertTab( tab_7, tr( "Document" ) );
-
- tab_2 = new QWidget( TabWidget3, "tab_2" );
- tabLayout_2 = new QGridLayout( tab_2 );
- tabLayout_2->setSpacing( 6 );
- tabLayout_2->setMargin( 11 );
- GroupBox1 = new QGroupBox( tab_2, "GroupBox1" );
- GroupBox1->setTitle( tr( "Grid Layout" ) );
- GroupBox1->setColumnLayout(0, Qt::Vertical );
- GroupBox1->layout()->setSpacing( 0 );
- GroupBox1->layout()->setMargin( 0 );
- GroupBox1Layout = new QHBoxLayout( GroupBox1->layout() );
- GroupBox1Layout->setAlignment( Qt::AlignTop );
- GroupBox1Layout->setSpacing( 0 );
- GroupBox1Layout->setMargin( 10 );
- Layout10 = new QGridLayout;
- Layout10->setSpacing( 6 );
- Layout10->setMargin( 0 );
- TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
- TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel1->sizePolicy().hasHeightForWidth() ) );
- TextLabel1->setText( tr( "Minor Grid Spacing:" ) );
- Layout10->addWidget( TextLabel1, 0, 0 );
- TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
- TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2->sizePolicy().hasHeightForWidth() ) );
- TextLabel2->setText( tr( "Major Grid Spacing:" ) );
- Layout10->addWidget( TextLabel2, 1, 0 );
- SpinBox1 = new MSpinBox( GroupBox1, 2 );
- SpinBox1->setMaxValue( 100000 );
- SpinBox1->setMinValue( 1 );
- Layout10->addWidget( SpinBox1, 0, 1 );
- SpinBox2 = new MSpinBox( GroupBox1, 2 );
- SpinBox2->setMaxValue( 100000 );
- SpinBox2->setMinValue( 10 );
- SpinBox1->setLineStep(100);
- SpinBox2->setLineStep(100);
- Layout10->addWidget( SpinBox2, 1, 1 );
- TextLabel2g = new QLabel( GroupBox1, "TextLabel2" );
- TextLabel2g->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2->sizePolicy().hasHeightForWidth() ) );
- TextLabel2g->setText( tr( "Guide Snap Distance:" ) );
- Layout10->addWidget( TextLabel2g, 2, 0 );
- SpinBox2g = new MSpinBox( GroupBox1, 2 );
- SpinBox2g->setMaxValue( 100000 );
- SpinBox2g->setMinValue( 1 );
- SpinBox2g->setLineStep(100);
- Layout10->addWidget( SpinBox2g, 2, 1 );
- if (ap->HaveDoc)
- {
- SpinBox2->setValue( qRound(ap->doc->majorGrid * Umrech * 100));
- SpinBox1->setValue( qRound(ap->doc->minorGrid * Umrech * 100));
- SpinBox2g->setValue( qRound(ap->doc->GuideRad * Umrech * 100));
- }
- else
- {
- SpinBox2->setValue( qRound(Vor->DmajGrid * Umrech * 100));
- SpinBox1->setValue( qRound(Vor->DminGrid * Umrech * 100));
- SpinBox2g->setValue( qRound(Vor->GuideRad * Umrech * 100));
- }
- GroupBox1Layout->addLayout( Layout10 );
- tabLayout_2->addWidget( GroupBox1, 0, 0 );
- GroupBox2 = new QGroupBox( tab_2, "GroupBox2" );
- GroupBox2->setTitle( tr( "Grid Colors" ) );
- GroupBox2->setColumnLayout(0, Qt::Vertical );
- GroupBox2->layout()->setSpacing( 0 );
- GroupBox2->layout()->setMargin( 0 );
- GroupBox2Layout = new QHBoxLayout( GroupBox2->layout() );
- GroupBox2Layout->setAlignment( Qt::AlignTop );
- GroupBox2Layout->setSpacing( 6 );
- GroupBox2Layout->setMargin( 11 );
- Layout11 = new QGridLayout;
- Layout11->setSpacing( 6 );
- Layout11->setMargin( 0 );
- TextLabel3 = new QLabel( GroupBox2, "TextLabel3" );
- TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel3->sizePolicy().hasHeightForWidth() ) );
- TextLabel3->setText( tr( "Minor Grid Color:" ) );
- Layout11->addWidget( TextLabel3, 0, 0 );
- TextLabel4 = new QLabel( GroupBox2, "TextLabel4" );
- TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel4->sizePolicy().hasHeightForWidth() ) );
- TextLabel4->setText( tr( "Major Grid Color:" ) );
- Layout11->addWidget( TextLabel4, 1, 0 );
- minColor = new QPushButton( GroupBox2, "minColor" );
- minColor->setText( tr( "" ) );
- minColor->setAutoDefault( false );
- QPixmap pm = QPixmap(40, 20);
- if (ap->HaveDoc)
- {
- pm.fill(ap->doc->minorColor);
- Cmin = ap->doc->minorColor;
- }
- else
- {
- pm.fill(Vor->DminColor);
- Cmin = Vor->DminColor;
- }
- minColor->setPixmap(pm);
- Layout11->addWidget( minColor, 0, 1 );
- MaxColor = new QPushButton( GroupBox2, "MaxColor" );
- MaxColor->setText( tr( "" ) );
- MaxColor->setAutoDefault( false );
- QPixmap pm1 = QPixmap(40, 20);
- if (ap->HaveDoc)
- {
- pm1.fill(ap->doc->majorColor);
- Cmax = ap->doc->majorColor;
- }
- else
- {
- pm1.fill(Vor->DmajColor);
- Cmax = Vor->DmajColor;
- }
- MaxColor->setPixmap(pm1);
- Layout11->addWidget( MaxColor, 1, 1 );
- TextLabel4g = new QLabel( GroupBox2, "TextLabel4g" );
- TextLabel4g->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel4->sizePolicy().hasHeightForWidth() ) );
- TextLabel4g->setText( tr( "User Guides Color:" ) );
- Layout11->addWidget( TextLabel4g, 2, 0 );
- GuideColor = new QPushButton( GroupBox2, "GuideColor" );
- GuideColor->setText( tr( "" ) );
- GuideColor->setAutoDefault( false );
- QPixmap pm12 = QPixmap(40, 20);
- if (ap->HaveDoc)
- {
- pm12.fill(ap->doc->guideColor);
- Cgui = ap->doc->guideColor;
- }
- else
- {
- pm12.fill(Vor->guideColor);
- Cgui = Vor->guideColor;
- }
- GuideColor->setPixmap(pm12);
- Layout11->addWidget( GuideColor, 2, 1 );
- GroupBox2Layout->addLayout( Layout11 );
- tabLayout_2->addWidget( GroupBox2, 1, 0 );
- ButtonGroup5 = new QButtonGroup( tab_2, "ButtonGroup5" );
- ButtonGroup5->setTitle( tr( "Placing" ) );
- ButtonGroup5->setExclusive( true );
- ButtonGroup5->setColumnLayout(0, Qt::Vertical );
- ButtonGroup5->layout()->setSpacing( 0 );
- ButtonGroup5->layout()->setMargin( 0 );
- ButtonGroup5Layout = new QHBoxLayout( ButtonGroup5->layout() );
- ButtonGroup5Layout->setAlignment( Qt::AlignTop );
- ButtonGroup5Layout->setSpacing( 6 );
- ButtonGroup5Layout->setMargin( 11 );
- Layout7 = new QVBoxLayout;
- Layout7->setSpacing( 6 );
- Layout7->setMargin( 0 );
- RadioButton6 = new QRadioButton( ButtonGroup5, "RadioButton6" );
- RadioButton6->setText( tr( "In the Background" ) );
- if (ap->HaveDoc)
- RadioButton6->setChecked( ap->doc->Before );
- else
- RadioButton6->setChecked( Vor->Before );
- Layout7->addWidget( RadioButton6 );
- RadioButton7 = new QRadioButton( ButtonGroup5, "RadioButton6_2" );
- RadioButton7->setText( tr( "In the Foreground" ) );
- if (ap->HaveDoc)
- RadioButton7->setChecked( !ap->doc->Before );
- else
- RadioButton7->setChecked( !Vor->Before );
- Layout7->addWidget( RadioButton7 );
- ButtonGroup5Layout->addLayout( Layout7 );
- tabLayout_2->addWidget( ButtonGroup5, 0, 1 );
- TabWidget3->insertTab( tab_2, tr( "Guides" ) );
-
- tab_4 = new QWidget( TabWidget3, "tab_4" );
- tabLayout_3 = new QGridLayout( tab_4 );
- tabLayout_3->setSpacing( 6 );
- tabLayout_3->setMargin( 11 );
- GroupBox4_2 = new QGroupBox( tab_4, "GroupBox4_2" );
- GroupBox4_2->setTitle( tr( "Subscript" ) );
- GroupBox4_2->setColumnLayout(0, Qt::Vertical );
- GroupBox4_2->layout()->setSpacing( 0 );
- GroupBox4_2->layout()->setMargin( 0 );
- GroupBox4_2Layout = new QHBoxLayout( GroupBox4_2->layout() );
- GroupBox4_2Layout->setAlignment( Qt::AlignTop );
- GroupBox4_2Layout->setSpacing( 6 );
- GroupBox4_2Layout->setMargin( 11 );
-
- Layout12 = new QGridLayout;
- Layout12->setSpacing( 6 );
- Layout12->setMargin( 0 );
- TextLabel2_3_2 = new QLabel( GroupBox4_2, "TextLabel2_3_2" );
- TextLabel2_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2_3_2->sizePolicy().hasHeightForWidth() ) );
- TextLabel2_3_2->setText( tr( "Scaling:" ) );
- Layout12->addWidget( TextLabel2_3_2, 1, 0 );
- TextLabel1_5_2 = new QLabel( GroupBox4_2, "TextLabel1_5_2" );
- TextLabel1_5_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel1_5_2->sizePolicy().hasHeightForWidth() ) );
- TextLabel1_5_2->setText( tr( "Disp.:" ) );
- Layout12->addWidget( TextLabel1_5_2, 0, 0 );
- VTiefW = new QSpinBox( GroupBox4_2, "VTiefW" );
- VTiefW->setSuffix( tr( " %" ) );
- VTiefW->setMaxValue( 100 );
- VTiefW->setMinValue( 1 );
- if (ap->HaveDoc)
- VTiefW->setValue( ap->doc->VTief );
- else
- VTiefW->setValue( Vor->DVTief );
- Layout12->addWidget( VTiefW, 0, 1 );
- VTiefWSc = new QSpinBox( GroupBox4_2, "VTiefWSc" );
- VTiefWSc->setSuffix( tr( " %" ) );
- VTiefWSc->setMaxValue( 100 );
- VTiefWSc->setMinValue( 1 );
- if (ap->HaveDoc)
- VTiefWSc->setValue( ap->doc->VTiefSc );
- else
- VTiefWSc->setValue( Vor->DVTiefSc );
- Layout12->addWidget( VTiefWSc, 1, 1 );
- GroupBox4_2Layout->addLayout( Layout12 );
- tabLayout_3->addWidget( GroupBox4_2, 1, 0 );
- GroupBox4 = new QGroupBox( tab_4, "GroupBox4" );
- GroupBox4->setTitle( tr( "Superscript" ) );
- GroupBox4->setColumnLayout(0, Qt::Vertical );
- GroupBox4->layout()->setSpacing( 0 );
- GroupBox4->layout()->setMargin( 0 );
- GroupBox4Layout = new QHBoxLayout( GroupBox4->layout() );
- GroupBox4Layout->setAlignment( Qt::AlignTop );
- GroupBox4Layout->setSpacing( 6 );
- GroupBox4Layout->setMargin( 11 );
- Layout13 = new QGridLayout;
- Layout13->setSpacing( 6 );
- Layout13->setMargin( 0 );
- TextLabel2_3 = new QLabel( GroupBox4, "TextLabel2_3" );
- TextLabel2_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2_3->sizePolicy().hasHeightForWidth() ) );
- TextLabel2_3->setText( tr( "Scaling:" ) );
- Layout13->addWidget( TextLabel2_3, 1, 0 );
- TextLabel1_5 = new QLabel( GroupBox4, "TextLabel1_5" );
- TextLabel1_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel1_5->sizePolicy().hasHeightForWidth() ) );
- TextLabel1_5->setText( tr( "Disp.:" ) );
- Layout13->addWidget( TextLabel1_5, 0, 0 );
- VHochW = new QSpinBox( GroupBox4, "VHochW" );
- VHochW->setSuffix( tr( " %" ) );
- VHochW->setMaxValue( 100 );
- VHochW->setMinValue( 1 );
- if (ap->HaveDoc)
- VHochW->setValue( ap->doc->VHoch );
- else
- VHochW->setValue( Vor->DVHoch );
- Layout13->addWidget( VHochW, 0, 1 );
- VHochWSc = new QSpinBox( GroupBox4, "VHochWSc" );
- VHochWSc->setSuffix( tr( " %" ) );
- VHochWSc->setMaxValue( 100 );
- VHochWSc->setMinValue( 1 );
- if (ap->HaveDoc)
- VHochWSc->setValue( ap->doc->VHochSc );
- else
- VHochWSc->setValue( Vor->DVHochSc );
- Layout13->addWidget( VHochWSc, 1, 1 );
- GroupBox4Layout->addLayout( Layout13 );
- tabLayout_3->addWidget( GroupBox4, 0, 0 );
- GroupBox4_3 = new QGroupBox( tab_4, "GroupBox4_3" );
- GroupBox4_3->setTitle( tr( "Small Caps" ) );
- GroupBox4_3->setColumnLayout(0, Qt::Vertical );
- GroupBox4_3->layout()->setSpacing( 0 );
- GroupBox4_3->layout()->setMargin( 0 );
- GroupBox4_3Layout = new QHBoxLayout( GroupBox4_3->layout() );
- GroupBox4_3Layout->setAlignment( Qt::AlignTop );
- GroupBox4_3Layout->setSpacing( 6 );
- GroupBox4_3Layout->setMargin( 11 );
- Layout14 = new QHBoxLayout;
- Layout14->setSpacing( 6 );
- Layout14->setMargin( 0 );
- TextLabel2_3_3 = new QLabel( GroupBox4_3, "TextLabel2_3_3" );
- TextLabel2_3_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2_3_3->sizePolicy().hasHeightForWidth() ) );
- TextLabel2_3_3->setText( tr( "Scaling:" ) );
- Layout14->addWidget( TextLabel2_3_3 );
- SmallCaps = new QSpinBox( GroupBox4_3, "SmallCaps" );
- SmallCaps->setSuffix( tr( " %" ) );
- SmallCaps->setMaxValue( 100 );
- SmallCaps->setMinValue( 1 );
- if (ap->HaveDoc)
- SmallCaps->setValue( ap->doc->VKapit );
- else
- SmallCaps->setValue( Vor->DVKapit );
- Layout14->addWidget( SmallCaps );
- GroupBox4_3Layout->addLayout( Layout14 );
- tabLayout_3->addWidget( GroupBox4_3, 0, 1 );
-
- GroupBox4_3a = new QGroupBox( tab_4, "GroupBox4_3a" );
- GroupBox4_3a->setTitle( tr( "Other" ) );
- GroupBox4_3a->setColumnLayout(0, Qt::Vertical );
- GroupBox4_3a->layout()->setSpacing( 0 );
- GroupBox4_3a->layout()->setMargin( 0 );
- GroupBox4_3aLayout = new QHBoxLayout( GroupBox4_3a->layout() );
- GroupBox4_3aLayout->setAlignment( Qt::AlignTop );
- GroupBox4_3aLayout->setSpacing( 6 );
- GroupBox4_3aLayout->setMargin( 11 );
- Layout14a = new QHBoxLayout;
- Layout14a->setSpacing( 6 );
- Layout14a->setMargin( 0 );
- TextLabel2_3_3a = new QLabel( GroupBox4_3a, "TextLabel2_3_3" );
- TextLabel2_3_3a->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2_3_3a->sizePolicy().hasHeightForWidth() ) );
- TextLabel2_3_3a->setText( tr( "Automatic Linespaceing:" ) );
- Layout14a->addWidget( TextLabel2_3_3a );
- AutoLineV = new QSpinBox( GroupBox4_3a, "LineS" );
- AutoLineV->setSuffix( tr( " %" ) );
- AutoLineV->setMaxValue( 100 );
- AutoLineV->setMinValue( 1 );
- if (ap->HaveDoc)
- AutoLineV->setValue( ap->doc->AutoLine );
- else
- AutoLineV->setValue( Vor->AutoLine );
- Layout14a->addWidget( AutoLineV );
- GroupBox4_3aLayout->addLayout( Layout14a );
- tabLayout_3->addWidget( GroupBox4_3a, 1, 1 );
-
- TabWidget3->insertTab( tab_4, tr( "Typographics" ) );
-
- tab_3 = new QWidget( TabWidget3, "tab_3" );
- tabLayout_4 = new QHBoxLayout( tab_3 );
- tabLayout_4->setSpacing( 0 );
- tabLayout_4->setMargin( 10 );
- ButtonGroup2 = new QButtonGroup( tab_3, "ButtonGroup2" );
- ButtonGroup2->setTitle( tr( "" ) );
- ButtonGroup2->setExclusive( true );
- ButtonGroup2->setColumnLayout(0, Qt::Vertical );
- ButtonGroup2->layout()->setSpacing( 0 );
- ButtonGroup2->layout()->setMargin( 0 );
- ButtonGroup2Layout = new QHBoxLayout( ButtonGroup2->layout() );
- ButtonGroup2Layout->setAlignment( Qt::AlignTop );
- ButtonGroup2Layout->setSpacing( 6 );
- ButtonGroup2Layout->setMargin( 5 );
- Layout16 = new QGridLayout;
- Layout16->setSpacing( 6 );
- Layout16->setMargin( 0 );
- TextButton = new QToolButton( ButtonGroup2, "TextButton" );
- TextButton->setText( tr( "" ) );
- TextButton->setPixmap(loadIcon("Text.xpm"));
- TextButton->setToggleButton( true );
- TextButton->setOn( true );
- ButtonGroup2->insert( TextButton, -1 );
- Layout16->addWidget( TextButton, 0, 0 );
- BildButton = new QToolButton( ButtonGroup2, "BildButton" );
- BildButton->setText( tr( "" ) );
- BildButton->setPixmap(loadIcon("Bild.xpm"));
- BildButton->setToggleButton( true );
- ButtonGroup2->insert( BildButton, -1 );
- Layout16->addWidget( BildButton, 0, 1 );
- RectButton = new QToolButton( ButtonGroup2, "RectButton" );
- RectButton->setText( tr( "" ) );
- RectButton->setPixmap(loadIcon("Rechtecke.xpm") );
- RectButton->setToggleButton( true );
- ButtonGroup2->insert( RectButton, -1 );
- Layout16->addWidget( RectButton, 1, 0 );
- OvalButton = new QToolButton( ButtonGroup2, "OvalButton" );
- OvalButton->setText( tr( "" ) );
- OvalButton->setPixmap(loadIcon("Kreise.xpm"));
- OvalButton->setToggleButton( true );
- ButtonGroup2->insert( OvalButton, -1 );
- Layout16->addWidget( OvalButton, 1, 1 );
- ZoomButton = new QToolButton( ButtonGroup2, "ZoomButton" );
- ZoomButton->setText( tr( "" ) );
- ZoomButton->setPixmap(loadIcon("Lupe.xpm"));
- ZoomButton->setToggleButton( true );
- ButtonGroup2->insert( ZoomButton, -1 );
- Layout16->addWidget( ZoomButton, 2, 0 );
- LineButton = new QToolButton( ButtonGroup2, "LineButton" );
- LineButton->setText( tr( "" ) );
- LineButton->setPixmap(loadIcon("Stift.xpm"));
- LineButton->setToggleButton( true );
- ButtonGroup2->insert( LineButton, -1 );
- Layout16->addWidget( LineButton, 2, 1 );
- PolyButton = new QToolButton( ButtonGroup2, "PolyButton" );
- PolyButton->setText( tr( "" ) );
- PolyButton->setPixmap(loadIcon("spline.png"));
- PolyButton->setToggleButton( true );
- ButtonGroup2->insert( PolyButton, -1 );
- Layout16->addWidget( PolyButton, 3, 0 );
- ButtonGroup2Layout->addLayout( Layout16 );
- tabLayout_4->addWidget( ButtonGroup2 );
-
- Fram = new QWidgetStack(tab_3);
- tabLayout_4->addWidget( Fram );
-
- ToolFrame = new QFrame( this, "ToolFrame" );
- ToolFrame->setFrameShape( QFrame::Box );
- ToolFrame->setFrameShadow( QFrame::Sunken );
- ToolFrameLayout = new QHBoxLayout( ToolFrame );
- ToolFrameLayout->setSpacing( 0 );
- ToolFrameLayout->setMargin( 10 );
- Layout15a = new QGridLayout;
- Layout15a->setSpacing( 6 );
- Layout15a->setMargin( 0 );
- TextLabel2_2 = new QLabel( ToolFrame, "TextLabel2_2" );
- TextLabel2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2_2->sizePolicy().hasHeightForWidth() ) );
- TextLabel2_2->setText( tr( "Default Size:" ) );
- Layout15a->addWidget( TextLabel2_2, 1, 0 );
- TextLabel1_3 = new QLabel( ToolFrame, "TextLabel1_3" );
- TextLabel1_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel1_3->sizePolicy().hasHeightForWidth() ) );
- TextLabel1_3->setText( tr( "Default Font:" ) );
- Layout15a->addWidget( TextLabel1_3, 0, 0 );
- FontCombo = new QComboBox( true, ToolFrame, "FontCombo" );
- FontCombo->setEditable(false);
- QStringList rlist;
- rlist.clear();
- SCFontsIterator it(*fon);
- for ( ; it.current(); ++it)
- {
- if (it.current()->UseFont)
- rlist.append(it.currentKey());
- }
- rlist.sort();
- FontCombo->insertStringList(rlist);
- if (ap->HaveDoc)
- {
- for (int fc=0; fc<FontCombo->count(); ++fc)
- {
- if (FontCombo->text(fc) == ap->doc->Dfont)
- {
- FontCombo->setCurrentItem(fc);
- break;
- }
- }
- }
- else
- {
- for (int fc=0; fc<FontCombo->count(); ++fc)
- {
- if (FontCombo->text(fc) == Vor->DefFont)
- {
- FontCombo->setCurrentItem(fc);
- break;
- }
- }
- }
- Layout15a->addWidget( FontCombo, 0, 1 );
- SizeCombo = new QComboBox( true, ToolFrame, "SizeCombo" );
- SizeCombo->setEditable(false);
- SizeCombo->insertItem(" 7 pt");
- SizeCombo->insertItem(" 9 pt");
- SizeCombo->insertItem("10 pt");
- SizeCombo->insertItem("12 pt");
- SizeCombo->insertItem("14 pt");
- SizeCombo->insertItem("18 pt");
- SizeCombo->insertItem("24 pt");
- SizeCombo->insertItem("36 pt");
- SizeCombo->insertItem("48 pt");
- SizeCombo->insertItem("60 pt");
- SizeCombo->insertItem("72 pt");
- int a;
- if (ap->HaveDoc)
- {
- for (a = 0; a < SizeCombo->count(); ++a)
- {
- if (SizeCombo->text(a).left(2).toInt() == ap->doc->Dsize)
- SizeCombo->setCurrentItem(a);
- }
- }
- else
- {
- for (a = 0; a < SizeCombo->count(); ++a)
- {
- if (SizeCombo->text(a).left(2).toInt() == Vor->DefSize)
- SizeCombo->setCurrentItem(a);
- }
- }
- Layout15a->addWidget( SizeCombo, 1, 1 );
- TextLabelT1 = new QLabel( ToolFrame, "TextLabel1_3_2" );
- TextLabelT1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT1->sizePolicy().hasHeightForWidth() ) );
- TextLabelT1->setText( tr( "Text Color:" ) );
- Layout15a->addWidget( TextLabelT1, 2, 0 );
- ForegroundT = new QComboBox( true, ToolFrame, "Foreground" );
- ForegroundT->setEditable(false);
- QPixmap pm2;
- pm2 = QPixmap(15, 15);
- CListe::Iterator itc;
- for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
- {
- pm2.fill(Vor->DColors[itc.key()].getRGBColor());
- ForegroundT->insertItem(pm2, itc.key());
- if (itc.key() == Vor->DpenText)
- {
- ForegroundT->setCurrentItem(ForegroundT->count()-1);
- }
- }
- Layout15a->addWidget( ForegroundT, 2, 1 );
- TextLabel1_4 = new QLabel( ToolFrame, "TextLabel1_4" );
- TextLabel1_4->setMinimumSize(QSize(260, 70));
- TextLabel1_4->setText( tr( "Woven silk pyjamas exchanged for blue quartz" ) );
- TextLabel1_4->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
- SetSample();
- Layout15a->addMultiCellWidget( TextLabel1_4, 3, 3, 0, 1 );
- QSpacerItem* sp09 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrameLayout->addItem( sp09 );
- ToolFrameLayout->addLayout( Layout15a );
- QSpacerItem* sp10 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrameLayout->addItem( sp10 );
- Fram->addWidget(ToolFrame, 1);
-
- ToolFrame2 = new QFrame( this, "ToolFrame" );
- ToolFrame2->setFrameShape( QFrame::Box );
- ToolFrame2->setFrameShadow( QFrame::Sunken );
- ToolFrame2Layout = new QHBoxLayout( ToolFrame2 );
- ToolFrame2Layout->setSpacing( 0 );
- ToolFrame2Layout->setMargin( 10 );
- Layout15b = new QGridLayout;
- Layout15b->setSpacing( 6 );
- Layout15b->setMargin( 0 );
- TextLabelT21 = new QLabel( ToolFrame2, "TextLabel1_3_2" );
- TextLabelT21->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT21->sizePolicy().hasHeightForWidth() ) );
- TextLabelT21->setText( tr( "Line Color:" ) );
- Layout15b->addWidget(TextLabelT21, 0, 0);
- TextLabelT22 = new QLabel( ToolFrame2, "TextLabel2_2" );
- TextLabelT22->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT22->sizePolicy().hasHeightForWidth() ) );
- TextLabelT22->setText( tr( "Shading:" ) );
- Layout15b->addWidget(TextLabelT22, 1, 0);
- TextLabelT23 = new QLabel( ToolFrame2, "TextLabel1_3" );
- TextLabelT23->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT23->sizePolicy().hasHeightForWidth() ) );
- TextLabelT23->setText( tr( "Fill Color:" ) );
- Layout15b->addWidget(TextLabelT23, 2, 0);
- TextLabelT24 = new QLabel( ToolFrame2, "TextLabel2_2_2" );
- TextLabelT24->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT24->sizePolicy().hasHeightForWidth() ) );
- TextLabelT24->setText( tr( "Shading:" ) );
- Layout15b->addWidget(TextLabelT24, 3, 0);
- TextLabelT25 = new QLabel( ToolFrame2, "TextLabel1_3_3" );
- TextLabelT25->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT25->sizePolicy().hasHeightForWidth() ) );
- TextLabelT25->setText( tr( "Linestyle:" ) );
- Layout15b->addWidget(TextLabelT25, 4, 0);
- TextLabelT26 = new QLabel( ToolFrame2, "TextLabel2_3_4" );
- TextLabelT26->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT26->sizePolicy().hasHeightForWidth() ) );
- TextLabelT26->setText( tr( "Linewidth:" ) );
- Layout15b->addWidget(TextLabelT26, 5, 0);
- Foreground = new QComboBox( true, ToolFrame2, "Foreground" );
- Foreground->setEditable(false);
- Foreground->insertItem(tr("None"));
- if (Vor->Dpen == "None")
- Foreground->setCurrentItem(Foreground->count()-1);
- pm2 = QPixmap(15, 15);
- for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
- {
- pm2.fill(Vor->DColors[itc.key()].getRGBColor());
- Foreground->insertItem(pm2, itc.key());
- if (itc.key() == Vor->Dpen)
- {
- Foreground->setCurrentItem(Foreground->count()-1);
- }
- }
- Layout15b->addWidget(Foreground, 0, 1);
- Shade2 = new QSpinBox( ToolFrame2, "Shade2" );
- Shade2->setSuffix( tr( " %" ) );
- Shade2->setMaxValue( 100 );
- Shade2->setMinValue( 0 );
- if (ap->HaveDoc)
- Shade2->setValue( ap->doc->Dshade2 );
- else
- Shade2->setValue( Vor->Dshade2 );
- Layout15b->addWidget(Shade2, 1, 1);
- Background = new QComboBox( true, ToolFrame2, "Background" );
- Background->setEditable(false);
- Background->insertItem(tr("None"));
- if (Vor->Dbrush == "None")
- Background->setCurrentItem(Background->count()-1);
- for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
- {
- pm2.fill(Vor->DColors[itc.key()].getRGBColor());
- Background->insertItem(pm2, itc.key());
- if (itc.key() == Vor->Dbrush)
- {
- Background->setCurrentItem(Background->count()-1);
- }
- }
- Layout15b->addWidget(Background, 2, 1);
- Shade = new QSpinBox( ToolFrame2, "Shade" );
- Shade->setSuffix( tr( " %" ) );
- Shade->setMaxValue( 100 );
- Shade->setMinValue( 0 );
- if (ap->HaveDoc)
- Shade->setValue( ap->doc->Dshade );
- else
- Shade->setValue( Vor->Dshade );
- Layout15b->addWidget(Shade, 3, 1);
- Linestyle = new LineCombo(ToolFrame2);
- Linestyle->setEditable(false);
- int dla;
- if (ap->HaveDoc)
- dla = ap->doc->DLineArt;
- else
- dla = Vor->DLineArt;
- switch (dla)
- {
- case SolidLine:
- Linestyle->setCurrentItem(0);
- break;
- case DashLine:
- Linestyle->setCurrentItem(1);
- break;
- case DotLine:
- Linestyle->setCurrentItem(2);
- break;
- case DashDotLine:
- Linestyle->setCurrentItem(3);
- break;
- case DashDotDotLine:
- Linestyle->setCurrentItem(4);
- break;
- default:
- Linestyle->setCurrentItem(0);
- break;
- }
- Layout15b->addWidget(Linestyle, 4, 1);
- LineW = new MSpinBox( ToolFrame2, 1 );
- LineW->setSuffix( tr( " pts" ) );
- LineW->setMaxValue( 200 );
- LineW->setMinValue( 0 );
- LineW->setLineStep(10);
- if (ap->HaveDoc)
- LineW->setValue(static_cast<int>(ap->doc->Dwidth*10));
- else
- LineW->setValue(static_cast<int>(Vor->Dwidth*10));
- Layout15b->addWidget(LineW, 5, 1);
- QSpacerItem* sp07 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame2Layout->addItem( sp07 );
- ToolFrame2Layout->addLayout( Layout15b );
- QSpacerItem* sp08 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame2Layout->addItem( sp08 );
- Fram->addWidget(ToolFrame2, 2);
-
- ToolFrame3 = new QFrame( this, "ToolFrame" );
- ToolFrame3->setFrameShape( QFrame::Box );
- ToolFrame3->setFrameShadow( QFrame::Sunken );
- ToolFrame3Layout = new QHBoxLayout( ToolFrame3 );
- ToolFrame3Layout->setSpacing( 0 );
- ToolFrame3Layout->setMargin( 10 );
- Layout15c = new QGridLayout;
- Layout15c->setSpacing( 6 );
- Layout15c->setMargin( 0 );
- TextLabelT31 = new QLabel( ToolFrame3, "TextLabel1_3_2" );
- TextLabelT31->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT31->sizePolicy().hasHeightForWidth() ) );
- TextLabelT31->setText( tr( "Line Color:" ) );
- Layout15c->addWidget(TextLabelT31, 0, 0);
- TextLabelT32 = new QLabel( ToolFrame3, "TextLabel2_2" );
- TextLabelT32->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT32->sizePolicy().hasHeightForWidth() ) );
- TextLabelT32->setText( tr( "Shading:" ) );
- Layout15c->addWidget(TextLabelT32, 1, 0);
- TextLabelT35 = new QLabel( ToolFrame3, "TextLabel1_3_3" );
- TextLabelT35->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT35->sizePolicy().hasHeightForWidth() ) );
- TextLabelT35->setText( tr( "Linestyle:" ) );
- Layout15c->addWidget(TextLabelT35, 2, 0);
- TextLabelT36 = new QLabel( ToolFrame3, "TextLabel2_3_4" );
- TextLabelT36->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT36->sizePolicy().hasHeightForWidth() ) );
- TextLabelT36->setText( tr( "Linewidth:" ) );
- Layout15c->addWidget(TextLabelT36, 3, 0);
- Foreground2 = new QComboBox( true, ToolFrame3, "Foreground" );
- Foreground2->setEditable(false);
- QPixmap pm3;
- pm3 = QPixmap(15, 15);
- CListe::Iterator itc2;
- for (itc2 = Vor->DColors.begin(); itc2 != Vor->DColors.end(); ++itc2)
- {
- pm3.fill(Vor->DColors[itc2.key()].getRGBColor());
- Foreground2->insertItem(pm3, itc2.key());
- if (itc2.key() == Vor->DpenLine)
- {
- Foreground2->setCurrentItem(Foreground2->count()-1);
- }
- }
- Layout15c->addWidget(Foreground2, 0, 1);
- Shade22 = new QSpinBox( ToolFrame3, "Shade2" );
- Shade22->setSuffix( tr( " %" ) );
- Shade22->setMaxValue( 100 );
- Shade22->setMinValue( 0 );
- if (ap->HaveDoc)
- Shade22->setValue( ap->doc->DshadeLine );
- else
- Shade22->setValue( Vor->DshadeLine );
- Layout15c->addWidget(Shade22, 1, 1);
- Linestyle2 = new LineCombo(ToolFrame3);
- Linestyle2->setEditable(false);
- if (ap->HaveDoc)
- dla = ap->doc->DLstyleLine;
- else
- dla = Vor->DLstyleLine;
- switch (dla)
- {
- case SolidLine:
- Linestyle2->setCurrentItem(0);
- break;
- case DashLine:
- Linestyle2->setCurrentItem(1);
- break;
- case DotLine:
- Linestyle2->setCurrentItem(2);
- break;
- case DashDotLine:
- Linestyle2->setCurrentItem(3);
- break;
- case DashDotDotLine:
- Linestyle2->setCurrentItem(4);
- break;
- default:
- Linestyle2->setCurrentItem(0);
- break;
- }
- Layout15c->addWidget(Linestyle2, 2, 1);
- LineW2 = new MSpinBox( ToolFrame3, 1 );
- LineW2->setSuffix( tr( " pts" ) );
- LineW2->setMaxValue( 200 );
- LineW2->setMinValue( 1 );
- LineW2->setLineStep(10);
- if (ap->HaveDoc)
- LineW2->setValue( static_cast<int>(ap->doc->DwidthLine*10) );
- else
- LineW2->setValue( static_cast<int>(Vor->DwidthLine*10) );
- Layout15c->addWidget(LineW2, 3, 1);
- QSpacerItem* sp05 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame3Layout->addItem( sp05 );
- ToolFrame3Layout->addLayout( Layout15c );
- QSpacerItem* sp06 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame3Layout->addItem( sp06 );
- Fram->addWidget(ToolFrame3, 3);
-
- ToolFrame4 = new QFrame( this, "ToolFrame" );
- ToolFrame4->setFrameShape( QFrame::Box );
- ToolFrame4->setFrameShadow( QFrame::Sunken );
- ToolFrame4Layout = new QHBoxLayout( ToolFrame4 );
- ToolFrame4Layout->setSpacing( 0 );
- ToolFrame4Layout->setMargin( 10 );
- Layout15d = new QGridLayout;
- Layout15d->setSpacing( 6 );
- Layout15d->setMargin( 0 );
- TextLabelT42 = new QLabel( ToolFrame4, "TextLabel2_2" );
- TextLabelT42->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT42->sizePolicy().hasHeightForWidth() ) );
- TextLabelT42->setText( tr( "Minimum:" ) );
- Layout15d->addWidget(TextLabelT42, 0, 0);
- TextLabelT43 = new QLabel( ToolFrame4, "TextLabel2_2_3" );
- TextLabelT43->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT43->sizePolicy().hasHeightForWidth() ) );
- TextLabelT43->setText( tr( "Maximum:" ) );
- Layout15d->addWidget(TextLabelT43, 1, 0);
- TextLabelT44 = new QLabel( ToolFrame4, "TextLabel2_3_4" );
- TextLabelT44->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT44->sizePolicy().hasHeightForWidth() ) );
- TextLabelT44->setText( tr( "Stepping:" ) );
- Layout15d->addWidget(TextLabelT44, 2, 0);
- MinMag = new QSpinBox( ToolFrame4, "Shade2" );
- MinMag->setSuffix( tr( " %" ) );
- MinMag->setMaxValue( 800 );
- MinMag->setMinValue( 10 );
- MinMag->setLineStep( 10 );
- if (ap->HaveDoc)
- MinMag->setValue( ap->doc->MagMin );
- else
- MinMag->setValue( Vor->MagMin );
- Layout15d->addWidget(MinMag, 0, 1);
- MaxMag = new QSpinBox( ToolFrame4, "Shade" );
- MaxMag->setSuffix( tr( " %" ) );
- MaxMag->setMaxValue( 800 );
- MaxMag->setMinValue( 10 );
- MaxMag->setLineStep( 10 );
- if (ap->HaveDoc)
- MaxMag->setValue( ap->doc->MagMax );
- else
- MaxMag->setValue( Vor->MagMax );
- Layout15d->addWidget(MaxMag, 1, 1);
- StepMag = new QSpinBox( ToolFrame4, "LineW" );
- StepMag->setSuffix( tr( " %" ) );
- StepMag->setMaxValue( 200 );
- StepMag->setMinValue( 1 );
- StepMag->setLineStep( 25 );
- if (ap->HaveDoc)
- StepMag->setValue( ap->doc->MagStep );
- else
- StepMag->setValue( Vor->MagStep );
- Layout15d->addWidget(StepMag, 2, 1);
- QSpacerItem* sp03 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame4Layout->addItem( sp03 );
- ToolFrame4Layout->addLayout( Layout15d );
- QSpacerItem* sp04 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame4Layout->addItem( sp04 );
- Fram->addWidget(ToolFrame4, 4);
-
- ToolFrame5 = new QButtonGroup( this, "ToolFrame5" );
- ToolFrame5->setFrameShape( QFrame::Box );
- ToolFrame5->setFrameShadow( QFrame::Sunken );
- ToolFrame5->setExclusive( false );
- ToolFrame5->setRadioButtonExclusive(true);
- ToolFrame5Layout = new QHBoxLayout( ToolFrame5 );
- ToolFrame5Layout->setSpacing( 0 );
- ToolFrame5Layout->setMargin( 20 );
- Layout15 = new QGridLayout;
- Layout15->setSpacing( 6 );
- Layout15->setMargin( 0 );
- FreeScale = new QRadioButton( ToolFrame5, "FreeScale" );
- FreeScale->setText( tr( "Free Scaling" ) );
- Layout15->addMultiCellWidget( FreeScale, 0, 0, 0, 3 );
- TextLabelT51 = new QLabel( ToolFrame5, "TextLabelT51" );
- TextLabelT51->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT51->sizePolicy().hasHeightForWidth() ) );
- TextLabelT51->setText( tr( "Horizontal Scaling" ) );
- Layout15->addWidget( TextLabelT51, 1, 1 );
- TextLabelT52 = new QLabel( ToolFrame5, "TextLabelT52" );
- TextLabelT52->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT52->sizePolicy().hasHeightForWidth() ) );
- TextLabelT52->setText( tr( "Vertical Scaling" ) );
- Layout15->addWidget( TextLabelT52, 2, 1 );
- TextLabelT53 = new QLabel( ToolFrame5, "TextLabelT53" );
- TextLabelT53->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT53->sizePolicy().hasHeightForWidth() ) );
- TextLabelT53->setText( tr( "Fill Color:" ) );
- Layout15->addWidget( TextLabelT53, 5, 0 );
- TextLabelT54 = new QLabel( ToolFrame5, "TextLabelT54" );
- TextLabelT54->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabelT54->sizePolicy().hasHeightForWidth() ) );
- TextLabelT54->setText( tr( "Shading:" ) );
- Layout15->addWidget( TextLabelT54, 6, 0 );
- XScale = new QSpinBox( ToolFrame5, "XScale" );
- XScale->setSuffix( tr( " %" ) );
- XScale->setMaxValue( 1000 );
- XScale->setMinValue( 1 );
- if (ap->HaveDoc)
- XScale->setValue( qRound(ap->doc->ScaleX * 100) );
- else
- XScale->setValue( qRound(Vor->ScaleX * 100) );
- Layout15->addWidget( XScale, 1, 2 );
- YScale = new QSpinBox( ToolFrame5, "YScale" );
- YScale->setSuffix( tr( " %" ) );
- YScale->setMaxValue( 1000 );
- YScale->setMinValue( 1 );
- if (ap->HaveDoc)
- YScale->setValue( qRound(ap->doc->ScaleY * 100) );
- else
- YScale->setValue( qRound(Vor->ScaleY * 100) );
- Layout15->addWidget( YScale, 2, 2 );
- Kette = new LinkButton( ToolFrame5 );
- Kette->setToggleButton( true );
- Kette->setAutoRaise(true);
- Layout15->addMultiCellWidget( Kette, 1, 2, 3, 3 );
- FrameScale = new QRadioButton(ToolFrame5, "FrameScale" );
- FrameScale->setText( tr( "Scale Picture to Frame Size" ) );
- Layout15->addMultiCellWidget( FrameScale, 3, 3, 0, 3 );
- Aspect = new QCheckBox( ToolFrame5, "Aspect" );
- Aspect->setText( tr( "Keep Aspect Ratio" ) );
- Layout15->addMultiCellWidget( Aspect, 4, 4, 1, 3 );
- ShadeP = new QSpinBox( ToolFrame5, "ShadeP" );
- ShadeP->setSuffix( tr( " %" ) );
- ShadeP->setMaxValue( 100 );
- ShadeP->setMinValue( 0 );
- if (ap->HaveDoc)
- ShadeP->setValue( ap->doc->ShadePict );
- else
- ShadeP->setValue( Vor->ShadePict );
- Layout15->addWidget( ShadeP, 6, 1 );
- BackgroundP = new QComboBox( true, ToolFrame5, "BackgroundP" );
- BackgroundP->setEditable(false);
- BackgroundP->insertItem(tr("None"));
- if (Vor->DbrushPict == "None")
- BackgroundP->setCurrentItem(BackgroundP->count()-1);
- for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
- {
- pm2.fill(Vor->DColors[itc.key()].getRGBColor());
- BackgroundP->insertItem(pm2, itc.key());
- if (itc.key() == Vor->DbrushPict)
- {
- BackgroundP->setCurrentItem(BackgroundP->count()-1);
- }
- }
- Layout15->addMultiCellWidget( BackgroundP, 5, 5, 1, 3 );
- QSpacerItem* sp01 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame5Layout->addItem( sp01 );
- ToolFrame5Layout->addLayout( Layout15 );
- QSpacerItem* sp02 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- ToolFrame5Layout->addItem( sp02 );
- if (ap->HaveDoc)
- Aspect->setChecked(ap->doc->AspectRatio);
- else
- Aspect->setChecked(Vor->AspectRatio);
- bool sct;
- if (ap->HaveDoc)
- sct = ap->doc->ScaleType;
- else
- sct = Vor->ScaleType;
- if (sct)
- {
- FreeScale->setChecked(true);
- FrameScale->setChecked(false);
- }
- else
- {
- FreeScale->setChecked(false);
- FrameScale->setChecked(true);
- }
- ChangeScaling();
- Fram->addWidget(ToolFrame5, 5);
-
- ToolFrame6 = new QFrame( this, "ToolFrame6" );
- ToolFrame6->setFrameShape( QFrame::Box );
- ToolFrame6->setFrameShadow( QFrame::Sunken );
- Pre = new QPixmap(101, 101);
- Pre->fill(white);
- PolygonPropsLayout = new QHBoxLayout( ToolFrame6, 10, 5, "PolygonPropsLayout");
- T6_Layout11 = new QHBoxLayout( 0, 0, 5, "Layout11");
- T6_Layout10 = new QVBoxLayout( 0, 0, 5, "Layout10");
- T6_Layout2 = new QHBoxLayout( 0, 0, 5, "Layout2");
- T6_Text1 = new QLabel( ToolFrame6, "Text1" );
- T6_Text1->setText( tr( "Corners:" ) );
- T6_Layout2->addWidget( T6_Text1 );
- T6_Ecken = new QSpinBox( ToolFrame6, "Ecken" );
- T6_Ecken->setMaxValue( 999 );
- T6_Ecken->setMinValue( 3 );
- T6_Ecken->setValue(Vor->PolyC);
- T6_Layout2->addWidget( T6_Ecken );
- T6_Layout10->addLayout( T6_Layout2 );
- T6_Layout9_2 = new QHBoxLayout( 0, 0, 5, "Layout9_2");
- T6_Layout8_2 = new QVBoxLayout( 0, 0, 5, "Layout8_2");
- T6_Layout7_2 = new QHBoxLayout( 0, 0, 5, "Layout7_2");
- T6_Text2_2 = new QLabel( ToolFrame6, "Text2_2" );
- T6_Text2_2->setText( tr( "Rotation:" ) );
- T6_Layout7_2->addWidget( T6_Text2_2 );
- T6_Faktor2 = new QSpinBox( ToolFrame6, "Faktor_2" );
- T6_Faktor2->setSuffix(" °");
- T6_Faktor2->setMaxValue( 180 );
- T6_Faktor2->setMinValue( -180 );
- T6_Faktor2->setValue(static_cast<int>(Vor->PolyR));
- T6_Layout7_2->addWidget( T6_Faktor2 );
- T6_Layout8_2->addLayout( T6_Layout7_2 );
- T6_Slider2 = new QSlider( ToolFrame6, "Slider1_2" );
- T6_Slider2->setMinValue( -180 );
- T6_Slider2->setMaxValue( 180 );
- T6_Slider2->setValue(static_cast<int>(Vor->PolyR));
- T6_Slider2->setOrientation( QSlider::Horizontal );
- T6_Slider2->setTickmarks( QSlider::Right );
- T6_Layout8_2->addWidget( T6_Slider2 );
- T6_Layout9_2->addLayout( T6_Layout8_2 );
- T6_Layout10->addLayout( T6_Layout9_2 );
- T6_Konvex = new QCheckBox( ToolFrame6, "Konvex" );
- T6_Konvex->setText( tr( "Convex Polygon" ) );
- T6_Konvex->setChecked(Vor->PolyS);
- T6_Layout10->addWidget( T6_Konvex );
- T6_Layout9 = new QHBoxLayout( 0, 0, 5, "Layout9");
- QSpacerItem* T6_spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- T6_Layout9->addItem( T6_spacer );
- T6_Layout8 = new QVBoxLayout( 0, 0, 5, "Layout8");
- T6_Layout7 = new QHBoxLayout( 0, 0, 5, "Layout7");
- T6_Text2 = new QLabel( ToolFrame6, "Text2" );
- T6_Text2->setText( tr( "Factor:" ) );
- T6_Layout7->addWidget( T6_Text2 );
- T6_Faktor = new QSpinBox( ToolFrame6, "Faktor" );
- T6_Faktor->setSuffix( tr( " %" ) );
- T6_Faktor->setMaxValue( 100 );
- T6_Faktor->setMinValue( -100 );
- T6_Faktor->setValue(Vor->PolyFd);
- T6_Layout7->addWidget( T6_Faktor );
- T6_Layout8->addLayout( T6_Layout7 );
- T6_Slider1 = new QSlider( ToolFrame6, "Slider1" );
- T6_Slider1->setMinValue( -100 );
- T6_Slider1->setMaxValue( 100 );
- T6_Slider1->setOrientation( QSlider::Horizontal );
- T6_Slider1->setTickmarks( QSlider::Right );
- T6_Slider1->setValue(Vor->PolyFd);
- T6_Layout8->addWidget( T6_Slider1 );
- T6_Layout9->addLayout( T6_Layout8 );
- T6_Layout10->addLayout( T6_Layout9 );
- T6_Layout11->addLayout( T6_Layout10 );
- T6_Preview = new QLabel( ToolFrame6, "Preview" );
- T6_Preview->setMinimumSize( QSize( 106, 106 ) );
- T6_Preview->setMaximumSize( QSize( 106, 106 ) );
- T6_Preview->setFrameShape( QLabel::Panel );
- T6_Preview->setFrameShadow( QLabel::Sunken );
- T6_Preview->setLineWidth(2);
- T6_Preview->setAlignment(AlignCenter);
- T6_Preview->setPixmap(*Pre);
- T6_Layout11->addWidget( T6_Preview );
- QSpacerItem* T6_spacer3 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- PolygonPropsLayout->addItem( T6_spacer3 );
- PolygonPropsLayout->addLayout( T6_Layout11 );
- QSpacerItem* T6_spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- PolygonPropsLayout->addItem( T6_spacer2 );
- UpdatePreView();
- Fram->addWidget(ToolFrame6, 6);
-
- TabWidget3->insertTab( tab_3, tr( "Tools" ) );
-
- tab_5 = new QWidget( TabWidget3, "tab_5" );
- tabLayout_5 = new QGridLayout( tab_5 );
- tabLayout_5->setSpacing( 6 );
- tabLayout_5->setMargin( 11 );
-
- Saving = new QGroupBox( tab_5, "Saving" );
- Saving->setTitle( tr( "Other Options" ) );
- Saving->setColumnLayout(0, Qt::Vertical );
- Saving->layout()->setSpacing( 0 );
- Saving->layout()->setMargin( 0 );
- SavingLayout = new QHBoxLayout( Saving->layout() );
- SavingLayout->setAlignment( Qt::AlignTop );
- SavingLayout->setSpacing( 6 );
- SavingLayout->setMargin( 25 );
-
- SaveAtQuit = new QCheckBox( Saving, "SaveAtQuit" );
- SaveAtQuit->setText( tr( "Save Contents on Exit" ) );
- SaveAtQuit->setChecked(Vor->SaveAtQ);
- SavingLayout->addWidget( SaveAtQuit );
-
- tabLayout_5->addWidget( Saving, 1, 0 );
-
- Preview = new QGroupBox( tab_5, "Preview" );
- Preview->setTitle( tr( "Preview" ) );
- Preview->setColumnLayout(0, Qt::Vertical );
- Preview->layout()->setSpacing( 0 );
- Preview->layout()->setMargin( 0 );
- PreviewLayout = new QHBoxLayout( Preview->layout() );
- PreviewLayout->setAlignment( Qt::AlignTop );
- PreviewLayout->setSpacing( 10 );
- PreviewLayout->setMargin( 24 );
-
- TextLabelP = new QLabel( Preview, "TextLabel1_3" );
- TextLabelP->setText( tr( "Size:" ) );
- PreviewLayout->addWidget( TextLabelP );
-
- PreviewSize = new QComboBox( true, Preview, "PreviewSize" );
- PreviewSize->insertItem( tr( "Small" ) );
- PreviewSize->insertItem( tr( "Medium" ) );
- PreviewSize->insertItem( tr( "Big" ) );
- PreviewSize->setEditable(false);
- switch (Vor->PSize)
- {
- case 40:
- PreviewSize->setCurrentItem(0);
- break;
- case 60:
- PreviewSize->setCurrentItem(1);
- break;
- case 80:
- PreviewSize->setCurrentItem(2);
- break;
- }
- PreviewLayout->addWidget( PreviewSize );
-
- tabLayout_5->addWidget( Preview, 0, 0 );
-
- Frame6 = new QFrame( tab_5, "Frame6" );
- Frame6->setFrameShape( QFrame::NoFrame );
- Frame6->setFrameShadow( QFrame::Plain );
- Frame6->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
-
- tabLayout_5->addMultiCellWidget( Frame6, 0, 1, 1, 1 );
- TabWidget3->insertTab( tab_5, tr( "Scrapbook" ) );
-
- tab_6 = new QWidget( TabWidget3, "tab_6" );
- tabLayout_6 = new QHBoxLayout( tab_6 );
- tabLayout_6->setSpacing( 6 );
- tabLayout_6->setMargin( 11 );
- GroupBox10 = new QGroupBox( tab_6, "GroupBox10" );
- GroupBox10->setTitle( tr( "" ) );
- GroupBox10->setColumnLayout(0, Qt::Vertical );
- GroupBox10->layout()->setSpacing( 0 );
- GroupBox10->layout()->setMargin( 0 );
- GroupBox10Layout = new QVBoxLayout( GroupBox10->layout() );
- GroupBox10Layout->setAlignment( Qt::AlignTop );
- GroupBox10Layout->setSpacing( 6 );
- GroupBox10Layout->setMargin( 11 );
- FramesVisible = new QCheckBox( GroupBox10, "FramesVisible" );
- FramesVisible->setText( tr( "Display Frames" ) );
- if (ap->HaveDoc)
- FramesVisible->setChecked(ap->doc->ShFrames);
- else
- FramesVisible->setChecked(Vor->ShFrames);
- GroupBox10Layout->addWidget( FramesVisible );
- SidebySide = new QCheckBox( GroupBox10, "SidebySide" );
- SidebySide->setText( tr( "Display Pages Side by Side" ) );
- if (ap->HaveDoc)
- SidebySide->setChecked(ap->doc->PagesSbS);
- else
- SidebySide->setChecked(Vor->PagesSbS);
- GroupBox10Layout->addWidget( SidebySide );
-
- Layout_6b = new QHBoxLayout();
- Layout_6b->setSpacing( 0 );
- Layout_6b->setMargin( 0 );
- GroupBox20a = new QGroupBox( GroupBox10, "GroupBox20" );
- GroupBox20a->setTitle( tr( "Page-Colors" ) );
- GroupBox20a->setColumnLayout(0, Qt::Vertical );
- GroupBox20a->layout()->setSpacing( 0 );
- GroupBox20a->layout()->setMargin( 0 );
- GroupBox20aLayout = new QHBoxLayout( GroupBox20a->layout() );
- GroupBox20aLayout->setAlignment( Qt::AlignTop );
- GroupBox20aLayout->setSpacing( 10 );
- GroupBox20aLayout->setMargin( 25 );
- TextLabel4a = new QLabel( GroupBox20a, "TextLabel4" );
- TextLabel4a->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel4a->sizePolicy().hasHeightForWidth() ) );
- TextLabel4a->setText( tr( "Background:" ) );
- GroupBox20aLayout->addWidget( TextLabel4a);
- PapColor = new QPushButton( GroupBox20a, "PapColor" );
- PapColor->setText( tr( "" ) );
- PapColor->setAutoDefault( false );
- QPixmap pm1a = QPixmap(40, 20);
- if (ap->HaveDoc)
- {
- pm1a.fill(ap->doc->papColor);
- Cpaper = ap->doc->papColor;
- }
- else
- {
- pm1a.fill(Vor->DpapColor);
- Cpaper = Vor->DpapColor;
- }
- PapColor->setPixmap(pm1a);
- GroupBox20aLayout->addWidget( PapColor );
- TextLabel4b = new QLabel( GroupBox20a, "TextLabel4" );
- TextLabel4b->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel4b->sizePolicy().hasHeightForWidth() ) );
- TextLabel4b->setText( tr( "Margins:" ) );
- GroupBox20aLayout->addWidget( TextLabel4b);
- RandColor = new QPushButton( GroupBox20a, "RColor" );
- RandColor->setText( tr( "" ) );
- RandColor->setAutoDefault( false );
- if (ap->HaveDoc)
- {
- pm1a.fill( ap->doc->margColor );
- Crand = ap->doc->margColor;
- }
- else
- {
- pm1a.fill( Vor->DmargColor );
- Crand = Vor->DmargColor;
- }
- RandColor->setPixmap(pm1a);
- GroupBox20aLayout->addWidget( RandColor );
- Layout_6b->addWidget(GroupBox20a);
- QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout_6b->addItem( spacer2 );
- GroupBox10Layout->addLayout(Layout_6b);
- RandFarb = new QCheckBox( GroupBox10, "Ran" );
- RandFarb->setText( tr( "Display unprintable Area in Margin Color" ) );
- if (ap->HaveDoc)
- RandFarb->setChecked(ap->doc->RandFarbig);
- else
- RandFarb->setChecked(Vor->RandFarbig);
- GroupBox10Layout->addWidget( RandFarb );
- UsePDFTrans = new QCheckBox( GroupBox10, "Ran2" );
- UsePDFTrans->setText( tr( "Use PDF-1.4 Transparency Features" ) );
- UsePDFTrans->setChecked(Vor->PDFTransparency);
- GroupBox10Layout->addWidget( UsePDFTrans );
- tabLayout_6->addWidget( GroupBox10 );
- TabWidget3->insertTab( tab_6, tr( "Display" ) );
- Fram->raiseWidget(1);
-
- PrefsLayout->addWidget( TabWidget3 );
- Layout3 = new QHBoxLayout;
- Layout3->setSpacing( 6 );
- Layout3->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer );
- buttonOK = new QPushButton( this, "buttonOK" );
- buttonOK->setText( tr( "OK" ) );
- buttonOK->setDefault( true );
- Layout3->addWidget( buttonOK );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer_2 );
- buttonCancel = new QPushButton( this, "buttonCancel" );
- buttonCancel->setText( tr( "Cancel" ) );
- buttonCancel->setDefault( false );
- Layout3->addWidget( buttonCancel );
- QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer_3 );
- PrefsLayout->addLayout( Layout3 );
- UnitChange();
-
- // signals and slots connections
- connect( minColor, SIGNAL( clicked() ), this, SLOT( changeMicolor() ) );
- connect( MaxColor, SIGNAL( clicked() ), this, SLOT( changeMaColor() ) );
- connect( PapColor, SIGNAL( clicked() ), this, SLOT( changePapColor() ) );
- connect( RandColor, SIGNAL( clicked() ), this, SLOT( changeRandColor() ) );
- connect( GuideColor, SIGNAL( clicked() ), this, SLOT( changeGuideColor() ) );
- connect( buttonOK, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect(FontCombo, SIGNAL(activated(int)), this, SLOT(SetSample()));
- connect(SizeCombo, SIGNAL(activated(int)), this, SLOT(SetSample()));
- connect(TextButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(RectButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(OvalButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(LineButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(ZoomButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(BildButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(PolyButton, SIGNAL(clicked()), this, SLOT(SetTool()));
- connect(Kette, SIGNAL(clicked()), this, SLOT(ToggleKette()));
- connect(XScale, SIGNAL(valueChanged(int)), this, SLOT(HChange()));
- connect(YScale, SIGNAL(valueChanged(int)), this, SLOT(VChange()));
- connect(UnitCombo, SIGNAL(activated(int)), this, SLOT(UnitChange()));
- connect(Shorty, SIGNAL(clicked()), this, SLOT(DefKB()));
- connect(T6_Faktor, SIGNAL(valueChanged(int)), this, SLOT(ValFromSpin(int)));
- connect(T6_Slider1, SIGNAL(valueChanged(int)), T6_Faktor, SLOT(setValue(int)));
- connect(T6_Slider1, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
- connect(T6_Faktor2, SIGNAL(valueChanged(int)), this, SLOT(ValFromSpin2(int)));
- connect(T6_Slider2, SIGNAL(valueChanged(int)), T6_Faktor2, SLOT(setValue(int)));
- connect(T6_Slider2, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
- connect(T6_Ecken, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
- connect(T6_Konvex, SIGNAL(clicked()), this, SLOT(UpdatePreView()));
- connect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
- connect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
- connect(GZComboO, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
- connect(GZComboF, SIGNAL(activated(int)), this, SLOT(setSize(int)));
- connect(Doppelseiten, SIGNAL(clicked()), this, SLOT(setDS()));
- connect(FreeScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
- connect(FrameScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
- connect(FileC, SIGNAL(clicked()), this, SLOT(ChangeDocs()));
- setSize(Vor->PageFormat);
-}
-
-/*
- * Destroys the object and frees any allocated resources
- */
-Preferences::~Preferences()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
-void Preferences::ChangeDocs()
-{
- QString s = QFileDialog::getExistingDirectory(Docs->text(), this, "d", tr("Choose a Directory"), true);
- if (s != "")
- Docs->setText(s);
-}
-
-void Preferences::ChangeScaling()
-{
- if (FreeScale->isChecked())
- {
- TextLabelT51->setEnabled(true);
- TextLabelT52->setEnabled(true);
- XScale->setEnabled(true);
- YScale->setEnabled(true);
- Kette->setEnabled(true);
- Aspect->setEnabled(false);
- }
- else
- {
- TextLabelT51->setEnabled(false);
- TextLabelT52->setEnabled(false);
- XScale->setEnabled(false);
- YScale->setEnabled(false);
- Kette->setEnabled(false);
- Aspect->setEnabled(true);
- }
-}
-
-void Preferences::setDS()
-{
- if (Doppelseiten->isChecked())
- {
- GRText3->setText( tr( "Inside:" ) );
- GRText4->setText( tr( "Outside:" ) );
- Linkszuerst->setEnabled(true);
- }
- else
- {
- GRText3->setText( tr( "Left:" ) );
- GRText4->setText( tr( "Right:" ) );
- Linkszuerst->setEnabled(false);
- Linkszuerst->setChecked(false);
- }
-}
-
-void Preferences::setBreite(int v)
-{
- Pagebr = v / Umrech / 100.0;
-}
-
-void Preferences::setHoehe(int v)
-{
- Pageho = v / Umrech / 100.0;
-}
-
-void Preferences::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;
- }
- disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
- disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
- Breite->setValue(qRound(Pagebr * Umrech * 100));
- Hoehe->setValue(qRound(Pageho * Umrech * 100));
- connect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
- connect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
-}
-
-void Preferences::setOrien(int ori)
-{
- int br;
- setSize(GZComboF->currentItem());
- if (ori == 0)
- {
- if (GZComboF->currentItem() == 30)
- {
- br = Breite->value();
- Breite->setValue(Hoehe->value());
- Hoehe->setValue(br);
- }
- }
- else
- {
- br = Breite->value();
- Breite->setValue(Hoehe->value());
- Hoehe->setValue(br);
- }
-}
-
-void Preferences::DefKB()
-{
- KeyManager *dia = new KeyManager(this, KKC);
- if (dia->exec())
- KKC = dia->KK;
- delete dia;
-}
-
-void Preferences::SetSample()
-{
- QFont fo;
- fo = (*fon)[FontCombo->currentText()]->Font;
- fo.setPointSize(SizeCombo->currentText().left(2).toInt());
- TextLabel1_4->setFont(fo);
-}
-
-void Preferences::changeMaColor()
-{
- QColor neu = QColor();
- neu = QColorDialog::getColor(Cmax, this);
- if (neu.isValid())
- {
- QPixmap pm = QPixmap(40, 20);
- pm.fill(neu);
- Cmax = neu;
- MaxColor->setPixmap(pm);
- }
-}
-
-void Preferences::changeMicolor()
-{
- QColor neu = QColor();
- neu = QColorDialog::getColor(Cmin, this);
- if (neu.isValid())
- {
- QPixmap pm = QPixmap(40, 20);
- pm.fill(neu);
- Cmin = neu;
- minColor->setPixmap(pm);
- }
-}
-
-void Preferences::changePapColor()
-{
- QColor neu = QColor();
- neu = QColorDialog::getColor(Cpaper, this);
- if (neu.isValid())
- {
- QPixmap pm = QPixmap(40, 20);
- pm.fill(neu);
- Cpaper = neu;
- PapColor->setPixmap(pm);
- }
-}
-
-void Preferences::changeRandColor()
-{
- QColor neu = QColor();
- neu = QColorDialog::getColor(Crand, this);
- if (neu.isValid())
- {
- QPixmap pm = QPixmap(40, 20);
- pm.fill(neu);
- Crand = neu;
- RandColor->setPixmap(pm);
- }
-}
-
-void Preferences::changeGuideColor()
-{
- QColor neu = QColor();
- neu = QColorDialog::getColor(Cgui, this);
- if (neu.isValid())
- {
- QPixmap pm = QPixmap(40, 20);
- pm.fill(neu);
- Cgui = neu;
- GuideColor->setPixmap(pm);
- }
-}
-
-void Preferences::SetTool()
-{
- if (TextButton == sender())
- Fram->raiseWidget(1);
- if (RectButton == sender())
- Fram->raiseWidget(2);
- if (OvalButton == sender())
- Fram->raiseWidget(2);
- if (LineButton == sender())
- Fram->raiseWidget(3);
- if (ZoomButton == sender())
- Fram->raiseWidget(4);
- if (BildButton == sender())
- Fram->raiseWidget(5);
- if (PolyButton == sender())
- Fram->raiseWidget(6);
-}
-
-void Preferences::ToggleKette()
-{
- if (Kette->isOn())
- YScale->setValue(XScale->value());
-}
-
-void Preferences::HChange()
-{
- if (Kette->isOn())
- YScale->setValue(XScale->value());
-}
-
-void Preferences::VChange()
-{
- if (Kette->isOn())
- XScale->setValue(YScale->value());
-}
-
-void Preferences::UnitChange()
-{
- float AltUmrech = Umrech;
- switch (UnitCombo->currentItem())
- {
- case 0:
- Umrech = 1.0;
- SpinBox1->setSuffix( tr( " pt" ) );
- SpinBox2->setSuffix( tr( " pt" ) );
- SpinBox2g->setSuffix( tr( " pt" ) );
- Breite->setSuffix( tr( " pt" ) );
- Hoehe->setSuffix( tr( " pt" ) );
- TopR->setSuffix( tr( " pt" ) );
- BottomR->setSuffix( tr( " pt" ) );
- LeftR->setSuffix( tr( " pt" ) );
- RightR->setSuffix( tr( " pt" ) );
- break;
- case 1:
- Umrech = 0.3527777;
- SpinBox1->setSuffix( tr( " mm" ) );
- SpinBox2->setSuffix( tr( " mm" ) );
- SpinBox2g->setSuffix( tr( " mm" ) );
- Breite->setSuffix( tr( " mm" ) );
- Hoehe->setSuffix( tr( " mm" ) );
- TopR->setSuffix( tr( " mm" ) );
- BottomR->setSuffix( tr( " mm" ) );
- LeftR->setSuffix( tr( " mm" ) );
- RightR->setSuffix( tr( " mm" ) );
- break;
- case 2:
- Umrech = 1.0 / 72.0;
- SpinBox1->setSuffix( tr( " in" ) );
- SpinBox2->setSuffix( tr( " in" ) );
- SpinBox2g->setSuffix( tr( " in" ) );
- Breite->setSuffix( tr( " in" ) );
- Hoehe->setSuffix( tr( " in" ) );
- TopR->setSuffix( tr( " in" ) );
- BottomR->setSuffix( tr( " in" ) );
- LeftR->setSuffix( tr( " in" ) );
- RightR->setSuffix( tr( " in" ) );
- break;
- case 3:
- Umrech = 1.0 / 12.0;
- SpinBox1->setSuffix( tr( " p" ) );
- SpinBox2->setSuffix( tr( " p" ) );
- SpinBox2g->setSuffix( tr( " p" ) );
- Breite->setSuffix( tr( " p" ) );
- Hoehe->setSuffix( tr( " p" ) );
- TopR->setSuffix( tr( " p" ) );
- BottomR->setSuffix( tr( " p" ) );
- LeftR->setSuffix( tr( " p" ) );
- RightR->setSuffix( tr( " p" ) );
- break;
- }
- disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
- disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
- SpinBox1->setValue(qRound(SpinBox1->value() / AltUmrech * Umrech));
- SpinBox2->setValue(qRound(SpinBox2->value() / AltUmrech * Umrech));
- SpinBox2g->setValue(qRound(SpinBox2g->value() / AltUmrech * Umrech));
- if (GZComboF->currentItem() == 30)
- {
- Breite->setValue(qRound(Breite->value() / AltUmrech * Umrech));
- Hoehe->setValue(qRound(Hoehe->value() / AltUmrech * Umrech));
- }
- else
- setSize(GZComboF->currentItem());
- TopR->setValue(qRound(TopR->value() / AltUmrech * Umrech));
- BottomR->setValue(qRound(BottomR->value() / AltUmrech * Umrech));
- LeftR->setValue(qRound(LeftR->value() / AltUmrech * Umrech));
- RightR->setValue(qRound(RightR->value() / AltUmrech * Umrech));
- connect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
- connect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
-}
-
-void Preferences::ValFromSpin2(int a)
-{
- disconnect(T6_Slider2, SIGNAL(valueChanged(int)), T6_Faktor2, SLOT(setValue(int)));
- T6_Slider2->setValue(a);
- connect(T6_Slider2, SIGNAL(valueChanged(int)), T6_Faktor2, SLOT(setValue(int)));
-}
-
-void Preferences::ValFromSpin(int a)
-{
- disconnect(T6_Slider1, SIGNAL(valueChanged(int)), T6_Faktor, SLOT(setValue(int)));
- T6_Slider1->setValue(a);
- connect(T6_Slider1, SIGNAL(valueChanged(int)), T6_Faktor, SLOT(setValue(int)));
-}
-
-void Preferences::UpdatePreView()
-{
- Pre->fill(white);
- QPainter p;
- p.begin(Pre);
- p.setBrush(NoBrush);
- p.setPen(black);
- QPointArray pp = RegularPolygon(100, 100, T6_Ecken->value(), T6_Konvex->isChecked(), GetFaktor(), T6_Slider2->value());
- QRect br = pp.boundingRect();
- if (br.x() < 0)
- pp.translate(-br.x(), 0);
- if (br.y() < 0)
- pp.translate(0, -br.y());
- br = pp.boundingRect();
- if ((br.height() > 100) || (br.width() > 100))
- {
- QWMatrix ma;
- float sca = 100.0 / float(QMAX(br.width(), br.height()));
- ma.scale(sca, sca);
- pp = ma * pp;
- }
- p.drawPolygon(pp);
- p.end();
- T6_Preview->setPixmap(*Pre);
-}
-
-float Preferences::GetZeroFaktor()
-{
- return sqrt(pow(1,2)-pow(((sin((360.0/(T6_Ecken->value()*2))/180*M_PI)* 2.0)/2.0),2));
-}
-
-float Preferences::GetMaxFaktor()
-{
- float win = (360.0/(T6_Ecken->value()*2)) / 180.0 * M_PI;
- float ret;
- if ((360.0/(T6_Ecken->value()*2)) > 45)
- ret = 1/sin(win);
- else
- ret = 1/cos(win);
- return ret;
-}
-
-float Preferences::GetFaktor()
-{
- int val = T6_Slider1->value();
- if (val < 0)
- {
- PFactor = GetZeroFaktor() * (100.0 + val) / 100.0;
- }
- else
- {
- float ma = GetMaxFaktor();
- float mi = GetZeroFaktor();
- PFactor = ((ma - mi) * val / 100.0) + mi;
- }
- return PFactor;
-}
-
/start/Scribus/scribus/libprefs/prefs.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/scfonts_encoding.cpp
===================================================================
--- start/Scribus/scribus/scfonts_encoding.cpp (revision 427)
+++ start/Scribus/scribus/scfonts_encoding.cpp (nonexistent)
@@ -1,45 +0,0 @@
-#include "config.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qtextstream.h>
-
-#include <iostream>
-
-#include "scfonts_encoding.h"
-
-#ifndef PREL
-#define PREL "/usr/local"
-#endif
-
-
-bool SCFonts_Encoding::read(QString name)
-{
- QString ISO;
- QString pfad = PREL;
- pfad += "/lib/scribus/" + name;
- QFile tf(pfad);
- if (tf.open(IO_ReadOnly))
- {
- QTextStream t(&tf);
- ISO=t.read();
- tf.close();
- }
- else
- return(false);
- QTextStream isoTs(&ISO, IO_ReadOnly);
- isoTs << oct;
- while (!isoTs.atEnd())
- {
- QString iNam;
- int iNr;
- isoTs >> iNam >> iNr;
- Codes[iNam] = iNr;
- Names[iNr]=iNam;
- }
-}
-
-
-SCFonts_Encoding::SCFonts_Encoding(QString name)
-{
- read(name);
-}
/start/Scribus/scribus/scfonts_encoding.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/fmitem.h
===================================================================
--- start/Scribus/scribus/fmitem.h (revision 427)
+++ start/Scribus/scribus/fmitem.h (nonexistent)
@@ -1,41 +0,0 @@
-/***************************************************************************
- fmitem.h - description
- -------------------
- begin : Sun May 13 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 FMITEM_H
-#define FMITEM_H
-
-#include <qsize.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qstring.h>
-#include <qmenudata.h>
-/**
- *@author Franz Schmid
- */
-
-class FmItem : public QCustomMenuItem {
-public:
- FmItem(const QString& s, const QFont& f);
- ~FmItem() {};
- void paint(QPainter *p, const QColorGroup& cg, bool act, bool enabled, int x, int y, int w, int h);
- QSize sizeHint();
-private:
- QString string;
- QFont font;
-};
-
-#endif
/start/Scribus/scribus/fmitem.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/javadocs.cpp
===================================================================
--- start/Scribus/scribus/javadocs.cpp (revision 427)
+++ start/Scribus/scribus/javadocs.cpp (nonexistent)
@@ -1,115 +0,0 @@
-#include "javadocs.h"
-#include "javadocs.moc"
-#include "query.h"
-#include "editor.h"
-extern QPixmap loadIcon(QString nam);
-
-JavaDocs::JavaDocs(QWidget* parent, ScribusDoc *doc, ScribusView* vie)
- : QDialog( parent, "Javadocs", true, 0 )
-{
- setCaption( tr( "Global JavaScripts" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- Doc = doc;
- View = vie;
- JavaDocsLayout = new QHBoxLayout( this, 11, 6, "JavaDocsLayout");
-
- Scripts = new QListBox( this, "Scripts" );
- Scripts->setMinimumSize( QSize( 150, 200 ) );
- QMap<QString,QString>::Iterator it;
- for (it = Doc->JavaScripts.begin(); it != Doc->JavaScripts.end(); ++it)
- {
- Scripts->insertItem(it.key());
- }
- JavaDocsLayout->addWidget( Scripts );
-
- Layout1 = new QVBoxLayout( 0, 0, 6, "Layout1");
-
- EditScript = new QPushButton( this, "EditScript" );
- EditScript->setText( tr( "Edit..." ) );
- Layout1->addWidget( EditScript );
-
- AddScript = new QPushButton( this, "AddScript" );
- AddScript->setText( tr( "Add..." ) );
- Layout1->addWidget( AddScript );
-
- DeleteScript = new QPushButton( this, "DeleteScript" );
- DeleteScript->setText( tr( "Delete" ) );
- Layout1->addWidget( DeleteScript );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout1->addItem( spacer );
-
- ExitDia = new QPushButton( this, "ExitDia" );
- ExitDia->setText( tr( "Close" ) );
- ExitDia->setDefault( true );
- Layout1->addWidget( ExitDia );
- if (Doc->JavaScripts.count() == 0)
- {
- EditScript->setEnabled(false);
- DeleteScript->setEnabled(false);
- }
- else
- Scripts->setCurrentItem(0);
- JavaDocsLayout->addLayout( Layout1 );
- connect(AddScript, SIGNAL(clicked()), this, SLOT(slotAdd()));
- connect(EditScript, SIGNAL(clicked()), this, SLOT(slotEdit()));
- connect(DeleteScript, SIGNAL(clicked()), this, SLOT(slotDelete()));
- connect(ExitDia, SIGNAL(clicked()), this, SLOT(accept()));
-}
-
-void JavaDocs::slotAdd()
-{
- QString nam;
- Query *dia = new Query(this, "tt", 1, 0, "New Script:", "New Script");
- dia->Answer->setText(tr("New Script"));
- if (dia->exec())
- {
- nam = dia->Answer->text();
- while (Doc->JavaScripts.contains(nam) || (nam == ""))
- {
- if (!dia->exec())
- {
- delete dia;
- return;
- }
- nam = dia->Answer->text();
- }
- Editor* dia2 = new Editor(this, "", View);
- if (dia2->exec())
- {
- EditScript->setEnabled(true);
- DeleteScript->setEnabled(true);
- Doc->JavaScripts[nam] = dia2->EditTex->text();
- Scripts->insertItem(nam);
- }
- delete dia2;
- delete dia;
- }
-}
-
-void JavaDocs::slotEdit()
-{
- QString nam = Scripts->currentText();
- Editor* dia2 = new Editor(this, Doc->JavaScripts[nam], View);
- if (dia2->exec())
- Doc->JavaScripts[nam] = dia2->EditTex->text();
- delete dia2;
-}
-
-void JavaDocs::slotDelete()
-{
- QString nam = Scripts->currentText();
- Doc->JavaScripts.remove(nam);
- Scripts->clear();
- QMap<QString,QString>::Iterator it;
- for (it = Doc->JavaScripts.begin(); it != Doc->JavaScripts.end(); ++it)
- {
- Scripts->insertItem(it.key());
- }
- if (Doc->JavaScripts.count() == 0)
- {
- EditScript->setEnabled(false);
- DeleteScript->setEnabled(false);
- }
- else
- Scripts->setCurrentItem(0);
-}
/start/Scribus/scribus/javadocs.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/align.cpp
===================================================================
--- start/Scribus/scribus/align.cpp (revision 427)
+++ start/Scribus/scribus/align.cpp (nonexistent)
@@ -1,214 +0,0 @@
-#include "align.h"
-#include "align.moc"
-extern QPixmap loadIcon(QString nam);
-extern float UmReFaktor;
-
-Align::Align( QWidget* parent, int anz, int ein)
- : QDialog( parent, "al", true, 0 )
-{
- Anzahl = anz;
- Anzahl > 2 ? setCaption(tr("Distribute/Align")) : setCaption(tr("Align"));
- setIcon(loadIcon("AppIcon.xpm"));
- AlignLayout = new QVBoxLayout( this );
- AlignLayout->setSpacing( 0 );
- AlignLayout->setMargin( 0 );
- Layout4 = new QHBoxLayout;
- Layout4->setSpacing( 10 );
- Layout4->setMargin( 10 );
- ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
- ButtonGroup1->setTitle( tr( "Horizontal" ) );
- ButtonGroup1->setColumnLayout(0, Qt::Vertical );
- ButtonGroup1->layout()->setSpacing( 0 );
- ButtonGroup1->layout()->setMargin( 0 );
- ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
- ButtonGroup1Layout->setAlignment( Qt::AlignTop );
- ButtonGroup1Layout->setSpacing( 5 );
- ButtonGroup1Layout->setMargin( 10 );
- TextLabel1 = new QLabel( ButtonGroup1, "TextLabel1" );
- TextLabel1->setEnabled( true );
- TextLabel1->setText( tr( "between:" ) );
- ButtonGroup1Layout->addWidget( TextLabel1, 0, 0 );
- VartH = new QComboBox( true, ButtonGroup1, "VartH" );
- VartH->setEnabled( true );
- VartH->setMinimumSize( QSize( 100, 22 ) );
- VartH->insertItem(tr("Left Sides"));
- VartH->insertItem(tr("Middles"));
- VartH->insertItem(tr("Right Sides"));
- VartH->setEditable(false);
- ButtonGroup1Layout->addMultiCellWidget( VartH, 0, 0, 1, 2 );
- NichtsH = new QRadioButton( ButtonGroup1, "NichtsH" );
- NichtsH->setText( tr( "Don't change" ) );
- NichtsH->setChecked(true);
- ButtonGroup1Layout->addMultiCellWidget( NichtsH, 1, 1, 0, 2 );
- CheckH = new QRadioButton( ButtonGroup1, "CheckH" );
- CheckH->setText( tr( "Align" ) );
- ButtonGroup1Layout->addMultiCellWidget( CheckH, 2, 2, 0, 2 );
- TextLabelD = new QLabel( ButtonGroup1, "TextLabelD" );
- TextLabelD->setText( tr( "Displacement" ) );
- TextLabelD->setEnabled(false);
- ButtonGroup1Layout->addWidget( TextLabelD, 3, 1);
- AHor = new MSpinBox( ButtonGroup1, 2 );
- AHor->setEnabled( true );
- AHor->setMinimumSize( QSize( 80, 20 ) );
- AHor->setMaxValue( 100000 );
- AHor->setMinValue( -100000 );
- AHor->setValue( 0 );
- AHor->setEnabled(false);
- ButtonGroup1Layout->addWidget( AHor, 3, 2, Qt::AlignRight);
- VerteilenH = new QRadioButton( ButtonGroup1, "VerteilenH" );
- VerteilenH->setEnabled( true );
- VerteilenH->setText( tr( "Distribute evenly" ) );
- if (Anzahl < 3)
- VerteilenH->setEnabled(false);
- ButtonGroup1Layout->addMultiCellWidget( VerteilenH, 4, 4, 0, 2 );
- Layout4->addWidget( ButtonGroup1 );
-
- ButtonGroup1_2 = new QButtonGroup( this, "ButtonGroup1" );
- ButtonGroup1_2->setTitle( tr( "Vertical" ) );
- ButtonGroup1_2->setColumnLayout(0, Qt::Vertical );
- ButtonGroup1_2->layout()->setSpacing( 0 );
- ButtonGroup1_2->layout()->setMargin( 0 );
- ButtonGroup1_2Layout = new QGridLayout( ButtonGroup1_2->layout() );
- ButtonGroup1_2Layout->setAlignment( Qt::AlignTop );
- ButtonGroup1_2Layout->setSpacing( 5 );
- ButtonGroup1_2Layout->setMargin( 10 );
- TextLabel1_2 = new QLabel( ButtonGroup1_2, "TextLabel1" );
- TextLabel1_2->setEnabled( true );
- TextLabel1_2->setText( tr( "between:" ) );
- ButtonGroup1_2Layout->addWidget( TextLabel1_2, 0, 0 );
- VartV = new QComboBox( true, ButtonGroup1_2, "VartH" );
- VartV->setEnabled( true );
- VartV->setMinimumSize( QSize( 100, 22 ) );
- VartV->insertItem(tr("Top Sides"));
- VartV->insertItem(tr("Middles"));
- VartV->insertItem(tr("Bottom Sides"));
- VartV->setEditable(false);
- ButtonGroup1_2Layout->addMultiCellWidget( VartV, 0, 0, 1, 2 );
- NichtsV = new QRadioButton( ButtonGroup1_2, "NichtsH" );
- NichtsV->setText( tr( "Don't change" ) );
- NichtsV->setChecked(true);
- ButtonGroup1_2Layout->addMultiCellWidget( NichtsV, 1, 1, 0, 2 );
- CheckV = new QRadioButton( ButtonGroup1_2, "CheckH" );
- CheckV->setText( tr( "Align" ) );
- ButtonGroup1_2Layout->addMultiCellWidget( CheckV, 2, 2, 0, 2 );
- TextLabelD2 = new QLabel( ButtonGroup1_2, "TextLabelD" );
- TextLabelD2->setText( tr( "Displacement" ) );
- TextLabelD2->setEnabled(false);
- ButtonGroup1_2Layout->addWidget( TextLabelD2, 3, 1 );
- AVert = new MSpinBox( ButtonGroup1_2, 2 );
- AVert->setEnabled( true );
- AVert->setMinimumSize( QSize( 80, 20 ) );
- switch (ein)
- {
- case 0:
- AHor->setSuffix( tr( " pts" ) );
- AVert->setSuffix( tr( " pts" ) );
- break;
- case 1:
- AHor->setSuffix( tr( " mm" ) );
- AVert->setSuffix( tr( " mm" ) );
- break;
- case 2:
- AHor->setSuffix( tr( " in" ) );
- AVert->setSuffix( tr( " in" ) );
- break;
- case 3:
- AHor->setSuffix( tr( " p" ) );
- AVert->setSuffix( tr( " p" ) );
- break;
- }
- AVert->setMaxValue( 100000 );
- AVert->setMinValue( -100000 );
- AVert->setValue( 0 );
- AVert->setEnabled(false);
- AHor->setLineStep(100);
- AVert->setLineStep(100);
- ButtonGroup1_2Layout->addWidget( AVert, 3, 2, Qt::AlignRight);
- VerteilenV = new QRadioButton( ButtonGroup1_2, "VerteilenH" );
- VerteilenV->setText( tr( "Distribute evenly" ) );
- if (Anzahl < 3)
- VerteilenV->setEnabled(false);
- ButtonGroup1_2Layout->addMultiCellWidget( VerteilenV, 4, 4, 0, 2 );
- Layout4->addWidget( ButtonGroup1_2 );
- AlignLayout->addLayout( Layout4 );
-
- Layout3 = new QHBoxLayout;
- Layout3->setSpacing( 10 );
- Layout3->setMargin( 10 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer );
- OKbutton = new QPushButton( this, "OKbutton" );
- OKbutton->setText( tr( "OK" ) );
- OKbutton->setDefault( true );
- Layout3->addWidget( OKbutton );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer_2 );
- ButtonApply = new QPushButton( this, "ButtonApply" );
- ButtonApply->setText( tr( "Apply" ) );
- Layout3->addWidget( ButtonApply );
- QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer_3 );
- CancelB = new QPushButton( this, "CancelB" );
- CancelB->setText( tr( "Cancel" ) );
- Layout3->addWidget( CancelB );
- QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer_4 );
- AlignLayout->addLayout( Layout3 );
- setMinimumSize(sizeHint());
-
- // signals and slots connections
- connect( OKbutton, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( CancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect(ButtonApply, SIGNAL(clicked()), this, SLOT( slotApplyDiag()));
- connect( ButtonGroup1, SIGNAL( clicked(int) ), this, SLOT( DistHoriz() ) );
- connect( ButtonGroup1_2, SIGNAL( clicked(int) ), this, SLOT( DistVert() ) );
-}
-
-/*
- * Destroys the object and frees any allocated resources
- */
-Align::~Align()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
-void Align::DistHoriz()
-{
- if (CheckH->isChecked())
- {
- AHor->setEnabled( true );
- TextLabelD->setEnabled(true);
- }
- else
- {
- AHor->setEnabled( false );
- TextLabelD->setEnabled(false);
- }
-}
-
-void Align::DistVert()
-{
- if (CheckV->isChecked())
- {
- AVert->setEnabled( true );
- TextLabelD2->setEnabled(true);
- }
- else
- {
- AVert->setEnabled( false );
- TextLabelD2->setEnabled(false);
- }
-}
-
-void Align::slotApplyDiag()
-{
- float xdp = static_cast<float>(AHor->value()) / UmReFaktor / 100.0;
- bool xa = (CheckH->isChecked() || VerteilenH->isChecked());
- float ydp = static_cast<float>(AVert->value()) / UmReFaktor / 100.0;
- bool ya = (CheckV->isChecked() || VerteilenV->isChecked());
- int xart = VartH->currentItem();
- int yart = VartV->currentItem();
- bool Vth = VerteilenH->isChecked();
- bool Vtv = VerteilenV->isChecked();
- emit ApplyDist(xa, ya, Vth, Vtv, xdp, ydp, xart, yart);
-}
/start/Scribus/scribus/align.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/inspage.h
===================================================================
--- start/Scribus/scribus/inspage.h (revision 427)
+++ start/Scribus/scribus/inspage.h (nonexistent)
@@ -1,49 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'InsPage.ui'
-**
-** Created: Tue Jun 12 21:21:09 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef INSPAGE_H
-#define INSPAGE_H
-
-#include <qdialog.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include "scribusview.h"
-
-class InsPage : public QDialog
-{
- Q_OBJECT
-
-public:
- InsPage( QWidget* parent, ScribusView* view, int act, int max, bool ds );
- ~InsPage() {};
-
- QLabel* TextLabel1;
- QPushButton* PushButton4_2;
- QPushButton* PushButton4;
- QComboBox* Where;
- QComboBox* Based;
- QComboBox* Based2;
- QLabel* TextLabel3;
- QLabel* TextLabel3a;
- QLabel* TextLabel2;
- QSpinBox* ActualPage;
- QSpinBox* NumPages;
-
-protected:
- QVBoxLayout* DLayout;
- QGridLayout* Layout4;
- QHBoxLayout* Layout4a;
- QHBoxLayout* Layout4b;
- QHBoxLayout* Layout3;
-
-};
-
-#endif // INSPAGE_H
/start/Scribus/scribus/inspage.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/selfield.h
===================================================================
--- start/Scribus/scribus/selfield.h (revision 427)
+++ start/Scribus/scribus/selfield.h (nonexistent)
@@ -1,48 +0,0 @@
-#ifndef SELECTFIELDS_H
-#define SELECTFIELDS_H
-
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include "pageitem.h"
-#include "scribusview.h"
-
-class SelectFields : public QDialog
-{
- Q_OBJECT
-
-public:
- SelectFields( QWidget* parent, QString Felder, QString Own, QPtrList<Page> *Seiten, int Art);
- ~SelectFields() {};
-
- QLabel* Text1;
- QListBox* AvailFields;
- QPushButton* ToSel;
- QPushButton* FromSel;
- QLabel* Text2;
- QListBox* SelFields;
- QPushButton* OK;
- QPushButton* Cancel;
- QString S_Fields;
- int FTyp;
-
-public slots:
- void SetRetVal();
- void RemoveSel();
- void PutToSel();
- void SelAField(QListBoxItem *c);
- void SelEField(QListBoxItem *c);
-
-protected:
- QVBoxLayout* SelectFieldsLayout;
- QHBoxLayout* Layout5;
- QVBoxLayout* Layout1;
- QVBoxLayout* Layout2;
- QVBoxLayout* Layout3;
- QHBoxLayout* Layout4;
-};
-
-#endif // SELECTFIELDS_H
/start/Scribus/scribus/selfield.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/.cvsignore
===================================================================
--- start/Scribus/scribus/.cvsignore (revision 427)
+++ start/Scribus/scribus/.cvsignore (nonexistent)
@@ -1,3 +0,0 @@
-Makefile
-*.moc.cpp
-*.moc
/start/Scribus/scribus/.cvsignore
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/pageback.cpp
===================================================================
--- start/Scribus/scribus/pageback.cpp (revision 427)
+++ start/Scribus/scribus/pageback.cpp (nonexistent)
@@ -1,34 +0,0 @@
-/***************************************************************************
- pageback.cpp - description
- -------------------
- begin : Sun Apr 8 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 "pageback.h"
-#include <qpainter.h>
-#include <qcolor.h>
-
-PageBack::PageBack(QWidget *pa) : QWidget(pa, "s", WRepaintNoErase)
-{
-}
-
-void PageBack::paintEvent(QPaintEvent *)
-{
- QPainter p;
- p.begin(this);
- p.setPen(QColor(128, 128, 128));
- p.setBrush(QColor(128, 128, 128));
- p.drawRect(5, 5, width(), height());
- p.end();
-}
/start/Scribus/scribus/pageback.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.cpp
===================================================================
--- start/Scribus/scribus/mspinbox.cpp (revision 427)
+++ start/Scribus/scribus/mspinbox.cpp (nonexistent)
@@ -1,87 +0,0 @@
-/***************************************************************************
- mspinbox.cpp - 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. *
- * *
- ***************************************************************************/
-
-#include "mspinbox.h"
-#include "qapplication.h"
-
-MSpinBox::MSpinBox(QWidget *pa, int s):QSpinBox(pa)
-{
- switch (s)
- {
- case 1:
- Decimals = 10;
- Width = 1;
- break;
- case 2:
- Decimals = 100;
- Width = 2;
- default:
- Decimals = 100;
- Width = 2;
- break;
- }
- setValidator(0);
-}
-
-bool MSpinBox::eventFilter( QObject* ob, QEvent* ev )
-{
- bool retval = FALSE;
- if ( ev->type() == QEvent::KeyPress )
- {
- QKeyEvent* k = (QKeyEvent*)ev;
- if (k->key() == Key_Shift)
- {
- setLineStep(Decimals / 10);
- retval = true;
- qApp->sendEvent( this, ev );
- return retval;
- }
- }
- if ( ev->type() == QEvent::KeyRelease )
- {
- QKeyEvent* k = (QKeyEvent*)ev;
- if (k->key() == Key_Shift)
- {
- setLineStep(Decimals);
- retval = true;
- qApp->sendEvent( this, ev );
- return retval;
- }
- }
- return QSpinBox::eventFilter(ob, ev);
-}
-
-QString MSpinBox::mapValueToText(int value)
-{
- return QString::number(static_cast<double>(value) / Decimals,
- 'f', Width);
-}
-
-int MSpinBox::mapTextToValue(bool *)
-{
- return int(qRound(text().toFloat()*Decimals));
-}
-
-void MSpinBox::setDecimals(int deci)
-{
- Decimals = deci;
- setLineStep(Decimals);
- if (deci > 9)
- Width = 1;
- if (deci > 99)
- Width = 2;
-}
/start/Scribus/scribus/mspinbox.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/customfdialog.cpp
===================================================================
--- start/Scribus/scribus/customfdialog.cpp (revision 427)
+++ start/Scribus/scribus/customfdialog.cpp (nonexistent)
@@ -1,238 +0,0 @@
-/***************************************************************************
- customfdialog.cpp - description
- -------------------
- begin : Fri Nov 30 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 "customfdialog.h"
-#include "customfdialog.moc"
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qdom.h>
-extern QImage LoadPict(QString fn);
-extern bool loadText(QString nam, QString *Buffer);
-extern QPixmap loadIcon(QString nam);
-extern QString DocDir;
-
-ImIconProvider::ImIconProvider(QWidget *pa) : QFileIconProvider(pa)
-{
- fmts.clear();
- fmts += "eps";
- fmts += "gif";
- fmts += "png";
- fmts += "jpg";
- fmts += "xpm";
- fmts += "tif";
- fmts += "bmp";
- fmts += "pbm";
- fmts += "pgm";
- fmts += "ppm";
- fmts += "xbm";
- fmts += "xpm";
- imagepm = loadIcon("image.png");
- pspm = loadIcon("postscript.png");
- txtpm = loadIcon("txt.png");
- docpm = loadIcon("doc.png");
- pdfpm = loadIcon("pdf.png");
-}
-
-const QPixmap * ImIconProvider::pixmap(const QFileInfo &fi)
-{
- QString ext = fi.extension(false).lower();
- if (fmts.contains(ext))
- {
- return &imagepm;
- }
- else
- {
- if (ext == "ps")
- return &pspm;
- if (ext == "txt")
- return &txtpm;
- if (ext == "scd")
- return &docpm;
- if (ext == "sla")
- return &docpm;
- if (ext == "pdf")
- return &pdfpm;
- return QFileIconProvider::pixmap(fi);
- }
-}
-
-FDialogPreview::FDialogPreview(QWidget *pa) : QLabel(pa)
-{
- setAlignment(AlignLeft | AlignTop);
- setMinimumSize( QSize( 100, 100 ) );
- setScaledContents( false );
- setEraseColor( white );
- setFrameShape( QLabel::WinPanel );
- setFrameShadow( QLabel::Sunken );
-}
-
-void FDialogPreview::GenPreview(QString name)
-{
- QPixmap pm;
- QString Buffer = "";
- setText("");
- QFileInfo fi = QFileInfo(name);
- if (fi.isDir())
- return;
- QString ex = fi.extension(false).upper();
- QStrList imfo = QImageIO::inputFormats();
- if (ex == "JPG")
- ex = "JPEG";
- if ((imfo.contains(ex))||(ex=="PS")||(ex=="EPS")||(ex=="TIF"))
- {
- QImage im = LoadPict(name);
- if (!im.isNull())
- {
- int ix = im.width();
- int iy = im.height();
- QString tmp = "";
- if ((im.width() > width()-5) || (im.height() > height()-20))
- {
- QImage im2;
- float sx = im.width() /
- static_cast<float>(width()-5);
- float sy = im.height() /
- static_cast<float>(height()-20);
- im2 = sy < sx ? im.smoothScale(qRound(im.width() / sx), qRound(im.height() / sx)) : im.smoothScale(qRound(im.width() / sy), qRound(im.height() / sy));
- im = im2;
- im2.detach();
- }
- QPainter p;
- pm = QPixmap(width(), height());
- pm.fill(white);
- p.begin(&pm);
- p.drawImage(0, 0, im);
- p.drawText(2, height()-5, tr("Size:")+" "+tmp.setNum(ix)+" x "+tmp.setNum(iy));
- p.end();
- setPixmap(pm);
- }
- }
- else
- {
- if (loadText(name, &Buffer))
- {
- if (Buffer.startsWith("<SCRIBUS"))
- {
- QDomDocument docu("scridoc");
- if(!docu.setContent(Buffer))
- return;
- QDomElement elem=docu.documentElement();
- if ((elem.tagName() != "SCRIBUS") && (elem.tagName() != "SCRIBUSUTF8"))
- return;
- QDomNode DOC=elem.firstChild();
- QDomElement dc=DOC.toElement();
- QString Tit = tr("Title:")+" ";
- QString ti2 = dc.attribute("TITLE");
- if (ti2 == "")
- ti2= tr("No Title");
- Tit += ti2+"\n";
- QString Aut = tr("Author:")+" ";
- QString au2 = dc.attribute("AUTHOR");
- if (au2 == "")
- au2 = tr("Unknown");
- Aut += au2;
- setText(tr("Scribus-Document")+"\n\n"+Tit+Aut);
- }
- else
- setText(Buffer.left(200));
- }
- }
-}
-
-void FDialogPreview::previewUrl( const QUrl &url )
-{
- if (url.isLocalFile())
- GenPreview(url.path());
-}
-
-CustomFDialog::CustomFDialog(QWidget *pa, QString cap, QString filter, bool Pre, bool mod, bool comp)
- : QFileDialog(QString::null, filter, pa, 0, true)
-{
- setIcon(loadIcon("AppIcon.xpm"));
- setCaption(cap);
- cDir = QDir();
- setDir(cDir);
- setIconProvider(new ImIconProvider(this));
- setContentsPreviewEnabled( true );
- FDialogPreview *pw = new FDialogPreview( this );
- setContentsPreview( pw, pw );
- if (comp)
- {
- Layout = new QFrame(this);
- Layout1 = new QHBoxLayout(Layout);
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- SaveZip = new QCheckBox(Layout, "test");
- SaveZip->setText(tr("Compress File"));
- Layout1->addWidget(SaveZip);
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
- }
- if (mod)
- setMode(QFileDialog::ExistingFile);
- else
- {
- setMode(QFileDialog::AnyFile);
- if (comp)
- addWidgets(0, Layout, 0);
- }
- if (Pre)
- setPreviewMode( QFileDialog::Contents );
- else
- setPreviewMode( QFileDialog::NoPreview );
- setViewMode( QFileDialog::List );
- if (comp)
- connect(SaveZip, SIGNAL(clicked()), this, SLOT(HandleComp()));
- HomeB = new QToolButton(this);
- HomeB->setIconSet(loadIcon("gohome.png"));
- HomeB->setTextLabel(tr("Moves to your Document Directory.\nThis can be set in the Preferences."));
- connect(HomeB, SIGNAL(clicked()), this, SLOT(slotHome()));
- addToolButton(HomeB);
-}
-
-CustomFDialog::~CustomFDialog()
-{
- setIconProvider(0);
- cDir.setCurrent(dir()->path());
-}
-
-void CustomFDialog::slotHome()
-{
- setDir(QDir(DocDir));
-}
-
-void CustomFDialog::HandleComp()
-{
- QString tmp;
- tmp = selectedFile();
- if (SaveZip->isChecked())
- {
- if (tmp.right(3) != ".gz")
- tmp = tmp+".gz";
- setSelection(tmp);
- }
- else
- {
- int en = tmp.findRev(".gz");
- if (en > 0)
- tmp.remove(en,3);
- }
- setSelection(tmp);
-}
/start/Scribus/scribus/customfdialog.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/scfonts_ttf.h
===================================================================
--- start/Scribus/scribus/scfonts_ttf.h (revision 427)
+++ start/Scribus/scribus/scfonts_ttf.h (nonexistent)
@@ -1,28 +0,0 @@
-#ifndef SCFONTS_TTF_H
-#define SCFONTS_TTF_H
-
-#include "scfonts.h"
-
-/*
- Class Foi_ttf
- Subclass of Foi, specifically for TrueType fonts.
- Implements: RealName() and EmbedFont().
-*/
-
-class Foi_ttf : public Foi
-{
- public:
- Foi_ttf(QString scname, QString path, bool embedps, SCFonts_Encoding &encoding) :
- Foi(scname,path,embedps,encoding), metricsread(false)
- {
- HasMetrics=true;
- }
- QString RealName();
- bool ReadMetrics();
- virtual bool EmbedFont(QString &str);
- private:
- QString cached_RealName;
- bool metricsread;
-};
-
-#endif
/start/Scribus/scribus/scfonts_ttf.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/helpbrowser.h
===================================================================
--- start/Scribus/scribus/helpbrowser.h (revision 427)
+++ start/Scribus/scribus/helpbrowser.h (nonexistent)
@@ -1,37 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'Help.ui'
-**
-** Created: Tue Jul 3 21:51:30 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef HELPBROWSER_H
-#define HELPBROWSER_H
-
-#include <qdialog.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QTextBrowser;
-class QToolButton;
-
-class HelpBrowser : public QWidget
-{
- Q_OBJECT
-
-public:
- HelpBrowser( QWidget* parent, QString Capt, QString Datei = "" );
- ~HelpBrowser() {};
-
- QToolButton* HomeB;
- QToolButton* BackB;
- QToolButton* ForwB;
- QTextBrowser* Anzeige;
-
-protected:
- QVBoxLayout* HelpBrowserLayout;
- QHBoxLayout* Layout13;
-};
-
-#endif // HELPBROWSER_H
/start/Scribus/scribus/helpbrowser.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/tree.h
===================================================================
--- start/Scribus/scribus/tree.h (revision 427)
+++ start/Scribus/scribus/tree.h (nonexistent)
@@ -1,46 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'tree.ui'
-**
-** Created: Thu May 24 10:46:08 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef TREE_H
-#define TREE_H
-
-#include <qdialog.h>
-#include <qptrlist.h>
-#include "scribusview.h"
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QListView;
-class QListViewItem;
-
-class Tree : public QDialog
-{
- Q_OBJECT
-
-public:
- Tree( QWidget* parent, WFlags fl );
- ~Tree() {};
-
- QListView* ListView1;
- QPtrList<QListViewItem> Seiten;
- QPtrList<QListViewItem> Elemente;
- void closeEvent(QCloseEvent *ce);
- void resizeEvent(QResizeEvent *r);
-
-public slots:
- virtual void slotSelect(QListViewItem* ite);
- void BuildTree(ScribusView *view);
-
-signals:
- void Schliessen();
- void SelectElement(int, int);
- void SelectSeite(int);
-
-};
-
-#endif // TREE_H
/start/Scribus/scribus/tree.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/mdup.cpp
===================================================================
--- start/Scribus/scribus/mdup.cpp (revision 427)
+++ start/Scribus/scribus/mdup.cpp (nonexistent)
@@ -1,90 +0,0 @@
-#include "mdup.h"
-#include "mdup.moc"
-
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-extern QPixmap loadIcon(QString nam);
-extern float UmReFaktor;
-
-Mdup::Mdup( QWidget* parent, float Dx, float Dy, int Ein )
- : QDialog( parent, "m", true, 0 )
-{
- setCaption( tr( "Multiple Duplicate" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- MdupLayout = new QVBoxLayout( this );
- MdupLayout->setSpacing( 5 );
- MdupLayout->setMargin( 10 );
- Layout4 = new QGridLayout;
- Layout4->setSpacing( 6 );
- Layout4->setMargin( 0 );
- Ncopies = new QSpinBox( this, "Ncopies" );
- Ncopies->setMaxValue( 100 );
- Ncopies->setMinValue( 1 );
- Ncopies->setValue(1);
- Layout4->addWidget( Ncopies, 0, 1 );
- ShiftV = new MSpinBox( this, 2 );
- ShiftV->setMaxValue( 100000 );
- ShiftV->setMinValue( -100000 );
- ShiftV->setValue(qRound(Dy * 100));
- ShiftV->setLineStep(100);
- Layout4->addWidget( ShiftV, 2, 1 );
- ShiftH = new MSpinBox( this, 2 );
- ShiftH->setMaxValue( 100000 );
- ShiftH->setMinValue( -100000 );
- ShiftH->setValue(qRound(Dx * 100));
- ShiftH->setLineStep(100);
- Layout4->addWidget( ShiftH, 1, 1 );
- switch (Ein)
- {
- case 0:
- ShiftH->setSuffix( tr( " pt" ) );
- ShiftV->setSuffix( tr( " pt" ) );
- break;
- case 1:
- ShiftH->setSuffix( tr( " mm" ) );
- ShiftV->setSuffix( tr( " mm" ) );
- break;
- case 2:
- ShiftH->setSuffix( tr( " in" ) );
- ShiftV->setSuffix( tr( " in" ) );
- break;
- case 3:
- ShiftH->setSuffix( tr( " p" ) );
- ShiftV->setSuffix( tr( " p" ) );
- break;
- }
- TextLabel1 = new QLabel( this, "TextLabel1" );
- TextLabel1->setText( tr( "Number of Copies:" ) );
- Layout4->addWidget( TextLabel1, 0, 0 );
- TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
- TextLabel1_2->setText( tr( "Horizontal Shift:" ) );
- Layout4->addWidget( TextLabel1_2, 1, 0 );
- TextLabel1_2_2 = new QLabel( this, "TextLabel1_2_2" );
- TextLabel1_2_2->setText( tr( "Vertical Shift:" ) );
- Layout4->addWidget( TextLabel1_2_2, 2, 0 );
- MdupLayout->addLayout( Layout4 );
- Layout3 = new QHBoxLayout;
- Layout3->setSpacing( 6 );
- Layout3->setMargin( 0 );
- PushButton12 = new QPushButton( this, "PushButton12" );
- PushButton12->setText( tr( "OK" ) );
- PushButton12->setDefault( true );
- Layout3->addWidget( PushButton12 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout3->addItem( spacer );
- PushButton13 = new QPushButton( this, "PushButton13" );
- PushButton13->setText( tr( "Cancel" ) );
- Layout3->addWidget( PushButton13 );
- MdupLayout->addLayout( Layout3 );
- setMaximumSize(sizeHint());
-
- // signals and slots connections
- connect( PushButton12, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( PushButton13, SIGNAL( clicked() ), this, SLOT( reject() ) );
-}
-
-
/start/Scribus/scribus/mdup.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/movepage.h
===================================================================
--- start/Scribus/scribus/movepage.h (revision 427)
+++ start/Scribus/scribus/movepage.h (nonexistent)
@@ -1,48 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'MovePage.ui'
-**
-** Created: Thu Jun 14 18:47:58 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef MOVEPAGES_H
-#define MOVEPAGES_H
-
-#include <qdialog.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-
-class MovePages : public QDialog
-{
- Q_OBJECT
-
-public:
- MovePages( QWidget* parent, int act, int max, bool art );
- ~MovePages() {};
-
- QLabel* TextLabel2;
- QSpinBox* FromPage;
- QSpinBox* ToPage;
- QSpinBox* ActualPage;
- QLabel* TextLabel1;
- QComboBox* Where;
- QPushButton* OK;
- QPushButton* Cancel;
- bool Wie;
-
-protected:
- QVBoxLayout* DLayout;
- QGridLayout* Layout4;
- QHBoxLayout* Layout3;
-
-public slots:
- virtual void FromChanged(int);
- virtual void ToChanged(int);
-
-};
-
-#endif // MOVEPAGES_H
/start/Scribus/scribus/movepage.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/serializer.cpp
===================================================================
--- start/Scribus/scribus/serializer.cpp (revision 427)
+++ start/Scribus/scribus/serializer.cpp (nonexistent)
@@ -1,135 +0,0 @@
-/***************************************************************************
- serializer.cpp - description
- -------------------
- begin : Sat May 5 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 "serializer.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
-extern bool loadText(QString nam, QString *Buffer);
-Serializer::Serializer(QString name)
-{
- Filename = name;
- Objekt = "";
-}
-
-QString Serializer::GetObjekt()
-{
- return Objekt;
-}
-
-void Serializer::PutText(PageItem *Item)
-{
- uint a;
- bool Uni = false;
- QString Dat = "";
- QPtrList<Pti> y = Item->Ptext;
- for (a=0; a<y.count(); ++a)
- {
- QString b = y.at(a)->ch;
- if (b == QChar(13))
- b = "\n";
- if (b[0].unicode() > 255)
- Uni = true;
- Dat += b;
- }
- if (Uni)
- Objekt = Dat.utf8();
- else
- Objekt = Dat;
-}
-
-void Serializer::GetText(PageItem *Item, int Absatz, bool Append)
-{
- struct Pti *hg;
- PageItem *nb;
- uint a;
- if (!Append)
- {
- if (Item->NextBox != 0)
- {
- nb = Item->NextBox;
- while (nb != 0)
- {
- nb->Ptext.clear();
- nb->CPos = 0;
- nb->Dirty = true;
- nb = nb->NextBox;
- }
- }
- Item->Ptext.clear();
- Item->CPos = 0;
- }
- for (a=0; a<Objekt.length(); ++a)
- {
- hg = new Pti;
- hg->ch = Objekt.at(a);
- if (hg->ch == QChar(10)) { hg->ch = QChar(13); }
- if (hg->ch == QChar(5)) { hg->ch = QChar(13); }
- if (hg->ch == QChar(9)) { hg->ch = " "; }
- hg->cfont = Item->IFont;
- hg->csize = Item->ISize;
- hg->ccolor = Item->Pcolor2;
- hg->cextra = 0;
- hg->cshade = Item->Shade2;
- hg->cselect = false;
- hg->cstyle = 0;
- hg->cab = Absatz;
- hg->xp = 0;
- hg->yp = 0;
- hg->PRot = 0;
- hg->PtransX = 0;
- hg->PtransY = 0;
- if (Append)
- Item->Ptext.insert(Item->CPos, hg);
- else
- Item->Ptext.append(hg);
- Item->CPos += 1;
- }
-}
-
-bool Serializer::Write()
-{
- QFile f(Filename);
- bool ret = false;
- if (f.open(IO_WriteOnly))
- {
- QTextStream t(&f);
- t.writeRawBytes(Objekt, Objekt.length());
- f.close();
- ret = true;
- }
- else
- {
- ret = false;
- }
- return ret;
-}
-
-bool Serializer::Read()
-{
- bool tmp = loadText(Filename, &Objekt);
- QTextCodec* codec = QTextCodec::codecForContent(Objekt, Objekt.length());
- if (codec)
- {
- if (QString(codec->name()) == "UTF-8")
- {
- QString dec = QString::fromUtf8(Objekt);
- Objekt = dec;
- }
- }
- return tmp;
-}
/start/Scribus/scribus/serializer.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/icc34.h
===================================================================
--- start/Scribus/scribus/icc34.h (revision 427)
+++ start/Scribus/scribus/icc34.h (nonexistent)
@@ -1,979 +0,0 @@
-/* Header file guard bands */
-#ifndef ICC_H
-#define ICC_H
-
-/*****************************************************************
- Copyright (c) 1994-1996 SunSoft, Inc.
-
- Rights Reserved
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without restrict-
-ion, including without limitation the rights to use, copy, modify,
-merge, publish distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
-INFRINGEMENT. IN NO EVENT SHALL SUNSOFT, INC. OR ITS PARENT
-COMPANY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of SunSoft, Inc.
-shall not be used in advertising or otherwise to promote the
-sale, use or other dealings in this Software without written
-authorization from SunSoft Inc.
-******************************************************************/
-
-/*
- * This version of the header file corresponds to the profile
- * specification version 3.4.
- *
- * All header file entries are pre-fixed with "ic" to help
- * avoid name space collisions. Signatures are pre-fixed with
- * icSig.
- *
- * The structures defined in this header file were created to
- * represent a description of an ICC profile on disk. Rather
- * than use pointers a technique is used where a single byte array
- * was placed at the end of each structure. This allows us in "C"
- * to extend the structure by allocating more data than is needed
- * to account for variable length structures.
- *
- * This also ensures that data following is allocated
- * contiguously and makes it easier to write and read data from
- * the file.
- *
- * For example to allocate space for a 256 count length UCR
- * and BG array, and fill the allocated data. Note strlen + 1
- * to remember NULL terminator.
- *
- icUcrBgCurve *ucrCurve, *bgCurve;
- int ucr_nbytes, bg_nbytes, string_bytes;
- icUcrBg *ucrBgWrite;
- char ucr_string[100], *ucr_char;
-
- strcpy(ucr_string, "Example ucrBG curves");
- ucr_nbytes = sizeof(icUInt32Number) +
- (UCR_CURVE_SIZE * sizeof(icUInt16Number));
- bg_nbytes = sizeof(icUInt32Number) +
- (BG_CURVE_SIZE * sizeof(icUInt16Number));
- string_bytes = strlen(ucr_string) + 1;
-
- ucrBgWrite = (icUcrBg *)malloc(
- (ucr_nbytes + bg_nbytes + string_bytes));
-
- ucrCurve = (icUcrBgCurve *)ucrBgWrite->data;
- ucrCurve->count = UCR_CURVE_SIZE;
- for (i=0; i<ucrCurve->count; i++)
- ucrCurve->curve[i] = (icUInt16Number)i;
-
- bgCurve = (icUcrBgCurve *)((char *)ucrCurve + ucr_nbytes);
- bgCurve->count = BG_CURVE_SIZE;
- for (i=0; i<bgCurve->count; i++)
- bgCurve->curve[i] = 255 - (icUInt16Number)i;
-
- ucr_char = (char *)((char *)bgCurve + bg_nbytes);
- memcpy(ucr_char, ucr_string, string_bytes);
- *
- */
-
-/*
- * Many of the structures contain variable length arrays. This
- * is represented by the use of the convention.
- *
- * type data[icAny];
- */
-
-/*------------------------------------------------------------------------*/
-/*
- * Defines used in the specification
- */
-#define icMagicNumber 0x61637370L /* 'acsp' */
-#define icVersionNumber 0x02100000L /* 2.1.0, BCD */
-
-/* Screening Encodings */
-#define icPrtrDefaultScreensFalse 0x00000000L /* Bit pos 0 */
-#define icPrtrDefaultScreensTrue 0x00000001L /* Bit pos 0 */
-#define icLinesPerInch 0x00000002L /* Bit pos 1 */
-#define icLinesPerCm 0x00000000L /* Bit pos 1 */
-
-/*
- * Device attributes, currently defined values correspond
- * to the low 4 bytes of the 8 byte attribute quantity, see
- * the header for their location.
- */
-#define icReflective 0x00000000L /* Bit pos 0 */
-#define icTransparency 0x00000001L /* Bit pos 0 */
-#define icGlossy 0x00000000L /* Bit pos 1 */
-#define icMatte 0x00000002L /* Bit pos 1 */
-
-/*
- * Profile header flags, the low 16 bits are reserved for consortium
- * use.
- */
-#define icEmbeddedProfileFalse 0x00000000L /* Bit pos 0 */
-#define icEmbeddedProfileTrue 0x00000001L /* Bit pos 0 */
-#define icUseAnywhere 0x00000000L /* Bit pos 1 */
-#define icUseWithEmbeddedDataOnly 0x00000002L /* Bit pos 1 */
-
-/* Ascii or Binary data */
-#define icAsciiData 0x00000000L
-#define icBinaryData 0x00000001L
-
-/*
- * Define used to indicate that this is a variable length array
- */
-#define icAny 1
-
-
-/*------------------------------------------------------------------------*/
-/*
- * Use this area to translate platform definitions of long
- * etc into icXXX form. The rest of the header uses the icXXX
- * typedefs. Signatures are 4 byte quantities.
- *
- */
-
-#ifdef __sgi
-#include "sgidefs.h"
-
-typedef __int32_t icSignature;
-
-/*
- * Number definitions
- */
-
-/* Unsigned integer numbers */
-typedef unsigned char icUInt8Number;
-typedef unsigned short icUInt16Number;
-typedef __uint32_t icUInt32Number;
-typedef __uint32_t icUInt64Number[2];
-
-/* Signed numbers */
-typedef char icInt8Number;
-typedef short icInt16Number;
-typedef __int32_t icInt32Number;
-typedef __int32_t icInt64Number[2];
-
-/* Fixed numbers */
-typedef __int32_t icS15Fixed16Number;
-typedef __uint32_t icU16Fixed16Number;
-
-#else
-#if defined(__GNUC__) || defined(__unix__)
-
-#include <sys/types.h>
-
-/* Sept-6-2001: added these type definitions. Modified by Marti Maria
- * in order to provide wider portability.
- */
-
-typedef int32_t icSignature;
-
-/* Unsigned integer numbers */
-typedef u_int8_t icUInt8Number;
-typedef u_int16_t icUInt16Number;
-typedef u_int32_t icUInt32Number;
-typedef u_int32_t icUInt64Number[2];
-
-/* Signed numbers */
-typedef int8_t icInt8Number;
-typedef int16_t icInt16Number;
-typedef int32_t icInt32Number;
-typedef int32_t icInt64Number[2];
-
-/* Fixed numbers */
-typedef int32_t icS15Fixed16Number;
-typedef u_int32_t icU16Fixed16Number;
-
-#else /* default definitions */
-
-typedef long icSignature;
-
-/*
- * Number definitions
- */
-
-/* Unsigned integer numbers */
-typedef unsigned char icUInt8Number;
-typedef unsigned short icUInt16Number;
-typedef unsigned long icUInt32Number;
-typedef unsigned long icUInt64Number[2];
-
-/* Signed numbers */
-typedef char icInt8Number;
-typedef short icInt16Number;
-typedef long icInt32Number;
-typedef long icInt64Number[2];
-
-/* Fixed numbers */
-typedef long icS15Fixed16Number;
-typedef unsigned long icU16Fixed16Number;
-#endif /* default defs */
-#endif
-
-/*------------------------------------------------------------------------*/
-/* public tags and sizes */
-typedef enum {
- icSigAToB0Tag = 0x41324230L, /* 'A2B0' */
- icSigAToB1Tag = 0x41324231L, /* 'A2B1' */
- icSigAToB2Tag = 0x41324232L, /* 'A2B2' */
- icSigBlueColorantTag = 0x6258595AL, /* 'bXYZ' */
- icSigBlueTRCTag = 0x62545243L, /* 'bTRC' */
- icSigBToA0Tag = 0x42324130L, /* 'B2A0' */
- icSigBToA1Tag = 0x42324131L, /* 'B2A1' */
- icSigBToA2Tag = 0x42324132L, /* 'B2A2' */
- icSigCalibrationDateTimeTag = 0x63616C74L, /* 'calt' */
- icSigCharTargetTag = 0x74617267L, /* 'targ' */
- icSigCopyrightTag = 0x63707274L, /* 'cprt' */
- icSigCrdInfoTag = 0x63726469L, /* 'crdi' */
- icSigDeviceMfgDescTag = 0x646D6E64L, /* 'dmnd' */
- icSigDeviceModelDescTag = 0x646D6464L, /* 'dmdd' */
- icSigGamutTag = 0x67616D74L, /* 'gamt ' */
- icSigGrayTRCTag = 0x6b545243L, /* 'kTRC' */
- icSigGreenColorantTag = 0x6758595AL, /* 'gXYZ' */
- icSigGreenTRCTag = 0x67545243L, /* 'gTRC' */
- icSigLuminanceTag = 0x6C756d69L, /* 'lumi' */
- icSigMeasurementTag = 0x6D656173L, /* 'meas' */
- icSigMediaBlackPointTag = 0x626B7074L, /* 'bkpt' */
- icSigMediaWhitePointTag = 0x77747074L, /* 'wtpt' */
- icSigNamedColorTag = 0x6E636f6CL, /* 'ncol'
- * OBSOLETE, use ncl2 */
- icSigNamedColor2Tag = 0x6E636C32L, /* 'ncl2' */
- icSigPreview0Tag = 0x70726530L, /* 'pre0' */
- icSigPreview1Tag = 0x70726531L, /* 'pre1' */
- icSigPreview2Tag = 0x70726532L, /* 'pre2' */
- icSigProfileDescriptionTag = 0x64657363L, /* 'desc' */
- icSigProfileSequenceDescTag = 0x70736571L, /* 'pseq' */
- icSigPs2CRD0Tag = 0x70736430L, /* 'psd0' */
- icSigPs2CRD1Tag = 0x70736431L, /* 'psd1' */
- icSigPs2CRD2Tag = 0x70736432L, /* 'psd2' */
- icSigPs2CRD3Tag = 0x70736433L, /* 'psd3' */
- icSigPs2CSATag = 0x70733273L, /* 'ps2s' */
- icSigPs2RenderingIntentTag = 0x70733269L, /* 'ps2i' */
- icSigRedColorantTag = 0x7258595AL, /* 'rXYZ' */
- icSigRedTRCTag = 0x72545243L, /* 'rTRC' */
- icSigScreeningDescTag = 0x73637264L, /* 'scrd' */
- icSigScreeningTag = 0x7363726EL, /* 'scrn' */
- icSigTechnologyTag = 0x74656368L, /* 'tech' */
- icSigUcrBgTag = 0x62666420L, /* 'bfd ' */
- icSigViewingCondDescTag = 0x76756564L, /* 'vued' */
- icSigViewingConditionsTag = 0x76696577L, /* 'view' */
- icMaxEnumTag = 0xFFFFFFFFL
-} icTagSignature;
-
-/* technology signature descriptions */
-typedef enum {
- icSigDigitalCamera = 0x6463616DL, /* 'dcam' */
- icSigFilmScanner = 0x6673636EL, /* 'fscn' */
- icSigReflectiveScanner = 0x7273636EL, /* 'rscn' */
- icSigInkJetPrinter = 0x696A6574L, /* 'ijet' */
- icSigThermalWaxPrinter = 0x74776178L, /* 'twax' */
- icSigElectrophotographicPrinter = 0x6570686FL, /* 'epho' */
- icSigElectrostaticPrinter = 0x65737461L, /* 'esta' */
- icSigDyeSublimationPrinter = 0x64737562L, /* 'dsub' */
- icSigPhotographicPaperPrinter = 0x7270686FL, /* 'rpho' */
- icSigFilmWriter = 0x6670726EL, /* 'fprn' */
- icSigVideoMonitor = 0x7669646DL, /* 'vidm' */
- icSigVideoCamera = 0x76696463L, /* 'vidc' */
- icSigProjectionTelevision = 0x706A7476L, /* 'pjtv' */
- icSigCRTDisplay = 0x43525420L, /* 'CRT ' */
- icSigPMDisplay = 0x504D4420L, /* 'PMD ' */
- icSigAMDisplay = 0x414D4420L, /* 'AMD ' */
- icSigPhotoCD = 0x4B504344L, /* 'KPCD' */
- icSigPhotoImageSetter = 0x696D6773L, /* 'imgs' */
- icSigGravure = 0x67726176L, /* 'grav' */
- icSigOffsetLithography = 0x6F666673L, /* 'offs' */
- icSigSilkscreen = 0x73696C6BL, /* 'silk' */
- icSigFlexography = 0x666C6578L, /* 'flex' */
- icMaxEnumTechnology = 0xFFFFFFFFL
-} icTechnologySignature;
-
-/* type signatures */
-typedef enum {
- icSigCurveType = 0x63757276L, /* 'curv' */
- icSigDataType = 0x64617461L, /* 'data' */
- icSigDateTimeType = 0x6474696DL, /* 'dtim' */
- icSigLut16Type = 0x6d667432L, /* 'mft2' */
- icSigLut8Type = 0x6d667431L, /* 'mft1' */
- icSigMeasurementType = 0x6D656173L, /* 'meas' */
- icSigNamedColorType = 0x6E636f6CL, /* 'ncol'
- * OBSOLETE, use ncl2 */
- icSigProfileSequenceDescType = 0x70736571L, /* 'pseq' */
- icSigS15Fixed16ArrayType = 0x73663332L, /* 'sf32' */
- icSigScreeningType = 0x7363726EL, /* 'scrn' */
- icSigSignatureType = 0x73696720L, /* 'sig ' */
- icSigTextType = 0x74657874L, /* 'text' */
- icSigTextDescriptionType = 0x64657363L, /* 'desc' */
- icSigU16Fixed16ArrayType = 0x75663332L, /* 'uf32' */
- icSigUcrBgType = 0x62666420L, /* 'bfd ' */
- icSigUInt16ArrayType = 0x75693136L, /* 'ui16' */
- icSigUInt32ArrayType = 0x75693332L, /* 'ui32' */
- icSigUInt64ArrayType = 0x75693634L, /* 'ui64' */
- icSigUInt8ArrayType = 0x75693038L, /* 'ui08' */
- icSigViewingConditionsType = 0x76696577L, /* 'view' */
- icSigXYZType = 0x58595A20L, /* 'XYZ ' */
- icSigXYZArrayType = 0x58595A20L, /* 'XYZ ' */
- icSigNamedColor2Type = 0x6E636C32L, /* 'ncl2' */
- icSigCrdInfoType = 0x63726469L, /* 'crdi' */
- icMaxEnumType = 0xFFFFFFFFL
-} icTagTypeSignature;
-
-/*
- * Color Space Signatures
- * Note that only icSigXYZData and icSigLabData are valid
- * Profile Connection Spaces (PCSs)
- */
-typedef enum {
- icSigXYZData = 0x58595A20L, /* 'XYZ ' */
- icSigLabData = 0x4C616220L, /* 'Lab ' */
- icSigLuvData = 0x4C757620L, /* 'Luv ' */
- icSigYCbCrData = 0x59436272L, /* 'YCbr' */
- icSigYxyData = 0x59787920L, /* 'Yxy ' */
- icSigRgbData = 0x52474220L, /* 'RGB ' */
- icSigGrayData = 0x47524159L, /* 'GRAY' */
- icSigHsvData = 0x48535620L, /* 'HSV ' */
- icSigHlsData = 0x484C5320L, /* 'HLS ' */
- icSigCmykData = 0x434D594BL, /* 'CMYK' */
- icSigCmyData = 0x434D5920L, /* 'CMY ' */
- icSig2colorData = 0x32434C52L, /* '2CLR' */
- icSig3colorData = 0x33434C52L, /* '3CLR' */
- icSig4colorData = 0x34434C52L, /* '4CLR' */
- icSig5colorData = 0x35434C52L, /* '5CLR' */
- icSig6colorData = 0x36434C52L, /* '6CLR' */
- icSig7colorData = 0x37434C52L, /* '7CLR' */
- icSig8colorData = 0x38434C52L, /* '8CLR' */
- icSig9colorData = 0x39434C52L, /* '9CLR' */
- icSig10colorData = 0x41434C52L, /* 'ACLR' */
- icSig11colorData = 0x42434C52L, /* 'BCLR' */
- icSig12colorData = 0x43434C52L, /* 'CCLR' */
- icSig13colorData = 0x44434C52L, /* 'DCLR' */
- icSig14colorData = 0x45434C52L, /* 'ECLR' */
- icSig15colorData = 0x46434C52L, /* 'FCLR' */
- icMaxEnumData = 0xFFFFFFFFL
-} icColorSpaceSignature;
-
-/* profileClass enumerations */
-typedef enum {
- icSigInputClass = 0x73636E72L, /* 'scnr' */
- icSigDisplayClass = 0x6D6E7472L, /* 'mntr' */
- icSigOutputClass = 0x70727472L, /* 'prtr' */
- icSigLinkClass = 0x6C696E6BL, /* 'link' */
- icSigAbstractClass = 0x61627374L, /* 'abst' */
- icSigColorSpaceClass = 0x73706163L, /* 'spac' */
- icSigNamedColorClass = 0x6e6d636cL, /* 'nmcl' */
- icMaxEnumClass = 0xFFFFFFFFL
-} icProfileClassSignature;
-
-/* Platform Signatures */
-typedef enum {
- icSigMacintosh = 0x4150504CL, /* 'APPL' */
- icSigMicrosoft = 0x4D534654L, /* 'MSFT' */
- icSigSolaris = 0x53554E57L, /* 'SUNW' */
- icSigSGI = 0x53474920L, /* 'SGI ' */
- icSigTaligent = 0x54474E54L, /* 'TGNT' */
- icMaxEnumPlatform = 0xFFFFFFFFL
-} icPlatformSignature;
-
-/*------------------------------------------------------------------------*/
-/*
- * Other enums
- */
-
-/* Measurement Flare, used in the measurmentType tag */
-typedef enum {
- icFlare0 = 0x00000000L, /* 0% flare */
- icFlare100 = 0x00000001L, /* 100% flare */
- icMaxFlare = 0xFFFFFFFFL
-} icMeasurementFlare;
-
-/* Measurement Geometry, used in the measurmentType tag */
-typedef enum {
- icGeometryUnknown = 0x00000000L, /* Unknown */
- icGeometry045or450 = 0x00000001L, /* 0/45, 45/0 */
- icGeometry0dord0 = 0x00000002L, /* 0/d or d/0 */
- icMaxGeometry = 0xFFFFFFFFL
-} icMeasurementGeometry;
-
-/* Rendering Intents, used in the profile header */
-typedef enum {
- icPerceptual = 0,
- icRelativeColorimetric = 1,
- icSaturation = 2,
- icAbsoluteColorimetric = 3,
- icMaxEnumIntent = 0xFFFFFFFFL
-} icRenderingIntent;
-
-/* Different Spot Shapes currently defined, used for screeningType */
-typedef enum {
- icSpotShapeUnknown = 0,
- icSpotShapePrinterDefault = 1,
- icSpotShapeRound = 2,
- icSpotShapeDiamond = 3,
- icSpotShapeEllipse = 4,
- icSpotShapeLine = 5,
- icSpotShapeSquare = 6,
- icSpotShapeCross = 7,
- icMaxEnumSpot = 0xFFFFFFFFL
-} icSpotShape;
-
-/* Standard Observer, used in the measurmentType tag */
-typedef enum {
- icStdObsUnknown = 0x00000000L, /* Unknown */
- icStdObs1931TwoDegrees = 0x00000001L, /* 2 deg */
- icStdObs1964TenDegrees = 0x00000002L, /* 10 deg */
- icMaxStdObs = 0xFFFFFFFFL
-} icStandardObserver;
-
-/* Pre-defined illuminants, used in measurement and viewing conditions type */
-typedef enum {
- icIlluminantUnknown = 0x00000000L,
- icIlluminantD50 = 0x00000001L,
- icIlluminantD65 = 0x00000002L,
- icIlluminantD93 = 0x00000003L,
- icIlluminantF2 = 0x00000004L,
- icIlluminantD55 = 0x00000005L,
- icIlluminantA = 0x00000006L,
- icIlluminantEquiPowerE = 0x00000007L,
- icIlluminantF8 = 0x00000008L,
- icMaxEnumIluminant = 0xFFFFFFFFL
-} icIlluminant;
-
-
-/*------------------------------------------------------------------------*/
-/*
- * Arrays of numbers
- */
-
-/* Int8 Array */
-typedef struct {
- icInt8Number data[icAny]; /* Variable array of values */
-} icInt8Array;
-
-/* UInt8 Array */
-typedef struct {
- icUInt8Number data[icAny]; /* Variable array of values */
-} icUInt8Array;
-
-/* uInt16 Array */
-typedef struct {
- icUInt16Number data[icAny]; /* Variable array of values */
-} icUInt16Array;
-
-/* Int16 Array */
-typedef struct {
- icInt16Number data[icAny]; /* Variable array of values */
-} icInt16Array;
-
-/* uInt32 Array */
-typedef struct {
- icUInt32Number data[icAny]; /* Variable array of values */
-} icUInt32Array;
-
-/* Int32 Array */
-typedef struct {
- icInt32Number data[icAny]; /* Variable array of values */
-} icInt32Array;
-
-/* UInt64 Array */
-typedef struct {
- icUInt64Number data[icAny]; /* Variable array of values */
-} icUInt64Array;
-
-/* Int64 Array */
-typedef struct {
- icInt64Number data[icAny]; /* Variable array of values */
-} icInt64Array;
-
-/* u16Fixed16 Array */
-typedef struct {
- icU16Fixed16Number data[icAny]; /* Variable array of values */
-} icU16Fixed16Array;
-
-/* s15Fixed16 Array */
-typedef struct {
- icS15Fixed16Number data[icAny]; /* Variable array of values */
-} icS15Fixed16Array;
-
-/* The base date time number */
-typedef struct {
- icUInt16Number year;
- icUInt16Number month;
- icUInt16Number day;
- icUInt16Number hours;
- icUInt16Number minutes;
- icUInt16Number seconds;
-} icDateTimeNumber;
-
-/* XYZ Number */
-typedef struct {
- icS15Fixed16Number X;
- icS15Fixed16Number Y;
- icS15Fixed16Number Z;
-} icXYZNumber;
-
-/* XYZ Array */
-typedef struct {
- icXYZNumber data[icAny]; /* Variable array of XYZ numbers */
-} icXYZArray;
-
-/* Curve */
-typedef struct {
- icUInt32Number count; /* Number of entries */
- icUInt16Number data[icAny]; /* The actual table data, real
- * number is determined by count
- * Interpretation depends on how
- * data is used with a given tag
- */
-} icCurve;
-
-/* Data */
-typedef struct {
- icUInt32Number dataFlag; /* 0 = ascii, 1 = binary */
- icInt8Number data[icAny]; /* Data, size from tag */
-} icData;
-
-/* lut16 */
-typedef struct {
- icUInt8Number inputChan; /* Number of input channels */
- icUInt8Number outputChan; /* Number of output channels */
- icUInt8Number clutPoints; /* Number of grid points */
- icInt8Number pad; /* Padding for byte alignment */
- icS15Fixed16Number e00; /* e00 in the 3 * 3 */
- icS15Fixed16Number e01; /* e01 in the 3 * 3 */
- icS15Fixed16Number e02; /* e02 in the 3 * 3 */
- icS15Fixed16Number e10; /* e10 in the 3 * 3 */
- icS15Fixed16Number e11; /* e11 in the 3 * 3 */
- icS15Fixed16Number e12; /* e12 in the 3 * 3 */
- icS15Fixed16Number e20; /* e20 in the 3 * 3 */
- icS15Fixed16Number e21; /* e21 in the 3 * 3 */
- icS15Fixed16Number e22; /* e22 in the 3 * 3 */
- icUInt16Number inputEnt; /* Num of in-table entries */
- icUInt16Number outputEnt; /* Num of out-table entries */
- icUInt16Number data[icAny]; /* Data follows see spec */
-/*
- * Data that follows is of this form
- *
- * icUInt16Number inputTable[inputChan][icAny]; * The in-table
- * icUInt16Number clutTable[icAny]; * The clut
- * icUInt16Number outputTable[outputChan][icAny]; * The out-table
- */
-} icLut16;
-
-/* lut8, input & output tables are always 256 bytes in length */
-typedef struct {
- icUInt8Number inputChan; /* Num of input channels */
- icUInt8Number outputChan; /* Num of output channels */
- icUInt8Number clutPoints; /* Num of grid points */
- icInt8Number pad;
- icS15Fixed16Number e00; /* e00 in the 3 * 3 */
- icS15Fixed16Number e01; /* e01 in the 3 * 3 */
- icS15Fixed16Number e02; /* e02 in the 3 * 3 */
- icS15Fixed16Number e10; /* e10 in the 3 * 3 */
- icS15Fixed16Number e11; /* e11 in the 3 * 3 */
- icS15Fixed16Number e12; /* e12 in the 3 * 3 */
- icS15Fixed16Number e20; /* e20 in the 3 * 3 */
- icS15Fixed16Number e21; /* e21 in the 3 * 3 */
- icS15Fixed16Number e22; /* e22 in the 3 * 3 */
- icUInt8Number data[icAny]; /* Data follows see spec */
-/*
- * Data that follows is of this form
- *
- * icUInt8Number inputTable[inputChan][256]; * The in-table
- * icUInt8Number clutTable[icAny]; * The clut
- * icUInt8Number outputTable[outputChan][256]; * The out-table
- */
-} icLut8;
-
-/* Measurement Data */
-typedef struct {
- icStandardObserver stdObserver; /* Standard observer */
- icXYZNumber backing; /* XYZ for backing */
- icMeasurementGeometry geometry; /* Meas. geometry */
- icMeasurementFlare flare; /* Measurement flare */
- icIlluminant illuminant; /* Illuminant */
-} icMeasurement;
-
-/* Named color */
-
-/*
- * icNamedColor2 takes the place of icNamedColor
- */
-typedef struct {
- icUInt32Number vendorFlag; /* Bottom 16 bits for IC use */
- icUInt32Number count; /* Count of named colors */
- icUInt32Number nDeviceCoords; /* Num of device coordinates */
- icInt8Number prefix[32]; /* Prefix for each color name */
- icInt8Number suffix[32]; /* Suffix for each color name */
- icInt8Number data[icAny]; /* Named color data follows */
-/*
- * Data that follows is of this form
- *
- * icInt8Number root1[32]; * Root name for 1st color
- * icUInt16Number pcsCoords1[icAny]; * PCS coords of 1st color
- * icUInt16Number deviceCoords1[icAny]; * Dev coords of 1st color
- * icInt8Number root2[32]; * Root name for 2nd color
- * icUInt16Number pcsCoords2[icAny]; * PCS coords of 2nd color
- * icUInt16Number deviceCoords2[icAny]; * Dev coords of 2nd color
- * :
- * :
- * Repeat for name and PCS and device color coordinates up to (count-1)
- *
- * NOTES:
- * PCS and device space can be determined from the header.
- *
- * PCS coordinates are icUInt16 numbers and are described in Annex A of
- * the ICC spec. Only 16 bit L*a*b* and XYZ are allowed. The number of
- * coordinates is consistent with the headers PCS.
- *
- * Device coordinates are icUInt16 numbers where 0x0000 represents
- * the minimum value and 0xFFFF represents the maximum value.
- * If the nDeviceCoords value is 0 this field is not given.
- */
-} icNamedColor2;
-
-/* Profile sequence structure */
-typedef struct {
- icSignature deviceMfg; /* Dev Manufacturer */
- icSignature deviceModel; /* Dev Model */
- icUInt64Number attributes; /* Dev attributes */
- icTechnologySignature technology; /* Technology sig */
- icInt8Number data[icAny]; /* Desc text follows */
-/*
- * Data that follows is of this form, this is an icInt8Number
- * to avoid problems with a compiler generating bad code as
- * these arrays are variable in length.
- *
- * icTextDescription deviceMfgDesc; * Manufacturer text
- * icTextDescription modelDesc; * Model text
- */
-} icDescStruct;
-
-/* Profile sequence description */
-typedef struct {
- icUInt32Number count; /* Number of descriptions */
- icUInt8Number data[icAny]; /* Array of desc structs */
-} icProfileSequenceDesc;
-
-/* textDescription */
-typedef struct {
- icUInt32Number count; /* Description length */
- icInt8Number data[icAny]; /* Descriptions follow */
-/*
- * Data that follows is of this form
- *
- * icInt8Number desc[count] * NULL terminated ascii string
- * icUInt32Number ucLangCode; * UniCode language code
- * icUInt32Number ucCount; * UniCode description length
- * icInt16Number ucDesc[ucCount];* The UniCode description
- * icUInt16Number scCode; * ScriptCode code
- * icUInt8Number scCount; * ScriptCode count
- * icInt8Number scDesc[67]; * ScriptCode Description
- */
-} icTextDescription;
-
-/* Screening Data */
-typedef struct {
- icS15Fixed16Number frequency; /* Frequency */
- icS15Fixed16Number angle; /* Screen angle */
- icSpotShape spotShape; /* Spot Shape encodings below */
-} icScreeningData;
-
-typedef struct {
- icUInt32Number screeningFlag; /* Screening flag */
- icUInt32Number channels; /* Number of channels */
- icScreeningData data[icAny]; /* Array of screening data */
-} icScreening;
-
-/* Text Data */
-typedef struct {
- icInt8Number data[icAny]; /* Variable array of chars */
-} icText;
-
-/* Structure describing either a UCR or BG curve */
-typedef struct {
- icUInt32Number count; /* Curve length */
- icUInt16Number curve[icAny]; /* The array of curve values */
-} icUcrBgCurve;
-
-/* Under color removal, black generation */
-typedef struct {
- icInt8Number data[icAny]; /* The Ucr BG data */
-/*
- * Data that follows is of this form, this is a icInt8Number
- * to avoid problems with a compiler generating bad code as
- * these arrays are variable in length.
- *
- * icUcrBgCurve ucr; * Ucr curve
- * icUcrBgCurve bg; * Bg curve
- * icInt8Number string; * UcrBg description
- */
-} icUcrBg;
-
-/* viewingConditionsType */
-typedef struct {
- icXYZNumber illuminant; /* In candelas per sq. meter */
- icXYZNumber surround; /* In candelas per sq. meter */
- icIlluminant stdIluminant; /* See icIlluminant defines */
-} icViewingCondition;
-
-/* CrdInfo type */
-typedef struct {
- icUInt32Number count; /* Char count includes NULL */
- icInt8Number desc[icAny]; /* Null terminated string */
-} icCrdInfo;
-
-/*------------------------------------------------------------------------*/
-/*
- * Tag Type definitions
- */
-
-/*
- * Many of the structures contain variable length arrays. This
- * is represented by the use of the convention.
- *
- * type data[icAny];
- */
-
-/* The base part of each tag */
-typedef struct {
- icTagTypeSignature sig; /* Signature */
- icInt8Number reserved[4]; /* Reserved, set to 0 */
-} icTagBase;
-
-/* curveType */
-typedef struct {
- icTagBase base; /* Signature, "curv" */
- icCurve curve; /* The curve data */
-} icCurveType;
-
-/* dataType */
-typedef struct {
- icTagBase base; /* Signature, "data" */
- icData data; /* The data structure */
-} icDataType;
-
-/* dateTimeType */
-typedef struct {
- icTagBase base; /* Signature, "dtim" */
- icDateTimeNumber date; /* The date */
-} icDateTimeType;
-
-/* lut16Type */
-typedef struct {
- icTagBase base; /* Signature, "mft2" */
- icLut16 lut; /* Lut16 data */
-} icLut16Type;
-
-/* lut8Type, input & output tables are always 256 bytes in length */
-typedef struct {
- icTagBase base; /* Signature, "mft1" */
- icLut8 lut; /* Lut8 data */
-} icLut8Type;
-
-/* Measurement Type */
-typedef struct {
- icTagBase base; /* Signature, "meas" */
- icMeasurement measurement; /* Measurement data */
-} icMeasurementType;
-
-/* Named color type */
-/* icNamedColor2Type, replaces icNamedColorType */
-typedef struct {
- icTagBase base; /* Signature, "ncl2" */
- icNamedColor2 ncolor; /* Named color data */
-} icNamedColor2Type;
-
-/* Profile sequence description type */
-typedef struct {
- icTagBase base; /* Signature, "pseq" */
- icProfileSequenceDesc desc; /* The seq description */
-} icProfileSequenceDescType;
-
-/* textDescriptionType */
-typedef struct {
- icTagBase base; /* Signature, "desc" */
- icTextDescription desc; /* The description */
-} icTextDescriptionType;
-
-/* s15Fixed16Type */
-typedef struct {
- icTagBase base; /* Signature, "sf32" */
- icS15Fixed16Array data; /* Array of values */
-} icS15Fixed16ArrayType;
-
-typedef struct {
- icTagBase base; /* Signature, "scrn" */
- icScreening screen; /* Screening structure */
-} icScreeningType;
-
-/* sigType */
-typedef struct {
- icTagBase base; /* Signature, "sig" */
- icSignature signature; /* The signature data */
-} icSignatureType;
-
-/* textType */
-typedef struct {
- icTagBase base; /* Signature, "text" */
- icText data; /* Variable array of chars */
-} icTextType;
-
-/* u16Fixed16Type */
-typedef struct {
- icTagBase base; /* Signature, "uf32" */
- icU16Fixed16Array data; /* Variable array of values */
-} icU16Fixed16ArrayType;
-
-/* Under color removal, black generation type */
-typedef struct {
- icTagBase base; /* Signature, "bfd " */
- icUcrBg data; /* ucrBg structure */
-} icUcrBgType;
-
-/* uInt16Type */
-typedef struct {
- icTagBase base; /* Signature, "ui16" */
- icUInt16Array data; /* Variable array of values */
-} icUInt16ArrayType;
-
-/* uInt32Type */
-typedef struct {
- icTagBase base; /* Signature, "ui32" */
- icUInt32Array data; /* Variable array of values */
-} icUInt32ArrayType;
-
-/* uInt64Type */
-typedef struct {
- icTagBase base; /* Signature, "ui64" */
- icUInt64Array data; /* Variable array of values */
-} icUInt64ArrayType;
-
-/* uInt8Type */
-typedef struct {
- icTagBase base; /* Signature, "ui08" */
- icUInt8Array data; /* Variable array of values */
-} icUInt8ArrayType;
-
-/* viewingConditionsType */
-typedef struct {
- icTagBase base; /* Signature, "view" */
- icViewingCondition view; /* Viewing conditions */
-} icViewingConditionType;
-
-/* XYZ Type */
-typedef struct {
- icTagBase base; /* Signature, "XYZ" */
- icXYZArray data; /* Variable array of XYZ nums */
-} icXYZType;
-
-/* CRDInfoType where [0] is the CRD product name count and string and
- * [1] -[5] are the rendering intents 0-4 counts and strings
- */
-typedef struct {
- icTagBase base; /* Signature, "crdi" */
- icCrdInfo info; /* 5 sets of counts & strings */
-}icCrdInfoType;
- /* icCrdInfo productName; PS product count/string */
- /* icCrdInfo CRDName0; CRD name for intent 0 */
- /* icCrdInfo CRDName1; CRD name for intent 1 */
- /* icCrdInfo CRDName2; CRD name for intent 2 */
- /* icCrdInfo CRDName3; CRD name for intent 3 */
-
-/*------------------------------------------------------------------------*/
-
-/*
- * Lists of tags, tags, profile header and profile structure
- */
-
-/* A tag */
-typedef struct {
- icTagSignature sig; /* The tag signature */
- icUInt32Number offset; /* Start of tag relative to
- * start of header, Spec
- * Clause 5 */
- icUInt32Number size; /* Size in bytes */
-} icTag;
-
-/* A Structure that may be used independently for a list of tags */
-typedef struct {
- icUInt32Number count; /* Num tags in the profile */
- icTag tags[icAny]; /* Variable array of tags */
-} icTagList;
-
-/* The Profile header */
-typedef struct {
- icUInt32Number size; /* Prof size in bytes */
- icSignature cmmId; /* CMM for profile */
- icUInt32Number version; /* Format version */
- icProfileClassSignature deviceClass; /* Type of profile */
- icColorSpaceSignature colorSpace; /* Clr space of data */
- icColorSpaceSignature pcs; /* PCS, XYZ or Lab */
- icDateTimeNumber date; /* Creation Date */
- icSignature magic; /* icMagicNumber */
- icPlatformSignature platform; /* Primary Platform */
- icUInt32Number flags; /* Various bits */
- icSignature manufacturer; /* Dev manufacturer */
- icUInt32Number model; /* Dev model number */
- icUInt64Number attributes; /* Device attributes */
- icUInt32Number renderingIntent;/* Rendering intent */
- icXYZNumber illuminant; /* Profile illuminant */
- icSignature creator; /* Profile creator */
- icInt8Number reserved[44]; /* Reserved */
-} icHeader;
-
-/*
- * A profile,
- * we can't use icTagList here because its not at the end of the structure
- */
-typedef struct {
- icHeader header; /* The header */
- icUInt32Number count; /* Num tags in the profile */
- icInt8Number data[icAny]; /* The tagTable and tagData */
-/*
- * Data that follows is of the form
- *
- * icTag tagTable[icAny]; * The tag table
- * icInt8Number tagData[icAny]; * The tag data
- */
-} icProfile;
-
-/*------------------------------------------------------------------------*/
-/* Obsolete entries */
-
-/* icNamedColor was replaced with icNamedColor2 */
-typedef struct {
- icUInt32Number vendorFlag; /* Bottom 16 bits for IC use */
- icUInt32Number count; /* Count of named colors */
- icInt8Number data[icAny]; /* Named color data follows */
-/*
- * Data that follows is of this form
- *
- * icInt8Number prefix[icAny]; * Prefix
- * icInt8Number suffix[icAny]; * Suffix
- * icInt8Number root1[icAny]; * Root name
- * icInt8Number coords1[icAny]; * Color coordinates
- * icInt8Number root2[icAny]; * Root name
- * icInt8Number coords2[icAny]; * Color coordinates
- * :
- * :
- * Repeat for root name and color coordinates up to (count-1)
- */
-} icNamedColor;
-
-/* icNamedColorType was replaced by icNamedColor2Type */
-typedef struct {
- icTagBase base; /* Signature, "ncol" */
- icNamedColor ncolor; /* Named color data */
-} icNamedColorType;
-
-#endif /* ICC_H */
/start/Scribus/scribus/icc34.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/kimageeffect.cpp
===================================================================
--- start/Scribus/scribus/kimageeffect.cpp (revision 427)
+++ start/Scribus/scribus/kimageeffect.cpp (nonexistent)
@@ -1,3841 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1998, 1999, 2001, 2002 Daniel M. Duley <mosfet@kde.org>
- (C) 1998, 1999 Christian Tibirna <ctibirna@total.net>
- (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org>
- (C) 2000 Josef Weidendorfer <weidendo@in.tum.de>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-// $Id$
-
-#include <cmath>
-
-#include <qimage.h>
-#include <cstdlib>
-#include <iostream>
-
-#include "kimageeffect.h"
-
-#define MaxRGB 255L
-#define DegreesToRadians(x) ((x)*M_PI/180.0)
-
-using namespace std;
-
-inline unsigned int intensityValue(unsigned int color)
-{
- return((unsigned int)((0.299*qRed(color) +
- 0.587*qGreen(color) +
- 0.1140000000000001*qBlue(color))));
-}
-
-//======================================================================
-//
-// Gradient effects
-//
-//======================================================================
-
-QImage KImageEffect::gradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType eff, int ncols)
-{
- int rDiff, gDiff, bDiff;
- int rca, gca, bca, rcb, gcb, bcb;
-
- QImage image(size, 32);
-
- if (size.width() == 0 || size.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::gradient: invalid image" << endl;
-#endif
- return image;
- }
-
- register int x, y;
-
- rDiff = (rcb = cb.red()) - (rca = ca.red());
- gDiff = (gcb = cb.green()) - (gca = ca.green());
- bDiff = (bcb = cb.blue()) - (bca = ca.blue());
-
- if( eff == VerticalGradient || eff == HorizontalGradient ){
-
- uint *p;
- uint rgb;
-
- register int rl = rca << 16;
- register int gl = gca << 16;
- register int bl = bca << 16;
-
- if( eff == VerticalGradient ) {
-
- int rcdelta = ((1<<16) / size.height()) * rDiff;
- int gcdelta = ((1<<16) / size.height()) * gDiff;
- int bcdelta = ((1<<16) / size.height()) * bDiff;
-
- for ( y = 0; y < size.height(); y++ ) {
- p = (uint *) image.scanLine(y);
-
- rl += rcdelta;
- gl += gcdelta;
- bl += bcdelta;
-
- rgb = qRgb( (rl>>16), (gl>>16), (bl>>16) );
-
- for( x = 0; x < size.width(); x++ ) {
- *p = rgb;
- p++;
- }
- }
-
- }
- else { // must be HorizontalGradient
-
- unsigned int *o_src = (unsigned int *)image.scanLine(0);
- unsigned int *src = o_src;
-
- int rcdelta = ((1<<16) / size.width()) * rDiff;
- int gcdelta = ((1<<16) / size.width()) * gDiff;
- int bcdelta = ((1<<16) / size.width()) * bDiff;
-
- for( x = 0; x < size.width(); x++) {
-
- rl += rcdelta;
- gl += gcdelta;
- bl += bcdelta;
-
- *src++ = qRgb( (rl>>16), (gl>>16), (bl>>16));
- }
-
- src = o_src;
-
- // Believe it or not, manually copying in a for loop is faster
- // than calling memcpy for each scanline (on the order of ms...).
- // I think this is due to the function call overhead (mosfet).
-
- for (y = 1; y < size.height(); ++y) {
-
- p = (unsigned int *)image.scanLine(y);
- src = o_src;
- for(x=0; x < size.width(); ++x)
- *p++ = *src++;
- }
- }
- }
-
- else {
-
- float rfd, gfd, bfd;
- float rd = rca, gd = gca, bd = bca;
-
- unsigned char *xtable[3];
- unsigned char *ytable[3];
-
- unsigned int w = size.width(), h = size.height();
- xtable[0] = new unsigned char[w];
- xtable[1] = new unsigned char[w];
- xtable[2] = new unsigned char[w];
- ytable[0] = new unsigned char[h];
- ytable[1] = new unsigned char[h];
- ytable[2] = new unsigned char[h];
- w*=2, h*=2;
-
- if ( eff == DiagonalGradient || eff == CrossDiagonalGradient) {
- // Diagonal dgradient code inspired by BlackBox (mosfet)
- // BlackBox dgradient is (C) Brad Hughes, <bhughes@tcac.net> and
- // Mike Cole <mike@mydot.com>.
-
- rfd = (float)rDiff/w;
- gfd = (float)gDiff/w;
- bfd = (float)bDiff/w;
-
- int dir;
- for (x = 0; x < size.width(); x++, rd+=rfd, gd+=gfd, bd+=bfd) {
- dir = eff == DiagonalGradient? x : size.width() - x - 1;
- xtable[0][dir] = (unsigned char) rd;
- xtable[1][dir] = (unsigned char) gd;
- xtable[2][dir] = (unsigned char) bd;
- }
- rfd = (float)rDiff/h;
- gfd = (float)gDiff/h;
- bfd = (float)bDiff/h;
- rd = gd = bd = 0;
- for (y = 0; y < size.height(); y++, rd+=rfd, gd+=gfd, bd+=bfd) {
- ytable[0][y] = (unsigned char) rd;
- ytable[1][y] = (unsigned char) gd;
- ytable[2][y] = (unsigned char) bd;
- }
-
- for (y = 0; y < size.height(); y++) {
- unsigned int *scanline = (unsigned int *)image.scanLine(y);
- for (x = 0; x < size.width(); x++) {
- scanline[x] = qRgb(xtable[0][x] + ytable[0][y],
- xtable[1][x] + ytable[1][y],
- xtable[2][x] + ytable[2][y]);
- }
- }
- }
-
- else if (eff == RectangleGradient ||
- eff == PyramidGradient ||
- eff == PipeCrossGradient ||
- eff == EllipticGradient)
- {
- int rSign = rDiff>0? 1: -1;
- int gSign = gDiff>0? 1: -1;
- int bSign = bDiff>0? 1: -1;
-
- rfd = (float)rDiff / size.width();
- gfd = (float)gDiff / size.width();
- bfd = (float)bDiff / size.width();
-
- rd = (float)rDiff/2;
- gd = (float)gDiff/2;
- bd = (float)bDiff/2;
-
- for (x = 0; x < size.width(); x++, rd-=rfd, gd-=gfd, bd-=bfd)
- {
- xtable[0][x] = (unsigned char) abs((int)rd);
- xtable[1][x] = (unsigned char) abs((int)gd);
- xtable[2][x] = (unsigned char) abs((int)bd);
- }
-
- rfd = (float)rDiff/size.height();
- gfd = (float)gDiff/size.height();
- bfd = (float)bDiff/size.height();
-
- rd = (float)rDiff/2;
- gd = (float)gDiff/2;
- bd = (float)bDiff/2;
-
- for (y = 0; y < size.height(); y++, rd-=rfd, gd-=gfd, bd-=bfd)
- {
- ytable[0][y] = (unsigned char) abs((int)rd);
- ytable[1][y] = (unsigned char) abs((int)gd);
- ytable[2][y] = (unsigned char) abs((int)bd);
- }
- unsigned int rgb;
- int h = (size.height()+1)>>1;
- for (y = 0; y < h; y++) {
- unsigned int *sl1 = (unsigned int *)image.scanLine(y);
- unsigned int *sl2 = (unsigned int *)image.scanLine(QMAX(size.height()-y-1, y));
-
- int w = (size.width()+1)>>1;
- int x2 = size.width()-1;
-
- for (x = 0; x < w; x++, x2--) {
- rgb = 0;
- if (eff == PyramidGradient) {
- rgb = qRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]),
- gcb-gSign*(xtable[1][x]+ytable[1][y]),
- bcb-bSign*(xtable[2][x]+ytable[2][y]));
- }
- if (eff == RectangleGradient) {
- rgb = qRgb(rcb - rSign *
- QMAX(xtable[0][x], ytable[0][y]) * 2,
- gcb - gSign *
- QMAX(xtable[1][x], ytable[1][y]) * 2,
- bcb - bSign *
- QMAX(xtable[2][x], ytable[2][y]) * 2);
- }
- if (eff == PipeCrossGradient) {
- rgb = qRgb(rcb - rSign *
- QMIN(xtable[0][x], ytable[0][y]) * 2,
- gcb - gSign *
- QMIN(xtable[1][x], ytable[1][y]) * 2,
- bcb - bSign *
- QMIN(xtable[2][x], ytable[2][y]) * 2);
- }
- if (eff == EllipticGradient) {
- rgb = qRgb(rcb - rSign *
- (int)sqrt((xtable[0][x]*xtable[0][x] +
- ytable[0][y]*ytable[0][y])*2.0),
- gcb - gSign *
- (int)sqrt((xtable[1][x]*xtable[1][x] +
- ytable[1][y]*ytable[1][y])*2.0),
- bcb - bSign *
- (int)sqrt((xtable[2][x]*xtable[2][x] +
- ytable[2][y]*ytable[2][y])*2.0));
- }
-
- sl1[x] = sl2[x] = rgb;
- sl1[x2] = sl2[x2] = rgb;
- }
- }
- }
-
- delete [] xtable[0];
- delete [] xtable[1];
- delete [] xtable[2];
- delete [] ytable[0];
- delete [] ytable[1];
- delete [] ytable[2];
- }
-
- // dither if necessary
- if (ncols && (QPixmap::defaultDepth() < 15 )) {
- if ( ncols < 2 || ncols > 256 )
- ncols = 3;
- QColor *dPal = new QColor[ncols];
- for (int i=0; i<ncols; i++) {
- dPal[i].setRgb ( rca + rDiff * i / ( ncols - 1 ),
- gca + gDiff * i / ( ncols - 1 ),
- bca + bDiff * i / ( ncols - 1 ) );
- }
- dither(image, dPal, ncols);
- delete [] dPal;
- }
-
- return image;
-}
-
-
-// -----------------------------------------------------------------------------
-
-//CT this was (before Dirk A. Mueller's speedup changes)
-// merely the same code as in the above method, but it's supposedly
-// way less performant since it introduces a lot of supplementary tests
-// and simple math operations for the calculus of the balance.
-// (surprizingly, it isn't less performant, in the contrary :-)
-// Yes, I could have merged them, but then the excellent performance of
-// the balanced code would suffer with no other gain than a mere
-// source code and byte code size economy.
-
-QImage KImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType eff, int xfactor, int yfactor,
- int ncols)
-{
- int dir; // general parameter used for direction switches
-
- bool _xanti = false , _yanti = false;
-
- if (xfactor < 0) _xanti = true; // negative on X direction
- if (yfactor < 0) _yanti = true; // negative on Y direction
-
- xfactor = abs(xfactor);
- yfactor = abs(yfactor);
-
- if (!xfactor) xfactor = 1;
- if (!yfactor) yfactor = 1;
-
- if (xfactor > 200 ) xfactor = 200;
- if (yfactor > 200 ) yfactor = 200;
-
-
- // float xbal = xfactor/5000.;
- // float ybal = yfactor/5000.;
- float xbal = xfactor/30./size.width();
- float ybal = yfactor/30./size.height();
- float rat;
-
- int rDiff, gDiff, bDiff;
- int rca, gca, bca, rcb, gcb, bcb;
-
- QImage image(size, 32);
-
- if (size.width() == 0 || size.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::unbalancedGradient : invalid image\n";
-#endif
- return image;
- }
-
- register int x, y;
- unsigned int *scanline;
-
- rDiff = (rcb = cb.red()) - (rca = ca.red());
- gDiff = (gcb = cb.green()) - (gca = ca.green());
- bDiff = (bcb = cb.blue()) - (bca = ca.blue());
-
- if( eff == VerticalGradient || eff == HorizontalGradient){
- QColor cRow;
-
- uint *p;
- uint rgbRow;
-
- if( eff == VerticalGradient) {
- for ( y = 0; y < size.height(); y++ ) {
- dir = _yanti ? y : size.height() - 1 - y;
- p = (uint *) image.scanLine(dir);
- rat = 1 - exp( - (float)y * ybal );
-
- cRow.setRgb( rcb - (int) ( rDiff * rat ),
- gcb - (int) ( gDiff * rat ),
- bcb - (int) ( bDiff * rat ) );
-
- rgbRow = cRow.rgb();
-
- for( x = 0; x < size.width(); x++ ) {
- *p = rgbRow;
- p++;
- }
- }
- }
- else {
-
- unsigned int *src = (unsigned int *)image.scanLine(0);
- for(x = 0; x < size.width(); x++ )
- {
- dir = _xanti ? x : size.width() - 1 - x;
- rat = 1 - exp( - (float)x * xbal );
-
- src[dir] = qRgb(rcb - (int) ( rDiff * rat ),
- gcb - (int) ( gDiff * rat ),
- bcb - (int) ( bDiff * rat ));
- }
-
- // Believe it or not, manually copying in a for loop is faster
- // than calling memcpy for each scanline (on the order of ms...).
- // I think this is due to the function call overhead (mosfet).
-
- for(y = 1; y < size.height(); ++y)
- {
- scanline = (unsigned int *)image.scanLine(y);
- for(x=0; x < size.width(); ++x)
- scanline[x] = src[x];
- }
- }
- }
-
- else {
- int w=size.width(), h=size.height();
-
- unsigned char *xtable[3];
- unsigned char *ytable[3];
- xtable[0] = new unsigned char[w];
- xtable[1] = new unsigned char[w];
- xtable[2] = new unsigned char[w];
- ytable[0] = new unsigned char[h];
- ytable[1] = new unsigned char[h];
- ytable[2] = new unsigned char[h];
-
- if ( eff == DiagonalGradient || eff == CrossDiagonalGradient)
- {
- for (x = 0; x < w; x++) {
- dir = _xanti ? x : w - 1 - x;
- rat = 1 - exp( - (float)x * xbal );
-
- xtable[0][dir] = (unsigned char) ( rDiff/2 * rat );
- xtable[1][dir] = (unsigned char) ( gDiff/2 * rat );
- xtable[2][dir] = (unsigned char) ( bDiff/2 * rat );
- }
-
- for (y = 0; y < h; y++) {
- dir = _yanti ? y : h - 1 - y;
- rat = 1 - exp( - (float)y * ybal );
-
- ytable[0][dir] = (unsigned char) ( rDiff/2 * rat );
- ytable[1][dir] = (unsigned char) ( gDiff/2 * rat );
- ytable[2][dir] = (unsigned char) ( bDiff/2 * rat );
- }
-
- for (y = 0; y < h; y++) {
- unsigned int *scanline = (unsigned int *)image.scanLine(y);
- for (x = 0; x < w; x++) {
- scanline[x] = qRgb(rcb - (xtable[0][x] + ytable[0][y]),
- gcb - (xtable[1][x] + ytable[1][y]),
- bcb - (xtable[2][x] + ytable[2][y]));
- }
- }
- }
-
- else if (eff == RectangleGradient ||
- eff == PyramidGradient ||
- eff == PipeCrossGradient ||
- eff == EllipticGradient)
- {
- int rSign = rDiff>0? 1: -1;
- int gSign = gDiff>0? 1: -1;
- int bSign = bDiff>0? 1: -1;
-
- for (x = 0; x < w; x++)
- {
- dir = _xanti ? x : w - 1 - x;
- rat = 1 - exp( - (float)x * xbal );
-
- xtable[0][dir] = (unsigned char) abs((int)(rDiff*(0.5-rat)));
- xtable[1][dir] = (unsigned char) abs((int)(gDiff*(0.5-rat)));
- xtable[2][dir] = (unsigned char) abs((int)(bDiff*(0.5-rat)));
- }
-
- for (y = 0; y < h; y++)
- {
- dir = _yanti ? y : h - 1 - y;
-
- rat = 1 - exp( - (float)y * ybal );
-
- ytable[0][dir] = (unsigned char) abs((int)(rDiff*(0.5-rat)));
- ytable[1][dir] = (unsigned char) abs((int)(gDiff*(0.5-rat)));
- ytable[2][dir] = (unsigned char) abs((int)(bDiff*(0.5-rat)));
- }
-
- for (y = 0; y < h; y++) {
- unsigned int *scanline = (unsigned int *)image.scanLine(y);
- for (x = 0; x < w; x++) {
- if (eff == PyramidGradient)
- {
- scanline[x] = qRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]),
- gcb-gSign*(xtable[1][x]+ytable[1][y]),
- bcb-bSign*(xtable[2][x]+ytable[2][y]));
- }
- if (eff == RectangleGradient)
- {
- scanline[x] = qRgb(rcb - rSign *
- QMAX(xtable[0][x], ytable[0][y]) * 2,
- gcb - gSign *
- QMAX(xtable[1][x], ytable[1][y]) * 2,
- bcb - bSign *
- QMAX(xtable[2][x], ytable[2][y]) * 2);
- }
- if (eff == PipeCrossGradient)
- {
- scanline[x] = qRgb(rcb - rSign *
- QMIN(xtable[0][x], ytable[0][y]) * 2,
- gcb - gSign *
- QMIN(xtable[1][x], ytable[1][y]) * 2,
- bcb - bSign *
- QMIN(xtable[2][x], ytable[2][y]) * 2);
- }
- if (eff == EllipticGradient)
- {
- scanline[x] = qRgb(rcb - rSign *
- (int)sqrt((xtable[0][x]*xtable[0][x] +
- ytable[0][y]*ytable[0][y])*2.0),
- gcb - gSign *
- (int)sqrt((xtable[1][x]*xtable[1][x] +
- ytable[1][y]*ytable[1][y])*2.0),
- bcb - bSign *
- (int)sqrt((xtable[2][x]*xtable[2][x] +
- ytable[2][y]*ytable[2][y])*2.0));
- }
- }
- }
- }
-
- if (ncols && (QPixmap::defaultDepth() < 15 )) {
- if ( ncols < 2 || ncols > 256 )
- ncols = 3;
- QColor *dPal = new QColor[ncols];
- for (int i=0; i<ncols; i++) {
- dPal[i].setRgb ( rca + rDiff * i / ( ncols - 1 ),
- gca + gDiff * i / ( ncols - 1 ),
- bca + bDiff * i / ( ncols - 1 ) );
- }
- dither(image, dPal, ncols);
- delete [] dPal;
- }
-
- delete [] xtable[0];
- delete [] xtable[1];
- delete [] xtable[2];
- delete [] ytable[0];
- delete [] ytable[1];
- delete [] ytable[2];
-
- }
-
- return image;
-}
-
-
-//======================================================================
-//
-// Intensity effects
-//
-//======================================================================
-
-
-/* This builds a 256 byte unsigned char lookup table with all
- * the possible percent values prior to applying the effect, then uses
- * integer math for the pixels. For any image larger than 9x9 this will be
- * less expensive than doing a float operation on the 3 color components of
- * each pixel. (mosfet)
- */
-
-QImage& KImageEffect::intensity(QImage &image, float percent)
-{
- if (image.width() == 0 || image.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::intensity : invalid image\n";
-#endif
- return image;
- }
-
- int segColors = image.depth() > 8 ? 256 : image.numColors();
- unsigned char *segTbl = new unsigned char[segColors];
- int pixels = image.depth() > 8 ? image.width()*image.height() :
- image.numColors();
- unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
- (unsigned int *)image.colorTable();
-
- bool brighten = (percent >= 0);
- if(percent < 0)
- percent = -percent;
-
- if(brighten){ // keep overflow check out of loops
- for(int i=0; i < segColors; ++i){
- int tmp = (int)(i*percent);
- if(tmp > 255)
- tmp = 255;
- segTbl[i] = tmp;
- }
- }
- else{
- for(int i=0; i < segColors; ++i){
- int tmp = (int)(i*percent);
- if(tmp < 0)
- tmp = 0;
- segTbl[i] = tmp;
- }
- }
-
- if(brighten){ // same here
- for(int i=0; i < pixels; ++i){
- int r = qRed(data[i]);
- int g = qGreen(data[i]);
- int b = qBlue(data[i]);
- int a = qAlpha(data[i]);
- r = r + segTbl[r] > 255 ? 255 : r + segTbl[r];
- g = g + segTbl[g] > 255 ? 255 : g + segTbl[g];
- b = b + segTbl[b] > 255 ? 255 : b + segTbl[b];
- data[i] = qRgba(r, g, b,a);
- }
- }
- else{
- for(int i=0; i < pixels; ++i){
- int r = qRed(data[i]);
- int g = qGreen(data[i]);
- int b = qBlue(data[i]);
- int a = qAlpha(data[i]);
- r = r - segTbl[r] < 0 ? 0 : r - segTbl[r];
- g = g - segTbl[g] < 0 ? 0 : g - segTbl[g];
- b = b - segTbl[b] < 0 ? 0 : b - segTbl[b];
- data[i] = qRgba(r, g, b, a);
- }
- }
- delete [] segTbl;
-
- return image;
-}
-
-QImage& KImageEffect::channelIntensity(QImage &image, float percent,
- RGBComponent channel)
-{
- if (image.width() == 0 || image.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::channelIntensity : invalid image\n";
-#endif
- return image;
- }
-
- int segColors = image.depth() > 8 ? 256 : image.numColors();
- unsigned char *segTbl = new unsigned char[segColors];
- int pixels = image.depth() > 8 ? image.width()*image.height() :
- image.numColors();
- unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
- (unsigned int *)image.colorTable();
- bool brighten = (percent >= 0);
- if(percent < 0)
- percent = -percent;
-
- if(brighten){ // keep overflow check out of loops
- for(int i=0; i < segColors; ++i){
- int tmp = (int)(i*percent);
- if(tmp > 255)
- tmp = 255;
- segTbl[i] = tmp;
- }
- }
- else{
- for(int i=0; i < segColors; ++i){
- int tmp = (int)(i*percent);
- if(tmp < 0)
- tmp = 0;
- segTbl[i] = tmp;
- }
- }
-
- if(brighten){ // same here
- if(channel == Red){ // and here ;-)
- for(int i=0; i < pixels; ++i){
- int c = qRed(data[i]);
- c = c + segTbl[c] > 255 ? 255 : c + segTbl[c];
- data[i] = qRgba(c, qGreen(data[i]), qBlue(data[i]), qAlpha(data[i]));
- }
- }
- if(channel == Green){
- for(int i=0; i < pixels; ++i){
- int c = qGreen(data[i]);
- c = c + segTbl[c] > 255 ? 255 : c + segTbl[c];
- data[i] = qRgba(qRed(data[i]), c, qBlue(data[i]), qAlpha(data[i]));
- }
- }
- else{
- for(int i=0; i < pixels; ++i){
- int c = qBlue(data[i]);
- c = c + segTbl[c] > 255 ? 255 : c + segTbl[c];
- data[i] = qRgba(qRed(data[i]), qGreen(data[i]), c, qAlpha(data[i]));
- }
- }
-
- }
- else{
- if(channel == Red){
- for(int i=0; i < pixels; ++i){
- int c = qRed(data[i]);
- c = c - segTbl[c] < 0 ? 0 : c - segTbl[c];
- data[i] = qRgba(c, qGreen(data[i]), qBlue(data[i]), qAlpha(data[i]));
- }
- }
- if(channel == Green){
- for(int i=0; i < pixels; ++i){
- int c = qGreen(data[i]);
- c = c - segTbl[c] < 0 ? 0 : c - segTbl[c];
- data[i] = qRgba(qRed(data[i]), c, qBlue(data[i]), qAlpha(data[i]));
- }
- }
- else{
- for(int i=0; i < pixels; ++i){
- int c = qBlue(data[i]);
- c = c - segTbl[c] < 0 ? 0 : c - segTbl[c];
- data[i] = qRgba(qRed(data[i]), qGreen(data[i]), c, qAlpha(data[i]));
- }
- }
- }
- delete [] segTbl;
-
- return image;
-}
-
-// Modulate an image with an RBG channel of another image
-//
-QImage& KImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
- ModulationType type, int factor, RGBComponent channel)
-{
- if (image.width() == 0 || image.height() == 0 ||
- modImage.width() == 0 || modImage.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::modulate : invalid image\n";
-#endif
- return image;
- }
-
- int r, g, b, h, s, v, a;
- QColor clr;
- int mod=0;
- unsigned int x1, x2, y1, y2;
- register int x, y;
-
- // for image, we handle only depth 32
- if (image.depth()<32) image = image.convertDepth(32);
-
- // for modImage, we handle depth 8 and 32
- if (modImage.depth()<8) modImage = modImage.convertDepth(8);
-
- unsigned int *colorTable2 = (modImage.depth()==8) ?
- modImage.colorTable():0;
- unsigned int *data1, *data2;
- unsigned char *data2b;
- unsigned int color1, color2;
-
- x1 = image.width(); y1 = image.height();
- x2 = modImage.width(); y2 = modImage.height();
-
- for (y = 0; y < (int)y1; y++) {
- data1 = (unsigned int *) image.scanLine(y);
- data2 = (unsigned int *) modImage.scanLine( y%y2 );
- data2b = (unsigned char *) modImage.scanLine( y%y2 );
-
- x=0;
- while(x < (int)x1) {
- color2 = (colorTable2) ? colorTable2[*data2b] : *data2;
- if (reverse) {
- color1 = color2;
- color2 = *data1;
- }
- else
- color1 = *data1;
-
- if (type == Intensity || type == Contrast) {
- r = qRed(color1);
- g = qGreen(color1);
- b = qBlue(color1);
- if (channel != All) {
- mod = (channel == Red) ? qRed(color2) :
- (channel == Green) ? qGreen(color2) :
- (channel == Blue) ? qBlue(color2) :
- (channel == Gray) ? qGray(color2) : 0;
- mod = mod*factor/50;
- }
-
- if (type == Intensity) {
- if (channel == All) {
- r += r * factor/50 * qRed(color2)/256;
- g += g * factor/50 * qGreen(color2)/256;
- b += b * factor/50 * qBlue(color2)/256;
- }
- else {
- r += r * mod/256;
- g += g * mod/256;
- b += b * mod/256;
- }
- }
- else { // Contrast
- if (channel == All) {
- r += (r-128) * factor/50 * qRed(color2)/128;
- g += (g-128) * factor/50 * qGreen(color2)/128;
- b += (b-128) * factor/50 * qBlue(color2)/128;
- }
- else {
- r += (r-128) * mod/128;
- g += (g-128) * mod/128;
- b += (b-128) * mod/128;
- }
- }
-
- if (r<0) r=0; if (r>255) r=255;
- if (g<0) g=0; if (g>255) g=255;
- if (b<0) b=0; if (b>255) b=255;
- a = qAlpha(*data1);
- *data1 = qRgba(r, g, b, a);
- }
- else if (type == Saturation || type == HueShift) {
- clr.setRgb(color1);
- clr.hsv(&h, &s, &v);
- mod = (channel == Red) ? qRed(color2) :
- (channel == Green) ? qGreen(color2) :
- (channel == Blue) ? qBlue(color2) :
- (channel == Gray) ? qGray(color2) : 0;
- mod = mod*factor/50;
-
- if (type == Saturation) {
- s -= s * mod/256;
- if (s<0) s=0; if (s>255) s=255;
- }
- else { // HueShift
- h += mod;
- while(h<0) h+=360;
- h %= 360;
- }
-
- clr.setHsv(h, s, v);
- a = qAlpha(*data1);
- *data1 = clr.rgb() | ((uint)(a & 0xff) << 24);
- }
- data1++; data2++; data2b++; x++;
- if ( (x%x2) ==0) { data2 -= x2; data2b -= x2; }
- }
- }
- return image;
-}
-
-
-
-//======================================================================
-//
-// Blend effects
-//
-//======================================================================
-
-
-// Nice and fast direct pixel manipulation
-QImage& KImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
-{
- if (dst.width() <= 0 || dst.height() <= 0)
- return dst;
-
- if (opacity < 0.0 || opacity > 1.0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::blend : invalid opacity. Range [0, 1]\n";
-#endif
- return dst;
- }
-
- int depth = dst.depth();
- if (depth != 32)
- dst = dst.convertDepth(32);
-
- int pixels = dst.width() * dst.height();
- int rcol, gcol, bcol;
- clr.rgb(&rcol, &gcol, &bcol);
-
-#ifdef WORDS_BIGENDIAN // ARGB (skip alpha)
- register unsigned char *data = (unsigned char *)dst.bits() + 1;
-#else // BGRA
- register unsigned char *data = (unsigned char *)dst.bits();
-#endif
-
- for (register int i=0; i<pixels; i++)
- {
-#ifdef WORDS_BIGENDIAN
- *(data++) += (unsigned char)((rcol - *data) * opacity);
- *(data++) += (unsigned char)((gcol - *data) * opacity);
- *(data++) += (unsigned char)((bcol - *data) * opacity);
-#else
- *(data++) += (unsigned char)((bcol - *data) * opacity);
- *(data++) += (unsigned char)((gcol - *data) * opacity);
- *(data++) += (unsigned char)((rcol - *data) * opacity);
-#endif
- data++; // skip alpha
- }
- return dst;
-}
-
-// Nice and fast direct pixel manipulation
-QImage& KImageEffect::blend(QImage& src, QImage& dst, float opacity)
-{
- if (src.width() <= 0 || src.height() <= 0)
- return dst;
- if (dst.width() <= 0 || dst.height() <= 0)
- return dst;
-
- if (src.width() != dst.width() || src.height() != dst.height()) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::blend : src and destination images are not the same size\n";
-#endif
- return dst;
- }
-
- if (opacity < 0.0 || opacity > 1.0) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::blend : invalid opacity. Range [0, 1]\n";
-#endif
- return dst;
- }
-
- if (src.depth() != 32) src = src.convertDepth(32);
- if (dst.depth() != 32) dst = dst.convertDepth(32);
-
- int pixels = src.width() * src.height();
-#ifdef WORDS_BIGENDIAN // ARGB (skip alpha)
- register unsigned char *data1 = (unsigned char *)dst.bits() + 1;
- register unsigned char *data2 = (unsigned char *)src.bits() + 1;
-#else // BGRA
- register unsigned char *data1 = (unsigned char *)dst.bits();
- register unsigned char *data2 = (unsigned char *)src.bits();
-#endif
-
- for (register int i=0; i<pixels; i++)
- {
-#ifdef WORDS_BIGENDIAN
- *(data1++) += (unsigned char)((*(data2++) - *data1) * opacity);
- *(data1++) += (unsigned char)((*(data2++) - *data1) * opacity);
- *(data1++) += (unsigned char)((*(data2++) - *data1) * opacity);
-#else
- *(data1++) += (unsigned char)((*(data2++) - *data1) * opacity);
- *(data1++) += (unsigned char)((*(data2++) - *data1) * opacity);
- *(data1++) += (unsigned char)((*(data2++) - *data1) * opacity);
-#endif
- data1++; // skip alpha
- data2++;
- }
-
- return dst;
-}
-
-
-QImage& KImageEffect::blend(QImage &image, float initial_intensity,
- const QColor &bgnd, GradientType eff,
- bool anti_dir)
-{
- if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) {
-#ifndef NDEBUG
- cerr << "WARNING: KImageEffect::blend : invalid image\n";
-#endif
- return image;
- }
-
- int r_bgnd = bgnd.red(), g_bgnd = bgnd.green(), b_bgnd = bgnd.blue();
- int r, g, b;
- int ind;
-
- unsigned int xi, xf, yi, yf;
- unsigned int a;
-
- // check the boundaries of the initial intesity param
- float unaffected = 1;
- if (initial_intensity > 1) initial_intensity = 1;
- if (initial_intensity < -1) initial_intensity = -1;
- if (initial_intensity < 0) {
- unaffected = 1. + initial_intensity;
- initial_intensity = 0;
- }
-
-
- float intensity = initial_intensity;
- float var = 1. - initial_intensity;
-
- if (anti_dir) {
- initial_intensity = intensity = 1.;
- var = -var;
- }
-
- register int x, y;
-
- unsigned int *data = (unsigned int *)image.bits();
-
- int image_width = image.width(); //Those can't change
- int image_height = image.height();
-
-
- if( eff == VerticalGradient || eff == HorizontalGradient ) {
-
- // set the image domain to apply the effect to
- xi = 0, xf = image_width;
- yi = 0, yf = image_height;
- if (eff == VerticalGradient) {
- if (anti_dir) yf = (int)(image_height * unaffected);
- else yi = (int)(image_height * (1 - unaffected));
- }
- else {
- if (anti_dir) xf = (int)(image_width * unaffected);
- else xi = (int)(image_height * (1 - unaffected));
- }
-
- var /= (eff == VerticalGradient?yf-yi:xf-xi);
-
- int ind_base;
- for (y = yi; y < (int)yf; y++) {
- intensity = eff == VerticalGradient? intensity + var :
- initial_intensity;
- ind_base = image_width * y ;
- for (x = xi; x < (int)xf ; x++) {
- if (eff == HorizontalGradient) intensity += var;
- ind = x + ind_base;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
- if (r > 255) r = 255; if (r < 0 ) r = 0;
- if (g > 255) g = 255; if (g < 0 ) g = 0;
- if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
- }
- }
- }
- else if (eff == DiagonalGradient || eff == CrossDiagonalGradient) {
- float xvar = var / 2 / image_width; // / unaffected;
- float yvar = var / 2 / image_height; // / unaffected;
- float tmp;
-
- for (x = 0; x < image_width ; x++) {
- tmp = xvar * (eff == DiagonalGradient? x : image.width()-x-1);
- ind = x;
- for (y = 0; y < image_height ; y++) {
- intensity = initial_intensity + tmp + yvar * y;
-
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
- if (r > 255) r = 255; if (r < 0 ) r = 0;
- if (g > 255) g = 255; if (g < 0 ) g = 0;
- if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
-
- ind += image_width;
- }
- }
- }
-
- else if (eff == RectangleGradient || eff == EllipticGradient) {
- float xvar;
- float yvar;
-
- for (x = 0; x < image_width / 2 + image_width % 2; x++) {
- xvar = var / image_width * (image_width - x*2/unaffected-1);
- for (y = 0; y < image_height / 2 + image_height % 2; y++) {
- yvar = var / image_height * (image_height - y*2/unaffected -1);
-
- if (eff == RectangleGradient)
- intensity = initial_intensity + QMAX(xvar, yvar);
- else
- intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar);
- if (intensity > 1) intensity = 1;
- if (intensity < 0) intensity = 0;
-
- //NW
- ind = x + image_width * y ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
- if (r > 255) r = 255; if (r < 0 ) r = 0;
- if (g > 255) g = 255; if (g < 0 ) g = 0;
- if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
-
- //NE
- ind = image_width - x - 1 + image_width * y ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
- if (r > 255) r = 255; if (r < 0 ) r = 0;
- if (g > 255) g = 255; if (g < 0 ) g = 0;
- if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
- }
- }
-
- //CT loop is doubled because of stupid central row/column issue.
- // other solution?
- for (x = 0; x < image_width / 2; x++) {
- xvar = var / image_width * (image_width - x*2/unaffected-1);
- for (y = 0; y < image_height / 2; y++) {
- yvar = var / image_height * (image_height - y*2/unaffected -1);
-
- if (eff == RectangleGradient)
- intensity = initial_intensity + QMAX(xvar, yvar);
- else
- intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar);
- if (intensity > 1) intensity = 1;
- if (intensity < 0) intensity = 0;
-
- //SW
- ind = x + image_width * (image_height - y -1) ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
- if (r > 255) r = 255; if (r < 0 ) r = 0;
- if (g > 255) g = 255; if (g < 0 ) g = 0;
- if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
-
- //SE
- ind = image_width-x-1 + image_width * (image_height - y - 1) ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
- if (r > 255) r = 255; if (r < 0 ) r = 0;
- if (g > 255) g = 255; if (g < 0 ) g = 0;
- if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
- }
- }
- }
-#ifndef NDEBUG
- else cerr << "KImageEffect::blend effect not implemented" << endl;
-#endif
- return image;
-}
-
-// Not very efficient as we create a third big image...
-//
-QImage& KImageEffect::blend(QImage &image1, QImage &image2,
- GradientType gt, int xf, int yf)
-{
- if (image1.width() == 0 || image1.height() == 0 ||
- image2.width() == 0 || image2.height() == 0)
- return image1;
-
- QImage image3;
-
- image3 = KImageEffect::unbalancedGradient(image1.size(),
- QColor(0,0,0), QColor(255,255,255),
- gt, xf, yf, 0);
-
- return blend(image1,image2,image3, Red); // Channel to use is arbitrary
-}
-
-// Blend image2 into image1, using an RBG channel of blendImage
-//
-QImage& KImageEffect::blend(QImage &image1, QImage &image2,
- QImage &blendImage, RGBComponent channel)
-{
- if (image1.width() == 0 || image1.height() == 0 ||
- image2.width() == 0 || image2.height() == 0 ||
- blendImage.width() == 0 || blendImage.height() == 0) {
-#ifndef NDEBUG
- cerr << "KImageEffect::blend effect invalid image" << endl;
-#endif
- return image1;
- }
-
- int r, g, b;
- int ind1, ind2, ind3;
-
- unsigned int x1, x2, x3, y1, y2, y3;
- unsigned int a;
-
- register int x, y;
-
- // for image1 and image2, we only handle depth 32
- if (image1.depth()<32) image1 = image1.convertDepth(32);
- if (image2.depth()<32) image2 = image2.convertDepth(32);
-
- // for blendImage, we handle depth 8 and 32
- if (blendImage.depth()<8) blendImage = blendImage.convertDepth(8);
-
- unsigned int *colorTable3 = (blendImage.depth()==8) ?
- blendImage.colorTable():0;
-
- unsigned int *data1 = (unsigned int *)image1.bits();
- unsigned int *data2 = (unsigned int *)image2.bits();
- unsigned int *data3 = (unsigned int *)blendImage.bits();
- unsigned char *data3b = (unsigned char *)blendImage.bits();
- unsigned int color3;
-
- x1 = image1.width(); y1 = image1.height();
- x2 = image2.width(); y2 = image2.height();
- x3 = blendImage.width(); y3 = blendImage.height();
-
- for (y = 0; y < (int)y1; y++) {
- ind1 = x1*y;
- ind2 = x2*(y%y2);
- ind3 = x3*(y%y3);
-
- x=0;
- while(x < (int)x1) {
- color3 = (colorTable3) ? colorTable3[data3b[ind3]] : data3[ind3];
-
- a = (channel == Red) ? qRed(color3) :
- (channel == Green) ? qGreen(color3) :
- (channel == Blue) ? qBlue(color3) : qGray(color3);
-
- r = (a*qRed(data1[ind1]) + (256-a)*qRed(data2[ind2]))/256;
- g = (a*qGreen(data1[ind1]) + (256-a)*qGreen(data2[ind2]))/256;
- b = (a*qBlue(data1[ind1]) + (256-a)*qBlue(data2[ind2]))/256;
-
- a = qAlpha(data1[ind1]);
- data1[ind1] = qRgba(r, g, b, a);
-
- ind1++; ind2++; ind3++; x++;
- if ( (x%x2) ==0) ind2 -= x2;
- if ( (x%x3) ==0) ind3 -= x3;
- }
- }
- return image1;
-}
-
-
-//======================================================================
-//
-// Hash effects
-//
-//======================================================================
-
-unsigned int KImageEffect::lHash(unsigned int c)
-{
- unsigned char r = qRed(c), g = qGreen(c), b = qBlue(c), a = qAlpha(c);
- unsigned char nr, ng, nb;
- nr =(r >> 1) + (r >> 2); nr = nr > r ? 0 : nr;
- ng =(g >> 1) + (g >> 2); ng = ng > g ? 0 : ng;
- nb =(b >> 1) + (b >> 2); nb = nb > b ? 0 : nb;
-
- return qRgba(nr, ng, nb, a);
-}
-
-
-// -----------------------------------------------------------------------------
-
-unsigned int KImageEffect::uHash(unsigned int c)
-{
- unsigned char r = qRed(c), g = qGreen(c), b = qBlue(c), a = qAlpha(c);
- unsigned char nr, ng, nb;
- nr = r + (r >> 3); nr = nr < r ? ~0 : nr;
- ng = g + (g >> 3); ng = ng < g ? ~0 : ng;
- nb = b + (b >> 3); nb = nb < b ? ~0 : nb;
-
- return qRgba(nr, ng, nb, a);
-}
-
-
-// -----------------------------------------------------------------------------
-
-QImage& KImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing)
-{
- if (image.width() == 0 || image.height() == 0) {
-#ifndef NDEBUG
- cerr << "KImageEffect::hash effect invalid image" << endl;
-#endif
- return image;
- }
-
- register int x, y;
- unsigned int *data = (unsigned int *)image.bits();
- unsigned int ind;
-
- //CT no need to do it if not enough space
- if ((lite == NorthLite ||
- lite == SouthLite)&&
- (unsigned)image.height() < 2+spacing) return image;
- if ((lite == EastLite ||
- lite == WestLite)&&
- (unsigned)image.height() < 2+spacing) return image;
-
- if (lite == NorthLite || lite == SouthLite) {
- for (y = 0 ; y < image.height(); y = y + 2 + spacing) {
- for (x = 0; x < image.width(); x++) {
- ind = x + image.width() * y;
- data[ind] = lite==NorthLite?uHash(data[ind]):lHash(data[ind]);
-
- ind = ind + image.width();
- data[ind] = lite==NorthLite?lHash(data[ind]):uHash(data[ind]);
- }
- }
- }
-
- else if (lite == EastLite || lite == WestLite) {
- for (y = 0 ; y < image.height(); y++) {
- for (x = 0; x < image.width(); x = x + 2 + spacing) {
- ind = x + image.width() * y;
- data[ind] = lite==EastLite?uHash(data[ind]):lHash(data[ind]);
-
- ind++;
- data[ind] = lite==EastLite?lHash(data[ind]):uHash(data[ind]);
- }
- }
- }
-
- else if (lite == NWLite || lite == SELite) {
- for (y = 0 ; y < image.height(); y++) {
- for (x = 0;
- x < (int)(image.width() - ((y & 1)? 1 : 0) * spacing);
- x = x + 2 + spacing) {
- ind = x + image.width() * y + ((y & 1)? 1 : 0);
- data[ind] = lite==NWLite?uHash(data[ind]):lHash(data[ind]);
-
- ind++;
- data[ind] = lite==NWLite?lHash(data[ind]):uHash(data[ind]);
- }
- }
- }
-
- else if (lite == SWLite || lite == NELite) {
- for (y = 0 ; y < image.height(); y++) {
- for (x = 0 + ((y & 1)? 1 : 0); x < image.width(); x = x + 2 + spacing) {
- ind = x + image.width() * y - ((y & 1)? 1 : 0);
- data[ind] = lite==SWLite?uHash(data[ind]):lHash(data[ind]);
-
- ind++;
- data[ind] = lite==SWLite?lHash(data[ind]):uHash(data[ind]);
- }
- }
- }
-
- return image;
-}
-
-
-//======================================================================
-//
-// Flatten effects
-//
-//======================================================================
-
-QImage& KImageEffect::flatten(QImage &img, const QColor &ca,
- const QColor &cb, int ncols)
-{
- if (img.width() == 0 || img.height() == 0)
- return img;
-
- // a bitmap is easy...
- if (img.depth() == 1) {
- img.setColor(0, ca.rgb());
- img.setColor(1, cb.rgb());
- return img;
- }
-
- int r1 = ca.red(); int r2 = cb.red();
- int g1 = ca.green(); int g2 = cb.green();
- int b1 = ca.blue(); int b2 = cb.blue();
- int min = 0, max = 255;
-
- QRgb col;
-
- // Get minimum and maximum greylevel.
- if (img.numColors()) {
- // pseudocolor
- for (int i = 0; i < img.numColors(); i++) {
- col = img.color(i);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
- min = QMIN(min, mean);
- max = QMAX(max, mean);
- }
- } else {
- // truecolor
- for (int y=0; y < img.height(); y++)
- for (int x=0; x < img.width(); x++) {
- col = img.pixel(x, y);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
- min = QMIN(min, mean);
- max = QMAX(max, mean);
- }
- }
-
- // Conversion factors
- float sr = ((float) r2 - r1) / (max - min);
- float sg = ((float) g2 - g1) / (max - min);
- float sb = ((float) b2 - b1) / (max - min);
-
-
- // Repaint the image
- if (img.numColors()) {
- for (int i=0; i < img.numColors(); i++) {
- col = img.color(i);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
- int r = (int) (sr * (mean - min) + r1 + 0.5);
- int g = (int) (sg * (mean - min) + g1 + 0.5);
- int b = (int) (sb * (mean - min) + b1 + 0.5);
- img.setColor(i, qRgba(r, g, b, qAlpha(col)));
- }
- } else {
- for (int y=0; y < img.height(); y++)
- for (int x=0; x < img.width(); x++) {
- col = img.pixel(x, y);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
- int r = (int) (sr * (mean - min) + r1 + 0.5);
- int g = (int) (sg * (mean - min) + g1 + 0.5);
- int b = (int) (sb * (mean - min) + b1 + 0.5);
- img.setPixel(x, y, qRgba(r, g, b, qAlpha(col)));
- }
- }
-
-
- // Dither if necessary
- if ( (ncols <= 0) || ((img.numColors() != 0) && (img.numColors() <= ncols)))
- return img;
-
- if (ncols == 1) ncols++;
- if (ncols > 256) ncols = 256;
-
- QColor *pal = new QColor[ncols];
- sr = ((float) r2 - r1) / (ncols - 1);
- sg = ((float) g2 - g1) / (ncols - 1);
- sb = ((float) b2 - b1) / (ncols - 1);
-
- for (int i=0; i<ncols; i++)
- pal[i] = QColor(r1 + int(sr*i), g1 + int(sg*i), b1 + int(sb*i));
-
- dither(img, pal, ncols);
-
- delete[] pal;
- return img;
-}
-
-
-//======================================================================
-//
-// Fade effects
-//
-//======================================================================
-
-QImage& KImageEffect::fade(QImage &img, float val, const QColor &color)
-{
- if (img.width() == 0 || img.height() == 0)
- return img;
-
- // We don't handle bitmaps
- if (img.depth() == 1)
- return img;
-
- unsigned char tbl[256];
- for (int i=0; i<256; i++)
- tbl[i] = (int) (val * i + 0.5);
-
- int red = color.red();
- int green = color.green();
- int blue = color.blue();
-
- QRgb col;
- int r, g, b, cr, cg, cb;
-
- if (img.depth() <= 8) {
- // pseudo color
- for (int i=0; i<img.numColors(); i++) {
- col = img.color(i);
- cr = qRed(col); cg = qGreen(col); cb = qBlue(col);
- if (cr > red)
- r = cr - tbl[cr - red];
- else
- r = cr + tbl[red - cr];
- if (cg > green)
- g = cg - tbl[cg - green];
- else
- g = cg + tbl[green - cg];
- if (cb > blue)
- b = cb - tbl[cb - blue];
- else
- b = cb + tbl[blue - cb];
- img.setColor(i, qRgba(r, g, b, qAlpha(col)));
- }
-
- } else {
- // truecolor
- for (int y=0; y<img.height(); y++) {
- QRgb *data = (QRgb *) img.scanLine(y);
- for (int x=0; x<img.width(); x++) {
- col = *data;
- cr = qRed(col); cg = qGreen(col); cb = qBlue(col);
- if (cr > red)
- r = cr - tbl[cr - red];
- else
- r = cr + tbl[red - cr];
- if (cg > green)
- g = cg - tbl[cg - green];
- else
- g = cg + tbl[green - cg];
- if (cb > blue)
- b = cb - tbl[cb - blue];
- else
- b = cb + tbl[blue - cb];
- *data++ = qRgba(r, g, b, qAlpha(col));
- }
- }
- }
-
- return img;
-}
-
-//======================================================================
-//
-// Color effects
-//
-//======================================================================
-
-// This code is adapted from code (C) Rik Hemsley <rik@kde.org>
-//
-// The formula used (r + b + g) /3 is different from the qGray formula
-// used by Qt. This is because our formula is much much faster. If,
-// however, it turns out that this is producing sub-optimal images,
-// then it will have to change (kurt)
-//
-// It does produce lower quality grayscale ;-) Use fast == true for the fast
-// algorithm, false for the higher quality one (mosfet).
-QImage& KImageEffect::toGray(QImage &img, bool fast)
-{
- if (img.width() == 0 || img.height() == 0)
- return img;
-
- if(fast){
- if (img.depth() == 32) {
- register uchar * r(img.bits());
- register uchar * g(img.bits() + 1);
- register uchar * b(img.bits() + 2);
-
- uchar * end(img.bits() + img.numBytes());
-
- while (r != end) {
-
- *r = *g = *b = (((*r + *g) >> 1) + *b) >> 1; // (r + b + g) / 3
-
- r += 4;
- g += 4;
- b += 4;
- }
- }
- else
- {
- for (int i = 0; i < img.numColors(); i++)
- {
- register uint r = qRed(img.color(i));
- register uint g = qGreen(img.color(i));
- register uint b = qBlue(img.color(i));
-
- register uint gray = (((r + g) >> 1) + b) >> 1;
- img.setColor(i, qRgba(gray, gray, gray, qAlpha(img.color(i))));
- }
- }
- }
- else{
- int pixels = img.depth() > 8 ? img.width()*img.height() :
- img.numColors();
- unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.colorTable();
- int val, i;
- for(i=0; i < pixels; ++i){
- val = qGray(data[i]);
- data[i] = qRgba(val, val, val, qAlpha(data[i]));
- }
- }
- return img;
-}
-
-// CT 29Jan2000 - desaturation algorithms
-QImage& KImageEffect::desaturate(QImage &img, float desat)
-{
- if (img.width() == 0 || img.height() == 0)
- return img;
-
- if (desat < 0) desat = 0.;
- if (desat > 1) desat = 1.;
- int pixels = img.depth() > 8 ? img.width()*img.height() :
- img.numColors();
- unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.colorTable();
- int h, s, v, i;
- QColor clr; // keep constructor out of loop (mosfet)
- for(i=0; i < pixels; ++i){
- clr.setRgb(data[i]);
- clr.hsv(&h, &s, &v);
- clr.setHsv(h, (int)(s * (1. - desat)), v);
- data[i] = clr.rgb();
- }
- return img;
-}
-
-// Contrast stuff (mosfet)
-QImage& KImageEffect::contrast(QImage &img, int c)
-{
- if (img.width() == 0 || img.height() == 0)
- return img;
-
- if(c > 255)
- c = 255;
- if(c < -255)
- c = -255;
- int pixels = img.depth() > 8 ? img.width()*img.height() :
- img.numColors();
- unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.colorTable();
- int i, r, g, b;
- for(i=0; i < pixels; ++i){
- r = qRed(data[i]);
- g = qGreen(data[i]);
- b = qBlue(data[i]);
- if(qGray(data[i]) <= 127){
- if(r - c <= 255)
- r -= c;
- if(g - c <= 255)
- g -= c;
- if(b - c <= 255)
- b -= c;
- }
- else{
- if(r + c <= 255)
- r += c;
- if(g + c <= 255)
- g += c;
- if(b + c <= 255)
- b += c;
- }
- data[i] = qRgba(r, g, b, qAlpha(data[i]));
- }
- return(img);
-}
-
-//======================================================================
-//
-// Dithering effects
-//
-//======================================================================
-
-// adapted from kFSDither (C) 1997 Martin Jones (mjones@kde.org)
-//
-// Floyd-Steinberg dithering
-// Ref: Bitmapped Graphics Programming in C++
-// Marv Luse, Addison-Wesley Publishing, 1993.
-QImage& KImageEffect::dither(QImage &img, const QColor *palette, int size)
-{
- if (img.width() == 0 || img.height() == 0 ||
- palette == 0 || img.depth() <= 8)
- return img;
-
- QImage dImage( img.width(), img.height(), 8, size );
- int i;
-
- dImage.setNumColors( size );
- for ( i = 0; i < size; i++ )
- dImage.setColor( i, palette[ i ].rgb() );
-
- int *rerr1 = new int [ img.width() * 2 ];
- int *gerr1 = new int [ img.width() * 2 ];
- int *berr1 = new int [ img.width() * 2 ];
-
- memset( rerr1, 0, sizeof( int ) * img.width() * 2 );
- memset( gerr1, 0, sizeof( int ) * img.width() * 2 );
- memset( berr1, 0, sizeof( int ) * img.width() * 2 );
-
- int *rerr2 = rerr1 + img.width();
- int *gerr2 = gerr1 + img.width();
- int *berr2 = berr1 + img.width();
-
- for ( int j = 0; j < img.height(); j++ )
- {
- uint *ip = (uint * )img.scanLine( j );
- uchar *dp = dImage.scanLine( j );
-
- for ( i = 0; i < img.width(); i++ )
- {
- rerr1[i] = rerr2[i] + qRed( *ip );
- rerr2[i] = 0;
- gerr1[i] = gerr2[i] + qGreen( *ip );
- gerr2[i] = 0;
- berr1[i] = berr2[i] + qBlue( *ip );
- berr2[i] = 0;
- ip++;
- }
-
- *dp++ = nearestColor( rerr1[0], gerr1[0], berr1[0], palette, size );
-
- for ( i = 1; i < img.width()-1; i++ )
- {
- int indx = nearestColor( rerr1[i], gerr1[i], berr1[i], palette, size );
- *dp = indx;
-
- int rerr = rerr1[i];
- rerr -= palette[indx].red();
- int gerr = gerr1[i];
- gerr -= palette[indx].green();
- int berr = berr1[i];
- berr -= palette[indx].blue();
-
- // diffuse red error
- rerr1[ i+1 ] += ( rerr * 7 ) >> 4;
- rerr2[ i-1 ] += ( rerr * 3 ) >> 4;
- rerr2[ i ] += ( rerr * 5 ) >> 4;
- rerr2[ i+1 ] += ( rerr ) >> 4;
-
- // diffuse green error
- gerr1[ i+1 ] += ( gerr * 7 ) >> 4;
- gerr2[ i-1 ] += ( gerr * 3 ) >> 4;
- gerr2[ i ] += ( gerr * 5 ) >> 4;
- gerr2[ i+1 ] += ( gerr ) >> 4;
-
- // diffuse red error
- berr1[ i+1 ] += ( berr * 7 ) >> 4;
- berr2[ i-1 ] += ( berr * 3 ) >> 4;
- berr2[ i ] += ( berr * 5 ) >> 4;
- berr2[ i+1 ] += ( berr ) >> 4;
-
- dp++;
- }
-
- *dp = nearestColor( rerr1[i], gerr1[i], berr1[i], palette, size );
- }
-
- delete [] rerr1;
- delete [] gerr1;
- delete [] berr1;
-
- img = dImage;
- return img;
-}
-
-int KImageEffect::nearestColor( int r, int g, int b, const QColor *palette, int size )
-{
- if (palette == 0)
- return 0;
-
- int dr = palette[0].red() - r;
- int dg = palette[0].green() - g;
- int db = palette[0].blue() - b;
-
- int minDist = dr*dr + dg*dg + db*db;
- int nearest = 0;
-
- for (int i = 1; i < size; i++ )
- {
- dr = palette[i].red() - r;
- dg = palette[i].green() - g;
- db = palette[i].blue() - b;
-
- int dist = dr*dr + dg*dg + db*db;
-
- if ( dist < minDist )
- {
- minDist = dist;
- nearest = i;
- }
- }
-
- return nearest;
-}
-
-bool KImageEffect::blend(
- const QImage & upper,
- const QImage & lower,
- QImage & output
-)
-{
- if (
- upper.width() > lower.width() ||
- upper.height() > lower.height() ||
- upper.depth() != 32 ||
- lower.depth() != 32
- )
- {
-#ifndef NDEBUG
- cerr << "KImageEffect::blend : Sizes not correct\n" ;
-#endif
- return false;
- }
-
- output = lower.copy();
-
- register uchar *i, *o;
- register int a;
- register int col;
- register int w = upper.width();
- int row(upper.height() - 1);
-
- do {
-
- i = upper.scanLine(row);
- o = output.scanLine(row);
-
- col = w << 2;
- --col;
-
- do {
-
- while (!(a = i[col]) && (col != 3)) {
- --col; --col; --col; --col;
- }
-
- --col;
- o[col] += ((i[col] - o[col]) * a) >> 8;
-
- --col;
- o[col] += ((i[col] - o[col]) * a) >> 8;
-
- --col;
- o[col] += ((i[col] - o[col]) * a) >> 8;
-
- } while (col--);
-
- } while (row--);
-
- return true;
-}
-
-#if 0
-// Not yet...
-bool KImageEffect::blend(
- const QImage & upper,
- const QImage & lower,
- QImage & output,
- const QRect & destRect
-)
-{
- output = lower.copy();
- return output;
-}
-
-#endif
-
-bool KImageEffect::blend(
- int &x, int &y,
- const QImage & upper,
- const QImage & lower,
- QImage & output
-)
-{
- int cx=0, cy=0, cw=upper.width(), ch=upper.height();
-
- if ( upper.width() + x > lower.width() ||
- upper.height() + y > lower.height() ||
- x < 0 || y < 0 ||
- upper.depth() != 32 || lower.depth() != 32 )
- {
- if ( x > lower.width() || y > lower.height() ) return false;
- if ( upper.width()<=0 || upper.height() <= 0 ) return false;
- if ( lower.width()<=0 || lower.height() <= 0 ) return false;
-
- if (x<0) {cx=-x; cw+=x; x=0; };
- if (cw + x > lower.width()) { cw=lower.width()-x; };
- if (y<0) {cy=-y; ch+=y; y=0; };
- if (ch + y > lower.height()) { ch=lower.height()-y; };
-
- if ( cx >= upper.width() || cy >= upper.height() ) return true;
- if ( cw <= 0 || ch <= 0 ) return true;
- }
-
- output.create(cw,ch,32);
-// output.setAlphaBuffer(true); // I should do some benchmarks to see if
- // this is worth the effort
-
- register QRgb *i, *o, *b;
-
- register int a;
- register int j,k;
- for (j=0; j<ch; j++)
- {
- b=reinterpret_cast<QRgb *>(&lower.scanLine(y+j) [ (x+cw) << 2 ]);
- i=reinterpret_cast<QRgb *>(&upper.scanLine(cy+j)[ (cx+cw) << 2 ]);
- o=reinterpret_cast<QRgb *>(&output.scanLine(j) [ cw << 2 ]);
-
- k=cw-1;
- --b; --i; --o;
- do
- {
- while ( !(a=qAlpha(*i)) && k>0 )
- {
- i--;
-// *o=0;
- *o=*b;
- --o; --b;
- k--;
- };
-// *o=0xFF;
- *o = qRgb(qRed(*b) + (((qRed(*i) - qRed(*b)) * a) >> 8),
- qGreen(*b) + (((qGreen(*i) - qGreen(*b)) * a) >> 8),
- qBlue(*b) + (((qBlue(*i) - qBlue(*b)) * a) >> 8));
- --i; --o; --b;
- } while (k--);
- }
-
- return true;
-}
-
-bool KImageEffect::blendOnLower(
- int x, int y,
- const QImage & upper,
- const QImage & lower
-)
-{
- int cx=0, cy=0, cw=upper.width(), ch=upper.height();
-
- if ( upper.depth() != 32 || lower.depth() != 32 ) return false;
- if ( x + cw > lower.width() ||
- y + ch > lower.height() ||
- x < 0 || y < 0 )
- {
- if ( x > lower.width() || y > lower.height() ) return true;
- if ( upper.width()<=0 || upper.height() <= 0 ) return true;
- if ( lower.width()<=0 || lower.height() <= 0 ) return true;
-
- if (x<0) {cx=-x; cw+=x; x=0; };
- if (cw + x > lower.width()) { cw=lower.width()-x; };
- if (y<0) {cy=-y; ch+=y; y=0; };
- if (ch + y > lower.height()) { ch=lower.height()-y; };
-
- if ( cx >= upper.width() || cy >= upper.height() ) return true;
- if ( cw <= 0 || ch <= 0 ) return true;
- }
-
- register uchar *i, *b;
- register int a;
- register int k;
-
- for (int j=0; j<ch; j++)
- {
- b=&lower.scanLine(y+j) [ (x+cw) << 2 ];
- i=&upper.scanLine(cy+j)[ (cx+cw) << 2 ];
-
- k=cw-1;
- --b; --i;
- do
- {
- while ( !(a=*i) && k>0 )
- {
- i-=4; b-=4; k--;
- };
-
- --i; --b;
- *b += ( ((*i - *b) * a) >> 8 );
- --i; --b;
- *b += ( ((*i - *b) * a) >> 8 );
- --i; --b;
- *b += ( ((*i - *b) * a) >> 8 );
- --i; --b;
- } while (k--);
- }
-
- return true;
-}
-
-// For selected icons
-// Code added by David Faure - I couldn't find a similar effect
-// among the existing ones, but I may have overlooked...
-QImage& KImageEffect::selectedImage( QImage &img, const QColor &col )
-{
- if ( img.depth() != 32 ) {
-#ifndef NDEBUG
- qDebug("KImageEffect::selectedImage converting to 32 bit");
-#endif
- img = img.convertDepth(32); // is this ok?
- }
- int w = img.width();
- int h = img.height();
- //QImage outImg(w, h, 32);
-
- if (img.isNull())
- return img;
-
-#define PIX(x,y) (*((QRgb*)img.scanLine(y)+x) & 0x00ffffff)
-
- // Determine background color from the 4 borders,
- // code taken from QPixmap::createHeuristicMask
- QRgb background = PIX(0,0);
- if ( background != PIX(w-1,0) &&
- background != PIX(0,h-1) &&
- background != PIX(w-1,h-1) ) {
- background = PIX(w-1,0);
- if ( background != PIX(w-1,h-1) &&
- background != PIX(0,h-1) &&
- PIX(0,h-1) == PIX(w-1,h-1) ) {
- background = PIX(w-1,h-1);
- }
- }
-#undef PIX
- //qDebug("background: %s",QString::number(background,16).ascii());
-
- img.setAlphaBuffer( true ); // just in case
-
- // Apply an overlay made of the 'selection color' with 50% transparency
- // (that overlay is a mask of the icon, transparent where the icon is transparent)
- int red = col.red();
- int green = col.green();
- int blue = col.blue();
- int alpha = 0x7f;
-
- for ( int y = 0; y < h; y++ ) {
- //QRgb *outp = (QRgb*)outImg.scanLine(y);
- QRgb *p = (QRgb *)img.scanLine(y);
- QRgb *end = p + w;
- for ( ; p < end; p++ /*, outp++*/ ) {
- QRgb pix = *p;
- if ( (pix & 0x00ffffff) != background )
- {
- int r = ((0xff-alpha) * qRed(pix) + alpha * red) >> 8;
- int g = ((0xff-alpha) * qGreen(pix) + alpha * green) >> 8;
- int b = ((0xff-alpha) * qBlue(pix) + alpha * blue) >> 8;
-
- *p = qRgba(r, g, b, qAlpha(pix));
- }
- //else // transparent pixel, copy as is
- // *outp = pix;
- }
- }
- return img;
-}
-
-//
-// ===================================================================
-// Effects originally ported from ImageMagick for PixiePlus, plus a few
-// new ones. (mosfet 12/29/01)
-// ===================================================================
-//
-
-void KImageEffect::normalize(QImage &img)
-{
- int *histogram, threshold_intensity, intense;
- int x, y, i;
-
- unsigned int gray_value;
- unsigned int *normalize_map;
- unsigned int high, low;
-
- // allocate histogram and normalize map
- histogram = (int *)calloc(MaxRGB+1, sizeof(int));
- normalize_map = (unsigned int *)malloc((MaxRGB+1)*sizeof(unsigned int));
- if(!normalize_map || !histogram){
- qWarning("Unable to allocate normalize histogram and map");
- free(normalize_map);
- free(histogram);
- return;
- }
-
- // form histogram
- if(img.depth() > 8){ // DirectClass
- unsigned int *data;
- for(y=0; y < img.height(); ++y){
- data = (unsigned int *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- gray_value = intensityValue(data[x]);
- histogram[gray_value]++;
- }
- }
- }
- else{ // PsudeoClass
- unsigned char *data;
- unsigned int *cTable = img.colorTable();
- for(y=0; y < img.height(); ++y){
- data = (unsigned char *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- gray_value = intensityValue(*(cTable+data[x]));
- histogram[gray_value]++;
- }
- }
- }
-
- // find histogram boundaries by locating the 1 percent levels
- threshold_intensity = (img.width()*img.height())/100;
- intense = 0;
- for(low=0; low < MaxRGB; ++low){
- intense+=histogram[low];
- if(intense > threshold_intensity)
- break;
- }
- intense=0;
- for(high=MaxRGB; high != 0; --high){
- intense+=histogram[high];
- if(intense > threshold_intensity)
- break;
- }
-
- if (low == high){
- // Unreasonable contrast; use zero threshold to determine boundaries.
- threshold_intensity=0;
- intense=0;
- for(low=0; low < MaxRGB; ++low){
- intense+=histogram[low];
- if(intense > threshold_intensity)
- break;
- }
- intense=0;
- for(high=MaxRGB; high != 0; --high)
- {
- intense+=histogram[high];
- if(intense > threshold_intensity)
- break;
- }
- if(low == high)
- return; // zero span bound
- }
-
- // Stretch the histogram to create the normalized image mapping.
- for(i=0; i <= MaxRGB; i++){
- if (i < (int) low)
- normalize_map[i]=0;
- else{
- if(i > (int) high)
- normalize_map[i]=MaxRGB;
- else
- normalize_map[i]=(MaxRGB-1)*(i-low)/(high-low);
- }
- }
- // Normalize
- if(img.depth() > 8){ // DirectClass
- unsigned int *data;
- for(y=0; y < img.height(); ++y){
- data = (unsigned int *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- data[x] = qRgba(normalize_map[qRed(data[x])],
- normalize_map[qGreen(data[x])],
- normalize_map[qBlue(data[x])],
- qAlpha(data[x]));
- }
- }
- }
- else{ // PsudeoClass
- int colors = img.numColors();
- unsigned int *cTable = img.colorTable();
- for(i=0; i < colors; ++i){
- cTable[i] = qRgba(normalize_map[qRed(cTable[i])],
- normalize_map[qGreen(cTable[i])],
- normalize_map[qBlue(cTable[i])],
- qAlpha(cTable[i]));
- }
- }
- free(histogram);
- free(normalize_map);
-}
-
-
-void KImageEffect::equalize(QImage &img)
-{
- int *histogram, *map, *equalize_map;
- int x, y, i, j;
-
- unsigned int high, low;
-
- // allocate histogram and maps
- histogram = (int *)calloc(MaxRGB+1, sizeof(int));
- map = (int *)malloc((MaxRGB+1)*sizeof(unsigned int));
- equalize_map = (int *)malloc((MaxRGB+1)*sizeof(unsigned int));
-
- if(!histogram || !map || !equalize_map){
- qWarning("Unable to allocate equalize histogram and maps");
- free(histogram);
- free(map);
- free(equalize_map);
- return;
- }
- // form histogram
- if(img.depth() > 8){ // DirectClass
- unsigned int *data;
- for(y=0; y < img.height(); ++y){
- data = (unsigned int *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- histogram[intensityValue(data[x])]++;
- }
- }
- }
- else{ // PsudeoClass
- unsigned char *data;
- unsigned int *cTable = img.colorTable();
- for(y=0; y < img.height(); ++y){
- data = (unsigned char *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- histogram[intensityValue(*(cTable+data[x]))]++;
- }
- }
- }
-
- // integrate the histogram to get the equalization map.
- j=0;
- for(i=0; i <= MaxRGB; i++){
- j+=histogram[i];
- map[i]=j;
- }
- free(histogram);
- if(map[MaxRGB] == 0){
- free(equalize_map);
- free(map);
- return;
- }
- // equalize
- low=map[0];
- high=map[MaxRGB];
- for(i=0; i <= MaxRGB; i++)
- equalize_map[i]=(unsigned int)
- ((((double) (map[i]-low))*MaxRGB)/QMAX(high-low,1));
- free(map);
- // stretch the histogram
- if(img.depth() > 8){ // DirectClass
- unsigned int *data;
- for(y=0; y < img.height(); ++y){
- data = (unsigned int *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- data[x] = qRgba(equalize_map[qRed(data[x])],
- equalize_map[qGreen(data[x])],
- equalize_map[qBlue(data[x])],
- qAlpha(data[x]));
- }
- }
- }
- else{ // PsudeoClass
- int colors = img.numColors();
- unsigned int *cTable = img.colorTable();
- for(i=0; i < colors; ++i){
- cTable[i] = qRgba(equalize_map[qRed(cTable[i])],
- equalize_map[qGreen(cTable[i])],
- equalize_map[qBlue(cTable[i])],
- qAlpha(cTable[i]));
- }
- }
- free(equalize_map);
-}
-
-QImage KImageEffect::sample(QImage &src, int w, int h)
-{
- if(w == src.width() && h == src.height())
- return(src);
-
- double *x_offset, *y_offset;
- int j, k, y;
- register int x;
- QImage dest(w, h, src.depth());
-
- x_offset = (double *)malloc(w*sizeof(double));
- y_offset = (double *)malloc(h*sizeof(double));
- if(!x_offset || !y_offset){
- qWarning("Unable to allocate pixels buffer");
- free(x_offset);
- free(y_offset);
- return(src);
- }
-
- // init pixel offsets
- for(x=0; x < w; ++x)
- x_offset[x] = x*src.width()/((double)w);
- for(y=0; y < h; ++y)
- y_offset[y] = y*src.height()/((double)h);
-
- // sample each row
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *srcData, *destData;
- unsigned int *pixels;
- pixels = (unsigned int *)malloc(src.width()*sizeof(unsigned int));
- if(!pixels){
- qWarning("Unable to allocate pixels buffer");
- free(pixels);
- free(x_offset);
- free(y_offset);
- return(src);
- }
- j = (-1);
- for(y=0; y < h; ++y){
- destData = (unsigned int *)dest.scanLine(y);
- if(j != y_offset[y]){
- // read a scan line
- j = (int)(y_offset[y]);
- srcData = (unsigned int *)src.scanLine(j);
- (void)memcpy(pixels, srcData, src.width()*sizeof(unsigned int));
- }
- // sample each column
- for(x=0; x < w; ++x){
- k = (int)(x_offset[x]);
- destData[x] = pixels[k];
- }
- }
- free(pixels);
- }
- else{ // PsudeoClass source image
- unsigned char *srcData, *destData;
- unsigned char *pixels;
- pixels = (unsigned char *)malloc(src.width()*sizeof(unsigned char));
- if(!pixels){
- qWarning("Unable to allocate pixels buffer");
- free(pixels);
- free(x_offset);
- free(y_offset);
- return(src);
- }
- // copy colortable
- dest.setNumColors(src.numColors());
- (void)memcpy(dest.colorTable(), src.colorTable(),
- src.numColors()*sizeof(unsigned int));
-
- // sample image
- j = (-1);
- for(y=0; y < h; ++y){
- destData = (unsigned char *)dest.scanLine(y);
- if(j != y_offset[y]){
- // read a scan line
- j = (int)(y_offset[y]);
- srcData = (unsigned char *)src.scanLine(j);
- (void)memcpy(pixels, srcData, src.width()*sizeof(unsigned char));
- }
- // sample each column
- for(x=0; x < w; ++x){
- k = (int)(x_offset[x]);
- destData[x] = pixels[k];
- }
- }
- free(pixels);
- }
- free(x_offset);
- free(y_offset);
- return(dest);
-}
-
-void KImageEffect::threshold(QImage &img, unsigned int threshold)
-{
- int i, count;
- unsigned int *data;
- if(img.depth() > 8){ // DirectClass
- count = img.width()*img.height();
- data = (unsigned int *)img.bits();
- }
- else{ // PsudeoClass
- count = img.numColors();
- data = (unsigned int *)img.colorTable();
- }
- for(i=0; i < count; ++i)
- data[i] = intensityValue(data[i]) < threshold ? Qt::black.rgb() : Qt::white.rgb();
-}
-
-QImage KImageEffect::charcoal(QImage &src, double factor)
-{
- QImage dest(src);
- dest.detach();
- toGray(dest);
- dest = edge(dest, factor);
- dest = blur(dest, factor);
- normalize(dest);
- dest.invertPixels(false);
- return(dest);
-}
-
-void KImageEffect::hull(const int x_offset, const int y_offset,
- const int polarity, const int columns,
- const int rows,
- unsigned int *f, unsigned int *g)
-{
- int x, y;
-
- unsigned int *p, *q, *r, *s;
- unsigned int v;
- if(f == NULL || g == NULL)
- return;
- p=f+(columns+2);
- q=g+(columns+2);
- r=p+(y_offset*(columns+2)+x_offset);
- for (y=0; y < rows; y++){
- p++;
- q++;
- r++;
- if(polarity > 0)
- for (x=0; x < columns; x++){
- v=(*p);
- if (*r > v)
- v++;
- *q=v;
- p++;
- q++;
- r++;
- }
- else
- for(x=0; x < columns; x++){
- v=(*p);
- if (v > (unsigned int) (*r+1))
- v--;
- *q=v;
- p++;
- q++;
- r++;
- }
- p++;
- q++;
- r++;
- }
- p=f+(columns+2);
- q=g+(columns+2);
- r=q+(y_offset*(columns+2)+x_offset);
- s=q-(y_offset*(columns+2)+x_offset);
- for(y=0; y < rows; y++){
- p++;
- q++;
- r++;
- s++;
- if(polarity > 0)
- for(x=0; x < (int) columns; x++){
- v=(*q);
- if (((unsigned int) (*s+1) > v) && (*r > v))
- v++;
- *p=v;
- p++;
- q++;
- r++;
- s++;
- }
- else
- for (x=0; x < columns; x++){
- v=(*q);
- if (((unsigned int) (*s+1) < v) && (*r < v))
- v--;
- *p=v;
- p++;
- q++;
- r++;
- s++;
- }
- p++;
- q++;
- r++;
- s++;
- }
-}
-
-QImage KImageEffect::despeckle(QImage &src)
-{
- int i, j, x, y;
- unsigned int *blue_channel, *red_channel, *green_channel, *buffer,
- *alpha_channel;
- int packets;
- static const int
- X[4]= {0, 1, 1,-1},
- Y[4]= {1, 0, 1, 1};
-
- unsigned int *destData;
- QImage dest(src.width(), src.height(), 32);
-
- packets = (src.width()+2)*(src.height()+2);
- red_channel = (unsigned int *)calloc(packets, sizeof(unsigned int));
- green_channel = (unsigned int *)calloc(packets, sizeof(unsigned int));
- blue_channel = (unsigned int *)calloc(packets, sizeof(unsigned int));
- alpha_channel = (unsigned int *)calloc(packets, sizeof(unsigned int));
- buffer = (unsigned int *)calloc(packets, sizeof(unsigned int));
- if(!red_channel || ! green_channel || ! blue_channel || ! alpha_channel ||
- !buffer){
- free(red_channel);
- free(green_channel);
- free(blue_channel);
- free(alpha_channel);
- free(buffer);
- return(src);
- }
-
- // copy image pixels to color component buffers
- j = src.width()+2;
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *srcData;
- for(y=0; y < src.height(); ++y){
- srcData = (unsigned int *)src.scanLine(y);
- ++j;
- for(x=0; x < src.width(); ++x){
- red_channel[j] = qRed(srcData[x]);
- green_channel[j] = qGreen(srcData[x]);
- blue_channel[j] = qBlue(srcData[x]);
- alpha_channel[j] = qAlpha(srcData[x]);
- ++j;
- }
- ++j;
- }
- }
- else{ // PsudeoClass source image
- unsigned char *srcData;
- unsigned int *cTable = src.colorTable();
- unsigned int pixel;
- for(y=0; y < src.height(); ++y){
- srcData = (unsigned char *)src.scanLine(y);
- ++j;
- for(x=0; x < src.width(); ++x){
- pixel = *(cTable+srcData[x]);
- red_channel[j] = qRed(pixel);
- green_channel[j] = qGreen(pixel);
- blue_channel[j] = qBlue(pixel);
- alpha_channel[j] = qAlpha(pixel);
- ++j;
- }
- ++j;
- }
- }
- // reduce speckle in red channel
- for(i=0; i < 4; i++){
- hull(X[i],Y[i],1,src.width(),src.height(),red_channel,buffer);
- hull(-X[i],-Y[i],1,src.width(),src.height(),red_channel,buffer);
- hull(-X[i],-Y[i],-1,src.width(),src.height(),red_channel,buffer);
- hull(X[i],Y[i],-1,src.width(),src.height(),red_channel,buffer);
- }
- // reduce speckle in green channel
- for (i=0; i < packets; i++)
- buffer[i]=0;
- for (i=0; i < 4; i++){
- hull(X[i],Y[i],1,src.width(),src.height(),green_channel,buffer);
- hull(-X[i],-Y[i],1,src.width(),src.height(),green_channel,buffer);
- hull(-X[i],-Y[i],-1,src.width(),src.height(),green_channel,buffer);
- hull(X[i],Y[i],-1,src.width(),src.height(),green_channel,buffer);
- }
- // reduce speckle in blue channel
- for (i=0; i < packets; i++)
- buffer[i]=0;
- for (i=0; i < 4; i++){
- hull(X[i],Y[i],1,src.width(),src.height(),blue_channel,buffer);
- hull(-X[i],-Y[i],1,src.width(),src.height(),blue_channel,buffer);
- hull(-X[i],-Y[i],-1,src.width(),src.height(),blue_channel,buffer);
- hull(X[i],Y[i],-1,src.width(),src.height(),blue_channel,buffer);
- }
- // copy color component buffers to despeckled image
- j = dest.width()+2;
- for(y=0; y < dest.height(); ++y)
- {
- destData = (unsigned int *)dest.scanLine(y);
- ++j;
- for (x=0; x < dest.width(); ++x)
- {
- destData[x] = qRgba(red_channel[j], green_channel[j],
- blue_channel[j], alpha_channel[j]);
- ++j;
- }
- ++j;
- }
- free(buffer);
- free(red_channel);
- free(green_channel);
- free(blue_channel);
- free(alpha_channel);
- return(dest);
-}
-
-unsigned int KImageEffect::generateNoise(unsigned int pixel,
- NoiseType noise_type)
-{
-#define NoiseEpsilon 1.0e-5
-#define NoiseMask 0x7fff
-#define SigmaUniform 4.0
-#define SigmaGaussian 4.0
-#define SigmaImpulse 0.10
-#define SigmaLaplacian 10.0
-#define SigmaMultiplicativeGaussian 0.5
-#define SigmaPoisson 0.05
-#define TauGaussian 20.0
-
- double alpha, beta, sigma, value;
- alpha=(double) (rand() & NoiseMask)/NoiseMask;
- if (alpha == 0.0)
- alpha=1.0;
- switch(noise_type){
- case UniformNoise:
- default:
- {
- value=(double) pixel+SigmaUniform*(alpha-0.5);
- break;
- }
- case GaussianNoise:
- {
- double tau;
-
- beta=(double) (rand() & NoiseMask)/NoiseMask;
- sigma=sqrt(-2.0*log(alpha))*cos(2.0*M_PI*beta);
- tau=sqrt(-2.0*log(alpha))*sin(2.0*M_PI*beta);
- value=(double) pixel+
- (sqrt((double) pixel)*SigmaGaussian*sigma)+(TauGaussian*tau);
- break;
- }
- case MultiplicativeGaussianNoise:
- {
- if (alpha <= NoiseEpsilon)
- sigma=MaxRGB;
- else
- sigma=sqrt(-2.0*log(alpha));
- beta=(rand() & NoiseMask)/NoiseMask;
- value=(double) pixel+
- pixel*SigmaMultiplicativeGaussian*sigma*cos(2.0*M_PI*beta);
- break;
- }
- case ImpulseNoise:
- {
- if (alpha < (SigmaImpulse/2.0))
- value=0;
- else
- if (alpha >= (1.0-(SigmaImpulse/2.0)))
- value=MaxRGB;
- else
- value=pixel;
- break;
- }
- case LaplacianNoise:
- {
- if (alpha <= 0.5)
- {
- if (alpha <= NoiseEpsilon)
- value=(double) pixel-MaxRGB;
- else
- value=(double) pixel+SigmaLaplacian*log(2.0*alpha);
- break;
- }
- beta=1.0-alpha;
- if (beta <= (0.5*NoiseEpsilon))
- value=(double) pixel+MaxRGB;
- else
- value=(double) pixel-SigmaLaplacian*log(2.0*beta);
- break;
- }
- case PoissonNoise:
- {
- register int
- i;
-
- for (i=0; alpha > exp(-SigmaPoisson*pixel); i++)
- {
- beta=(double) (rand() & NoiseMask)/NoiseMask;
- alpha=alpha*beta;
- }
- value=i/SigmaPoisson;
- break;
- }
- }
- if(value < 0.0)
- return(0);
- if(value > MaxRGB)
- return(MaxRGB);
- return((unsigned int) (value+0.5));
-}
-
-QImage KImageEffect::addNoise(QImage &src, NoiseType noise_type)
-{
- int x, y;
- QImage dest(src.width(), src.height(), 32);
- unsigned int *destData;
-
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *srcData;
- for(y=0; y < src.height(); ++y){
- srcData = (unsigned int *)src.scanLine(y);
- destData = (unsigned int *)dest.scanLine(y);
- for(x=0; x < src.width(); ++x){
- destData[x] = qRgba(generateNoise(qRed(srcData[x]), noise_type),
- generateNoise(qGreen(srcData[x]), noise_type),
- generateNoise(qBlue(srcData[x]), noise_type),
- qAlpha(srcData[x]));
- }
- }
- }
- else{ // PsudeoClass source image
- unsigned char *srcData;
- unsigned int *cTable = src.colorTable();
- unsigned int pixel;
- for(y=0; y < src.height(); ++y){
- srcData = (unsigned char *)src.scanLine(y);
- destData = (unsigned int *)dest.scanLine(y);
- for(x=0; x < src.width(); ++x){
- pixel = *(cTable+srcData[x]);
- destData[x] = qRgba(generateNoise(qRed(pixel), noise_type),
- generateNoise(qGreen(pixel), noise_type),
- generateNoise(qBlue(pixel), noise_type),
- qAlpha(pixel));
- }
- }
-
- }
- return(dest);
-}
-
-unsigned int KImageEffect::interpolateColor(QImage *image, double x_offset,
- double y_offset,
- unsigned int background)
-{
- double alpha, beta;
- unsigned int p, q, r, s;
- int x, y;
-
- x = (int)x_offset;
- y = (int)y_offset;
- if((x < -1) || (x >= image->width()) || (y < -1) || (y >= image->height()))
- return(background);
- if(image->depth() > 8){
- if((x >= 0) && (y >= 0) && (x < (image->width()-1)) && (y < (image->height()-1))) {
- unsigned int *t = (unsigned int *)image->scanLine(y);
- p = t[x];
- q = t[x+1];
- r = t[x+image->width()];
- s = t[x+image->width()+1];
- }
- else{
- unsigned int *t = (unsigned int *)image->scanLine(y);
- p = background;
- if((x >= 0) && (y >= 0)){
- p = t[x];
- }
- q = background;
- if(((x+1) < image->width()) && (y >= 0)){
- q = t[x+1];
- }
- r = background;
- if((x >= 0) && ((y+1) < image->height())){
- t = (unsigned int *)image->scanLine(y+1);
- r = t[x+image->width()];
- }
- s = background;
- if(((x+1) < image->width()) && ((y+1) < image->height())){
- t = (unsigned int *)image->scanLine(y+1);
- s = t[x+image->width()+1];
- }
-
- }
- }
- else{
- unsigned int *colorTable = (unsigned int *)image->colorTable();
- if((x >= 0) && (y >= 0) && (x < (image->width()-1)) && (y < (image->height()-1))) {
- unsigned char *t;
- t = (unsigned char *)image->scanLine(y);
- p = *(colorTable+t[x]);
- q = *(colorTable+t[x+1]);
- t = (unsigned char *)image->scanLine(y+1);
- r = *(colorTable+t[x]);
- s = *(colorTable+t[x+1]);
- }
- else{
- unsigned char *t;
- p = background;
- if((x >= 0) && (y >= 0)){
- t = (unsigned char *)image->scanLine(y);
- p = *(colorTable+t[x]);
- }
- q = background;
- if(((x+1) < image->width()) && (y >= 0)){
- t = (unsigned char *)image->scanLine(y);
- q = *(colorTable+t[x+1]);
- }
- r = background;
- if((x >= 0) && ((y+1) < image->height())){
- t = (unsigned char *)image->scanLine(y+1);
- r = *(colorTable+t[x]);
- }
- s = background;
- if(((x+1) < image->width()) && ((y+1) < image->height())){
- t = (unsigned char *)image->scanLine(y+1);
- s = *(colorTable+t[x+1]);
- }
-
- }
-
- }
- x_offset -= floor(x_offset);
- y_offset -= floor(y_offset);
- alpha = 1.0-x_offset;
- beta = 1.0-y_offset;
-
- return(qRgba((unsigned char)(beta*(alpha*qRed(p)+x_offset*qRed(q))+y_offset*(alpha*qRed(r)+x_offset*qRed(s))),
- (unsigned char)(beta*(alpha*qGreen(p)+x_offset*qGreen(q))+y_offset*(alpha*qGreen(r)+x_offset*qGreen(s))),
- (unsigned char)(beta*(alpha*qBlue(p)+x_offset*qBlue(q))+y_offset*(alpha*qBlue(r)+x_offset*qBlue(s))),
- (unsigned char)(beta*(alpha*qAlpha(p)+x_offset*qAlpha(q))+y_offset*(alpha*qAlpha(r)+x_offset*qAlpha(s)))));
-}
-
-QImage KImageEffect::implode(QImage &src, double factor,
- unsigned int background)
-{
- double amount, distance, radius;
- double x_center, x_distance, x_scale;
- double y_center, y_distance, y_scale;
- unsigned int *destData;
- int x, y;
-
- QImage dest(src.width(), src.height(), 32);
-
- // compute scaling factor
- x_scale = 1.0;
- y_scale = 1.0;
- x_center = (double)0.5*src.width();
- y_center = (double)0.5*src.height();
- radius=x_center;
- if(src.width() > src.height())
- y_scale = (double)src.width()/src.height();
- else if(src.width() < src.height()){
- x_scale = (double) src.height()/src.width();
- radius = y_center;
- }
- amount=factor/10.0;
- if(amount >= 0)
- amount/=10.0;
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *srcData;
- for(y=0; y < src.height(); ++y){
- srcData = (unsigned int *)src.scanLine(y);
- destData = (unsigned int *)dest.scanLine(y);
- y_distance=y_scale*(y-y_center);
- for(x=0; x < src.width(); ++x){
- destData[x] = srcData[x];
- x_distance = x_scale*(x-x_center);
- distance= x_distance*x_distance+y_distance*y_distance;
- if(distance < (radius*radius)){
- double factor;
- // Implode the pixel.
- factor=1.0;
- if(distance > 0.0)
- factor=
- pow(sin(0.5000000000000001*M_PI*sqrt(distance)/radius),-amount);
- destData[x] = interpolateColor(&src, factor*x_distance/x_scale+x_center,
- factor*y_distance/y_scale+y_center,
- background);
- }
- }
- }
- }
- else{ // PsudeoClass source image
- unsigned char *srcData;
- unsigned char idx;
- unsigned int *cTable = src.colorTable();
- for(y=0; y < src.height(); ++y){
- srcData = (unsigned char *)src.scanLine(y);
- destData = (unsigned int *)dest.scanLine(y);
- y_distance=y_scale*(y-y_center);
- for(x=0; x < src.width(); ++x){
- idx = srcData[x];
- destData[x] = cTable[idx];
- x_distance = x_scale*(x-x_center);
- distance= x_distance*x_distance+y_distance*y_distance;
- if(distance < (radius*radius)){
- double factor;
- // Implode the pixel.
- factor=1.0;
- if(distance > 0.0)
- factor=
- pow(sin(0.5000000000000001*M_PI*sqrt(distance)/radius),-amount);
- destData[x] = interpolateColor(&src, factor*x_distance/x_scale+x_center,
- factor*y_distance/y_scale+y_center,
- background);
- }
- }
- }
-
- }
- return(dest);
-}
-
-QImage KImageEffect::rotate(QImage &img, RotateDirection r)
-{
- QImage dest;
- int x, y;
- if(img.depth() > 8){
- unsigned int *srcData, *destData;
- switch(r){
- case Rotate90:
- dest.create(img.height(), img.width(), img.depth());
- for(y=0; y < img.height(); ++y){
- srcData = (unsigned int *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- destData = (unsigned int *)dest.scanLine(x);
- destData[img.height()-y-1] = srcData[x];
- }
- }
- break;
- case Rotate180:
- dest.create(img.width(), img.height(), img.depth());
- for(y=0; y < img.height(); ++y){
- srcData = (unsigned int *)img.scanLine(y);
- destData = (unsigned int *)dest.scanLine(img.height()-y-1);
- for(x=0; x < img.width(); ++x)
- destData[img.width()-x-1] = srcData[x];
- }
- break;
- case Rotate270:
- dest.create(img.height(), img.width(), img.depth());
- for(y=0; y < img.height(); ++y){
- srcData = (unsigned int *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- destData = (unsigned int *)dest.scanLine(img.width()-x-1);
- destData[y] = srcData[x];
- }
- }
- break;
- default:
- dest = img;
- break;
- }
- }
- else{
- unsigned char *srcData, *destData;
- unsigned int *srcTable, *destTable;
- switch(r){
- case Rotate90:
- dest.create(img.height(), img.width(), img.depth());
- dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.colorTable();
- destTable = (unsigned int *)dest.colorTable();
- for(x=0; x < img.numColors(); ++x)
- destTable[x] = srcTable[x];
- for(y=0; y < img.height(); ++y){
- srcData = (unsigned char *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- destData = (unsigned char *)dest.scanLine(x);
- destData[img.height()-y-1] = srcData[x];
- }
- }
- break;
- case Rotate180:
- dest.create(img.width(), img.height(), img.depth());
- dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.colorTable();
- destTable = (unsigned int *)dest.colorTable();
- for(x=0; x < img.numColors(); ++x)
- destTable[x] = srcTable[x];
- for(y=0; y < img.height(); ++y){
- srcData = (unsigned char *)img.scanLine(y);
- destData = (unsigned char *)dest.scanLine(img.height()-y-1);
- for(x=0; x < img.width(); ++x)
- destData[img.width()-x-1] = srcData[x];
- }
- break;
- case Rotate270:
- dest.create(img.height(), img.width(), img.depth());
- dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.colorTable();
- destTable = (unsigned int *)dest.colorTable();
- for(x=0; x < img.numColors(); ++x)
- destTable[x] = srcTable[x];
- for(y=0; y < img.height(); ++y){
- srcData = (unsigned char *)img.scanLine(y);
- for(x=0; x < img.width(); ++x){
- destData = (unsigned char *)dest.scanLine(img.width()-x-1);
- destData[y] = srcData[x];
- }
- }
- break;
- default:
- dest = img;
- break;
- }
-
- }
- return(dest);
-}
-
-void KImageEffect::solarize(QImage &img, double factor)
-{
- int i, count;
- int threshold;
- unsigned int *data;
-
- threshold = (int)(factor*(MaxRGB+1)/100.0);
- if(img.depth() < 32){
- data = (unsigned int *)img.colorTable();
- count = img.numColors();
- }
- else{
- data = (unsigned int *)img.bits();
- count = img.width()*img.height();
- }
- for(i=0; i < count; ++i){
- data[i] = qRgba(qRed(data[i]) > threshold ? MaxRGB-qRed(data[i]) : qRed(data[i]),
- qGreen(data[i]) > threshold ? MaxRGB-qGreen(data[i]) : qGreen(data[i]),
- qBlue(data[i]) > threshold ? MaxRGB-qBlue(data[i]) : qBlue(data[i]),
- qAlpha(data[i]));
- }
-}
-
-QImage KImageEffect::spread(QImage &src, unsigned int amount)
-{
- int quantum, x, y;
- int x_distance, y_distance;
- if(src.width() < 3 || src.height() < 3)
- return(src);
- QImage dest(src);
- dest.detach();
- quantum=(amount+1) >> 1;
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p, *q;
- for(y=0; y < src.height(); y++){
- q = (unsigned int *)dest.scanLine(y);
- for(x=0; x < src.width(); x++){
- x_distance = x + ((rand() & (amount+1))-quantum);
- y_distance = y + ((rand() & (amount+1))-quantum);
- x_distance = QMIN(x_distance, src.width()-1);
- y_distance = QMIN(y_distance, src.height()-1);
- if(x_distance < 0)
- x_distance = 0;
- if(y_distance < 0)
- y_distance = 0;
- p = (unsigned int *)src.scanLine(y_distance);
- p += x_distance;
- *q++=(*p);
- }
- }
- }
- else{ // PsudeoClass source image
- // just do colortable values
- unsigned char *p, *q;
- for(y=0; y < src.height(); y++){
- q = (unsigned char *)dest.scanLine(y);
- for(x=0; x < src.width(); x++){
- x_distance = x + ((rand() & (amount+1))-quantum);
- y_distance = y + ((rand() & (amount+1))-quantum);
- x_distance = QMIN(x_distance, src.width()-1);
- y_distance = QMIN(y_distance, src.height()-1);
- if(x_distance < 0)
- x_distance = 0;
- if(y_distance < 0)
- y_distance = 0;
- p = (unsigned char *)src.scanLine(y_distance);
- p += x_distance;
- *q++=(*p);
- }
- }
- }
- return(dest);
-}
-
-QImage KImageEffect::swirl(QImage &src, double degrees,
- unsigned int background)
-{
- double cosine, distance, factor, radius, sine, x_center, x_distance,
- x_scale, y_center, y_distance, y_scale;
- int x, y;
- unsigned int *q;
- QImage dest(src.width(), src.height(), 32);
-
- // compute scaling factor
- x_center = src.width()/2.0;
- y_center = src.height()/2.0;
- radius = QMAX(x_center,y_center);
- x_scale=1.0;
- y_scale=1.0;
- if(src.width() > src.height())
- y_scale=(double)src.width()/src.height();
- else if(src.width() < src.height())
- x_scale=(double)src.height()/src.width();
- degrees=DegreesToRadians(degrees);
- // swirl each row
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p;
- for(y=0; y < src.height(); y++){
- p = (unsigned int *)src.scanLine(y);
- q = (unsigned int *)dest.scanLine(y);
- y_distance = y_scale*(y-y_center);
- for(x=0; x < src.width(); x++){
- // determine if the pixel is within an ellipse
- *q=(*p);
- x_distance = x_scale*(x-x_center);
- distance = x_distance*x_distance+y_distance*y_distance;
- if (distance < (radius*radius)){
- // swirl
- factor = 1.0-sqrt(distance)/radius;
- sine = sin(degrees*factor*factor);
- cosine = cos(degrees*factor*factor);
- *q = interpolateColor(&src,
- (cosine*x_distance-sine*y_distance)/x_scale+x_center,
- (sine*x_distance+cosine*y_distance)/y_scale+y_center,
- background);
- }
- p++;
- q++;
- }
- }
- }
- else{ // PsudeoClass source image
- unsigned char *p;
- unsigned int *cTable = (unsigned int *)src.colorTable();
- for(y=0; y < src.height(); y++){
- p = (unsigned char *)src.scanLine(y);
- q = (unsigned int *)dest.scanLine(y);
- y_distance = y_scale*(y-y_center);
- for(x=0; x < src.width(); x++){
- // determine if the pixel is within an ellipse
- *q = *(cTable+(*p));
- x_distance = x_scale*(x-x_center);
- distance = x_distance*x_distance+y_distance*y_distance;
- if (distance < (radius*radius)){
- // swirl
- factor = 1.0-sqrt(distance)/radius;
- sine = sin(degrees*factor*factor);
- cosine = cos(degrees*factor*factor);
- *q = interpolateColor(&src,
- (cosine*x_distance-sine*y_distance)/x_scale+x_center,
- (sine*x_distance+cosine*y_distance)/y_scale+y_center,
- background);
- }
- p++;
- q++;
- }
- }
-
- }
- return(dest);
-}
-
-QImage KImageEffect::wave(QImage &src, double amplitude, double wavelength,
- unsigned int background)
-{
- double *sine_map;
- int x, y;
- unsigned int *q;
-
- QImage dest(src.width(), src.height() + (int)(2*fabs(amplitude)), 32);
- // allocate sine map
- sine_map = (double *)malloc(dest.width()*sizeof(double));
- if(!sine_map)
- return(src);
- for(x=0; x < dest.width(); ++x)
- sine_map[x]=fabs(amplitude)+amplitude*sin((2*M_PI*x)/wavelength);
- // wave image
- for(y=0; y < dest.height(); ++y){
- q = (unsigned int *)dest.scanLine(y);
- for (x=0; x < dest.width(); x++){
- *q=interpolateColor(&src, x, (int)(y-sine_map[x]), background);
- ++q;
- }
- }
- free(sine_map);
- return(dest);
-}
-
-QImage KImageEffect::oilPaint(QImage &src, int radius)
-{
- // TODO 8bpp src!
- if(src.depth() < 32){
- qWarning("Oil Paint source image < 32bpp. Convert before using!");
- return(src);
- }
- int j, k, i, x, y;
- unsigned int *histogram;
- unsigned int *s;
- unsigned int count;
-
- unsigned int *srcData, *destData;
-
- QImage dest(src);
- dest.detach();
- histogram = (unsigned int *) malloc((MaxRGB+1)*sizeof(unsigned int));
- if(!histogram)
- return(src);
- // paint each row
- k=0;
- for(y = radius; y < src.height(); ++y){
- srcData = (unsigned int *)src.scanLine(y-radius);
- destData = (unsigned int *)dest.scanLine(y);
- srcData += radius*src.width()+radius;
- destData += radius;
- for(x=radius; x < src.width()-radius; ++x){
- // determine most frequent color
- count = 0;
- for(i=0; i < MaxRGB+1; ++i)
- histogram[i] = 0;
- for(i=0; i < radius; ++i){
- s = srcData-(radius-1)*src.width()-i-1;
- for(j =0; j < (2*i+1); ++j){
- k = intensityValue(*s);
- histogram[k]++;
- if(histogram[k] > count){
- *destData = *s;
- count = histogram[k];
- }
- ++s;
- }
- s = srcData+(radius-i)*src.width()-i-1;
- for(j =0; j < (2*i+1); ++j){
- k = intensityValue(*s);
- histogram[k]++;
- if(histogram[k] > count){
- *destData = *s;
- count = histogram[k];
- }
- ++s;
- }
- }
- s = srcData-radius;
- for(j =0; j < (2*i+1); ++j){
- k = intensityValue(*s);
- histogram[k]++;
- if(histogram[k] > count){
- *destData = *s;
- count = histogram[k];
- }
- ++s;
- }
- ++srcData;
- ++destData;
- }
- }
- free(histogram);
- return(dest);
-}
-
-//
-// The following methods work by computing a value from neighboring pixels
-// (mosfet 12/28/01)
-//
-
-QImage KImageEffect::edge(QImage &src, double factor)
-{
-#define Edge(weight) \
- total_red+=(weight)*qRed(*s); \
- total_green+=(weight)*qGreen(*s); \
- total_blue+=(weight)*qBlue(*s); \
- total_opacity+=(weight)*qAlpha(*s); \
- s++;
-
-#define Edge256(weight) \
- total_red+=(weight)*qRed(*(cTable+(*s))); \
- total_green+=(weight)*qGreen(*(cTable+(*s))); \
- total_blue+=(weight)*qBlue(*(cTable+(*s))); \
- total_opacity+=(weight)*qAlpha(*(cTable+(*s))); \
- s++;
-
- if(src.width() < 3 || src.height() < 3)
- return(src);
-
- double total_blue, total_green, total_opacity, total_red, weight;
-
- int x, y;
-
- unsigned int *q;
-
- QImage dest(src.width(), src.height(), 32);
- weight=factor/8.0;
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p, *s;
- for(y=0; y < src.height(); ++y){
- p = (unsigned int *)src.scanLine(QMIN(QMAX(y-1,0),src.height()-3));
- q = (unsigned int *)dest.scanLine(y);
- // edge detect this row of pixels.
- *q++=(*(p+src.width()));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- total_opacity=0.0;
- s=p;
- Edge(-weight/8); Edge(-weight/8) Edge(-weight/8);
- s=p+src.width();
- Edge(-weight/8); Edge(weight); Edge(-weight/8);
- s=p+2*src.width();
- Edge(-weight/8); Edge(-weight/8); Edge(-weight/8);
- *q = qRgba((unsigned char)((total_red < 0) ? 0 : (total_red > MaxRGB) ? MaxRGB : total_red),
- (unsigned char)((total_green < 0) ? 0 : (total_green > MaxRGB) ? MaxRGB : total_green),
- (unsigned char)((total_blue < 0) ? 0 : (total_blue > MaxRGB) ? MaxRGB : total_blue),
- (unsigned char)((total_opacity < 0) ? 0 : (total_opacity > MaxRGB) ? MaxRGB : total_opacity));
- p++;
- q++;
- }
- p++;
- *q++=(*p);
- }
- }
- else{ // PsudeoClass source image
- unsigned char *p, *p2, *p3, *s;
- unsigned int *cTable = src.colorTable();
- int scanLineIdx;
- for(y=0; y < src.height(); ++y){
- scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
- p = (unsigned char *)src.scanLine(scanLineIdx);
- p2 = (unsigned char *)src.scanLine(scanLineIdx+1);
- p3 = (unsigned char *)src.scanLine(scanLineIdx+2);
- q = (unsigned int *)dest.scanLine(y);
- // edge detect this row of pixels.
- *q++=(*(cTable+(*p2)));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- total_opacity=0.0;
- s=p;
- Edge256(-weight/8); Edge256(-weight/8) Edge256(-weight/8);
- s=p2;
- Edge256(-weight/8); Edge256(weight); Edge256(-weight/8);
- s=p3;
- Edge256(-weight/8); Edge256(-weight/8); Edge256(-weight/8);
- *q = qRgba((unsigned char)((total_red < 0) ? 0 : (total_red > MaxRGB) ? MaxRGB : total_red),
- (unsigned char)((total_green < 0) ? 0 : (total_green > MaxRGB) ? MaxRGB : total_green),
- (unsigned char)((total_blue < 0) ? 0 : (total_blue > MaxRGB) ? MaxRGB : total_blue),
- (unsigned char)((total_opacity < 0) ? 0 : (total_opacity > MaxRGB) ? MaxRGB : total_opacity));
- p++;
- p2++;
- p3++;
- q++;
- }
- p++;
- *q++=(*(cTable+(*p)));
- }
- }
- return(dest);
-}
-
-QImage KImageEffect::sharpen(QImage &src, double factor)
-{
-#define Sharpen(weight) \
- total_red+=(weight)*qRed(*s); \
- total_green+=(weight)*qGreen(*s); \
- total_blue+=(weight)*qBlue(*s); \
- total_opacity+=(weight)*qAlpha(*s); \
- s++;
-
-#define Sharpen256(weight) \
- total_red+=(weight)*qRed(*(cTable+(*s))); \
- total_green+=(weight)*qGreen(*(cTable+(*s))); \
- total_blue+=(weight)*qBlue(*(cTable+(*s))); \
- total_opacity+=(weight)*qAlpha(*(cTable+(*s))); \
- s++;
-
- if(src.width() < 3 || src.height() < 3)
- return(src);
-
- double total_blue, total_green, total_opacity, total_red;
- double quantum, weight;
- unsigned char r, g, b, a;
-
- int x, y;
- unsigned int *q;
-
- QImage dest(src.width(), src.height(), 32);
- weight = ((100.0-factor)/2.0+13.0);
- quantum = QMAX(weight-12.0, 1.0);
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p, *s;
- for(y=0; y < src.height(); ++y){
- p = (unsigned int *)src.scanLine(QMIN(QMAX(y-1,0),src.height()-3));
- q = (unsigned int *)dest.scanLine(y);
- // sharpen this row of pixels.
- *q++=(*(p+src.width()));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- total_opacity=0.0;
- s=p;
- Sharpen(-1); Sharpen(-2); Sharpen(-1);
- s=p+src.width();
- Sharpen(-2); Sharpen(weight); Sharpen(-2);
- s=p+2*src.width();
- Sharpen(-1); Sharpen(-2); Sharpen(-1);
- if(total_red < 0)
- r=0;
- else if(total_red > (int)(MaxRGB*quantum))
- r = (unsigned char)MaxRGB;
- else
- r = (unsigned char)((total_red+(quantum/2.0))/quantum);
-
- if(total_green < 0)
- g = 0;
- else if(total_green > (int)(MaxRGB*quantum))
- g = (unsigned char)MaxRGB;
- else
- g = (unsigned char)((total_green+(quantum/2.0))/quantum);
-
- if(total_blue < 0)
- b = 0;
- else if(total_blue > (int)(MaxRGB*quantum))
- b = (unsigned char)MaxRGB;
- else
- b = (unsigned char)((total_blue+(quantum/2.0))/quantum);
-
- if(total_opacity < 0)
- a = 0;
- else if(total_opacity > (int)(MaxRGB*quantum))
- a = (unsigned char)MaxRGB;
- else
- a= (unsigned char)((total_opacity+(quantum/2.0))/quantum);
-
- *q = qRgba(r, g, b, a);
-
- p++;
- q++;
- }
- p++;
- *q++=(*p);
- }
- }
- else{ // PsudeoClass source image
- unsigned char *p, *p2, *p3, *s;
- unsigned int *cTable = src.colorTable();
- int scanLineIdx;
- for(y=0; y < src.height(); ++y){
- scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
- p = (unsigned char *)src.scanLine(scanLineIdx);
- p2 = (unsigned char *)src.scanLine(scanLineIdx+1);
- p3 = (unsigned char *)src.scanLine(scanLineIdx+2);
- q = (unsigned int *)dest.scanLine(y);
- // sharpen this row of pixels.
- *q++=(*(cTable+(*p2)));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- total_opacity=0.0;
- s=p;
- Sharpen256(-1); Sharpen256(-2); Sharpen256(-1);
- s=p2;
- Sharpen256(-2); Sharpen256(weight); Sharpen256(-2);
- s=p3;
- Sharpen256(-1); Sharpen256(-2); Sharpen256(-1);
- if(total_red < 0)
- r=0;
- else if(total_red > (int)(MaxRGB*quantum))
- r = (unsigned char)MaxRGB;
- else
- r = (unsigned char)((total_red+(quantum/2.0))/quantum);
-
- if(total_green < 0)
- g = 0;
- else if(total_green > (int)(MaxRGB*quantum))
- g = (unsigned char)MaxRGB;
- else
- g = (unsigned char)((total_green+(quantum/2.0))/quantum);
-
- if(total_blue < 0)
- b = 0;
- else if(total_blue > (int)(MaxRGB*quantum))
- b = (unsigned char)MaxRGB;
- else
- b = (unsigned char)((total_blue+(quantum/2.0))/quantum);
-
- if(total_opacity < 0)
- a = 0;
- else if(total_opacity > (int)(MaxRGB*quantum))
- a = (unsigned char)MaxRGB;
- else
- a = (unsigned char)((total_opacity+(quantum/2.0))/quantum);
-
- *q = qRgba(r, g, b, a);
-
- p++;
- p2++;
- p3++;
- q++;
- }
- p++;
- *q++=(*(cTable+(*p)));
- }
- }
- return(dest);
-}
-
-QImage KImageEffect::emboss(QImage &src)
-{
-#define Emboss(weight) \
- total_red+=(weight)*qRed(*s); \
- total_green+=(weight)*qGreen(*s); \
- total_blue+=(weight)*qBlue(*s); \
- s++;
-
-#define Emboss256(weight) \
- total_red+=(weight)*qRed(*(cTable+(*s))); \
- total_green+=(weight)*qGreen(*(cTable+(*s))); \
- total_blue+=(weight)*qBlue(*(cTable+(*s))); \
- s++;
-
- if(src.width() < 3 || src.height() < 3)
- return(src);
-
- double total_blue, total_green, total_red;
- int x, y;
- unsigned int *q;
-
- QImage dest(src.width(), src.height(), 32);
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p, *s;
- for(y=0; y < src.height(); ++y){
- p = (unsigned int *)src.scanLine(QMIN(QMAX(y-1,0),src.height()-3));
- q = (unsigned int *)dest.scanLine(y);
- // emboss this row of pixels.
- *q++=(*(p+src.width()));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- s=p;
- Emboss(-1); Emboss(-2); Emboss( 0);
- s=p+src.width();
- Emboss(-2); Emboss( 0); Emboss( 2);
- s=p+2*src.width();
- Emboss( 0); Emboss( 2); Emboss( 1);
- total_red += (MaxRGB+1)/2;
- total_green += (MaxRGB+1)/2;
- total_blue += (MaxRGB+1)/2;
- *q = qRgba((unsigned char)((total_red < 0) ? 0 : (total_red > MaxRGB) ? MaxRGB : total_red),
- (unsigned char)((total_green < 0) ? 0 : (total_green > MaxRGB) ? MaxRGB : total_green),
- (unsigned char)((total_blue < 0) ? 0 : (total_blue > MaxRGB) ? MaxRGB : total_blue),
- 255);
- p++;
- q++;
- }
- p++;
- *q++=(*p);
- }
- }
- else{ // PsudeoClass source image
- unsigned char *p, *p2, *p3, *s;
- unsigned int *cTable = src.colorTable();
- int scanLineIdx;
- for(y=0; y < src.height(); ++y){
- scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
- p = (unsigned char *)src.scanLine(scanLineIdx);
- p2 = (unsigned char *)src.scanLine(scanLineIdx+1);
- p3 = (unsigned char *)src.scanLine(scanLineIdx+2);
- q = (unsigned int *)dest.scanLine(y);
- // emboss this row of pixels.
- *q++=(*(cTable+(*p2)));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- s=p;
- Emboss256(-1); Emboss256(-2); Emboss256(0);
- s=p2;
- Emboss256(-2); Emboss256(0); Emboss256(2);
- s=p3;
- Emboss256(0); Emboss256(2); Emboss256(1);
- total_red += (MaxRGB+1)/2;
- total_green += (MaxRGB+1)/2;
- total_blue += (MaxRGB+1)/2;
- *q = qRgba((unsigned char)((total_red < 0) ? 0 : (total_red > MaxRGB) ? MaxRGB : total_red),
- (unsigned char)((total_green < 0) ? 0 : (total_green > MaxRGB) ? MaxRGB : total_green),
- (unsigned char)((total_blue < 0) ? 0 : (total_blue > MaxRGB) ? MaxRGB : total_blue),
- 255);
- p++;
- p2++;
- p3++;
- q++;
- }
- p++;
- *q++=(*(cTable+(*p)));
- }
- }
- toGray(dest);
- normalize(dest);
- return(dest);
-}
-
-QImage KImageEffect::shade(QImage &src, bool color_shading, double azimuth,
- double elevation)
-{
- struct PointInfo{
- double x, y, z;
- };
-
- double distance, normal_distance, shade;
- int x, y;
-
- struct PointInfo light, normal;
-
- unsigned int *q;
-
- QImage dest(src.width(), src.height(), 32);
-
- azimuth = DegreesToRadians(azimuth);
- elevation = DegreesToRadians(elevation);
- light.x = MaxRGB*cos(azimuth)*cos(elevation);
- light.y = MaxRGB*sin(azimuth)*cos(elevation);
- light.z = MaxRGB*sin(elevation);
- normal.z= 2*MaxRGB; // constant Z of surface normal
-
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p, *s0, *s1, *s2;
- for(y=0; y < src.height(); ++y){
- p = (unsigned int *)src.scanLine(QMIN(QMAX(y-1,0),src.height()-3));
- q = (unsigned int *)dest.scanLine(y);
- // shade this row of pixels.
- *q++=(*(p+src.width()));
- p++;
- s0 = p;
- s1 = p + src.width();
- s2 = p + 2*src.width();
- for(x=1; x < src.width()-1; ++x){
- // determine the surface normal and compute shading.
- normal.x=intensityValue(*(s0-1))+intensityValue(*(s1-1))+intensityValue(*(s2-1))-
- (double) intensityValue(*(s0+1))-(double) intensityValue(*(s1+1))-
- (double) intensityValue(*(s2+1));
- normal.y=intensityValue(*(s2-1))+intensityValue(*s2)+intensityValue(*(s2+1))-
- (double) intensityValue(*(s0-1))-(double) intensityValue(*s0)-
- (double) intensityValue(*(s0+1));
- if((normal.x == 0) && (normal.y == 0))
- shade=light.z;
- else{
- shade=0.0;
- distance=normal.x*light.x+normal.y*light.y+normal.z*light.z;
- if (distance > 0.0){
- normal_distance=
- normal.x*normal.x+normal.y*normal.y+normal.z*normal.z;
- if(fabs(normal_distance) > 0.0000001)
- shade=distance/sqrt(normal_distance);
- }
- }
- if(!color_shading){
- *q = qRgba((unsigned char)(shade),
- (unsigned char)(shade),
- (unsigned char)(shade),
- qAlpha(*s1));
- }
- else{
- *q = qRgba((unsigned char)((shade*qRed(*s1))/(MaxRGB+1)),
- (unsigned char)((shade*qGreen(*s1))/(MaxRGB+1)),
- (unsigned char)((shade*qBlue(*s1))/(MaxRGB+1)),
- qAlpha(*s1));
- }
- ++s0;
- ++s1;
- ++s2;
- q++;
- }
- *q++=(*s1);
- }
- }
- else{ // PsudeoClass source image
- unsigned char *p, *s0, *s1, *s2;
- int scanLineIdx;
- unsigned int *cTable = (unsigned int *)src.colorTable();
- for(y=0; y < src.height(); ++y){
- scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
- p = (unsigned char *)src.scanLine(scanLineIdx);
- q = (unsigned int *)dest.scanLine(y);
- // shade this row of pixels.
- s0 = p;
- s1 = (unsigned char *) src.scanLine(scanLineIdx+1);
- s2 = (unsigned char *) src.scanLine(scanLineIdx+2);
- *q++=(*(cTable+(*s1)));
- ++p;
- ++s0;
- ++s1;
- ++s2;
- for(x=1; x < src.width()-1; ++x){
- // determine the surface normal and compute shading.
- normal.x=intensityValue(*(cTable+(*(s0-1))))+intensityValue(*(cTable+(*(s1-1))))+intensityValue(*(cTable+(*(s2-1))))-
- (double) intensityValue(*(cTable+(*(s0+1))))-(double) intensityValue(*(cTable+(*(s1+1))))-
- (double) intensityValue(*(cTable+(*(s2+1))));
- normal.y=intensityValue(*(cTable+(*(s2-1))))+intensityValue(*(cTable+(*s2)))+intensityValue(*(cTable+(*(s2+1))))-
- (double) intensityValue(*(cTable+(*(s0-1))))-(double) intensityValue(*(cTable+(*s0)))-
- (double) intensityValue(*(cTable+(*(s0+1))));
- if((normal.x == 0) && (normal.y == 0))
- shade=light.z;
- else{
- shade=0.0;
- distance=normal.x*light.x+normal.y*light.y+normal.z*light.z;
- if (distance > 0.0){
- normal_distance=
- normal.x*normal.x+normal.y*normal.y+normal.z*normal.z;
- if(fabs(normal_distance) > 0.0000001)
- shade=distance/sqrt(normal_distance);
- }
- }
- if(!color_shading){
- *q = qRgba((unsigned char)(shade),
- (unsigned char)(shade),
- (unsigned char)(shade),
- qAlpha(*(cTable+(*s1))));
- }
- else{
- *q = qRgba((unsigned char)((shade*qRed(*(cTable+(*s1))))/(MaxRGB+1)),
- (unsigned char)((shade*qGreen(*(cTable+(*s1))))/(MaxRGB+1)),
- (unsigned char)((shade*qBlue(*(cTable+(*s1))))/(MaxRGB+1)),
- qAlpha(*s1));
- }
- ++s0;
- ++s1;
- ++s2;
- q++;
- }
- *q++=(*(cTable+(*s1)));
- }
- }
- return(dest);
-}
-
-QImage KImageEffect::blur(QImage &src, double factor)
-{
-
-#define Blur(weight) \
- total_red+=(weight)*qRed(*s); \
- total_green+=(weight)*qGreen(*s); \
- total_blue+=(weight)*qBlue(*s); \
- total_opacity+=(weight)*qAlpha(*s); \
- s++;
-
-#define Blur256(weight) \
- total_red+=(weight)*qRed(*(cTable+(*s))); \
- total_green+=(weight)*qGreen(*(cTable+(*s))); \
- total_blue+=(weight)*qBlue(*(cTable+(*s))); \
- total_opacity+=(weight)*qAlpha(*(cTable+(*s))); \
- s++;
-
- if(src.width() < 3 || src.height() < 3)
- return(src);
-
- double quantum, total_blue, total_green, total_opacity, total_red, weight;
-
- int x, y;
- unsigned int *q;
-
- QImage dest(src.width(), src.height(), 32);
- weight=((100.0-factor)/2)+1;
- quantum = QMAX(weight+12.0, 1.0);
- if(src.depth() > 8){ // DirectClass source image
- unsigned int *p, *s;
- for(y=0; y < src.height(); ++y){
- p = (unsigned int *)src.scanLine(QMIN(QMAX(y-1,0),src.height()-3));
- q = (unsigned int *)dest.scanLine(y);
- // blur this row of pixels.
- *q++=(*(p+src.width()));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- total_opacity=0.0;
- s=p;
- Blur(1); Blur(2); Blur(1);
- s=p+src.width();
- Blur(2); Blur(weight); Blur(2);
- s=p+2*src.width();
- Blur(1); Blur(2); Blur(1);
- *q = qRgba((unsigned char)((total_red+(quantum/2))/quantum),
- (unsigned char)((total_green+(quantum/2))/quantum),
- (unsigned char)((total_blue+(quantum/2))/quantum),
- (unsigned char)((total_opacity+(quantum/2))/quantum));
- p++;
- q++;
- }
- p++;
- *q++=(*p);
- }
- }
- else{ // PsudeoClass source image
- unsigned char *p, *p2, *p3, *s;
- unsigned int *cTable = src.colorTable();
- int scanLineIdx;
- for(y=0; y < src.height(); ++y){
- scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
- p = (unsigned char *)src.scanLine(scanLineIdx);
- p2 = (unsigned char *)src.scanLine(scanLineIdx+1);
- p3 = (unsigned char *)src.scanLine(scanLineIdx+2);
- q = (unsigned int *)dest.scanLine(y);
- // blur this row of pixels.
- *q++=(*(cTable+(*p2)));
- for(x=1; x < src.width()-1; ++x){
- // compute weighted average of target pixel color components.
- total_red=0.0;
- total_green=0.0;
- total_blue=0.0;
- total_opacity=0.0;
- s=p;
- Blur256(1); Blur256(2); Blur256(1);
- s=p2;
- Blur256(2); Blur256(weight); Blur256(2);
- s=p3;
- Blur256(1); Blur256(2); Blur256(1);
- *q = qRgba((unsigned char)((total_red+(quantum/2))/quantum),
- (unsigned char)((total_green+(quantum/2))/quantum),
- (unsigned char)((total_blue+(quantum/2))/quantum),
- (unsigned char)((total_opacity+(quantum/2))/quantum));
- p++;
- p2++;
- p3++;
- q++;
- }
- p++;
- *q++=(*(cTable+(*p)));
- }
- }
- return(dest);
-}
-
-// High quality, expensive HSV contrast. You can do a faster one by just
-// taking a grayscale threshold (ie: 128) and incrementing RGB color
-// channels above it and decrementing those below it, but this gives much
-// better results. (mosfet 12/28/01)
-void KImageEffect::contrastHSV(QImage &img, bool sharpen)
-{
- int i, sign;
- unsigned int *data;
- int count;
- double brightness, scale, theta;
- QColor c;
- int h, s, v;
-
- sign = sharpen ? 1 : -1;
- scale=0.5000000000000001;
- if(img.depth() > 8){
- count = img.width()*img.height();
- data = (unsigned int *)img.bits();
- }
- else{
- count = img.numColors();
- data = (unsigned int *)img.colorTable();
- }
- for(i=0; i < count; ++i){
- c.setRgb(data[i]);
- c.hsv(&h, &s, &v);
- brightness = v/255.0;
- theta=(brightness-0.5)*M_PI;
- brightness+=scale*(((scale*((sin(theta)+1.0)))-brightness)*sign);
- if (brightness > 1.0)
- brightness=1.0;
- else
- if (brightness < 0)
- brightness=0.0;
- v = (int)(brightness*255);
- c.setHsv(h, s, v);
- data[i] = qRgba(c.red(), c.green(), c.blue(), qAlpha(data[i]));
- }
-}
-
-
-
-
/start/Scribus/scribus/kimageeffect.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/page.cpp
===================================================================
--- start/Scribus/scribus/page.cpp (revision 427)
+++ start/Scribus/scribus/page.cpp (nonexistent)
@@ -1,6707 +0,0 @@
-/***************************************************************************
- page.cpp - description
- -------------------
- begin : Sat Apr 7 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 <iostream.h>
-
-#include "page.h"
-#include "page.moc"
-#include "pageitem.h"
-#include "serializer.h"
-#include "scribusXml.h"
-#include "kimageeffect.h"
-#include <qapplication.h>
-#include <qcolor.h>
-#include <qrect.h>
-#include <qpointarray.h>
-#include <qregion.h>
-#include <qcursor.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcstring.h>
-#include <qdragobject.h>
-#include <qurl.h>
-#include <cmath>
-#include <cstdio>
-#include <cstdlib>
-#include <qbitmap.h>
-#include <qwmatrix.h>
-#include <qpopupmenu.h>
-
-#ifdef HAVE_TIFF
- #include <tiffio.h>
-#endif
-#ifdef HAVE_CMS
- #include <lcms.h>
-#endif
-extern int PolyC;
-extern int PolyFd;
-extern float PolyF;
-extern bool PolyS;
-extern float PolyR;
-extern ProfilesL InputProfiles;
-extern QPixmap loadIcon(QString nam);
-extern float Cwidth(ScribusDoc *doc, QPainter *p, QString name, QString ch, int Siz, QString ch2 = " ");
-#ifdef HAVE_CMS
-QImage ProofPict(QImage *Im, QString Prof, int Rend, cmsHPROFILE emPr=0);
-#else
-QImage ProofPict(QImage *Im, QString Prof, int Rend);
-#endif
-extern FPointArray RegularPolygonF(float w, float h, uint c, bool star, float factor, float rota);
-extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
-extern float xy2Deg(float x, float y);
-extern void BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4);
-extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level);
-#ifdef HAVE_FREETYPE
-extern FPointArray traceCharacter(PageItem *b, QString chx, uint ind, float *x, float *y);
-#endif
-
-Page::Page(QWidget *pa, int x, int y, int b, int h, ScribusDoc *doc, QScrollView *view)
- : QWidget(pa)
-{
- resize(b, h);
- move(x, y);
- setEraseColor(doc->papColor);
- doku = doc;
- Anz = view;
- Items.clear();
- Items.setAutoDelete(true);
- Margins.Top = 9;
- Margins.Left = 9;
- Margins.Right = 9;
- Margins.Bottom = 40;
- SelItem.clear();
- ClRe = -1;
- ClRe2 = -1;
- setAcceptDrops(true);
- emit DocChanged();
- doku->DragP = false;
- Imoved = false;
- Mpressed = false;
- MidButt = false;
- HaveSelRect = false;
- PageNam = "";
- LeftPg = false;
- Magnify = false;
- FirstPoly = true;
- EdPoints = true;
- MoveSym = false;
- GroupSel = false;
- DraggedGroup = false;
- GroupX = 0;
- GroupY = 0;
- GroupW = 0;
- GroupH = 0;
- DrHY = -1;
- DrVX = -1;
- XGuides.clear();
- YGuides.clear();
- GyM = 0;
- MoveGY = false;
- GxM = 0;
- MoveGX = false;
-}
-
-void Page::dragLeaveEvent(QDragLeaveEvent *e)
-{
- if (DraggedGroup)
- {
- float gx, gy, gw, gh;
- getGroupRectScreen(&gx, &gy, &gw, &gh);
- repaint(static_cast<int>(gx), static_cast<int>(gy), static_cast<int>(gw), static_cast<int>(gh));
- DraggedGroup = false;
- }
-}
-
-void Page::dragEnterEvent(QDragEnterEvent *e)
-{
- QString text;
- e->accept(QTextDrag::canDecode(e));
- if (QTextDrag::decode(e, text))
- {
- float gx, gy, gw, gh;
- QUrl ur(text);
- QFileInfo fi = QFileInfo(ur.path());
- ScriXmlDoc *ss = new ScriXmlDoc();
- if (fi.exists())
- text = ur.path();
- if(ss->ReadElemHeader(text,fi.exists(), &gx, &gy, &gw, &gh))
- {
- GroupX = e->pos().x() / doku->Scale;
- GroupY = e->pos().y() / doku->Scale;
- GroupW = gw;
- GroupH = gh;
- DraggedGroup = true;
- GroupSel = false;
- }
- delete ss;
- setActiveWindow();
- raise();
- SeleItemPos(e->pos());
- }
-}
-
-void Page::dragMoveEvent(QDragMoveEvent *e)
-{
- QString text;
- PageItem *b;
- bool img;
- e->accept(QTextDrag::canDecode(e));
- if (QTextDrag::decode(e, text))
- {
- if (DraggedGroup)
- {
- float gx, gy, gw, gh;
- getGroupRectScreen(&gx, &gy, &gw, &gh);
- repaint(static_cast<int>(gx), static_cast<int>(gy), static_cast<int>(gw), static_cast<int>(gh));
- GroupX = e->pos().x() / doku->Scale;
- GroupY = e->pos().y() / doku->Scale;
- paintGroupRect(false);
- emit MousePos(GroupX, GroupY);
- emit Hrule(e->pos().x()+Anz->childX(parentWidget()));
- emit Vrule(e->pos().y()+Anz->childY(parentWidget()));
- return;
- }
- QUrl ur(text);
- QFileInfo fi = QFileInfo(ur.path());
- QString ext = fi.extension(false).upper();
- QStrList imfo = QImageIO::inputFormats();
- if (ext == "JPG")
- ext = "JPEG";
- img = ((imfo.contains(ext))||(ext=="PS")||(ext=="EPS")||(ext=="TIF"));
- if (!SeleItemPos(e->pos()))
- {
- if (SelItem.count() != 0)
- Deselect(true);
- }
- else
- {
- b = SelItem.at(0);
- if (img)
- {
- if (b->PType != 2)
- Deselect(true);
- }
- else
- {
- if (b->PType != 4)
- Deselect(true);
- }
- }
- }
-}
-
-void Page::dropEvent(QDropEvent *e)
-{
- QString text;
- PageItem *b;
- bool img;
- struct Pti *hg;
- uint a;
- int re;
- if (QTextDrag::decode(e, text))
- {
- QUrl ur(text);
- QFileInfo fi = QFileInfo(ur.path());
- QString ext = fi.extension(false).upper();
- QStrList imfo = QImageIO::inputFormats();
- if (ext == "JPG")
- ext = "JPEG";
- img = ((imfo.contains(ext))||(ext=="PS")||(ext=="EPS")||(ext=="TIF"));
- if ((SeleItemPos(e->pos())) && (!text.startsWith("<SCRIBUSELEM")))
- {
- b = SelItem.at(0);
- if (b->PType == 2)
- {
- if ((fi.exists()) && (img))
- {
- LoadPict(ur.path(), b->ItemNr);
- update();
- }
- }
- if (b->PType == 4)
- {
- if ((b->BackBox != 0) && (b->Ptext.count() == 0))
- return;
- if ((fi.exists()) && (!img) && (fi.size() < 500000))
- {
- Serializer *ss = new Serializer(ur.path());
- if (ss->Read())
- {
- ss->GetText(b, b->Ausrich);
- emit DocChanged();
- }
- delete ss;
- update();
- }
- else
- {
- slotDoCurs(false);
- slotSetCurs(e->pos().x(), e->pos().y());
- if (text.startsWith("<SCRIBUSELEM"))
- return;
- for (a=0; a<text.length(); ++a)
- {
- hg = new Pti;
- hg->ch = text.at(a);
- if (hg->ch == QChar(10))
- {
- hg->ch = QChar(13);
- }
- if (hg->ch == QChar(9))
- {
- hg->ch = " ";
- }
- if (hg->ch == QChar(5))
- {
- hg->ch = QChar(13);
- }
- hg->cfont = b->IFont;
- hg->csize = b->ISize;
- hg->ccolor = b->Pcolor2;
- hg->cextra = 0;
- hg->cshade = b->Shade2;
- hg->cselect = false;
- hg->cstyle = 0;
- hg->cab = 0;
- 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;
- emit DocChanged();
- update();
- }
- }
- }
- else
- {
- if ((fi.exists()) && (!img))
- {
- emit LoadElem(QString(ur.path()), qRound(e->pos().x()/doku->Scale), qRound(e->pos().y()/doku->Scale), true, false, doku);
- }
- else
- {
- if (doku->DraggedElem != 0)
- {
- QPopupMenu *pmen = new QPopupMenu();
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
- pmen->insertItem(tr("Copy Here"));
- pmen->insertItem(tr("Move Here"));
- pmen->insertItem(tr("Cancel"));
- re = pmen->indexOf(pmen->exec(QCursor::pos()));
- delete pmen;
- if (re == 1)
- {
- doku->DraggedElem->OwnPage->SelItem.clear();
- for (uint dre=0; dre<doku->DragElements.count(); ++dre)
- {
- doku->DraggedElem->OwnPage->SelItem.append(doku->DraggedElem->OwnPage->Items.at(doku->DragElements[dre]));
- }
- doku->DraggedElem->OwnPage->DeleteItem();
- }
- }
- else
- re = 1;
- if ((!img) && ((re == 0) || (re == 1)))
- emit LoadElem(QString(text), qRound(e->pos().x()/doku->Scale), qRound(e->pos().y()/doku->Scale), false, false, doku);
- Deselect(true);
- doku->DraggedElem = 0;
- doku->DragElements.clear();
- }
- }
- }
-}
-
-void Page::DrawPageMarks(QPaintEvent *e)
-{
- QPainter p;
- float b;
- p.begin(this);
- if (doku->Marks)
- {
- p.setPen(doku->margColor);
- if (doku->RandFarbig)
- {
- p.setBrush(doku->margColor);
- p.drawRect(0, 0, width(), static_cast<int>(Margins.Top*doku->Scale));
- p.drawRect(0, static_cast<int>(Margins.Top*doku->Scale), static_cast<int>(Margins.Left*doku->Scale), static_cast<int>(height()-Margins.Top*doku->Scale));
- p.drawRect(static_cast<int>(Margins.Left*doku->Scale), static_cast<int>(height()-Margins.Bottom*doku->Scale),
- static_cast<int>(width()-Margins.Right*doku->Scale-Margins.Left*doku->Scale),
- static_cast<int>(Margins.Bottom*doku->Scale));
- p.drawRect(static_cast<int>(width()-Margins.Right*doku->Scale), static_cast<int>(Margins.Top*doku->Scale),
- static_cast<int>(Margins.Right*doku->Scale), height());
- }
- p.setPen(doku->margColor);
- p.drawLine(0, static_cast<int>(Margins.Top*doku->Scale), width(), static_cast<int>(Margins.Top*doku->Scale));
- p.drawLine(0, height()-static_cast<int>(Margins.Bottom*doku->Scale), width(), height()-static_cast<int>(Margins.Bottom*doku->Scale));
- p.drawLine(static_cast<int>(Margins.Left*doku->Scale), 0, static_cast<int>(Margins.Left*doku->Scale), height());
- p.drawLine(width()-static_cast<int>(Margins.Right*doku->Scale), 0, width()-static_cast<int>(Margins.Right*doku->Scale), height());
- }
- if (doku->Raster)
- {
- p.setClipRect(e->rect());
- int stx = e->rect().x();
- int endx = e->rect().x()+e->rect().width();
- int sty = e->rect().y();
- int endy = e->rect().y()+e->rect().height();
- if (doku->Scale > 0.49)
- {
- float i,start;
- i=doku->majorGrid*doku->Scale;
- p.setPen(QPen(doku->majorColor, 1, SolidLine, FlatCap, MiterJoin));
- start=floor(sty/i);
- start*=i;
- for (b = start; b < endy; b+=i)
- p.drawLine(0, static_cast<int>(b), width(), static_cast<int>(b));
- start=floor(stx/i);
- start*=i;
- for (b = start; b <= endx; b+=i)
- p.drawLine(static_cast<int>(b), 0, static_cast<int>(b), height());
- i=doku->minorGrid*doku->Scale;
- p.setPen(QPen(doku->minorColor, 1, DotLine, FlatCap, MiterJoin));
- start=floor(sty/i);
- start*=i;
- for (b = start; b < endy; b+=i)
- p.drawLine(0, static_cast<int>(b), width(), static_cast<int>(b));
- start=floor(stx/i);
- start*=i;
- for (b = start; b <= endx; b+=i)
- p.drawLine(static_cast<int>(b), 0, static_cast<int>(b), height());
- }
- }
- if (doku->Guides)
- {
- if (XGuides.count() != 0)
- {
- p.setPen(QPen(doku->guideColor, 1, SolidLine, FlatCap, MiterJoin));
- for (uint xg = 0; xg < XGuides.count(); ++xg)
- {
- p.drawLine(static_cast<int>(XGuides[xg]*doku->Scale), 0, static_cast<int>(XGuides[xg]*doku->Scale), static_cast<int>(doku->PageH*doku->Scale));
- }
- }
- if (YGuides.count() != 0)
- {
- p.setPen(QPen(doku->guideColor, 1, SolidLine, FlatCap, MiterJoin));
- for (uint yg = 0; yg < YGuides.count(); ++yg)
- {
- p.drawLine(0, static_cast<int>(YGuides[yg]*doku->Scale), static_cast<int>(doku->PageB*doku->Scale), static_cast<int>(YGuides[yg]*doku->Scale));
- }
- }
- }
- p.setPen(QColor(0, 0, 0));
- p.setBrush(NoBrush);
- p.drawRect(0, 0, width(), height());
- p.end();
-}
-
-void Page::DrawPageItems(QPaintEvent *e)
-{
- QPainter p;
- uint a;
- int Lnr;
- struct Layer ll;
- PageItem* b;
- ll.Sichtbar = false;
- ll.LNr = 0;
- ScribusView* vi = (ScribusView*)Anz;
- if (MPageNam != "")
- {
- Page* Mp = vi->MasterPages.at(vi->MasterNames[MPageNam]);
- QWidget* Opa;
- Page* Opa2;
- if (Mp->Items.count() != 0)
- {
- Lnr = 0;
- for (uint la = 0; la < doku->Layers.count(); ++la)
- {
- Level2Layer(doku, &ll, Lnr);
- if (ll.Sichtbar)
- {
- for (a = 0; a < Mp->Items.count(); ++a)
- {
- b = Mp->Items.at(a);
- if (b->LayerNr != ll.LNr)
- continue;
- Opa = b->Parent;
- Opa2 = b->OwnPage;
- b->Parent = this;
- b->OwnPage = this;
- if ((b->Transparency != 0) && (vi->Prefs->PDFTransparency))
- DrawTransparent(b);
- else
- b->paintObj(e->rect());
- b->Parent = Opa;
- b->OwnPage = Opa2;
- }
- }
- Lnr++;
- }
- }
- }
- if (Items.count() != 0)
- {
- for (a = 0; a < Items.count(); ++a)
- {
- Items.at(a)->Redrawn = false;
- }
- Lnr = 0;
- for (uint la2 = 0; la2 < doku->Layers.count(); ++la2)
- {
- Level2Layer(doku, &ll, Lnr);
- if (ll.Sichtbar)
- {
- for (a = 0; a < Items.count(); ++a)
- {
- b = Items.at(a);
- if (b->LayerNr != ll.LNr)
- continue;
- QPainter p;
- p.begin(this);
- Transform(b, &p);
- QRegion apr = QRegion(p.xForm(b->Clip));
- QRegion apr2 = QRegion(p.xForm(QRect(-1, -1, static_cast<int>(b->Width), static_cast<int>(b->Height))));
- p.end();
- if ((e->rect().intersects(apr.boundingRect())) || (e->rect().intersects(apr2.boundingRect())))
- {
- if (!b->Redrawn)
- {
- if ((b->Transparency != 0) && (vi->Prefs->PDFTransparency))
- DrawTransparent(b);
- else
- b->paintObj(e->rect());
- b->Redrawn = true;
- }
- if ((doku->EditClip) && (b->Select))
- MarkClip(b);
- if ((doku->AppMode == 7) && (b->Select))
- slotDoCurs(true);
- }
- }
- }
- Lnr++;
- }
- for (a = 0; a < Items.count(); ++a)
- {
- Items.at(a)->Redrawn = false;
- }
- if (GroupSel)
- {
- setGroupRect();
- paintGroupRect();
- }
- }
-}
-
-void Page::DrawTransparent(PageItem *b)
-{
- PageItem *bb;
- PageItem *nb;
- QPainter p;
- p.begin(this);
- Transform(b, &p);
- if (b->PType == 7)
- SetPolyClip(b, static_cast<int>(QMAX(1, b->Pwidth / 2)), static_cast<int>(QMAX(1, b->Pwidth / 2)));
- QRegion apr = QRegion(p.xForm(b->Clip));
- p.end();
- int xde = mapToGlobal(QPoint(apr.boundingRect().x(), apr.boundingRect().y())).x();
- int yde = mapToGlobal(QPoint(apr.boundingRect().x(), apr.boundingRect().y())).y();
- int dw = apr.boundingRect().width();
- int dh = apr.boundingRect().height();
- if ( xde + dw+1 > QApplication::desktop()->width() )
- dw = QApplication::desktop()->width()-xde;
- if ( yde + dh+1 > QApplication::desktop()->height() )
- dh = QApplication::desktop()->height()-yde;
- QPixmap pxx = QPixmap::grabWindow( QApplication::desktop()->winId(), xde, yde, dw+1, dh+1 );
- if (pxx.isNull())
- return;
- QImage image = pxx.convertToImage();
- QPixmap pm = QPixmap(static_cast<int>(doku->PageB*doku->Scale), static_cast<int>(doku->PageH*doku->Scale));
- pm.fill();
- b->toPixmap = true;
- nb = b->NextBox;
- bb = b->BackBox;
- b->NextBox = 0;
- b->BackBox = 0;
- b->paintObj(QRect(0, 0, static_cast<int>(doku->PageB*doku->Scale), static_cast<int>(doku->PageH*doku->Scale)), &pm);
- b->toPixmap = false;
- b->NextBox = nb;
- b->BackBox = bb;
- if (b->PType == 4)
- {
- QBitmap bm;
- bm = pm;
- pm.setMask(bm);
- }
- else
- pm.setMask(pm.createHeuristicMask());
- QImage image2 = pm.convertToImage();
- QImage image3 = image2.copy(QRect(apr.boundingRect().x(), apr.boundingRect().y(), dw+1, dh+1));
- QImage image4 = KImageEffect::blend(image, image3, b->Transparency);
- p.begin(this);
- p.setClipRect(ViewReg().boundingRect());
- QRegion gesClip = p.clipRegion();
-// if ((b->PType == 1) || (b->PType == 5) || (b->PType == 6) || (b->PType == 7))
-// p.setClipRegion(apr.intersect(gesClip));
- p.drawImage(apr.boundingRect().x(), apr.boundingRect().y(), image3);
- p.end();
- b->FrameOnly = true;
- b->paintObj();
- b->FrameOnly = false;
-}
-
-void Page::setGroupRect()
-{
- PageItem* b;
- float minx = 99999;
- float miny = 99999;
- float maxx = -99999;
- float maxy = -99999;
- for (uint gc = 0; gc < SelItem.count(); ++gc)
- {
- b = SelItem.at(gc);
- QPainter p;
- p.begin(this);
- p.translate(static_cast<int>(b->Xpos), static_cast<int>(b->Ypos));
- p.rotate(b->Rot);
- QRect apr = QRegion(p.xForm(QRect(0, 0, static_cast<int>(b->Width), static_cast<int>(QMAX(b->Height, 1))))).boundingRect();
- p.end();
- minx = QMIN(minx, apr.x());
- miny = QMIN(miny, apr.y());
- maxx = QMAX(maxx, apr.x() + apr.width());
- maxy = QMAX(maxy, apr.y() + apr.height());
- }
- GroupX = minx;
- GroupY = miny;
- GroupW = maxx - minx;
- GroupH = maxy - miny;
- GroupSel = true;
-}
-
-void Page::moveGroup(float x, float y, bool fromMP)
-{
- PageItem* b;
- float gx, gy, gw, gh;
- if (GroupSel)
- getGroupRectScreen(&gx, &gy, &gw, &gh);
- for (uint a = 0; a < SelItem.count(); ++a)
- {
- b = SelItem.at(a);
- MoveItem(x, y, b, fromMP);
- }
- if (GroupSel)
- repaint(QRect(static_cast<int>(gx-5), static_cast<int>(gy-5), static_cast<int>(gw+10), static_cast<int>(gh+10)));
-}
-
-void Page::getGroupRect(float *x, float *y, float *w, float *h)
-{
- *x = GroupX;
- *y = GroupY;
- *w = GroupW;
- *h = GroupH;
-}
-
-void Page::getGroupRectScreen(float *x, float *y, float *w, float *h)
-{
- float sc = doku->Scale;
- *x = GroupX*sc;
- *y = GroupY*sc;
- *w = GroupW*sc;
- *h = GroupH*sc;
-}
-
-void Page::paintGroupRect(bool norm)
-{
- float x, y, w, h;
- getGroupRectScreen(&x, &y, &w, &h);
- QPainter pgc;
- pgc.begin(this);
- if (norm)
- pgc.setPen(QPen(red, 1, DotLine, FlatCap, MiterJoin));
- else
- pgc.setPen(QPen(black, 1, DotLine, FlatCap, MiterJoin));
- pgc.setBrush(NoBrush);
- pgc.drawRect(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h));
- pgc.setBrush(red);
- if (norm)
- {
- pgc.setPen(QPen(red, 1, SolidLine, FlatCap, MiterJoin));
- pgc.drawRect(static_cast<int>(x+w-6), static_cast<int>(y+h-6), 6, 6);
- }
-// pgc.drawRect(int(x), int(y), 6, 6);
-/* pgc.drawRect(int(x+w-6), int(y), 6, 6);
- pgc.drawRect(int(x), int(y+h-6), 6, 6);
- if (w > 6)
- {
- pgc.drawRect(int(x+w/2 - 3), int(y+h-6), 6, 6);
- pgc.drawRect(int(x+w/2 - 3), int(y), 6, 6);
- }
- if (h > 6)
- {
- pgc.drawRect(int(x+w-6), int(y+h/2 - 3), 6, 6);
- pgc.drawRect(int(x), int(y+h/2 - 3), 6, 6);
- } */
- pgc.end();
-}
-
-void Page::storeUndoInf(PageItem* b)
-{
- if ((doku->UnData.UnCode == 0) && (doku->UnDoValid))
- delete doku->UnData.Item;
- doku->UnDoValid = false;
- doku->UnData.Xpos = b->Xpos;
- doku->UnData.Ypos = b->Ypos;
- doku->UnData.Width = b->Width;
- doku->UnData.Height = b->Height;
- doku->UnData.Rot = b->Rot;
- doku->UnData.Item = b;
- doku->UnData.PageNr = PageNr;
- doku->UnData.ItemNr = b->ItemNr;
-}
-
-/** No descriptions */
-void Page::paintEvent(QPaintEvent *e)
-{
- if (doku->Before)
- DrawPageMarks(e);
- DrawPageItems(e);
- if (!doku->Before)
- DrawPageMarks(e);
-}
-
-QRegion Page::ViewReg()
-{
- int cx = Anz->contentsX() - Anz->childX(doku->ActPage->parentWidget());
- int cy = Anz->contentsY() - Anz->childY(doku->ActPage->parentWidget());
- int cw = Anz->visibleWidth();
- int ch = Anz->visibleHeight();
- return QRegion(QRect(cx, cy, cw, ch));
-}
-
-void Page::Transform(PageItem *b, QPainter *p)
-{
- p->translate(static_cast<int>(b->Xpos*doku->Scale), static_cast<int>(b->Ypos*doku->Scale));
- p->scale(doku->Scale, doku->Scale);
- p->rotate(b->Rot);
-}
-
-bool Page::GetItem(PageItem **b, int nr)
-{
- if (SelItem.count() != 0)
- {
- if (nr == -1)
- *(b) = SelItem.at(0);
- else
- *(b) = SelItem.at(nr);
- return true;
- }
- else
- {
- *(b) = 0;
- return false;
- }
-}
-
-void Page::TransformM(PageItem *b, QPainter *p)
-{
- if (b->flippedH % 2 != 0)
- {
- p->translate(b->Width, 0);
- p->scale(-1, 1);
- }
- if (b->flippedV % 2 != 0)
- {
- p->translate(0, b->Height);
- p->scale(1, -1);
- }
-}
-
-void Page::PaintSizeRect(QPainter *p, QRect alt, QRect neu)
-{
- p->setRasterOp(XorROP);
- p->setBrush(NoBrush);
- p->setPen(QPen(white, 1, DotLine, FlatCap, MiterJoin));
- p->drawRect(alt);
- p->drawRect(neu);
-}
-
-QPoint Page::ApplyGrid(QPoint in)
-{
- QPoint np;
- if (doku->useRaster)
- {
- np.setX(static_cast<int>(qRound(in.x() / doku->minorGrid) * doku->minorGrid));
- np.setY(static_cast<int>(qRound(in.y() / doku->minorGrid) * doku->minorGrid));
- }
- else
- np = in;
- return np;
-}
-
-void Page::ApplyGuides(float *x, float *y)
-{
- if (doku->SnapGuides)
- {
- if (YGuides.count() != 0)
- {
- for (uint yg = 0; yg < YGuides.count(); ++yg)
- {
- if ((YGuides[yg] < (*y+doku->GuideRad)) && (YGuides[yg] > (*y-doku->GuideRad)))
- {
- *y= YGuides[yg];
- break;
- }
- }
- }
- if (XGuides.count() != 0)
- {
- for (uint xg = 0; xg < XGuides.count(); ++xg)
- {
- if ((XGuides[xg] < (*x+doku->GuideRad)) && (XGuides[xg] > (*x-doku->GuideRad)))
- {
- *x = XGuides[xg];
- break;
- }
- }
- }
- }
-}
-
-FPoint Page::ApplyGridF(FPoint in)
-{
- FPoint np;
- if (doku->useRaster)
- {
- np.setX(qRound(in.x() / doku->minorGrid) * doku->minorGrid);
- np.setY(qRound(in.y() / doku->minorGrid) * doku->minorGrid);
- }
- else
- np = in;
- return np;
-}
-
-void Page::RefreshItem(PageItem *b)
-{
- QPainter p;
- p.begin(this);
- Transform(b, &p);
- if (b->PType == 4)
- RepaintTextRegion(b, QRegion(p.xForm(QRect(-10, -10, static_cast<int>(b->Width+20), static_cast<int>(b->Height+20)))));
- else
- update(QRegion(p.xForm(QRect(-10, -10, static_cast<int>(b->Width+20), static_cast<int>(b->Height+20)))).intersect(ViewReg()).boundingRect());
- p.end();
-}
-
-void Page::RepaintTextRegion(PageItem *b, QRegion alt)
-{
- QPainter p;
- QRegion neu;
- p.begin(this);
- Transform(b, &p);
- neu = QRegion(p.xForm(QRect(0, 0, static_cast<int>(b->Width+1), static_cast<int>(b->Height+1)))).unite(alt);
- p.end();
- b->Dirty = true;
- QRect g = neu.boundingRect();
- g.setX(g.x()-20);
- g.setY(g.y()-20);
- g.setWidth(g.width()+20);
- g.setHeight(g.height()+20);
- PageItem *nb;
- neu = QRegion(g);
- if (b->NextBox != 0)
- {
- nb = b->NextBox;
- while (nb->OwnPage == this)
- {
- p.begin(this);
- Transform(nb, &p);
- neu = QRegion(p.xForm(QRect(0, 0, static_cast<int>(nb->Width), static_cast<int>(nb->Height)))).unite(neu);
- p.end();
- if (nb->NextBox == 0)
- break;
- nb = nb->NextBox;
- }
- }
- update(neu.intersect(ViewReg()).boundingRect());
-}
-
-void Page::AdjustPreview(PageItem *b)
-{
- int neww, newh, fho, fvo;
- if ((b->LocalViewX < 1.0) || (b->LocalViewY < 1.0))
- {
- if ((b->Pfile != "") && (b->PicAvail))
- {
- if (!b->Sizing)
- {
- fho = b->flippedH;
- fvo = b->flippedV;
- LoadPict(b->Pfile, b->ItemNr);
- b->flippedH = fho;
- b->flippedV = fvo;
- }
- neww = qRound(b->pixm.width() * b->LocalViewX);
- newh = qRound(b->pixm.height() * b->LocalViewY);
- b->pixm = b->pixm.smoothScale(neww, newh);
- b->LocalViewX = 1;
- b->LocalViewY = 1;
- }
- }
-}
-
-void Page::AdjustPictScale(PageItem *b)
-{
- int fho, fvo;
- if (b->ScaleType)
- return;
- b->LocalX = 0;
- b->LocalY = 0;
- if ((b->OrigW == 0) || (b->OrigH == 0))
- return;
- float xs = b->Width / float(b->OrigW);
- float ys = b->Height / float(b->OrigH);
- if (!b->Sizing)
- {
- fho = b->flippedH;
- fvo = b->flippedV;
- LoadPict(b->Pfile, b->ItemNr);
- b->flippedH = fho;
- b->flippedV = fvo;
- }
- if (b->AspectRatio)
- {
- b->LocalScX = QMIN(xs, ys);
- b->LocalScY = QMIN(xs, ys);
- b->LocalViewX = QMIN(xs, ys);
- b->LocalViewY = QMIN(xs, ys);
- }
- else
- {
- b->LocalScX = xs;
- b->LocalScY = ys;
- b->LocalViewX = xs;
- b->LocalViewY = ys;
- }
- emit SetLocalValues(b->LocalScX, b->LocalScY, b->LocalX, b->LocalY );
-}
-
-bool Page::MoveSizeItem(FPoint newX, FPoint newY, int ite)
-{
- QRegion alt;
- QPainter p;
- PageItem *b = Items.at(ite);
- p.begin(this);
- Transform(b, &p);
- alt = QRegion(p.xForm(QRect(0, 0, static_cast<int>(b->Width), static_cast<int>(b->Height))));
- p.end();
- if (b->PType == 5)
- {
- QWMatrix ma;
- ma.translate(b->Xpos, b->Ypos);
- ma.rotate(b->Rot);
- float mx = ma.m11() * b->Width + ma.m21() * b->Height + ma.dx();
- float my = ma.m22() * b->Height + ma.m12() * b->Width + ma.dy();
- MoveItem(new