Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 427 → Rev 429

/tags/post/Scribus/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: Scribus/config.h.in
===================================================================
--- Scribus/config.h.in (.../branches/start) (revision 427)
+++ Scribus/config.h.in (.../tags/post) (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
/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: Scribus/ChangeLogCVS
===================================================================
--- Scribus/ChangeLogCVS (.../branches/start) (revision 427)
+++ Scribus/ChangeLogCVS (.../tags/post) (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 %
-
-
/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: Scribus/scribus.lsm
===================================================================
--- Scribus/scribus.lsm (.../branches/start) (revision 427)
+++ Scribus/scribus.lsm (.../tags/post) (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
/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: Scribus/TODO
===================================================================
--- Scribus/TODO (.../branches/start) (revision 427)
+++ Scribus/TODO (.../tags/post) (nonexistent)
@@ -1,5 +0,0 @@
-Plans for the next Release:
-
- - Integrate a Spellchecker
- - Provide an alternative Fontselector
- - enhanche the Display
/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: Scribus/INSTALL
===================================================================
--- Scribus/INSTALL (.../branches/start) (revision 427)
+++ Scribus/INSTALL (.../tags/post) (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.
-
/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: Scribus/COPYING
===================================================================
--- Scribus/COPYING (.../branches/start) (revision 427)
+++ Scribus/COPYING (.../tags/post) (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
/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: Scribus/stamp-h
===================================================================
--- Scribus/stamp-h (.../branches/start) (revision 427)
+++ Scribus/stamp-h (.../tags/post) (nonexistent)
@@ -1 +0,0 @@
-timestamp
/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: Scribus/Makefile.am
===================================================================
--- Scribus/Makefile.am (.../branches/start) (revision 427)
+++ Scribus/Makefile.am (.../tags/post) (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
/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: Scribus/scribus/buttonicon.h
===================================================================
--- Scribus/scribus/buttonicon.h (.../branches/start) (revision 427)
+++ Scribus/scribus/buttonicon.h (.../tags/post) (nonexistent)
@@ -1,56 +0,0 @@
-#ifndef BUTTONICON_H
-#define BUTTONICON_H
-
-#include <qdialog.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include "pageitem.h"
-
-class ButtonIcon : public QDialog
-{
- Q_OBJECT
-
-public:
- ButtonIcon(QWidget* parent, PageItem* ite);
- ~ButtonIcon() {};
-
- QLabel* TextLabel1_2;
- QComboBox* Place;
- QLabel* TextLabel1;
- QComboBox* ScaleW;
- QLabel* TextLabel2;
- QComboBox* ScaleH;
- QGroupBox* GroupButton;
- QLabel* TextLabel3;
- QSlider* SliderX;
- QSlider* SliderY;
- QPushButton* OK;
- QPushButton* Cancel;
- QPushButton* Reset;
- PageItem* Item;
- int IcPlace;
- int IcScaleW;
- int IcScaleH;
- float IcPlaceX;
- float IcPlaceY;
-
-private slots:
- void MoveIconY(int y);
- void MoveIconX(int x);
- void SetAllVals();
- void SetScaleHow(int s);
-
-protected:
- QVBoxLayout* ButtonIconLayout;
- QGridLayout* Layout1;
- QHBoxLayout* Layout5;
- QGridLayout* Layout3;
- QHBoxLayout* Layout4;
-};
-
-#endif // BUTTONICON_H
/Scribus/scribus/buttonicon.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: Scribus/scribus/iso8859-10ps.enc
===================================================================
--- Scribus/scribus/iso8859-10ps.enc (.../branches/start) (revision 427)
+++ Scribus/scribus/iso8859-10ps.enc (.../tags/post) (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
/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: Scribus/scribus/pageitem.h
===================================================================
--- Scribus/scribus/pageitem.h (.../branches/start) (revision 427)
+++ Scribus/scribus/pageitem.h (.../tags/post) (nonexistent)
@@ -1,243 +0,0 @@
-/***************************************************************************
- pageitem.h - 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. *
- * *
- ***************************************************************************/
-
-#ifndef PAGEITEM_H
-#define PAGEITEM_H
-
-#include <qobject.h>
-#include <qwidget.h>
-#include <qpointarray.h>
-#include <qptrlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qfont.h>
-#include <qvaluestack.h>
-#include <qvaluelist.h>
-#include "scribusdoc.h"
-/**
- *@author Franz Schmid
- */
-
-class PageItem : public QObject {
-
-public:
- PageItem(Page* pa, int art, float x, float y, float w, float h, float w2, QString fill, QString outline, ScribusDoc *doc);
- ~PageItem() {};
- struct ZZ { QString Zeich;
- QColor Farb;
- QFont Zsatz;
- QString ZFo;
- float xco;
- float yco;
- bool Sele;
- int Siz;
- float wide;
- };
- /** Zeichnet das Item */
- void paintObj(QRect e=QRect(), QPixmap *ppX = 0);
- void CopyIt(struct CLBuf *Buffer);
- void SetZeichAttr(QPainter *p, QFont *ffo, struct Pti *hl, int *chs, QString *chx);
- void SetFarbe(QColor *tmp, QString farbe, int shad);
- void DrawZeichen(QPainter *p, struct Pti *hl);
- void DrawZeichen(QPainter *p, struct ZZ *hl);
- void DrawPoly(QPainter *p, QPointArray pts, QColor BackF, bool bitm = false);
- void DrawPolyL(QPainter *p, QPointArray pts);
- QString ExpandToken(uint base);
- bool Locked;
- bool Reverse;
- /** X-Position auf der Seite */
- float Xpos;
- /** Y-Position auf der Seite */
- float Ypos;
- /** Breite des Elements */
- float Width;
- /** Hoehe des Elements */
- float Height;
- /** Eckrundung von Rechtecken */
- float RadRect;
- /** Art des Items */
- int PType;
- /** Winkel um den das Item gedreht wird */
- float Rot;
- /** Enthaelt das uebergeordnete Objekt */
- QWidget *Parent;
- /** Enthaelt das Dokument */
- ScribusDoc *Doc;
- QString GrColor;
- QString GrColor2;
- int GrShade;
- int GrShade2;
- int GrType;
- /** Fuellfarbe */
- QString Pcolor;
- /** Abstufung fuer Füllfarbe */
- int Shade;
- /** Zeichenfarbe fuer Elemente */
- QString Pcolor2;
- /** Abstufung fuer Zeichenfarbe */
- int Shade2;
- /** Strichstaerke */
- float Pwidth;
- /** Linienart */
- PenStyle PLineArt;
- PenCapStyle PLineEnd;
- PenJoinStyle PLineJoin;
- /** Element selektiert Ja/Nein */
- bool Select;
- /** Definiert die Clipping-Region des Elements; */
- QPointArray Clip;
- FPointArray PoLine;
- QValueList<uint> Segments;
- bool PoShow;
- float BaseOffs;
- bool ClipEdited;
- int FrameType;
- /** Interne Item-Nummer */
- uint ItemNr;
- /** Hat Element Rahmen? */
- bool Frame;
- /** Seite zu der das Element gehoert */
- Page *OwnPage;
- /** Darzustellendes Bild */
- QImage pixm;
-// QPixmap pixm;
- /** Dateiname des Bildes */
- QString Pfile;
- QString Pfile2;
- QString Pfile3;
- QString IProfile;
- bool UseEmbedded;
- QString EmProfile;
- int IRender;
- /** Darstellungsart Bild/Titel */
- bool PicArt;
- /** Bild verfuegbar */
- bool PicAvail;
- /** Lokales Scaling x*/
- float LocalScX;
- float LocalViewX;
- /** Lokales Scaling y*/
- float LocalScY;
- float LocalViewY;
- /** Lokales X */
- float LocalX;
- /** Lokales Y */
- float LocalY;
- int OrigW;
- int OrigH;
- /** Anzahl horizontaler Spiegelungen */
- int flippedH;
- /** Anzahl vertikaler Spiegelungen */
- int flippedV;
- /** BoundigBox-X */
- float BBoxX;
- /** BoundingBox-H */
- float BBoxH;
- /** Extra Abstand vom Rand */
- float Extra;
- float TExtra;
- float BExtra;
- float RExtra;
- /** Linespacing */
- float LineSp;
- /** Zeichen X-Position */
- float CurX;
- /** Zeichen Y-Position */
- float CurY;
- /** Cursorposition */
- int CPos;
- /** Text des Elements */
- QPtrList<Pti> Ptext;
- /** Flag ob Element gedruckt wird */
- bool isPrintable;
- /** Flag fuer PDF-Bookmark */
- bool isBookmark;
- int BMnr;
- /** Flag fuer PDF-Annotation */
- bool isAnnotation;
- int AnType;
- int AnActType;
- QString AnAction;
- QString An_E_act;
- QString An_X_act;
- QString An_D_act;
- QString An_Fo_act;
- QString An_Bl_act;
- QString An_K_act;
- QString An_F_act;
- QString An_V_act;
- QString An_C_act;
- QString AnName;
- QString AnToolTip;
- QString AnRollOver;
- QString AnDown;
- QString AnBColor;
- int AnBsty;
- int AnBwid;
- int AnFeed;
- int AnZiel;
- int AnFlag;
- int AnMaxChar;
- int AnVis;
- int AnChkStil;
- int AnFont;
- bool AnIsChk;
- bool AnAAact;
- bool AnHTML;
- bool AnUseIcons;
- int AnIPlace;
- int AnScaleW;
- int AnFormat;
- /** Flag fuer neuzeichnen im EditMode */
- bool Dirty;
- /** Item Font */
- QString IFont;
- /** Item Fontgroesse */
- int ISize;
- /** Flag fuer Auswahl */
- bool HasSel;
- /** Flag fuer Textfluss */
- bool Textflow;
- bool FrameOnly;
- PageItem *BackBox;
- PageItem *NextBox;
- int NextIt;
- int NextPg;
- bool Tinput;
- bool isAutoText;
- int Ausrich;
- uint MaxChars;
- bool Redrawn;
- float ExtraV;
- bool isRaster;
- float OldB;
- float OldH;
- float OldB2;
- float OldH2;
- bool Sizing;
- bool toPixmap;
- float DevRes;
- int DevResX;
- int DevResY;
- int LayerNr;
- bool ScaleType;
- bool AspectRatio;
- float Transparency;
- QValueStack<int> Groups;
-};
-
-#endif
/Scribus/scribus/pageitem.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: Scribus/scribus/scribusdoc.cpp
===================================================================
--- Scribus/scribus/scribusdoc.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/scribusdoc.cpp (.../tags/post) (nonexistent)
@@ -1,211 +0,0 @@
-/***************************************************************************
- scribusdoc.cpp - description
- -------------------
- begin : Fre Apr 6 21:47:55 CEST 2001
- copyright : (C) 2001 by Franz Schmid
- email : Franz.Schmid@altmuehlnet.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "scribusdoc.h"
-#include <qfile.h>
-
-ScribusDoc::ScribusDoc()
-{
- modified = false;
- MasterP = false;
- Marks = true;
- Guides = true;
- GuideLock = false;
- SnapGuides = false;
- ShowPic = true;
- Raster = false;
- useRaster = false;
- EditClip = false;
- EditClipMode = 0;
- loading = false;
- minorGrid = 20;
- majorGrid = 100;
- minorColor = QColor(green);
- majorColor = QColor(green);
- guideColor = QColor(darkBlue);
- GuideRad = 10;
- Scale = 1.0;
- Dpen = "Black";
- Dshade2 = 100;
- Dbrush = "Black";
- Dshade = 100;
- Dwidth = 1;
- DLineArt = SolidLine;
- DocName = "Document-";
- UsedFonts.clear();
- Dfont = "";
- Dsize = 12;
- CurrentSel = -1;
- DocTitel = "";
- DocAutor = "";
- DocComments = "";
- PageC = 0;
- LastAuto = 0;
- FirstAuto = 0;
- DraggedElem = 0;
- GroupCounter = 1;
- Vorlagen.clear();
- struct StVorL vg;
- vg.Vname = "Normal Internal";
- vg.LineSpa = 15;
- vg.Ausri = 0;
- vg.Indent = 0;
- vg.First = 0;
- vg.Avor = 0;
- vg.Anach = 0;
- vg.Font = "";
- vg.FontSize = Dsize;
- Vorlagen.append(vg);
- vg.Vname = "Center Internal";
- vg.Ausri = 1;
- Vorlagen.append(vg);
- vg.Vname = "Rechts Internal";
- vg.Ausri = 2;
- Vorlagen.append(vg);
- vg.Vname = "Block Internal";
- vg.Ausri = 3;
- Vorlagen.append(vg);
- vg.Vname = "EBlock Internal";
- vg.Ausri = 4;
- Vorlagen.append(vg);
- Layers.clear();
- struct Layer ll;
- ll.LNr = 0;
- ll.Level = 0;
- ll.Name = tr("Background");
- ll.Sichtbar = true;
- ll.Drucken = true;
- Layers.append(ll);
- ActiveLayer = 0;
- JavaScripts.clear();
- UnDoValid = false;
- UnData.UnCode = -1;
- CurrentStyle = 0;
- CurrentABStil = 0;
- TotalItems = 0;
- TemplateMode = false;
- PDF_Optionen.Thumbnails = false;
- PDF_Optionen.Articles = false;
- PDF_Optionen.Compress = true;
- PDF_Optionen.RecalcPic = false;
- PDF_Optionen.Bookmarks = false;
- PDF_Optionen.PicRes = 300;
- PDF_Optionen.Version = 13;
- PDF_Optionen.Resolution = 300;
- PDF_Optionen.Binding = 0;
- PDF_Optionen.EmbedList.clear();
- PDF_Optionen.PresentMode = false;
- PDF_Optionen.Datei = "";
- PDF_Optionen.PresentVals.clear();
- PDF_Optionen.UseRGB = false;
- PDF_Optionen.UseProfiles = false;
- PDF_Optionen.UseProfiles2 = false;
- PDF_Optionen.SolidProf = "";
- PDF_Optionen.SComp = 3;
- PDF_Optionen.ImageProf = "";
- PDF_Optionen.PrintProf = "";
- PDF_Optionen.Info = "";
- PDF_Optionen.Intent = 0;
- PDF_Optionen.Intent2 = 0;
- PDF_Optionen.BleedTop = 0;
- PDF_Optionen.BleedLeft = 0;
- PDF_Optionen.BleedRight = 0;
- PDF_Optionen.BleedBottom = 0;
- PDF_Optionen.EmbeddedI = false;
- PDF_Optionen.Encrypt = false;
- PDF_Optionen.PassOwner = "";
- PDF_Optionen.PassUser = "";
- PDF_Optionen.Permissions = -4;
- RePos = false;
- BookMarks.clear();
- OldBM = false;
- hasName = false;
- RotMode = 0;
- ASaveTimer = new QTimer(this);
-#ifdef HAVE_FREETYPE
- FT_Init_FreeType( &library );
-#endif
-}
-
-ScribusDoc::~ScribusDoc()
-{
-#ifdef HAVE_FREETYPE
- FT_Done_FreeType( library );
-#endif
-}
-
-void ScribusDoc::setModified()
-{
- modified = true;
-}
-
-void ScribusDoc::setUnModified()
-{
- modified = false;
-}
-
-bool ScribusDoc::isModified() const
-{
- return modified;
-}
-/** Setzt die Seitenattribute */
-void ScribusDoc::setPage(float b, float h, float t, float l, float r, float bo, float sp, float ab, bool atf, bool fp)
-{
- PageB = b;
- PageH = h;
- PageM.Top = t;
- PageM.Left = l;
- PageM.Right = r;
- PageM.Bottom = bo;
- PageSp = sp;
- PageSpa = ab;
- PageFP = fp;
- PageAT = atf;
-}
-
-void ScribusDoc::resetPage(float t, float l, float r, float bo, bool fp)
-{
- PageM.Top = t;
- PageM.Left = l;
- PageM.Right = r;
- PageM.Bottom = bo;
- PageFP = fp;
-}
-
-void ScribusDoc::AddFont(QString name, QFont fo)
-{
-#ifdef HAVE_FREETYPE
- FT_Face face;
- FT_New_Face( library, (*AllFonts)[name]->Datei, 0, &face );
- FFonts[name] = face;
-#endif
- UsedFonts[name] = fo;
- (*AllFonts)[name]->ReadMetrics();
- (*AllFonts)[name]->CharWidth[13] = 0;
-#ifdef HAVE_FREETYPE
- QString afnm = (*AllFonts)[name]->Datei.left((*AllFonts)[name]->Datei.length()-3);
- QFile afm(afnm+"afm");
- if(!(afm.exists()))
- {
- afm.setName(afnm+"Afm");
- if(!(afm.exists()))
- afm.setName(afnm+"AFM");
- }
- if (afm.exists())
- FT_Attach_File(face, afm.name());
-#endif
-}
/Scribus/scribus/scribusdoc.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: Scribus/scribus/plugins/Makefile.am
===================================================================
--- Scribus/scribus/plugins/Makefile.am (.../branches/start) (revision 427)
+++ Scribus/scribus/plugins/Makefile.am (.../tags/post) (nonexistent)
@@ -1,5 +0,0 @@
-####### kdevelop will overwrite this part!!! (begin)##########
-
-SUBDIRS = libchar
-
-####### kdevelop will overwrite this part!!! (end)############
/Scribus/scribus/plugins/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: Scribus/scribus/plugins/libchar/Makefile.am
===================================================================
--- Scribus/scribus/plugins/libchar/Makefile.am (.../branches/start) (revision 427)
+++ Scribus/scribus/plugins/libchar/Makefile.am (.../tags/post) (nonexistent)
@@ -1,16 +0,0 @@
-libdir = $(prefix)/lib/scribus/plugins
-AM_CPPFLAGS = -I$(top_builddir)/scribus
-lib_LTLIBRARIES = libcharselect.la
-
-INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes)
-
-libcharselect_la_LDFLAGS = -version-info 0:0:0
-
-libcharselect_la_METASOURCES = AUTO
-
-libcharselect_la_SOURCES = charselect.cpp
-KDE_OPTIONS = qtonly
-
-EXTRA_DIST = charselect.cpp charselect.h
-
-AM_LDFLAGS = -s $(LIBFREETYPE_LIBS)
/Scribus/scribus/plugins/libchar/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: Scribus/scribus/plugins/libchar/charselect.cpp
===================================================================
--- Scribus/scribus/plugins/libchar/charselect.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/plugins/libchar/charselect.cpp (.../tags/post) (nonexistent)
@@ -1,235 +0,0 @@
-#include "charselect.h"
-#include "charselect.moc"
-#include <qtextcodec.h>
-#include <qbitmap.h>
-#include <qpaintdevicemetrics.h>
-#include "config.h"
-#ifdef HAVE_FREETYPE
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
-#include FT_GLYPH_H
-#endif
-
-extern QPixmap loadIcon(QString nam);
-
-QString Name()
-{
- return "Insert Special";
-}
-
-int Type()
-{
- return 1;
-}
-
-void Run(QWidget *d, ScribusApp *plug)
-{
- if ((plug->HaveDoc) && (plug->doc->ActPage->SelItem.count() != 0))
- {
- PageItem *b = plug->doc->ActPage->SelItem.at(0);
- if ((b->PType == 4) && (plug->doc->AppMode == 7))
- {
- ZAuswahl *dia = new ZAuswahl(d, &plug->Prefs, b, plug);
- dia->exec();
- delete dia;
- }
- }
-}
-
-ZAuswahl::ZAuswahl( QWidget* parent, preV *Vor, PageItem *item, ScribusApp *pl)
- : QDialog( parent, "ZAuswahl", true, 0 )
-{
- setCaption( tr( "Select Character" ) );
- ite = item;
- ap = pl;
- setIcon(loadIcon("AppIcon.xpm"));
- ZAuswahlLayout = new QVBoxLayout( this );
- ZAuswahlLayout->setSpacing( 6 );
- ZAuswahlLayout->setMargin( 11 );
-
- ZTabelle = new QTable( this, "ZTabelle" );
- ZTabelle->setNumCols( 32 );
- ZTabelle->setLeftMargin(0);
- ZTabelle->verticalHeader()->hide();
- ZTabelle->setTopMargin(0);
- ZTabelle->horizontalHeader()->hide();
- ZTabelle->setSorting(false);
- ZTabelle->setSelectionMode(QTable::NoSelection);
- ZTabelle->setColumnMovingEnabled(false);
- ZTabelle->setRowMovingEnabled(false);
- ZTabelle->setFont(pl->doc->UsedFonts[ite->IFont]);
- QPaintDeviceMetrics pm(this);
- DevResX = pm.logicalDpiX();
- DevResY = pm.logicalDpiY();
-#ifdef HAVE_FREETYPE
- int counter = 1;
- FT_Face face;
- FT_ULong charcode;
- FT_UInt gindex;
- face = pl->doc->FFonts[ite->IFont];
- charcode = FT_Get_First_Char(face, &gindex );
- while (gindex != 0)
- {
- Zeich.append(charcode);
- counter++;
- charcode = FT_Get_Next_Char(face, charcode, &gindex );
- }
- int ab = counter / 32;
- int ac = counter % 32;
- int cc = 0;
- MaxCount = counter;
- if (ac != 0)
- ab++;
- ZTabelle->setNumRows( ab );
- for (int a = 0; a < ab; a++)
- {
- for (int b = 0; b < 32; b++)
- {
- FT_Set_Char_Size( face, 0, 14*64, DevResX, DevResY );
- FT_Load_Char( face, Zeich[cc], FT_LOAD_RENDER | FT_LOAD_NO_BITMAP | FT_LOAD_MONOCHROME );
- QByteArray bd(face->glyph->bitmap.rows * face->glyph->bitmap.pitch);
- uint yy = 0;
- uint adv;
- if ((face->glyph->bitmap.width % 8) == 0)
- adv = face->glyph->bitmap.width / 8;
- else
- adv = face->glyph->bitmap.width / 8 + 1;
- for (int y = 0; y < face->glyph->bitmap.rows; ++y)
- {
- memcpy(bd.data()+yy, face->glyph->bitmap.buffer+(y * face->glyph->bitmap.pitch), adv);
- yy += adv;
- }
- QBitmap bb(face->glyph->bitmap.width, face->glyph->bitmap.rows, (uchar*)bd.data(), false);
- QPixmap pixm(face->glyph->bitmap.width, face->glyph->bitmap.rows);
- if (!pixm.isNull())
- {
- pixm.fill(black);
- pixm.setMask(bb);
- QPixmap pixm2(face->glyph->bitmap.width+4, face->glyph->bitmap.rows);
- pixm2.fill();
- QPainter p;
- p.begin(&pixm2);
- p.drawPixmap(4, 0, pixm);
- p.end();
- QTableItem *it = new QTableItem(ZTabelle, QTableItem::Never, "", pixm2);
- ZTabelle->setItem(a, b, it);
- }
- cc++;
- if (cc == counter)
- break;
- }
- }
- for (int d = 0; d < 32; d++)
- {
- ZTabelle->setColumnWidth(d, ZTabelle->rowHeight(0));
- }
- ZTabelle->setMinimumSize(QSize(ZTabelle->rowHeight(0)*32, ZTabelle->rowHeight(0)*7));
-#else
- ZTabelle->setNumRows( 7 );
- QByteArray c = QByteArray(1);
- c[0] = 32;
- uint cc = 32;
- for (int a = 0; a < 7; a++)
- {
- for (int b = 0; b < 32; b++)
- {
- QTableItem *it = new QTableItem(ZTabelle, QTableItem::Never, QString(QChar(cc)));
- ZTabelle->setItem(a, b, it);
- cc++;
- c[0] = cc;
- }
- }
- for (int d = 0; d < 32; d++)
- {
- ZTabelle->setColumnWidth(d, ZTabelle->rowHeight(0));
- }
- ZTabelle->setMinimumSize(QSize(ZTabelle->rowHeight(0)*32, ZTabelle->rowHeight(0)*7));
-#endif
- ZAuswahlLayout->addWidget( ZTabelle );
-
- Zeichen = new QLineEdit( this, "Zeichen" );
- Zeichen->setFont(pl->doc->UsedFonts[ite->IFont]);
- ZAuswahlLayout->addWidget( Zeichen );
-
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
-
- Einf = new QPushButton( this, "Einf" );
- Einf->setText( tr( "Insert" ) );
- Layout1->addWidget( Einf );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer_2 );
-
- Delete = new QPushButton( this, "Delete" );
- Delete->setText( tr( "Clear" ) );
- Layout1->addWidget( Delete );
- QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer_3 );
-
- Close = new QPushButton( this, "Close" );
- Close->setText( tr( "Close" ) );
- Layout1->addWidget( Close );
- QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer_4 );
- ZAuswahlLayout->addLayout( Layout1 );
-
- // signals and slots connections
- connect(Close, SIGNAL(clicked()), this, SLOT(accept()));
- connect(Delete, SIGNAL(clicked()), this, SLOT(DelEdit()));
- connect(Einf, SIGNAL(clicked()), this, SLOT(InsChar()));
- connect(ZTabelle, SIGNAL(pressed(int, int, int, const QPoint&)), this, SLOT(NeuesZeichen(int, int)));
-}
-
-ZAuswahl::~ZAuswahl()
-{
-}
-
-void ZAuswahl::NeuesZeichen(int r, int c)
-{
-#ifdef HAVE_FREETYPE
- if ((r*32+c) < MaxCount)
- Zeichen->insert(QChar(Zeich[r*32+c]));
-#else
- Zeichen->insert(ZTabelle->text(r, c));
-#endif
-}
-
-void ZAuswahl::DelEdit()
-{
- Zeichen->clear();
-}
-
-void ZAuswahl::InsChar()
-{
- struct Pti *hg;
- QString Tex = Zeichen->text();
- for (uint a=0; a<Tex.length(); a++)
- {
- hg = new Pti;
- hg->ch = Tex.at(a);
- if (hg->ch == QChar(10)) { hg->ch = QChar(13); }
- if (hg->ch == QChar(9)) { hg->ch = " "; }
- hg->cfont = ite->IFont;
- hg->csize = ite->ISize;
- hg->ccolor = ite->Pcolor2;
- hg->cextra = 0;
- hg->cshade = ite->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;
- ite->Ptext.insert(ite->CPos, hg);
- ite->CPos += 1;
- }
- ite->Dirty = true;
- ite->paintObj();
- ap->slotDocCh();
-}
/Scribus/scribus/plugins/libchar/charselect.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: Scribus/scribus/plugins/libchar/charselect.h
===================================================================
--- Scribus/scribus/plugins/libchar/charselect.h (.../branches/start) (revision 427)
+++ Scribus/scribus/plugins/libchar/charselect.h (.../tags/post) (nonexistent)
@@ -1,63 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'Query.ui'
-**
-** Created: Mon Apr 23 20:48:47 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef QUERY_H
-#define QUERY_H
-
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtable.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qfont.h>
-#include "scribus.h"
-
-/** Calls the Plugin with the main Application window as parent
- * and the main Application Class as parameter */
-extern "C" void Run(QWidget *d, ScribusApp *plug);
-/** Returns the Name of the Plugin.
- * This name appears in the relevant Menue-Entrys */
-extern "C" QString Name();
-/** Returns the Type of the Plugin.
- * 1 = the Plugin is a normal Plugin, which appears in the Extras Menue
- * 2 = the Plugins is a import Plugin, which appears in the Import Menue
- * 3 = the Plugins is a export Plugin, which appears in the Export Menue */
-extern "C" int Type();
-
-class ZAuswahl : public QDialog
-{
- Q_OBJECT
-
-public:
- ZAuswahl( QWidget* parent, preV *Vor, PageItem *item, ScribusApp *plug );
- ~ZAuswahl();
- QTable* ZTabelle;
- QLineEdit* Zeichen;
- QPushButton* Einf;
- QPushButton* Delete;
- QPushButton* Close;
- PageItem *ite;
- ScribusApp *ap;
- QValueList<uint> Zeich;
- int MaxCount;
- int DevResX;
- int DevResY;
-
-public slots:
- void NeuesZeichen(int r, int c);
- void DelEdit();
- void InsChar();
-
-protected:
- QVBoxLayout* ZAuswahlLayout;
- QHBoxLayout* Layout1;
-};
-#endif // QUERY_H
/Scribus/scribus/plugins/libchar/charselect.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: Scribus/scribus/picsearch.cpp
===================================================================
--- Scribus/scribus/picsearch.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/picsearch.cpp (.../tags/post) (nonexistent)
@@ -1,130 +0,0 @@
-#include "picsearch.h"
-#include "picsearch.moc"
-#include <qimage.h>
-#include <qpixmap.h>
-extern QImage LoadPict(QString fn);
-extern QPixmap loadIcon(QString nam);
-
-PicSearch::PicSearch(QWidget* parent, QString name, QStringList alt)
- : QDialog( parent, "pi2", true, 0 )
-{
- setCaption( tr( "Result" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- Bild = "";
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, sizePolicy().hasHeightForWidth() ) );
- PicSearchLayout = new QVBoxLayout( this );
- PicSearchLayout->setSpacing( 6 );
- PicSearchLayout->setMargin( 11 );
-
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 6 );
- Layout2->setMargin( 0 );
-
- TextLabel1 = new QLabel( this, "TextLabel1" );
- TextLabel1->setText( tr( "Search Results for: " ) );
- Layout2->addWidget( TextLabel1 );
-
- Datei = new QLabel( this, "Datei" );
- Datei->setText( tr( name ) );
- Layout2->addWidget( Datei );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer );
- PicSearchLayout->addLayout( Layout2 );
-
- Layout3 = new QHBoxLayout;
- Layout3->setSpacing( 6 );
- Layout3->setMargin( 0 );
-
- ListBox1 = new QListBox( this, "ListBox1" );
- ListBox1->setMinimumSize( QSize( 250, 210 ) );
- ListBox1->setMaximumSize( QSize( 250, 32767 ) );
- ListBox1->insertStringList( alt );
- Layout3->addWidget( ListBox1 );
-
- Layout1 = new QVBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
-
- Preview = new QCheckBox( this, "Preview" );
- Preview->setText( tr( "Preview" ) );
- Preview->setChecked(false);
- Layout1->addWidget( Preview );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout1->addItem( spacer_2 );
-
- UseB = new QPushButton( this, "UseB" );
- UseB->setMinimumSize( QSize( 100, 30 ) );
- UseB->setText( tr( "Select" ) );
- UseB->setDefault( true );
- UseB->setEnabled(false);
- Layout1->addWidget( UseB );
-
- CancelB = new QPushButton( this, "CancelB" );
- CancelB->setMinimumSize( QSize( 100, 30 ) );
- CancelB->setText( tr( "Cancel" ) );
- Layout1->addWidget( CancelB );
- Layout3->addLayout( Layout1 );
-
- PixmapLabel1 = new QLabel( this, "PixmapLabel1" );
- PixmapLabel1->setMinimumSize( QSize( 210, 210 ) );
- PixmapLabel1->setAlignment(AlignLeft | AlignTop);
- PixmapLabel1->setScaledContents( FALSE );
- PixmapLabel1->setBackgroundColor( white );
- PixmapLabel1->setFrameShape( QLabel::WinPanel );
- PixmapLabel1->setFrameShadow( QLabel::Sunken );
- Layout3->addWidget( PixmapLabel1 );
- PixmapLabel1->hide();
- PicSearchLayout->addLayout( Layout3 );
- minS = minimumSize();
- // signals and slots connections
- connect( CancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( UseB, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( Preview, SIGNAL( clicked() ), this, SLOT( ShowPrev() ) );
- connect(ListBox1, SIGNAL(clicked(QListBoxItem*)), this, SLOT(selBild(QListBoxItem*)));
-}
-
-void PicSearch::ShowPrev()
-{
- if (Preview->isChecked())
- {
- PixmapLabel1->show();
- if (Bild != "")
- GenPreview();
- }
- else
- {
- PixmapLabel1->hide();
- setMinimumSize(minS);
- resize(minS);
- }
-}
-
-void PicSearch::selBild(QListBoxItem *c)
-{
- if (c == NULL)
- return;
- Bild = c->text();
- if (Preview->isChecked())
- GenPreview();
- UseB->setEnabled(true);
-}
-
-void PicSearch::GenPreview()
-{
- QPixmap pm;
- QImage im = LoadPict(Bild);
- if ((im.width() > 200) || (im.height() > 200))
- {
- QImage im2;
- float sx = im.width() / 200.0;
- float sy = im.height() / 200.0;
- if (sy < sx)
- im2 = im.smoothScale(qRound(im.width() / sx), qRound(im.height() / sx));
- else
- im2 = im.smoothScale(qRound(im.width() / sy), qRound(im.height() / sy));
- im = im2;
- im2.detach();
- }
- pm.convertFromImage(im);
- PixmapLabel1->setPixmap(pm);
-}
/Scribus/scribus/picsearch.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: Scribus/scribus/.directory
===================================================================
--- Scribus/scribus/.directory (.../branches/start) (revision 427)
+++ Scribus/scribus/.directory (.../tags/post) (nonexistent)
@@ -1,971 +0,0 @@
-[IconPosition::CVS]
-X=28
-Y=5
-
-[IconPosition::ISOenc.txt]
-X=363
-Y=1298
-
-[IconPosition::Makefile]
-X=281
-Y=1442
-
-[IconPosition::Makefile.am]
-X=359
-Y=1442
-
-[IconPosition::Makefile.in]
-X=14
-Y=1499
-
-[IconPosition::Stdenc.txt]
-X=278
-Y=3077
-
-[IconPosition::TTFenc.txt]
-X=276
-Y=3134
-
-[IconPosition::align.cpp]
-X=279
-Y=62
-
-[IconPosition::align.h]
-X=373
-Y=62
-
-[IconPosition::align.moc]
-X=17
-Y=119
-
-[IconPosition::align.o]
-X=112
-Y=121
-
-[IconPosition::applytemplate.cpp]
-X=183
-Y=119
-
-[IconPosition::applytemplate.h]
-X=270
-Y=119
-
-[IconPosition::applytemplate.moc]
-X=357
-Y=119
-
-[IconPosition::applytemplate.o]
-X=9
-Y=193
-
-[IconPosition::cmykcolor.cpp]
-X=94
-Y=191
-
-[IconPosition::cmykcolor.h]
-X=184
-Y=191
-
-[IconPosition::cmykcolor.o]
-X=271
-Y=193
-
-[IconPosition::cmykfw.cpp]
-X=359
-Y=191
-
-[IconPosition::cmykfw.h]
-X=18
-Y=263
-
-[IconPosition::cmykfw.moc]
-X=97
-Y=263
-
-[IconPosition::cmykfw.o]
-X=192
-Y=265
-
-[IconPosition::colorchart.cpp]
-X=268
-Y=263
-
-[IconPosition::colorchart.h]
-X=359
-Y=263
-
-[IconPosition::colorchart.moc]
-X=6
-Y=335
-
-[IconPosition::colorchart.o]
-X=98
-Y=337
-
-[IconPosition::colorm.cpp]
-X=187
-Y=335
-
-[IconPosition::colorm.h]
-X=281
-Y=335
-
-[IconPosition::colorm.moc]
-X=360
-Y=335
-
-[IconPosition::colorm.o]
-X=20
-Y=409
-
-[IconPosition::cpalette.cpp]
-X=97
-Y=407
-
-[IconPosition::cpalette.h]
-X=191
-Y=407
-
-[IconPosition::cpalette.moc]
-X=270
-Y=407
-
-[IconPosition::cpalette.o]
-X=365
-Y=409
-
-[IconPosition::customfdialog.cpp]
-X=6
-Y=479
-
-[IconPosition::customfdialog.h]
-X=93
-Y=479
-
-[IconPosition::customfdialog.moc]
-X=180
-Y=479
-
-[IconPosition::customfdialog.moc.cpp]
-X=267
-Y=479
-
-[IconPosition::customfdialog.o]
-X=354
-Y=481
-
-[IconPosition::dcolor.cpp]
-X=14
-Y=551
-
-[IconPosition::dcolor.h]
-X=108
-Y=551
-
-[IconPosition::dcolor.moc]
-X=187
-Y=551
-
-[IconPosition::dcolor.o]
-X=282
-Y=553
-
-[IconPosition::delpages.cpp]
-X=354
-Y=551
-
-[IconPosition::delpages.h]
-X=13
-Y=608
-
-[IconPosition::delpages.moc]
-X=96
-Y=608
-
-[IconPosition::delpages.o]
-X=187
-Y=610
-
-[IconPosition::docinfo.cpp]
-X=272
-Y=608
-
-[IconPosition::docinfo.h]
-X=366
-Y=608
-
-[IconPosition::docinfo.o]
-X=18
-Y=682
-
-[IconPosition::docs]
-X=115
-Y=5
-
-[IconPosition::druck.cpp]
-X=103
-Y=680
-
-[IconPosition::druck.h]
-X=197
-Y=680
-
-[IconPosition::druck.moc]
-X=276
-Y=680
-
-[IconPosition::druck.o]
-X=371
-Y=682
-
-[IconPosition::edit1format.cpp]
-X=9
-Y=752
-
-[IconPosition::edit1format.h]
-X=96
-Y=752
-
-[IconPosition::edit1format.moc]
-X=182
-Y=752
-
-[IconPosition::edit1format.o]
-X=270
-Y=754
-
-[IconPosition::editformats.cpp]
-X=354
-Y=752
-
-[IconPosition::editformats.h]
-X=9
-Y=824
-
-[IconPosition::editformats.moc]
-X=95
-Y=824
-
-[IconPosition::editformats.o]
-X=183
-Y=826
-
-[IconPosition::fmitem.cpp]
-X=276
-Y=824
-
-[IconPosition::fmitem.h]
-X=370
-Y=824
-
-[IconPosition::fmitem.o]
-X=22
-Y=898
-
-[IconPosition::fontprefs.cpp]
-X=95
-Y=896
-
-[IconPosition::fontprefs.h]
-X=189
-Y=896
-
-[IconPosition::fontprefs.o]
-X=276
-Y=898
-
-[IconPosition::fpalettev.cpp]
-X=356
-Y=896
-
-[IconPosition::fpalettev.h]
-X=15
-Y=953
-
-[IconPosition::fpalettev.moc]
-X=94
-Y=953
-
-[IconPosition::fpalettev.o]
-X=189
-Y=955
-
-[IconPosition::frameedit.cpp]
-X=268
-Y=953
-
-[IconPosition::frameedit.h]
-X=362
-Y=953
-
-[IconPosition::frameedit.moc]
-X=6
-Y=1010
-
-[IconPosition::frameedit.o]
-X=101
-Y=1012
-
-[IconPosition::helpbrowser.cpp]
-X=182
-Y=1010
-
-[IconPosition::helpbrowser.h]
-X=269
-Y=1010
-
-[IconPosition::helpbrowser.moc]
-X=356
-Y=1010
-
-[IconPosition::helpbrowser.o]
-X=8
-Y=1084
-
-[IconPosition::hruler.cpp]
-X=103
-Y=1082
-
-[IconPosition::hruler.h]
-X=197
-Y=1082
-
-[IconPosition::hruler.moc]
-X=276
-Y=1082
-
-[IconPosition::hruler.o]
-X=371
-Y=1084
-
-[IconPosition::iconmenubutton.cpp]
-X=7
-Y=1154
-
-[IconPosition::iconmenubutton.h]
-X=94
-Y=1154
-
-[IconPosition::iconmenubutton.o]
-X=181
-Y=1156
-
-[IconPosition::icons]
-X=202
-Y=5
-
-[IconPosition::icons2.h]
-X=281
-Y=1154
-
-[IconPosition::icons4a.h]
-X=365
-Y=1154
-
-[IconPosition::icons5.h]
-X=20
-Y=1226
-
-[IconPosition::icons6.h]
-X=107
-Y=1226
-
-[IconPosition::icontbutton.cpp]
-X=182
-Y=1226
-
-[IconPosition::icontbutton.h]
-X=269
-Y=1226
-
-[IconPosition::icontbutton.o]
-X=356
-Y=1228
-
-[IconPosition::inspage.cpp]
-X=10
-Y=1298
-
-[IconPosition::inspage.h]
-X=104
-Y=1298
-
-[IconPosition::inspage.moc]
-X=183
-Y=1298
-
-[IconPosition::inspage.o]
-X=278
-Y=1300
-
-[IconPosition::libabout]
-X=283
-Y=5
-
-[IconPosition::libpostscript]
-X=359
-Y=5
-
-[IconPosition::libprefs]
-X=24
-Y=62
-
-[IconPosition::linecombo.cpp]
-X=7
-Y=1370
-
-[IconPosition::linecombo.h]
-X=97
-Y=1370
-
-[IconPosition::linecombo.o]
-X=184
-Y=1372
-
-[IconPosition::linkbutton.cpp]
-X=270
-Y=1370
-
-[IconPosition::linkbutton.h]
-X=360
-Y=1370
-
-[IconPosition::linkbutton.o]
-X=12
-Y=1444
-
-[IconPosition::main.cpp]
-X=106
-Y=1442
-
-[IconPosition::main.o]
-X=200
-Y=1444
-
-[IconPosition::mdup.cpp]
-X=104
-Y=1499
-
-[IconPosition::mdup.h]
-X=198
-Y=1499
-
-[IconPosition::mdup.o]
-X=285
-Y=1501
-
-[IconPosition::missing.cpp]
-X=359
-Y=1499
-
-[IconPosition::missing.h]
-X=18
-Y=1556
-
-[IconPosition::missing.moc]
-X=97
-Y=1556
-
-[IconPosition::missing.o]
-X=192
-Y=1558
-
-[IconPosition::modify.cpp]
-X=275
-Y=1556
-
-[IconPosition::modify.h]
-X=369
-Y=1556
-
-[IconPosition::modify.moc]
-X=13
-Y=1613
-
-[IconPosition::modify.o]
-X=108
-Y=1615
-
-[IconPosition::movepage.cpp]
-X=180
-Y=1613
-
-[IconPosition::movepage.h]
-X=271
-Y=1613
-
-[IconPosition::movepage.moc]
-X=357
-Y=1613
-
-[IconPosition::movepage.o]
-X=10
-Y=1687
-
-[IconPosition::mpal.cpp]
-X=106
-Y=1685
-
-[IconPosition::mpal.h]
-X=200
-Y=1685
-
-[IconPosition::mpal.moc]
-X=279
-Y=1685
-
-[IconPosition::mpal.o]
-X=374
-Y=1687
-
-[IconPosition::mspinbox.cpp]
-X=6
-Y=1742
-
-[IconPosition::mspinbox.h]
-X=100
-Y=1742
-
-[IconPosition::mspinbox.o]
-X=187
-Y=1744
-
-[IconPosition::muster.cpp]
-X=275
-Y=1742
-
-[IconPosition::muster.h]
-X=369
-Y=1742
-
-[IconPosition::muster.moc]
-X=13
-Y=1799
-
-[IconPosition::muster.o]
-X=108
-Y=1801
-
-[IconPosition::newfile.cpp]
-X=186
-Y=1799
-
-[IconPosition::newfile.h]
-X=280
-Y=1799
-
-[IconPosition::newfile.moc]
-X=359
-Y=1799
-
-[IconPosition::newfile.o]
-X=19
-Y=1858
-
-[IconPosition::newtemp.cpp]
-X=94
-Y=1856
-
-[IconPosition::newtemp.h]
-X=188
-Y=1856
-
-[IconPosition::newtemp.o]
-X=275
-Y=1858
-
-[IconPosition::page.cpp]
-X=366
-Y=1856
-
-[IconPosition::page.h]
-X=25
-Y=1913
-
-[IconPosition::page.moc]
-X=104
-Y=1913
-
-[IconPosition::page.o]
-X=199
-Y=1915
-
-[IconPosition::pageback.cpp]
-X=269
-Y=1913
-
-[IconPosition::pageback.h]
-X=359
-Y=1913
-
-[IconPosition::pageback.o]
-X=11
-Y=1987
-
-[IconPosition::pageitem.cpp]
-X=94
-Y=1985
-
-[IconPosition::pageitem.h]
-X=188
-Y=1985
-
-[IconPosition::pageitem.o]
-X=275
-Y=1987
-
-[IconPosition::pdfopts.cpp]
-X=360
-Y=1985
-
-[IconPosition::pdfopts.h]
-X=19
-Y=2042
-
-[IconPosition::pdfopts.moc]
-X=98
-Y=2042
-
-[IconPosition::pdfopts.o]
-X=193
-Y=2044
-
-[IconPosition::picsearch.cpp]
-X=269
-Y=2042
-
-[IconPosition::picsearch.h]
-X=359
-Y=2042
-
-[IconPosition::picsearch.moc]
-X=7
-Y=2114
-
-[IconPosition::picsearch.o]
-X=98
-Y=2116
-
-[IconPosition::picstatus.cpp]
-X=181
-Y=2114
-
-[IconPosition::picstatus.h]
-X=275
-Y=2114
-
-[IconPosition::picstatus.moc]
-X=354
-Y=2114
-
-[IconPosition::picstatus.o]
-X=14
-Y=2188
-
-[IconPosition::plugins]
-X=111
-Y=62
-
-[IconPosition::pslib.o]
-X=287
-Y=2188
-
-[IconPosition::query.cpp]
-X=364
-Y=2186
-
-[IconPosition::query.h]
-X=23
-Y=2243
-
-[IconPosition::query.o]
-X=110
-Y=2245
-
-[IconPosition::reformdoc.cpp]
-X=182
-Y=2243
-
-[IconPosition::reformdoc.h]
-X=272
-Y=2243
-
-[IconPosition::reformdoc.moc]
-X=355
-Y=2243
-
-[IconPosition::reformdoc.o]
-X=11
-Y=2317
-
-[IconPosition::scfonts.cpp]
-X=99
-Y=2315
-
-[IconPosition::scfonts.h]
-X=193
-Y=2315
-
-[IconPosition::scfonts.o]
-X=280
-Y=2317
-
-[IconPosition::scfonts_encoding.cpp]
-X=355
-Y=2315
-
-[IconPosition::scfonts_encoding.h]
-X=7
-Y=2387
-
-[IconPosition::scfonts_encoding.o]
-X=94
-Y=2389
-
-[IconPosition::scfonts_ttf.cpp]
-X=182
-Y=2387
-
-[IconPosition::scfonts_ttf.h]
-X=272
-Y=2387
-
-[IconPosition::scfonts_ttf.o]
-X=359
-Y=2389
-
-[IconPosition::scfonts_ttftypes.h]
-X=8
-Y=2459
-
-[IconPosition::scrap.cpp]
-X=103
-Y=2459
-
-[IconPosition::scrap.h]
-X=197
-Y=2459
-
-[IconPosition::scrap.moc]
-X=276
-Y=2459
-
-[IconPosition::scrap.o]
-X=371
-Y=2461
-
-[IconPosition::scribus]
-X=24
-Y=2533
-
-[IconPosition::scribus.bg.qm]
-X=93
-Y=2531
-
-[IconPosition::scribus.bg_BG.po]
-X=182
-Y=2531
-
-[IconPosition::scribus.ca.po]
-X=268
-Y=2531
-
-[IconPosition::scribus.ca.qm]
-X=354
-Y=2531
-
-[IconPosition::scribus.cpp]
-X=12
-Y=2603
-
-[IconPosition::scribus.de.qm]
-X=93
-Y=2603
-
-[IconPosition::scribus.de_DE.po]
-X=181
-Y=2603
-
-[IconPosition::scribus.es.qm]
-X=267
-Y=2603
-
-[IconPosition::scribus.es_ES.po]
-X=356
-Y=2603
-
-[IconPosition::scribus.fr.po]
-X=10
-Y=2675
-
-[IconPosition::scribus.fr.qm]
-X=96
-Y=2675
-
-[IconPosition::scribus.galician.po]
-X=181
-Y=2675
-
-[IconPosition::scribus.gl.qm]
-X=269
-Y=2675
-
-[IconPosition::scribus.h]
-X=367
-Y=2675
-
-[IconPosition::scribus.hu.po]
-X=7
-Y=2747
-
-[IconPosition::scribus.hu.qm]
-X=93
-Y=2747
-
-[IconPosition::scribus.it.po]
-X=185
-Y=2747
-
-[IconPosition::scribus.it.qm]
-X=271
-Y=2747
-
-[IconPosition::scribus.moc]
-X=359
-Y=2747
-
-[IconPosition::scribus.o]
-X=19
-Y=2806
-
-[IconPosition::scribus.sk.qm]
-X=94
-Y=2804
-
-[IconPosition::scribus.sk_SK.po]
-X=183
-Y=2804
-
-[IconPosition::scribus.uk.po]
-X=268
-Y=2804
-
-[IconPosition::scribus.uk.qm]
-X=354
-Y=2804
-
-[IconPosition::scribusXml.cpp]
-X=182
-Y=2948
-
-[IconPosition::scribusXml.h]
-X=269
-Y=2948
-
-[IconPosition::scribusXml.moc]
-X=355
-Y=2948
-
-[IconPosition::scribusXml.o]
-X=8
-Y=3022
-
-[IconPosition::scribusdoc.cpp]
-X=8
-Y=2876
-
-[IconPosition::scribusdoc.h]
-X=95
-Y=2876
-
-[IconPosition::scribusdoc.o]
-X=182
-Y=2878
-
-[IconPosition::scribusview.cpp]
-X=267
-Y=2876
-
-[IconPosition::scribusview.h]
-X=354
-Y=2876
-
-[IconPosition::scribusview.moc]
-X=9
-Y=2948
-
-[IconPosition::scribusview.o]
-X=93
-Y=2950
-
-[IconPosition::serializer.cpp]
-X=94
-Y=3020
-
-[IconPosition::serializer.h]
-X=188
-Y=3020
-
-[IconPosition::serializer.o]
-X=275
-Y=3022
-
-[IconPosition::spalette.cpp]
-X=358
-Y=3020
-
-[IconPosition::spalette.h]
-X=17
-Y=3077
-
-[IconPosition::spalette.moc]
-X=96
-Y=3077
-
-[IconPosition::spalette.o]
-X=191
-Y=3079
-
-[IconPosition::templates]
-X=192
-Y=62
-
-[IconPosition::tree.cpp]
-X=369
-Y=3077
-
-[IconPosition::tree.h]
-X=28
-Y=3134
-
-[IconPosition::tree.moc]
-X=107
-Y=3134
-
-[IconPosition::tree.o]
-X=202
-Y=3136
-
-[IconPosition::util.cpp]
-X=372
-Y=3134
-
-[IconPosition::util.o]
-X=29
-Y=3193
-
-[IconPosition::vruler.cpp]
-X=103
-Y=3191
-
-[IconPosition::vruler.h]
-X=197
-Y=3191
-
-[IconPosition::vruler.moc]
-X=276
-Y=3191
-
-[IconPosition::vruler.o]
-X=371
-Y=3193
/Scribus/scribus/.directory
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: Scribus/scribus/icons5.h
===================================================================
--- Scribus/scribus/icons5.h (.../branches/start) (revision 427)
+++ Scribus/scribus/icons5.h (.../tags/post) (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",
-".........................................................................",
-".........................................................................",
-"..#########...#########...#########...#########...#########...#########..",
-"..#########...#########...#########...#########...#########...#########..",
-"..#########...#########...#########...#########...#########...#########..",
-".........................................................................",
-"........................................................................."};
/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: Scribus/scribus/druck.cpp
===================================================================
--- Scribus/scribus/druck.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/druck.cpp (.../tags/post) (nonexistent)
@@ -1,650 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Druck.ui'
-**
-** Created: Mon Sep 17 21:42:19 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "druck.h"
-#include "druck.moc"
-#include "config.h"
-#include "customfdialog.h"
-#include "cupsoptions.h"
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qmap.h>
-#ifdef HAVE_CUPS
-#include <cups/cups.h>
-#endif
-#ifdef HAVE_CMS
-extern bool CMSuse;
-#endif
-
-extern bool loadText(QString nam, QString *Buffer);
-extern QPixmap loadIcon(QString nam);
-
-AdvOptions::AdvOptions(QWidget* parent, bool Hm, bool Vm, bool Ic) : QDialog( parent, "prin", true, 0 )
-{
- setCaption( tr( "Advanced Options" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- AdvOptionsLayout = new QVBoxLayout( this );
- AdvOptionsLayout->setSpacing( 5 );
- AdvOptionsLayout->setMargin( 10 );
- MirrorH = new QCheckBox(this, "MirrorH");
- MirrorH->setText(tr("Mirror Page(s) horizontal"));
- MirrorH->setChecked(Hm);
- AdvOptionsLayout->addWidget( MirrorH );
- MirrorV = new QCheckBox(this, "MirrorV");
- MirrorV->setText(tr("Mirror Page(s) vertical"));
- MirrorV->setChecked(Vm);
- AdvOptionsLayout->addWidget( MirrorV );
-#ifdef HAVE_CMS
- if (CMSuse)
- {
- UseICC = new QCheckBox(this, "ICC");
- UseICC->setText(tr("Apply ICC-Profiles"));
- UseICC->setChecked(Ic);
- AdvOptionsLayout->addWidget( UseICC );
- }
-#endif
-
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 30 );
- Layout2->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "OK" ) );
- Layout2->addWidget( PushButton1 );
- QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer2 );
- PushButton2 = new QPushButton( this, "PushButton1_2" );
- PushButton2->setText( tr( "Cancel" ) );
- PushButton2->setDefault( TRUE );
- PushButton2->setFocus();
- Layout2->addWidget( PushButton2 );
- QSpacerItem* spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer3 );
- AdvOptionsLayout->addLayout( Layout2 );
- setMinimumSize( sizeHint() );
- connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
-}
-
-Druck::Druck( QWidget* parent, QString PDatei, QString PDev, QString PCom)
- : QDialog( parent, "Dr", true, 0)
-{
- PrinterOpts = "";
- setCaption( tr( "Setup Printer" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- DruckLayout = new QVBoxLayout( this );
- DruckLayout->setSpacing( 6 );
- DruckLayout->setMargin( 10 );
-
- Drucker = new QGroupBox( this, "Drucker" );
- Drucker->setTitle( tr( "Print destination" ) );
- Drucker->setColumnLayout(0, Qt::Vertical );
- Drucker->layout()->setSpacing( 0 );
- Drucker->layout()->setMargin( 0 );
- DruckerLayout = new QGridLayout( Drucker->layout() );
- DruckerLayout->setAlignment( Qt::AlignTop );
- DruckerLayout->setSpacing( 6 );
- DruckerLayout->setMargin( 10 );
-
- Layout1x = new QHBoxLayout;
- Layout1x->setSpacing( 6 );
- Layout1x->setMargin( 0 );
- PrintDest = new QComboBox( true, Drucker, "PrintDest" );
- PrintDest->setMinimumSize( QSize( 250, 22 ) );
- PrintDest->setMaximumSize( QSize( 260, 22 ) );
- PrintDest->setEditable(false);
- QString Pcap;
- QString tmp;
- QStringList wt;
-#ifdef HAVE_CUPS
- cups_dest_t *dests;
- int num_dests;
- num_dests = cupsGetDests(&dests);
- for (int pr = 0; pr < num_dests; pr++)
- {
- tmp = QString(dests[pr].name);
- PrintDest->insertItem(tmp);
- if (tmp == PDev)
- {
- PrintDest->setCurrentItem(PrintDest->count()-1);
- ToFile = false;
- }
- }
- cupsFreeDests(num_dests, dests);
-#else
- if (loadText("/etc/printcap", &Pcap))
- {
- QTextStream ts(&Pcap, IO_ReadOnly);
- while(!ts.atEnd())
- {
- tmp = ts.readLine();
- if (tmp.isEmpty())
- continue;
- if ((tmp[0] != '#') && (tmp[0] != ' ') && (tmp[0] != '\n') && (tmp[0] != '\t'))
- {
- tmp = tmp.stripWhiteSpace();
- if (tmp.right(2) == ":\\")
- tmp = tmp.left(tmp.length()-2);
- else
- tmp = tmp.left(tmp.length()-1);
- wt = QStringList::split("|", tmp);
- PrintDest->insertItem(wt[0]);
- if (wt[0] == PDev)
- {
- PrintDest->setCurrentItem(PrintDest->count()-1);
- ToFile = false;
- }
- }
- }
- }
-#endif
- PrintDest->insertItem(tr("File"));
- if (PDev == "")
- {
- Geraet = PrintDest->text(0);
- ToFile = false;
- }
- else
- Geraet = PDev;
- Layout1x->addWidget( PrintDest );
-
-#ifdef HAVE_CUPS
- OptButton = new QPushButton(Drucker, "Optionen" );
- OptButton->setText( tr( "Options..." ) );
- Layout1x->addWidget( OptButton );
-#endif
- QSpacerItem* spacerDR = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1x->addItem( spacerDR );
- DruckerLayout->addLayout( Layout1x, 0, 0);
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- DateiT = new QLabel( Drucker, "DateiT" );
- DateiT->setEnabled( false );
- DateiT->setText( tr( "File:" ) );
- Layout1->addWidget( DateiT );
- LineEdit1 = new QLineEdit( Drucker, "LineEdit1" );
- LineEdit1->setMinimumSize( QSize( 240, 22 ) );
- LineEdit1->setEnabled(false);
- LineEdit1->setText(PDatei);
- Layout1->addWidget( LineEdit1 );
- ToolButton1 = new QToolButton( Drucker, "ToolButton1" );
- ToolButton1->setMinimumSize( QSize( 80, 22 ) );
- ToolButton1->setText( tr( "Change..." ) );
- ToolButton1->setEnabled(false);
- Layout1->addWidget( ToolButton1 );
- DruckerLayout->addLayout( Layout1, 1, 0 );
-
- OtherCom = new QCheckBox(Drucker, "Dc");
- OtherCom->setChecked(false);
- OtherCom->setText(tr("Print via other Command"));
- DruckerLayout->addWidget( OtherCom, 2, 0, Qt::AlignLeft);
- LayoutCC = new QHBoxLayout;
- LayoutCC->setSpacing( 6 );
- LayoutCC->setMargin( 0 );
- OthText = new QLabel( Drucker, "DateiTc" );
- OthText->setEnabled( false );
- OthText->setText( tr( "Command:" ) );
- LayoutCC->addWidget( OthText );
- Command = new QLineEdit( Drucker, "LineEdit12" );
- Command->setMinimumSize( QSize( 240, 22 ) );
- Command->setEnabled(false);
- Command->setText(PCom);
- LayoutCC->addWidget( Command );
- DruckerLayout->addLayout( LayoutCC, 3, 0 );
- DruckLayout->addWidget( Drucker );
-
-
- Umfang = new QButtonGroup( this, "Umfang" );
- Umfang->setTitle( tr( "Range:" ) );
- Umfang->setColumnLayout(0, Qt::Vertical );
- Umfang->layout()->setSpacing( 0 );
- Umfang->layout()->setMargin( 0 );
- UmfangLayout = new QHBoxLayout( Umfang->layout() );
- UmfangLayout->setAlignment( Qt::AlignTop );
- UmfangLayout->setSpacing( 6 );
- UmfangLayout->setMargin( 5 );
-
- ButtonGroup5 = new QButtonGroup( Umfang, "ButtonGroup5" );
- ButtonGroup5->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup5->setTitle( tr( "" ) );
- ButtonGroup5->setColumnLayout(0, Qt::Vertical );
- ButtonGroup5->layout()->setSpacing( 0 );
- ButtonGroup5->layout()->setMargin( 0 );
- ButtonGroup5Layout = new QGridLayout( ButtonGroup5->layout() );
- ButtonGroup5Layout->setAlignment( Qt::AlignTop );
- ButtonGroup5Layout->setSpacing( 6 );
- ButtonGroup5Layout->setMargin( 5 );
-
- TextLabel2_2 = new QLabel( ButtonGroup5, "TextLabel2_2" );
- TextLabel2_2->setEnabled( false );
- TextLabel2_2->setText( tr( "To page:" ) );
-
- ButtonGroup5Layout->addWidget( TextLabel2_2, 3, 0 );
-
- To = new QSpinBox( ButtonGroup5, "To" );
- To->setEnabled( false );
- To->setMinimumSize( QSize( 70, 22 ) );
- To->setMinValue(1);
- To->setMaxValue(1000);
- To->setValue(1);
- ButtonGroup5Layout->addWidget( To, 3, 1 );
-
- From = new QSpinBox( ButtonGroup5, "From" );
- From->setEnabled( false );
- From->setMinimumSize( QSize( 70, 22 ) );
- From->setMinValue(1);
- From->setMaxValue(1000);
- From->setValue(1);
-
- ButtonGroup5Layout->addWidget( From, 2, 1 );
-
- TextLabel2 = new QLabel( ButtonGroup5, "TextLabel2" );
- TextLabel2->setEnabled( false );
- TextLabel2->setText( tr( "From page:" ) );
-
- ButtonGroup5Layout->addWidget( TextLabel2, 2, 0 );
-
- RadioButton2 = new QRadioButton( ButtonGroup5, "RadioButton2" );
- RadioButton2->setText( tr( "Print range" ) );
-
- ButtonGroup5Layout->addMultiCellWidget( RadioButton2, 1, 1, 0, 1 );
-
- RadioButton1 = new QRadioButton( ButtonGroup5, "RadioButton1" );
- RadioButton1->setText( tr( "Print all" ) );
- RadioButton1->setChecked( true );
-
- ButtonGroup5Layout->addWidget( RadioButton1, 0, 0 );
- UmfangLayout->addWidget( ButtonGroup5 );
-
- ButtonGroup4 = new QButtonGroup( Umfang, "ButtonGroup4" );
- ButtonGroup4->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup4->setTitle( tr( "" ) );
- ButtonGroup4->setColumnLayout(0, Qt::Vertical );
- ButtonGroup4->layout()->setSpacing( 0 );
- ButtonGroup4->layout()->setMargin( 0 );
- ButtonGroup4Layout = new QGridLayout( ButtonGroup4->layout() );
- ButtonGroup4Layout->setAlignment( Qt::AlignTop );
- ButtonGroup4Layout->setSpacing( 6 );
- ButtonGroup4Layout->setMargin( 5 );
-
- FirstPlast = new QRadioButton( ButtonGroup4, "FirstPlast" );
- FirstPlast->setText( tr( "Print last page first" ) );
-
- ButtonGroup4Layout->addMultiCellWidget( FirstPlast, 1, 1, 0, 1 );
-
- FirstPfirst = new QRadioButton( ButtonGroup4, "FirstPfirst" );
- FirstPfirst->setText( tr( "Print first page first" ) );
- FirstPfirst->setChecked( true );
-
- ButtonGroup4Layout->addMultiCellWidget( FirstPfirst, 0, 0, 0, 1 );
-
- TextLabel3 = new QLabel( ButtonGroup4, "TextLabel3" );
- TextLabel3->setText( tr( "Number of copies:" ) );
-
- ButtonGroup4Layout->addWidget( TextLabel3, 2, 0 );
-
- Copies = new QSpinBox( ButtonGroup4, "Copies" );
- Copies->setEnabled( true );
- Copies->setMinimumSize( QSize( 70, 22 ) );
- Copies->setMinValue( 1 );
- Copies->setMaxValue(1000);
- Copies->setValue(1);
-
- ButtonGroup4Layout->addWidget( Copies, 2, 1 );
- UmfangLayout->addWidget( ButtonGroup4 );
- DruckLayout->addWidget( Umfang );
-
- Optionen = new QButtonGroup( this, "Optionen" );
- Optionen->setTitle( tr( "Options" ) );
- Optionen->setColumnLayout(0, Qt::Vertical );
- Optionen->layout()->setSpacing( 0 );
- Optionen->layout()->setMargin( 0 );
- OptionenLayout = new QGridLayout( Optionen->layout() );
- OptionenLayout->setAlignment( Qt::AlignTop );
- OptionenLayout->setSpacing( 5 );
- OptionenLayout->setMargin( 5 );
-
- ButtonGroup3 = new QButtonGroup( Optionen, "ButtonGroup3" );
- ButtonGroup3->setGeometry( QRect( 11, 19, 138, 95 ) );
- ButtonGroup3->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup3->setTitle( tr( "" ) );
- ButtonGroup3->setColumnLayout(0, Qt::Vertical );
- ButtonGroup3->layout()->setSpacing( 0 );
- ButtonGroup3->layout()->setMargin( 0 );
- ButtonGroup3Layout = new QVBoxLayout( ButtonGroup3->layout() );
- ButtonGroup3Layout->setAlignment( Qt::AlignTop );
- ButtonGroup3Layout->setSpacing( 5 );
- ButtonGroup3Layout->setMargin( 5 );
-
- NormalP = new QRadioButton( ButtonGroup3, "NormalP" );
- NormalP->setText( tr( "Print Normal" ) );
- NormalP->setChecked( true );
- ButtonGroup3Layout->addWidget( NormalP );
-
- PrintSep = new QRadioButton( ButtonGroup3, "PrintSep" );
- PrintSep->setText( tr( "Print Separations" ) );
- ButtonGroup3Layout->addWidget( PrintSep );
- ToSeparation = false;
-
- SepArt = new QComboBox( true, ButtonGroup3, "SepArt" );
- SepArt->insertItem( tr( "All" ) );
- SepArt->insertItem("Cyan");
- SepArt->insertItem("Magenta");
- SepArt->insertItem("Yellow");
- SepArt->insertItem("Black");
- SepArt->setEnabled( false );
- SepArt->setEditable( false );
- ButtonGroup3Layout->addWidget( SepArt );
- OptionenLayout->addWidget( ButtonGroup3, 0, 0, Qt::AlignLeft );
-
- ButtonGroup3_2 = new QButtonGroup( Optionen, "ButtonGroup3_2" );
- ButtonGroup3_2->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup3_2->setTitle( tr( "" ) );
- ButtonGroup3_2->setColumnLayout(0, Qt::Vertical );
- ButtonGroup3_2->layout()->setSpacing( 0 );
- ButtonGroup3_2->layout()->setMargin( 0 );
- ButtonGroup3_2Layout = new QVBoxLayout( ButtonGroup3_2->layout() );
- ButtonGroup3_2Layout->setAlignment( Qt::AlignTop );
- ButtonGroup3_2Layout->setSpacing( 5 );
- ButtonGroup3_2Layout->setMargin( 5 );
-
- PrintGray = new QRadioButton( ButtonGroup3_2, "PrintGray" );
- PrintGray->setText( tr( "Print in color if available" ) );
- PrintGray->setChecked( true );
- ButtonGroup3_2Layout->addWidget( PrintGray );
-
- PrintGray2 = new QRadioButton( ButtonGroup3_2, "PrintGray2" );
- PrintGray2->setText( tr( "Print in grayscale" ) );
- ButtonGroup3_2Layout->addWidget( PrintGray2 );
- MirrorH = false;
- MirrorV = false,
- ICCinUse = false;
- AdvOptButton = new QPushButton(ButtonGroup3_2, "Adv");
- AdvOptButton->setText(tr("Advanced Options..."));
- ButtonGroup3_2Layout->addWidget( AdvOptButton );
-
- OptionenLayout->addWidget( ButtonGroup3_2, 0, 1 );
- DruckLayout->addWidget( Optionen );
-
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 24 );
- Layout2->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout2->addItem( spacer );
-
- OKButton = new QPushButton( this, "OKButton" );
- OKButton->setText( tr( "OK" ) );
- OKButton->setDefault( true );
- Layout2->addWidget( OKButton );
- OKButton_2 = new QPushButton( this, "OKButton_2" );
- OKButton_2->setText( tr( "Cancel" ) );
- OKButton_2->setDefault( false );
- Layout2->addWidget( OKButton_2 );
-
- DruckLayout->addLayout( Layout2 );
- if ((PDev==tr("File")) || (PrintDest->count() == 1))
- {
- PrintDest->setCurrentItem(PrintDest->count()-1);
- DateiT->setEnabled(true);
- LineEdit1->setEnabled(true);
- ToolButton1->setEnabled(true);
- ToFile = true;
- }
- setMaximumSize(sizeHint());
-
- // signals and slots connections
- connect( OKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( OKButton_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(SelPrinter(const QString&)));
- connect( RadioButton1, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
- connect( NormalP, SIGNAL(toggled(bool)), this, SLOT(SelMode(bool)));
- connect( ToolButton1, SIGNAL(clicked()), this, SLOT(SelFile()));
- connect( OtherCom, SIGNAL(clicked()), this, SLOT(SelComm()));
- connect( AdvOptButton, SIGNAL( clicked() ), this, SLOT( SetAdvOptions() ) );
-#ifdef HAVE_CUPS
- connect( OptButton, SIGNAL( clicked() ), this, SLOT( SetOptions() ) );
-#endif
-}
-
-void Druck::SetAdvOptions()
-{
- AdvOptions* dia = new AdvOptions(this, MirrorH, MirrorV, ICCinUse);
- if (dia->exec())
- {
- MirrorH = dia->MirrorH->isChecked();
- MirrorV = dia->MirrorV->isChecked();
-#ifdef HAVE_CMS
- if (CMSuse)
- ICCinUse = dia->UseICC->isChecked();
-#endif
- }
- delete dia;
-}
-
-void Druck::SetOptions()
-{
- PrinterOpts = "";
- CupsOptions* dia = new CupsOptions(this, Geraet);
- if (dia->exec())
- {
- struct CupsOptions::OpData daten;
- QMap<QString,CupsOptions::OpData>::Iterator it;
- for (it = dia->KeyToText.begin(); it != dia->KeyToText.end(); ++it)
- {
- if (dia->KeyToDefault[it.key()] != dia->FlagsOpt.at(it.data().Cnum)->currentText())
- {
- if (it.data().KeyW == "mirror")
- PrinterOpts += " -o mirror";
- else
- {
- if (it.data().KeyW == "page-set")
- {
- PrinterOpts += " -o "+it.data().KeyW+"=";
- if (dia->FlagsOpt.at(it.data().Cnum)->currentItem() == 1)
- PrinterOpts += "even";
- else
- PrinterOpts += "odd";
- }
- else
- {
- if (it.data().KeyW == "number-up")
- {
- PrinterOpts += " -o "+it.data().KeyW+"=";
- switch (dia->FlagsOpt.at(it.data().Cnum)->currentItem())
- {
- case 1:
- PrinterOpts += "2";
- break;
- case 2:
- PrinterOpts += "4";
- break;
- case 3:
- PrinterOpts += "6";
- break;
- case 4:
- PrinterOpts += "9";
- break;
- case 5:
- PrinterOpts += "16";
- break;
- }
- }
- else
- PrinterOpts += " -o "+it.data().KeyW+"="+dia->FlagsOpt.at(it.data().Cnum)->currentText();
- }
- }
- }
- }
- }
- delete dia;
-}
-
-void Druck::SelComm()
-{
- if (OtherCom->isChecked())
- {
- OthText->setEnabled(true);
- Command->setEnabled(true);
- DateiT->setEnabled(false);
- LineEdit1->setEnabled(false);
- ToolButton1->setEnabled(false);
- PrintDest->setEnabled(false);
- ToFile = false;
-#ifdef HAVE_CUPS
- OptButton->setEnabled(false);
-#endif
- }
- else
- {
- OthText->setEnabled(false);
- Command->setEnabled(false);
- PrintDest->setEnabled(true);
- SelPrinter(PrintDest->currentText());
-#ifdef HAVE_CUPS
- if (Geraet != tr("File"))
- OptButton->setEnabled(true);
-#endif
- }
-}
-
-void Druck::SelPrinter(const QString& prn)
-{
- if (prn == tr("File"))
- {
- DateiT->setEnabled(true);
- LineEdit1->setEnabled(true);
- ToolButton1->setEnabled(true);
- ToFile = true;
-#ifdef HAVE_CUPS
- OptButton->setEnabled(false);
-#endif
- }
- else
- {
- DateiT->setEnabled(false);
- LineEdit1->setEnabled(false);
- ToolButton1->setEnabled(false);
- ToFile = false;
-#ifdef HAVE_CUPS
- OptButton->setEnabled(true);
-#endif
- }
- Geraet = prn;
-}
-
-void Druck::SelRange(bool e)
-{
- if (e)
- {
- TextLabel2_2->setEnabled( false );
- TextLabel2->setEnabled( false );
- To->setEnabled( false );
- From->setEnabled( false );
- }
- else
- {
- TextLabel2_2->setEnabled( true );
- TextLabel2->setEnabled( true );
- To->setEnabled( true );
- From->setEnabled( true );
- }
-}
-
-void Druck::SelMode(bool e)
-{
- if (e)
- {
- SepArt->setEnabled( false );
- ToSeparation = false;
- }
- else
- {
- SepArt->setEnabled( true );
- ToSeparation = true;
- }
-}
-
-void Druck::SelFile()
-{
- CustomFDialog dia(this, tr("Save as"), tr("Postscript-Files (*.ps);; All Files (*)"), false, false);
- if (LineEdit1->text() != "")
- dia.setSelection(LineEdit1->text());
- if (dia.exec() == QDialog::Accepted)
- LineEdit1->setText(dia.selectedFile());
-}
-
-void Druck::setMinMax(int min, int max)
-{
- To->setMinValue(min);
- To->setMaxValue(max);
- From->setMinValue(min);
- From->setMaxValue(max);
-}
-
-void Druck::setFromTo(int min, int max)
-{
- To->setValue(max);
- From->setValue(min);
-}
-
-QString Druck::printerName()
-{
- return Geraet;
-}
-
-QString Druck::outputFileName()
-{
- return LineEdit1->text();
-}
-
-bool Druck::outputToFile()
-{
- return ToFile;
-}
-
-int Druck::fromPage()
-{
- return From->value();
-}
-
-int Druck::toPage()
-{
- return To->value();
-}
-
-int Druck::numCopies()
-{
- return Copies->value();
-}
-
-int Druck::pageOrder()
-{
- if (FirstPfirst->isChecked())
- return 0;
- else
- return 1;
-}
-
-bool Druck::outputSeparations()
-{
- return ToSeparation;
-}
-
-QString Druck::separationName()
-{
- return SepArt->currentText();
-}
-
-bool Druck::color()
-{
- return PrintGray->isChecked();
-}
/Scribus/scribus/druck.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/linecombo.h
===================================================================
--- Scribus/scribus/linecombo.h (.../branches/start) (revision 427)
+++ Scribus/scribus/linecombo.h (.../tags/post) (nonexistent)
@@ -1,34 +0,0 @@
-/***************************************************************************
- linecombo.h - description
- -------------------
- begin : Thu Jul 12 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 LINECOMBO_H
-#define LINECOMBO_H
-
-#include <qcombobox.h>
-#include <qpixmap.h>
-
-/**
- *@author Franz Schmid
- */
-
-class LineCombo : public QComboBox {
-public:
- LineCombo(QWidget* pa);
- ~LineCombo() {};
-};
-
-#endif
/Scribus/scribus/linecombo.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: Scribus/scribus/serializer.h
===================================================================
--- Scribus/scribus/serializer.h (.../branches/start) (revision 427)
+++ Scribus/scribus/serializer.h (.../tags/post) (nonexistent)
@@ -1,42 +0,0 @@
-/***************************************************************************
- serializer.h - 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. *
- * *
- ***************************************************************************/
-
-#ifndef SERIALIZER_H
-#define SERIALIZER_H
-
-#include <qstring.h>
-#include "scribusview.h"
-/**
- *@author Franz Schmid
- */
-
-class Serializer {
-public:
- Serializer(QString name);
- ~Serializer() {};
- QString Filename;
- QString Objekt;
- int Count;
-
- QString GetObjekt();
- void PutText(PageItem *Item);
- void GetText(PageItem *Item, int Absatz, bool Append = false);
- bool Write();
- bool Read();
-};
-
-#endif
/Scribus/scribus/serializer.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: Scribus/scribus/vruler.cpp
===================================================================
--- Scribus/scribus/vruler.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/vruler.cpp (.../tags/post) (nonexistent)
@@ -1,152 +0,0 @@
-/***************************************************************************
- vruler.cpp - description
- -------------------
- begin : Wed Apr 11 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 "vruler.h"
-#include "vruler.moc"
-#include "page.h"
-#include <qcursor.h>
-Vruler::Vruler(QScrollView *pa, ScribusDoc *doc) : QWidget(pa)
-{
- setEraseColor(QColor(255,255,255));
- doku = doc;
- rfont = font();
- rfont.setPointSize(9);
- offs = -12;
- Markp = 0;
- oldMark = 0;
- Mpressed = false;
-}
-
-void Vruler::mousePressEvent(QMouseEvent *)
-{
- Mpressed = true;
- qApp->setOverrideCursor(QCursor(SplitVCursor), true);
-}
-
-void Vruler::mouseReleaseEvent(QMouseEvent *m)
-{
- Mpressed = false;
- doku->ActPage->DrVX = -1;
- doku->ActPage->SetXGuide(m);
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
-}
-
-void Vruler::mouseMoveEvent(QMouseEvent *m)
-{
- if ((Mpressed) && (m->pos().x() > width()))
- doku->ActPage->FromVRuler(m);
-}
-
-void Vruler::paintEvent(QPaintEvent *)
-{
- int xx, pc;
- 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(24, 0, 24, height());
- p.translate(0, -offs);
- p.setBrush(black);
- p.setPen(black);
- p.setFont(rfont);
- p.scale(1.0, sc);
- if ((doku->PageFP) && (doku->PagesSbS))
- {
- if (doku->FirstPageLeft)
- {
- if (doku->PageC % 2 == 0)
- pc = doku->PageC / 2;
- else
- pc = (doku->PageC+1) / 2;
- }
- else
- {
- if (doku->PageC % 2 == 0)
- pc = doku->PageC / 2 + 1;
- else
- pc = doku->PageC / 2 + 1;
- }
- }
- else
- pc = doku->PageC;
- for (xx = 0; xx < pc; ++xx)
- {
- of = xx * (doku->PageH+30.0);
- for (xl = 0; xl < doku->PageH; xl += iter)
- {
- p.drawLine(18, static_cast<int>(xl+of), 24, static_cast<int>(xl+of));
- }
- for (xl = 0; xl < doku->PageH+(iter2/2); xl += iter2)
- {
- p.drawLine(11, static_cast<int>(xl+of), 24, static_cast<int>(xl+of));
- p.save();
- p.scale(1.0, 1.0 / sc);
- switch (doku->Einheit)
- {
- case 2:
- p.drawText(9, static_cast<int>((xl+of+qRound(10/sc)) * sc), QString::number(xl / iter2));
- break;
- case 3:
- p.drawText(9, static_cast<int>((xl+of+qRound(10/sc)) * sc), QString::number(xl / iter));
- break;
- default:
- p.drawText(9, static_cast<int>((xl+of+qRound(10/sc)) * sc), QString::number(xl / iter * 10));
- break;
- }
- p.restore();
- }
- }
- p.end();
-}
-/** Zeichnet den Pfeil */
-void Vruler::Draw(int wo)
-{
- Markp = wo-qRound(10*doku->Scale);
- QPainter p;
- p.begin(this);
- p.translate(0, -offs);
- p.setPen(white);
- p.setBrush(white);
- p.drawRect(0, oldMark-3, 10, 6);
- p.setPen(red);
- p.setBrush(red);
- QPointArray cr;
- cr.setPoints(3, 9, Markp, 0, Markp+2, 0, Markp-2);
- p.drawPolygon(cr);
- p.end();
- oldMark = Markp;
-}
-
/Scribus/scribus/vruler.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: Scribus/scribus/iso8859-4ps.enc
===================================================================
--- Scribus/scribus/iso8859-4ps.enc (.../branches/start) (revision 427)
+++ Scribus/scribus/iso8859-4ps.enc (.../tags/post) (nonexistent)
@@ -1,96 +0,0 @@
-16#A0 /space
-16#A1 /Aogonek
-16#A2 /kra
-16#A3 /Rcedilla
-16#A4 /currency
-16#A5 /Itilde
-16#A6 /Lcedilla
-16#A7 /section
-16#A8 /dieresis
-16#A9 /Scaron
-16#AA /Emacron
-16#AB /Gcedilla
-16#AC /Tbar
-16#AD /hyphen
-16#AE /Zcaron
-16#AF /macron
-16#B0 /degree
-16#B1 /aogonek
-16#B2 /ogonek
-16#B3 /rcedilla
-16#B4 /acute
-16#B5 /itilde
-16#B6 /lcedilla
-16#B7 /caron
-16#B8 /cedilla
-16#B9 /scaron
-16#BA /emacron
-16#BB /gcedilla
-16#BC /tbar
-16#BD /Eng
-16#BE /zcaron
-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 /Imacron
-16#D0 /Eth
-16#D1 /Ncedilla
-16#D2 /Omacron
-16#D3 /Kcedilla
-16#D4 /Ocircumflex
-16#D5 /Otilde
-16#D6 /Odieresis
-16#D7 /multiply
-16#D8 /Oslash
-16#D9 /Uogonek
-16#DA /Uacute
-16#DB /Ucircumflex
-16#DC /Udieresis
-16#DD /Utilde
-16#DE /Umacron
-16#DF /germandbls
-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 /imacron
-16#F0 /dbar
-16#F1 /ncedilla
-16#F2 /omacron
-16#F3 /kcedilla
-16#F4 /ocircumflex
-16#F5 /otilde
-16#F6 /odieresis
-16#F7 /divide
-16#F8 /oslash
-16#F9 /uogonek
-16#FA /uacute
-16#FB /ucircumflex
-16#FC /udieresis
-16#FD /utilde
-16#FE /umacron
-16#FF /dotaccent
/Scribus/scribus/iso8859-4ps.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: Scribus/scribus/kimageeffect.h
===================================================================
--- Scribus/scribus/kimageeffect.h (.../branches/start) (revision 427)
+++ Scribus/scribus/kimageeffect.h (.../tags/post) (nonexistent)
@@ -1,555 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1998, 1999, 2001, 2002 Daniel M. Duley <mosfet@interaccess.com>
- (C) 1998, 1999 Christian Tibirna <ctibirna@total.net>
- (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org>
-
-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$
-
-#ifndef __KIMAGE_EFFECT_H
-#define __KIMAGE_EFFECT_H
-
-class QImage;
-class QSize;
-class QColor;
-
-/**
- * This class includes various @ref QImage based graphical effects.
- *
- * Everything is
- * static, so there is no need to create an instance of this class. You can
- * just call the static methods. They are encapsulated here merely to provide
- * a common namespace.
- */
-
-class KImageEffect
-{
-public:
- enum GradientType { VerticalGradient, HorizontalGradient,
- DiagonalGradient, CrossDiagonalGradient,
- PyramidGradient, RectangleGradient,
- PipeCrossGradient, EllipticGradient };
- enum RGBComponent { Red, Green, Blue, Gray, All };
-
- enum Lighting {NorthLite, NWLite, WestLite, SWLite,
- SouthLite, SELite, EastLite, NELite};
-
- enum ModulationType { Intensity, Saturation, HueShift, Contrast };
-
- enum NoiseType { UniformNoise=0, GaussianNoise, MultiplicativeGaussianNoise,
- ImpulseNoise, LaplacianNoise, PoissonNoise};
-
- enum RotateDirection{ Rotate90, Rotate180, Rotate270 };
-
- /**
- * Create a gradient from color a to color b of the specified type.
- *
- * @param size The desired size of the gradient.
- * @param ca Color a
- * @param cb Color b
- * @param type The type of gradient.
- * @param ncols The number of colors to use when not running on a
- * truecolor display. The gradient will be dithered to this number of
- * colors. Pass 0 to prevent dithering.
- */
- static QImage gradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType type, int ncols=3);
-
- /**
- * Create an unbalanced gradient.
-
- * An unbalanced gradient is a gradient where the transition from
- * color a to color b is not linear, but in this case, exponential.
- *
- * @param size The desired size of the gradient.
- * @param ca Color a
- * @param cb Color b
- * @param type The type of gradient.
- * @param xfactor The x decay length. Use a value between -200 and 200.
- * @param yfactor The y decay length.
- * @param ncols The number of colors. See KPixmapEffect:gradient.
- */
- static QImage unbalancedGradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType type, int xfactor = 100,
- int yfactor = 100, int ncols = 3);
-
- /**
- * Blends a color into the destination image, using an opacity
- * value for blending one into another. Very fast direct pixel
- * manipulation is used.
- *
- * @author Karol Szwed (gallium@kde.org)
- * @param clr source color to be blended into the destination image.
- * @param dst destination image in which the source will be blended into.
- * @param opacity opacity (in percent) which determines how much the source
- * color will be blended into the destination image.
- * @return The destination image (dst) containing the result.
- */
- static QImage& blend(const QColor& clr, QImage& dst, float opacity);
-
- /**
- * Blend the src image into the destination image, using an opacity
- * value for blending one into another. Very fast direct pixel
- * manipulation is used.
- *
- * @author Karol Szwed (gallium@kde.org)
- * @param src source image to be blended into the destination image.
- * @param dst destination image in which the source will be blended into.
- * @param opacity opacity (in percent) which determines how much the source
- * image will be blended into the destination image.
- * @return The destination image (dst) containing the result.
- */
- static QImage& blend(QImage& src, QImage& dst, float opacity);
-
- /**
- * Blend the provided image into a background of the indicated color.
- *
- * @param initial_intensity this parameter takes values from -1 to 1:
- * a) if positive: how much to fade the image in its
- * less affected spot
- * b) if negative: roughly indicates how much of the image
- * remains unaffected
- * @param bgnd indicates the color of the background to blend in
- * @param eff lets you choose what kind of blending you like
- * @param anti_dir blend in the opposite direction (makes no much sense
- * with concentric blending effects)
- * @param image must be 32bpp
- */
- static QImage& blend(QImage &image, float initial_intensity,
- const QColor &bgnd, GradientType eff,
- bool anti_dir=false);
-
- /**
- * Blend an image into another one, using a gradient type
- * for blending from one to another.
- *
- * @param image1 source1 and result of blending
- * @param image2 source2 of blending
- * @param gt gradient type for blending between source1 and source2
- * @param xf x decay length for unbalanced gradient tpye
- * @param yf y decay length for unbalanced gradient tpye
- */
- static QImage& blend(QImage &image1,QImage &image2,
- GradientType gt, int xf=100, int yf=100);
-
- /**
- * Blend an image into another one, using a color channel of a
- * third image for the decision of blending from one to another.
- *
- * @param image1 Source 1 and result of blending
- * @param image2 Source 2 of blending
- * @param blendImage If the gray value of of pixel is 0, the result
- * for this pixel is that of image1; for a gray value
- * of 1, the pixel of image2 is used; for a value
- * inbetween, a corresponding blending is used.
- * @param channel The RBG channel to use for the blending decision.
- */
- static QImage& blend(QImage &image1, QImage &image2,
- QImage &blendImage, RGBComponent channel);
-
- /**
- * Blend an image into another one, using alpha in the expected way.
- * @author Rik Hemsley (rikkus) <rik@kde.org>
- */
- static bool blend(const QImage & upper, const QImage & lower, QImage & output);
-// Not yet... static bool blend(const QImage & image1, const QImage & image2, QImage & output, const QRect & destRect);
-
- /**
- * Blend an image into another one, using alpha in the expected way and
- * over coordinates @p x and @p y with respect to the lower image.
- * The output is a QImage which is the @p upper image already blended
- * with the @p lower one, so its size will be (in general) the same than
- * @p upper instead of the same size than @p lower like the method above.
- * In fact, the size of @p output is like upper's one only when it can be
- * painted on lower, if there has to be some clipping, output's size will
- * be the clipped area and x and y will be set to the correct up-left corner
- * where the clipped rectangle begins.
- */
- static bool blend(int &x, int &y, const QImage & upper, const QImage & lower, QImage & output);
- /**
- * Blend an image into another one, using alpha in the expected way and
- * over coordinates @p x and @p y with respect to the lower image.
- * The output is painted in the own @p lower image. This is an optimization
- * of the @ref blend method above provided by convenience.
- */
- static bool blendOnLower(int x, int y, const QImage & upper, const QImage & lower);
-
- /**
- * Modifies the intensity of a pixmap's RGB channel component.
- *
- * @author Daniel M. Duley (mosfet)
- * @param image The QImage to process.
- * @param percent Percent value. Use a negative value to dim.
- * @param channel Which channel(s) should be modified
- * @return The @p image, provided for convenience.
- */
- static QImage& channelIntensity(QImage &image, float percent,
- RGBComponent channel);
-
- /**
- * Fade an image to a certain background color.
- *
- * The number of colors will not be changed.
- *
- * @param image The QImage to process.
- * @param val The strength of the effect. 0 <= val <= 1.
- * @param color The background color.
- * @return Returns the @ref image(), provided for convenience.
- */
- static QImage& fade(QImage &img, float val, const QColor &color);
-
-
- /**
- * This recolors a pixmap. The most dark color will become color a,
- * the most bright one color b, and in between.
- *
- * @param image A QImage to process.
- * @param ca Color a
- * @param cb Color b
- */
- static QImage& flatten(QImage &image, const QColor &ca,
- const QColor &cb, int ncols=0);
-
- /**
- * Build a hash on any given @ref QImage
- *
- * @param image The QImage to process
- * @param lite The hash faces the indicated lighting (cardinal poles).
- * @param spacing How many unmodified pixels inbetween hashes.
- * @return Returns the @ref image(), provided for convenience.
- */
- static QImage& hash(QImage &image, Lighting lite=NorthLite,
- unsigned int spacing=0);
-
- /**
- * Either brighten or dim the image by a specified percent.
- * For example, .50 will modify the colors by 50%.
- *
- * @author Daniel M. Duley (mosfet)
- * @param image The QImage to process.
- * @param percent The percent value. Use a negative value to dim.
- * @return Returns The @ref image(), provided for convenience.
- */
- static QImage& intensity(QImage &image, float percent);
-
- /**
- * Modulate the image with a color channel of another image.
- *
- * @param image The QImage to modulate and result.
- * @param modImage The QImage to use for modulation.
- * @param reverse Invert the meaning of image/modImage; result is image!
- * @param type The modulation Type to use.
- * @param factor The modulation amplitude; with 0 no effect [-200;200].
- * @param channel The RBG channel of image2 to use for modulation.
- * @return Returns the @ref image(), provided for convenience.
- */
- static QImage& modulate(QImage &image, QImage &modImage, bool reverse,
- ModulationType type, int factor, RGBComponent channel);
-
- /**
- * Convert an image to grayscale.
- *
- * @author Daniel M. Duley (mosfet)
- * @param image The @ref QImage to process.
- * @param fast Set to @p true in order to use a faster but non-photographic
- * quality algorithm. Appropriate for things such as toolbar icons.
- * @return Returns the @ref image(), provided for convenience.
- */
- static QImage& toGray(QImage &image, bool fast = false);
-
- /**
- * Desaturate an image evenly.
- *
- * @param image The QImage to process.
- * @param desat A value between 0 and 1 setting the degree of desaturation
- * @return Returns the @ref image(), provided for convenience.
- */
- static QImage& desaturate(QImage &image, float desat = 0.3);
-
- /**
- * Fast, but low quality contrast of an image. Also see contrastHSV.
- *
- * @author Daniel M. Duley (mosfet)
- * @param image The QImage to process.
- * @param c A contrast value between -255 to 255.
- * @return The @ref image(), provided for convenience.
- */
- static QImage& contrast(QImage &image, int c);
-
- /**
- * Dither an image using Floyd-Steinberg dithering for low-color
- * situations.
- *
- * @param image The QImage to process.
- * @param palette The color palette to use
- * @param size The size of the palette
- * @return Returns the @ref image(), provided for convenience.
- */
- static QImage& dither(QImage &img, const QColor *palette, int size);
-
- /**
- * Calculate the image for a selected image, for instance a selected icon
- * on the desktop.
- * @param img the QImage to select
- * @param col the selected color, usually from QColorGroup::highlight().
- */
- static QImage& selectedImage( QImage &img, const QColor &col );
-
- /**
- * High quality, expensive HSV contrast. You can do a faster one by just
- * taking a intensity threshold (ie: 128) and incrementing RGB color
- * channels above it and decrementing those below it, but this gives much
- * better results.
- *
- * @author Daniel M. Duley (mosfet)
- * @param img The QImage to process.
- * @param sharpen If true sharpness is increase, (spiffed). Otherwise
- * it is decreased, (dulled).
- */
- static void contrastHSV(QImage &img, bool sharpen=true);
-
- /**
- * Normalizes the pixel values to span the full range of color values.
- * This is a contrast enhancement technique.
- * @author Daniel M. Duley (mosfet)
- */
- static void normalize(QImage &img);
-
- /**
- * Performs histogram equalization on the reference
- * image.
- * @author Daniel M. Duley (mosfet)
- */
- static void equalize(QImage &img);
-
- /**
- * Thresholds the reference image. You can also threshold images by using
- * ThresholdDither in the various QPixmap/QImage convert methods, but this
- * lets you specify a threshold value.
- *
- * @author Daniel M. Duley (mosfet)
- * @param img The QImage to process.
- * @param value The threshold value.
- */
- static void threshold(QImage &img, unsigned int value=128);
-
- /**
- * Produces a 'solarization' effect seen when exposing a photographic
- * film to light during the development process.
- *
- * @author Daniel M. Duley (mosfet)
- * @param img The QImage to process.
- * @param factor The extent of the solarization (0-99.9)
- */
- static void solarize(QImage &img, double factor=50.0);
-
- /**
- * Embosses the source image. This involves highlighting the edges
- * and applying various other enhancements in order to get a metal
- * effect.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @return The embossed image. The original is not changed.
- */
- static QImage emboss(QImage &src);
-
- /**
- * Minimizes speckle noise in the source image using the 8 hull
- * algorithm.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @return The despeckled image. The original is not changed.
- */
- static QImage despeckle(QImage &src);
-
- /**
- * Produces a neat little "charcoal" effect.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param factor The factor for detecting lines (0-99.0).
- * @return The charcoal image. The original is not changed.
- */
- static QImage charcoal(QImage &src, double factor=50.0);
-
- /**
- * Rotates the image by the specified amount
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param r The rotate direction.
- * @return The rotated image. The original is not changed.
- */
- static QImage rotate(QImage &src, RotateDirection r);
-
- /**
- * Scales an image using simple pixel sampling. This does not produce
- * nearly as nice a result as QImage::smoothScale(), but has the
- * advantage of being much faster - only a few milliseconds.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param w The new width.
- * @param h The new height.
- * @return The scaled image. The original is not changed.
- */
- static QImage sample(QImage &src, int w, int h);
-
- /**
- * Adds noise to an image.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param type The algorithm used to generate the noise.
- * @return The image with noise added. The original is not changed.
- */
- static QImage addNoise(QImage &src, NoiseType type = GaussianNoise);
-
- /**
- * Blurs an image by convolving pixel neighborhoods.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param factor The percent weight to give to the center pixel.
- * @return The blurred image. The original is not changed.
- */
- static QImage blur(QImage &src, double factor=50.0);
-
- /**
- * Detects edges in an image using pixel neighborhoods and an edge
- * detection mask.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param factor The percent weight to give to the center pixel.
- * @return The image with edges detected. The original is not changed.
- */
- static QImage edge(QImage &src, double factor=50.0);
-
- /**
- * Implodes an image by a specified percent.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param factor The extent of the implosion.
- * @param background An RGBA value to use for the background. After the
- * effect some pixels may be "empty". This value is used for those pixels.
- * @return The imploded image. The original is not changed.
- */
- static QImage implode(QImage &src, double factor=30.0,
- unsigned int background = 0xFFFFFFFF);
- /**
- * Produces an oil painting effect.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param radius The radius of the pixel neighborhood used in applying the
- * effect.
- * @return The new image. The original is not changed.
- */
- static QImage oilPaint(QImage &src, int radius=3);
-
- /**
- * Sharpens the pixels in the image using pixel neighborhoods.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param factor The percent weight to give to the center pixel.
- * @return The sharpened image. The original is not changed.
- */
- static QImage sharpen(QImage &src, double factor=30.0);
-
- /**
- * Randomly displaces pixels.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param amount The vicinity for choosing a random pixel to swap.
- * @return The image with pixels displaced. The original is not changed.
- */
- static QImage spread(QImage &src, unsigned int amount=3);
-
- /**
- * Shades the image using a distance light source.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param color_shading If true do color shading, otherwise do grayscale.
- * @param azimuth Determines the light source and direction.
- * @param elevation Determines the light source and direction.
- * @return The shaded image. The original is not changed.
- */
- static QImage shade(QImage &src, bool color_shading=true, double azimuth=30.0,
- double elevation=30.0);
- /**
- * Swirls the image by a specified amount
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param degrees The tightness of the swirl.
- * @param background An RGBA value to use for the background. After the
- * effect some pixels may be "empty". This value is used for those pixels.
- * @return The swirled image. The original is not changed.
- */
- static QImage swirl(QImage &src, double degrees=50.0, unsigned int background =
- 0xFFFFFFFF);
-
- /**
- * Modifies the pixels along a sine wave.
- *
- * @author Daniel M. Duley (mosfet)
- * @param src The QImage to process.
- * @param amplitude The amplitude of the sine wave.
- * @param wavelength The frequency of the sine wave.
- * @return The new image. The original is not changed.
- */
- static QImage wave(QImage &src, double amplitude=25.0, double frequency=150.0,
- unsigned int background = 0xFFFFFFFF);
-
-private:
-
- /**
- * Helper function to fast calc some altered (lighten, shaded) colors
- *
- */
- static unsigned int lHash(unsigned int c);
- static unsigned int uHash(unsigned int c);
-
- /**
- * Helper function to find the nearest color to the RBG triplet
- */
- static int nearestColor( int r, int g, int b, const QColor *pal, int size );
-
- static void hull(const int x_offset, const int y_offset, const int polarity,
- const int width, const int height,
- unsigned int *f, unsigned int *g);
- static unsigned int generateNoise(unsigned int pixel, NoiseType type);
- static unsigned int interpolateColor(QImage *image, double x, double y,
- unsigned int background);
-};
-
-#endif
/Scribus/scribus/kimageeffect.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: Scribus/scribus/scfonts.cpp
===================================================================
--- Scribus/scribus/scfonts.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/scfonts.cpp (.../tags/post) (nonexistent)
@@ -1,624 +0,0 @@
-/*
- Scribus font handling code - copyright (C) 2001 by
- Alastair M. Robinson
-
- Based on code by Christian Töpp and Franz Schmid.
-
- Contributed to the Scribus project under the terms of
- the GNU General Public License version 2, or any later
- version, at your discretion.
-*/
-
-#include <qapplication.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstrlist.h>
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfont.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
-
-#include <cstdlib>
-#include "scfonts.h"
-#include "scfonts_ttf.h"
-#ifdef HAVE_FREETYPE
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
-#include FT_GLYPH_H
-#endif
-
-extern bool loadText(QString nam, QString *Buffer);
-extern bool GlyNames(QMap<uint, QString> *GList, QString Dat);
-
-SCFonts_Encoding Foi::StdEncoding("Stdenc.txt");
-SCFonts_Encoding Foi::TTFEncoding("TTFenc.txt");
-
-Foi::Foi(QString scname, QString path, bool embedps, SCFonts_Encoding &encoding) :
- SCName(scname), Datei(path), EmbedPS(embedps), Encoding(encoding)
-{
-}
-
-QString Foi::RealName()
-{
- QString result="Base";
- return(result);
-}
-
-bool Foi::EmbedFont(QString &str)
-{
- str+="Base";
- return(false);
-}
-
-bool Foi::ReadMetrics()
-{
- HasMetrics=false;
- for(int i=0;i<256;++i)
- CharWidth[i]=0;
- return(false);
-}
-
-bool Foi::GlNames(QMap<uint, QString> *GList)
-{
- return GlyNames(GList, Datei);
-}
-
-/*
- Class Foi_postscript
- Subclass of Foi, for Postscript fonts that could possibly have a .afm file
- associated with them for metrics information.
-*/
-
-class Foi_postscript : public Foi
-{
- public:
- Foi_postscript(QString scname, QString path, bool embedps, SCFonts_Encoding &encoding) :
- Foi(scname,path,embedps,encoding), metricsread(false)
- {
- HasMetrics=false;
- HasKern = false;
- Ascent = "0";
- CapHeight = "0";
- Descender = "0";
- ItalicAngle = "0";
- StdVW = "1";
- FontBBox = "0 0 0 0";
- IsFixedPitch = false;
-#ifdef HAVE_FREETYPE
- HasMetrics=true;
-#else
- QString afm=Datei.left(Datei.length()-3);
- QFile f(afm+"afm");
- if(f.exists())
- HasMetrics=true;
- else
- {
- f.setName(afm+"AFM");
- if(f.exists())
- HasMetrics=true;
- else
- {
- f.setName(afm+"Afm");
- if(f.exists())
- HasMetrics=true;
- }
- }
-#endif
- }
-
- virtual QString RealName()
- {
- if(cached_RealName)
- return(cached_RealName);
- QString tmp = "a /NoName";
- QString tmp2 = "";
- loadText(Datei, &tmp2);
- int bd = tmp2.find("/FontName");
- tmp = tmp2.mid(bd, 80);
- QString rn,dummy;
- QTextIStream (&tmp) >> dummy >> rn;
- cached_RealName=rn.remove(0,1);
- return(cached_RealName);
- }
-
- virtual bool ReadMetrics() // routine by Franz Schmid - modified by Alastair M. Robinson
- {
- if(metricsread)
- return(HasMetrics);
-#ifdef HAVE_FREETYPE
- CharWidth.clear();
- QString tmp;
- bool error;
- FT_Library library;
- FT_ULong charcode;
- FT_UInt gindex;
- FT_Face face;
- error = FT_Init_FreeType( &library );
- if (error)
- {
- UseFont = false;
- return false;
- }
- error = FT_New_Face( library, Datei, 0, &face );
- if (error)
- {
- UseFont = false;
- return false;
- }
- uniEM = static_cast<float>(face->units_per_EM);
- QString afnm = Datei.left(Datei.length()-3);
- QFile afm(afnm+"afm");
- if(!(afm.exists()))
- {
- afm.setName(afnm+"Afm");
- if(!(afm.exists()))
- afm.setName(afnm+"AFM");
- }
- if (afm.exists())
- error = FT_Attach_File(face, afm.name());
- HasKern = FT_HAS_KERNING(face);
- Ascent = tmp.setNum(face->ascender);
- Descender = tmp.setNum(face->descender);
- CapHeight = Ascent;
- ItalicAngle = "0";
- StdVW = "1";
- FontBBox = tmp.setNum(face->bbox.xMin)+" "+tmp.setNum(face->bbox.yMin)+" "+tmp.setNum(face->bbox.xMax)+" "+tmp.setNum(face->bbox.yMax);
- IsFixedPitch = face->face_flags & 4;
- gindex = 0;
- charcode = FT_Get_First_Char( face, &gindex );
- while ( gindex != 0 )
- {
- FT_Load_Glyph( face, gindex, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP );
- CharWidth.insert(charcode, face->glyph->metrics.horiAdvance / uniEM);
- charcode = FT_Get_Next_Char( face, charcode, &gindex );
- }
- FT_Done_FreeType( library );
- HasMetrics=true;
- metricsread=true;
-#else
- QString afnm,tmpaf, afmz, AFMName, Enco;
- QStringList wt3, wt4, wtiso;
- int AFMIndex, AFMWidth;
- float afmwid;
- bool stdEnc = true;
- AFMIndex = 0;
- AFMWidth = 0;
-
- for (int am = 0; am < 256; ++am)
- CharWidth[am] = 0;
-
- afnm=Datei.left(Datei.length()-3);
- QFile afm(afnm+"afm");
- if(!(afm.exists()))
- {
- afm.setName(afnm+"Afm");
- if(!(afm.exists()))
- {
- afm.setName(afnm+"AFM");
- }
- }
- if (afm.exists())
- {
- if (afm.open(IO_ReadOnly))
- {
- QTextStream ts7(&afm);
- tmpaf = ts7.read();
- afm.close();
- QTextStream ts8(&tmpaf, IO_ReadOnly);
- while (!ts8.atEnd())
- {
- afmz = ts8.readLine();
- afmz = afmz.simplifyWhiteSpace();
- if (afmz.startsWith("Ascender"))
- Ascent = afmz.remove(0, 9);
- if (afmz.startsWith("CapHeight"))
- CapHeight = afmz.remove(0, 10);
- if (afmz.startsWith("Descender"))
- Descender = afmz.remove(0, 10);
- if (afmz.startsWith("ItalicAngle"))
- ItalicAngle = afmz.remove(0, 12);
- if (afmz.startsWith("StdVW"))
- StdVW = afmz.remove(0, 6);
- if (afmz.startsWith("IsFixedPitch"))
- {
- Enco = afmz.remove(0, 13);
- if (Enco == "false")
- IsFixedPitch = false;
- else
- IsFixedPitch = true;
- }
- if (afmz.startsWith("FontBBox"))
- FontBBox = afmz.remove(0, 9);
- if (afmz.startsWith("StartCharMetrics"))
- break;
- if (afmz.startsWith("EncodingScheme"))
- {
- Enco = afmz.stripWhiteSpace();
- Enco = Enco.remove(0, 15);
- if (Enco == "FontSpecific")
- stdEnc = false;
- else
- stdEnc = true;
- }
- }
- while (!afmz.startsWith("EndCharMetrics"))
- {
- afmz = ts8.readLine();
- wt3 = QStringList::split(";", afmz);
- AFMIndex=0;
- AFMName="";
- for (uint wtc = 0; wtc < wt3.count(); ++wtc)
- {
- wt4 = QStringList::split(" ", wt3[wtc]);
- if (wt4[0] == "C")
- AFMIndex = wt4[1].toInt();
- if (wt4[0] == "WX")
- AFMWidth = wt4[1].toInt();
- if (wt4[0] == "N")
- AFMName = wt4[1];
- }
- afmwid = float(AFMWidth) / 1000.0;
- if (AFMIndex > 0) // Whatever the encoding of the font, we need
- { // to extract metrics for ISO-latin1.
- // Either we can map from the font's encoding
- // to latin 1 by name (if the font has standard
- // glyph names), or we can map by code, assuming
- // the codes correspond to standard encoding.
- if(Encoding.present(AFMName))
- {
- CharWidth[Encoding[AFMName]] = afmwid;
- }
- else
- {
-/* if(StdEncoding.present(AFMIndex))
- {
- QString &glyph=StdEncoding[AFMIndex];
- if(Encoding.present(glyph))
- CharWidth[Encoding[glyph]] = afmwid;
- else
- CharWidth[AFMIndex] = afmwid;
- }
- else */
- CharWidth[AFMIndex] = afmwid;
- }
- }
- else
- {
- if(Encoding.present(AFMName))
- CharWidth[Encoding[AFMName]] = afmwid;
- }
- }
- HasMetrics=true;
- metricsread=true;
- }
- else
- {
- HasMetrics=false;
- }
- }
-#endif
- return(HasMetrics);
- }
- private:
- QString cached_RealName;
- bool metricsread;
-};
-
-/*
- Class Foi_pfb
- Subclass of Foi, specifically for Adobe type 1 .pfb fonts.
- Implements: RealName() and EmbedFont().
-*/
-
-class Foi_pfb : public Foi_postscript
-{
- public:
- Foi_pfb(QString scname, QString path, bool embedps, SCFonts_Encoding &encoding) :
- Foi_postscript(scname,path,embedps,encoding)
- {
- }
-
- virtual bool EmbedFont(QString &str)
- {
- QFile f(Datei);
- QString tmp2 = "";
- if (f.open(IO_ReadOnly))
- {
- QByteArray bb(f.size());
- f.readBlock(bb.data(), f.size());
- if ((bb[0] == char(0x80)) && (static_cast<int>(bb[1]) == 1))
- {
- QString tmp3="";
- QString tmp4 = "";
- uint posi,cxxc=0;
- for (posi = 6; posi < bb.size(); ++posi)
- {
- if ((bb[posi] == char(0x80)) && (static_cast<int>(bb[posi+1]) == 2))
- break;
- str += bb[posi];
- }
- uint ulen;
- ulen = bb[posi+2] & 0xff;
- ulen |= (bb[posi+3] << 8) & 0xff00;
- ulen |= (bb[posi+4] << 16) & 0xff0000;
- ulen |= (bb[posi+5] << 24) & 0xff000000;
- if (ulen > bb.size())
- ulen = bb.size()-7;
- posi += 6;
- char linebuf[80];
- cxxc=0;
- for (uint j = 0; j < ulen; ++j)
- {
- unsigned char u=bb[posi];
- linebuf[cxxc]=((u >> 4) & 15) + '0';
- if(u>0x9f) linebuf[cxxc]+='a'-':';
- ++cxxc;
- u&=15; linebuf[cxxc]=u + '0';
- if(u>0x9) linebuf[cxxc]+='a'-':';
- ++posi;
- ++cxxc;
- if (cxxc > 72)
- {
- linebuf[cxxc++]='\n';
- linebuf[cxxc++]=0;
- str += linebuf;
- cxxc = 0;
- }
- }
- linebuf[cxxc]=0;
- str += linebuf;
- str += "\n";
- posi += 6;
- for (uint j = posi; j < bb.size(); ++j)
- {
- if ((bb[j] == char(0x80)) && (static_cast<int>(bb[j+1]) == 3))
- break;
- if(bb[j]=='\r')
- str+="\n";
- else
- str += bb[j];
- }
- str += "\n";
- cxxc = 0;
- }
- f.close();
- return(true);
- }
- else
- return(false);
- }
-};
-
-/*
- Class Foi_pfa
- Subclass of Foi, specifically for Adobe type 1 and type 3 .pfa fonts.
- Implements: RealName() and EmbedFont().
-*/
-
-class Foi_pfa : public Foi_postscript
-{
- public:
- Foi_pfa(QString scname, QString path, bool embedps, SCFonts_Encoding &encoding) :
- Foi_postscript(scname,path,embedps,encoding)
- {
- }
- virtual bool EmbedFont(QString &str)
- {
- return loadText(Datei, &str);
- }
-};
-
-
-/***************************************************************************/
-
-SCFonts::~SCFonts()
-{
- if(ExtraPath.length())
- {
- system("xset fp- "+ExtraPath);
- system("xset fp rehash");
- }
-}
-
-/* Add a path to the list of fontpaths, ensuring that
- a trailing slash is present.
- Checks to make sure this path is not already present
- before adding.
-*/
-void SCFonts::AddPath(QString p)
-{
- if(p.right(1) != "/")
- p += "/";
- if(FontPath.find(p)==-1)
- FontPath.insert(FontPath.count(),p);
-}
-
-void SCFonts::AddScalableFonts(const QString &path)
-{
- QFile fp(QString(path)+"fonts.scale");
- if(!(fp.exists()))
- fp.setName(QString(path)+"fonts.dir");
- if(fp.open(IO_ReadOnly))
- {
- int entries;
- QString tmp;
- QTextStream ts(&fp);
- entries = ts.readLine().toInt();
- while(tmp = ts.readLine())
- {
- int pos=tmp.find(" ");
- QString filename=tmp.left(pos);
- QFileInfo fo(QString(path)+filename);
- if (!fo.exists())
- continue;
- tmp=tmp.right(tmp.length()-(pos+1)).stripWhiteSpace();
-
- QStringList wt = QStringList::split("-",tmp);
- if(wt.count()>4)
- {
- QString FoEnc = wt[wt.count()-2].lower()+"-"+wt[wt.count()-1].lower();
- QString LoEnc = QString(QTextCodec::codecForLocale()->name()).lower().replace(QRegExp(" "), "");
- QString FName=wt[1];
- QString Style=wt[2];
- Style[0] = Style[0].upper();
- FName[0] = FName[0].upper();
- QString SCName = FName + " " + Style;
-// QString SCName = FName[0].upper() + FName.remove(0,1) + " ";
-// SCName += Style[0].upper() + Style.remove(0,1);
- if (wt[3] == "i") SCName += " Italic";
- if (wt[3] == "o") SCName += " Oblique";
-#if 0
- if (wt[4] != "normal") // sadly, QT seems to ignore this field
- {
- QString scn_wid=wt[4][0].upper() + wt[4].remove(0,1);
- SCName+=" " + scn_wid;
- }
-#endif
- if ((!(find(SCName)))
- && ((FoEnc == LoEnc)
- || ((FoEnc == "iso8859-1") && (LoEnc == "iso8859-15"))
- || ((FoEnc == "iso8859-1") && (LoEnc == "utf-8"))
- || (FoEnc == "adobe-fontspecific")))
- {
- Foi *t=0;
- if(filename.contains(".pfa",false))
- t=new Foi_pfa(SCName,path+filename,true,Encoding);
- else if(filename.contains(".pfb",false))
- t=new Foi_pfb(SCName,path+filename,true,Encoding);
- else if(filename.contains(".ttf",false))
- t=new Foi_ttf(SCName,path+filename,true,Encoding);
- if(t)
- {
- t->Font.setPointSize(12);
- t->Font.setRawName(tmp);
- t->Font.setPointSize(12);
- t->FontEnc = FoEnc;
- insert(SCName,t);
- t->EmbedPS = true;
- t->UseFont = true;
-// if(t->HasMetrics)
-// t->ReadMetrics();
- t->CharWidth[13] = 0;
- }
- }
- }
- }
- fp.close();
- }
-}
-
-void SCFonts::AddXFontPath()
-{
- int pathcount,i;
- Display *display=XOpenDisplay(NULL);
- char **fontpath=XGetFontPath(display,&pathcount);
- for(i=0; i<pathcount; ++i)
- AddPath(fontpath[i]);
- XFreeFontPath(fontpath);
-}
-
-/* replacement for AddXFontServerPath() for correctly parsing
- * RedHad-Style /etc/X11/fs/config files */
-
-void SCFonts::AddXFontServerPath()
-{
- QFile fs("/etc/X11/fs/config");
- if(!(fs.exists()))
- {
- fs.setName("/usr/X11R6/lib/X11/fs/config");
- if(!(fs.exists()))
- {
- fs.setName("/usr/X11/lib/X11/fs/config");
- if(!(fs.exists()))
- return;
- }
- }
-
- if (fs.open(IO_ReadOnly))
- {
- QString fsconfig,paths,tmp;
- QTextStream tsx(&fs);
- fsconfig = tsx.read();
- fs.close();
-
- int pos = fsconfig.find("catalogue");
- paths = fsconfig.mid(pos);
- paths = paths.mid(paths.find("=")+1);
-
- pos=0;
- do {
- pos = paths.find("\n",pos+1);
- } while (pos > -1 && paths.mid(pos-1, 1) == ",");
-
- if(pos<0) pos=paths.length();
- paths = paths.left(pos);
- paths = paths.simplifyWhiteSpace();
- paths.replace(QRegExp(" "), "");
- paths.replace(QRegExp(","), "\n");
- paths += "\n";
- paths = paths.stripWhiteSpace();
-
- pos=-1;
- do {
- int pos2;
- pos2 = paths.find("\n",pos+1);
- tmp = paths.mid(pos+1,(pos2-pos)-1);
- pos=pos2;
-
- AddPath(tmp);
-
- } while (pos > -1);
- }
-}
-
-/* Add an extra path to the X-Server's Fontpath
- * allowing a user to have extra Fonts installed
- * only for this user. Was used also as an emergency
- * fallback if no suitable Font was found elsewere */
-void SCFonts::AddUserPath(QString pf)
-{
- QFile fx(pf+"/scribusfont.rc");
- ExtraPath="";
- if ( fx.exists() )
- {
- if (fx.open(IO_ReadOnly))
- {
- QTextStream tsx(&fx);
- while (!tsx.atEnd())
- {
- ExtraPath += tsx.readLine();
- ExtraPath += ",";
- }
- fx.close();
- }
- ExtraPath = ExtraPath.left(ExtraPath.length()-1);
- system("xset fp+ "+ExtraPath);
- system("xset fp rehash");
- }
-}
-
-void SCFonts::GetFonts(QString pf)
-{
- FontPath.clear();
- AddUserPath(pf);
- AddXFontPath();
- AddXFontServerPath();
- for(QStrListIterator fpi(FontPath) ; fpi.current() ; ++fpi)
- AddScalableFonts(fpi.current());
-}
-
-void SCFonts::FreeExtraFonts()
-{
- if(ExtraPath.length())
- {
- system("xset fp- "+ExtraPath);
- system("xset fp rehash");
- ExtraPath = "";
- }
-}
/Scribus/scribus/scfonts.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: Scribus/scribus/picstatus.h
===================================================================
--- Scribus/scribus/picstatus.h (.../branches/start) (revision 427)
+++ Scribus/scribus/picstatus.h (.../tags/post) (nonexistent)
@@ -1,47 +0,0 @@
-#ifndef PICSTATUS_H
-#define PICSTATUS_H
-
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qtable.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qheader.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include "scribusdoc.h"
-#include "scribusview.h"
-
-class PicStatus : public QDialog
-{
- Q_OBJECT
-
-public:
- PicStatus(QWidget* parent, ScribusDoc *docu, ScribusView *viewi);
- ~PicStatus() {};
-
- QTable* PicTable;
- QHeader *Header;
- QPushButton* CancelB;
- QPushButton* OkB;
- ScribusDoc *doc;
- ScribusView *view;
- int Zeilen;
- QPtrList<QCheckBox> FlagsPic;
- QValueList<uint> ItemNrs;
-
-private slots:
- void GotoPic();
- void SearchPic();
- void PrintPic();
-
-protected:
- QVBoxLayout* PicStatusLayout;
- QHBoxLayout* Layout2;
-
-signals:
- void GotoSeite(int);
-};
-
-#endif // PICSTATUS_H
/Scribus/scribus/picstatus.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: Scribus/scribus/libprefs/Makefile.am
===================================================================
--- Scribus/scribus/libprefs/Makefile.am (.../branches/start) (revision 427)
+++ Scribus/scribus/libprefs/Makefile.am (.../tags/post) (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)
/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: Scribus/scribus/libprefs/prefs.cpp
===================================================================
--- Scribus/scribus/libprefs/prefs.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/libprefs/prefs.cpp (.../tags/post) (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;
-}
-
/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: Scribus/scribus/libprefs/prefs.h
===================================================================
--- Scribus/scribus/libprefs/prefs.h (.../branches/start) (revision 427)
+++ Scribus/scribus/libprefs/prefs.h (.../tags/post) (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
/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: Scribus/scribus/fmitem.h
===================================================================
--- Scribus/scribus/fmitem.h (.../branches/start) (revision 427)
+++ Scribus/scribus/fmitem.h (.../tags/post) (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
/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: Scribus/scribus/seiten.cpp
===================================================================
--- Scribus/scribus/seiten.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/seiten.cpp (.../tags/post) (nonexistent)
@@ -1,875 +0,0 @@
-#include "seiten.h"
-#include "seiten.moc"
-#include <qcursor.h>
-extern QPixmap loadIcon(QString nam);
-
-/* Code fuer DragObjekt */
-SeDrag::SeDrag(QString secret, QWidget * parent, const char * name): QStoredDrag("page/magic", parent, name)
-{
- QByteArray data(secret.length());
- for (uint a = 0; a < secret.length(); ++a)
- {
- data[a]= QChar(secret[a]);
- }
- setEncodedData( data );
-}
-
-bool SeDrag::canDecode( QDragMoveEvent* e )
-{
- return e->provides("page/magic");
-}
-
-bool SeDrag::decode( QDropEvent* e, QString& str )
-{
- QByteArray payload = e->data("page/magic");
- if (payload.size())
- {
- e->accept();
- str = "";
- for (uint a = 0; a < payload.size(); ++a)
- {
- str += payload[a];
- }
- return true;
- }
- return false;
-}
-
-/* IconItems Code */
-SeItem::SeItem(QTable* parent, QString text, QPixmap Pix, bool ss)
- : QTableItem(parent, QTableItem::Never, text, Pix)
-{
- Side = ss;
- setWordWrap(true);
-}
-
-void SeItem::paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected)
-{
- int px = pixmap().width();
- int py = pixmap().height();
- SeView *sv;
- QTable *tt = table();
- sv = (SeView*)tt;
- if (Side)
- {
- p->drawPixmap(0, (cr.height()-py)/2, pixmap());
- if (sv->Namen)
- p->drawText(px, 0, cr.width()-px, cr.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, text());
- }
- else
- {
- p->drawPixmap(cr.width()-px-2, (cr.height()-py)/2, pixmap());
- if (sv->Namen)
- p->drawText(0, 0, cr.width()-px-2, cr.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, text());
- }
-}
-
-/* ListBox Subclass */
-SeList::SeList(QWidget* parent) : QListBox(parent)
-{
- Mpressed = false;
- setAcceptDrops(true);
-}
-
-void SeList::mouseReleaseEvent(QMouseEvent *m)
-{
- Mpressed = false;
- if (m->button() == RightButton)
- {
- QPopupMenu *pmen = new QPopupMenu();
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
- int px = pmen->insertItem(tr("Show Page Previews"), this, SLOT(ToggleTh()));
- if (Thumb)
- pmen->setItemChecked(px, true);
- pmen->exec(QCursor::pos());
- delete pmen;
- }
-}
-
-void SeList::ToggleTh()
-{
- Thumb = !Thumb;
- emit ThumbChanged();
-}
-
-void SeList::mousePressEvent(QMouseEvent* e)
-{
- e->accept();
- CurItem = 0;
- QListBoxItem *i = itemAt(e->pos());
- if (i)
- {
- CurItem = i;
- Mpos = e->pos();
- Mpressed = true;
-
- }
-}
-
-void SeList::mouseMoveEvent(QMouseEvent* e)
-{
- if ((Mpressed) && ((Mpos - e->pos()).manhattanLength() > 4))
- {
- Mpressed = false;
- QListBoxItem *i = itemAt(Mpos);
- if (i)
- {
- QDragObject *dr = new SeDrag("1"+i->text(), this, "te");
- dr->setPixmap(loadIcon("doc.png"));
- dr->drag();
- }
- }
-}
-
-/* QTable Subclass */
-SeView::SeView(QWidget* parent) : QTable(parent)
-{
- setDragEnabled(true);
- setAcceptDrops(true);
- viewport()->setAcceptDrops(true);
- setShowGrid(false);
- Mpressed = false;
- Doppel = false;
- Namen = true;
- pix = QPixmap(2, 34);
- pix.fill(black);
- setFocusPolicy(NoFocus);
-}
-
-void SeView::contentsMousePressEvent(QMouseEvent* e)
-{
- e->accept();
- Mpos = e->pos();
- Mpressed = true;
-}
-
-void SeView::contentsMouseReleaseEvent(QMouseEvent* e)
-{
- e->accept();
- Mpressed = false;
- if (e->button() == RightButton)
- {
- QPopupMenu *pmen = new QPopupMenu();
- qApp->setOverrideCursor(QCursor(ArrowCursor), true);
- int px = pmen->insertItem(tr("Show Template Names"), this, SLOT(ToggleNam()));
- if (Namen)
- pmen->setItemChecked(px, true);
- pmen->exec(QCursor::pos());
- delete pmen;
- }
- emit Click(rowAt(e->pos().y()), columnAt(e->pos().x()), e->button());
-}
-
-void SeView::ToggleNam()
-{
- Namen = !Namen;
- if (Namen)
- {
- setColumnWidth(1, 100);
- setColumnWidth(3, 100);
- }
- else
- {
- setColumnWidth(1, 35);
- setColumnWidth(3, 35);
- }
- hide();
- show();
-}
-
-void SeView::contentsMouseMoveEvent(QMouseEvent* e)
-{
- QString str, tmp;
- int p;
- int a = rowAt(e->pos().y());
- int b = columnAt(e->pos().x());
- if ((Mpressed) && ((Mpos - e->pos()).manhattanLength() > 4))
- {
- Mpressed = false;
- if ((a != -1) && (b != -1))
- {
- str = text(a, b);
- p = GetPage(a, b);
- QDragObject *dr = new SeDrag("2 "+tmp.setNum(p)+" "+str, this, "te");
- dr->setPixmap(loadIcon("doc.png"));
- dr->drag();
- }
- }
-}
-
-void SeView::contentsDropEvent(QDropEvent * e)
-{
- QString str, tmp;
- if (SeDrag::decode(e, str))
- {
- if (str.startsWith("1"))
- {
- int a = rowAt(e->pos().y());
- int b = columnAt(e->pos().x());
- int p;
- tmp = str.remove(0,1);
- if ((a == -1) || (b == -1))
- return;
- if (Doppel)
- {
- if (((a % 2) == 1) && ((b == 0) || (b == 2)))
- {
- if (Links)
- {
- if (b == 0)
- emit NewPage(a-1, tmp);
- if (b == 2)
- emit NewPage(a, tmp);
- }
- else
- {
- if (b == 0)
- {
- if (a == 1)
- emit NewPage(a-1, tmp);
- else
- emit NewPage(a-2, tmp);
- }
- if (b == 2)
- emit NewPage(a-1, tmp);
- }
- ClearPix();
- }
- if (a == numRows()-1)
- emit NewPage(MaxC+1, tmp);
- if (((a % 2) == 1) && ((b == 1) || (b == 3)))
- {
- if (item(a,b) != 0)
- {
- p = GetPage(a, b);
- emit UseTemp(tmp, p);
- setText(a, b, tmp);
- }
- }
- }
- else
- {
- if ((a == -1) || ((a % 2) == 0))
- {
- setNumRows(numRows()+2);
- if (a == -1)
- emit NewPage(numRows()/2-1, tmp);
- else
- {
- emit NewPage(a/2, tmp);
- clearCell(a, 0);
- }
- }
- else
- {
- emit UseTemp(tmp, a/2);
- setText(a, 0, tmp);
- }
- }
- return;
- }
- if (str.startsWith("2"))
- {
- int st = str.find(" ");
- int en = str.find(" ", st+1);
- tmp = str.mid(en+1);
- int dr = str.mid(st, en-st).toInt();
- int a = rowAt(e->pos().y());
- int b = columnAt(e->pos().x());
- int p, z;
- if ((a == -1) || (b == -1))
- return;
- if (Doppel)
- {
- if (((a % 2) == 1) && ((b == 0) || (b == 2)))
- {
- if (Links)
- {
- if (b == 0)
- z = a-1;
- if (b == 2)
- z = a;
- }
- else
- {
- if (b == 0)
- {
- if (a == 1)
- z = a-1;
- else
- z = a-2;
- }
- if (b == 2)
- z = a-1;
- }
- if (dr != z)
- emit MovePage(dr, z);
- ClearPix();
- }
- if (a == numRows()-1)
- {
- z = MaxC;
- emit MovePage(dr, z);
- }
- if (((a % 2) == 1) && ((b == 1) || (b == 3)))
- {
- if (item(a,b) != 0)
- {
- p = GetPage(a, b);
- emit UseTemp(tmp, p);
- setText(a, b, tmp);
- }
- }
- }
- else
- {
- if ((a == -1) || ((a % 2) == 0))
- {
- if (a != -1)
- {
- if (dr != a/2)
- emit MovePage(dr, a/2);
- clearCell(a, 0);
- }
- }
- else
- {
- emit UseTemp(tmp, a/2);
- setText(a, 0, tmp);
- }
- }
- ClearPix();
- return;
- }
- }
-}
-
-void SeView::contentsDragEnterEvent(QDragEnterEvent *e)
-{
- if (SeDrag::canDecode(e))
- {
- e->accept();
- }
-}
-
-void SeView::contentsDragLeaveEvent(QDragLeaveEvent *e)
-{
- ClearPix();
-}
-
-void SeView::contentsDragMoveEvent(QDragMoveEvent *e)
-{
- QString str, tmp;
- if (SeDrag::decode(e, str))
- {
- int a = rowAt(e->pos().y());
- int b = columnAt(e->pos().x());
- if ((a == -1) || (b == -1))
- {
- ClearPix();
- return;
- }
- if (Doppel)
- {
- if ((((a % 2) == 1) && ((b == 0) || (b == 2))) || (a == numRows()-1))
- {
- QPixmap pm;
- pm = QPixmap(columnWidth(b), rowHeight(a));
- pm.fill(darkBlue);
- setPixmap(a, b, pm);
- }
- else
- ClearPix();
- }
- else
- {
- if ((a % 2) == 0)
- {
- QPixmap pm;
- pm = QPixmap(columnWidth(0), 9);
- pm.fill(darkBlue);
- setPixmap(a, 0, pm);
- }
- else
- ClearPix();
- }
- }
-}
-
-void SeView::ClearPix()
-{
- for (int a = 0; a < numRows(); ++a)
- {
- if (Doppel)
- {
- if ((a % 2) == 1)
- {
- clearCell(a,0);
- setPixmap(a,2, pix);
- }
- else
- {
- clearCell(a,0);
- clearCell(a,1);
- setPixmap(a,2, pix);
- clearCell(a,3);
- }
- }
- else
- {
- if ((a % 2) == 0)
- clearCell(a, 0);
- }
- }
-}
-
-int SeView::GetPage(int r, int c)
-{
- int p;
- if (Doppel)
- {
- if (Links)
- {
- if (c == 1)
- p = r;
- if (c == 3)
- p = r+1;
- }
- else
- {
- if ((c == 1) && ( r == 1))
- return 0;
- if (c == 1)
- p = r - 1;
- else
- p = r;
- }
- p--;
- if (p > MaxC)
- p = MaxC;
- }
- else
- {
- p = r / 2;
- if (p > MaxC)
- p = MaxC;
- }
- return p;
-}
-
-/* Der Muelleimer */
-TrashBin::TrashBin(QWidget * parent) : QLabel(parent, "Trash")
-{
- Normal = loadIcon("trashcan.png");
- Offen = loadIcon("trashcan2.png");
- setPixmap(Normal);
- setScaledContents(false);
- setAcceptDrops(true);
-}
-
-void TrashBin::dragEnterEvent(QDragEnterEvent *e)
-{
- if (SeDrag::canDecode(e))
- {
- e->accept();
- setPixmap(Offen);
- }
-}
-
-void TrashBin::dragLeaveEvent(QDragLeaveEvent *)
-{
- setPixmap(Normal);
-}
-
-void TrashBin::dropEvent(QDropEvent * e)
-{
- setPixmap(Normal);
- QString str, tmp;
- if (SeDrag::decode(e, str))
- {
- if (str.startsWith("2"))
- {
- int st = str.find(" ");
- int en = str.find(" ", st+1);
- emit DelPage(str.mid(st, en-st).toInt());
- }
- if (str.startsWith("1"))
- {
- tmp = str.remove(0,1);
- emit DelMaster(tmp);
- }
- }
-}
-
-
-SeitenPal::SeitenPal(QWidget* parent)
- : QDialog( parent, "SP", false, Qt::WStyle_Customize | Qt::WStyle_Title | Qt::WStyle_Tool)
-{
- setCaption( tr( "Arrange Pages" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- SeitenPalLayout = new QVBoxLayout( this );
- SeitenPalLayout->setSpacing( 5 );
- SeitenPalLayout->setMargin( 5 );
- Splitter1 = new QSplitter( this, "Splitter1" );
- Splitter1->setOrientation( QSplitter::Vertical );
- QWidget* privateLayoutWidget = new QWidget( Splitter1, "Layout2" );
- Layout2 = new QVBoxLayout( privateLayoutWidget, 0, 5, "Layout2");
- TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" );
- TextLabel1->setText( tr( "Available Templates:" ) );
- Layout2->addWidget( TextLabel1 );
- TemplList = new SeList(privateLayoutWidget);
- TemplList->setMinimumSize(QSize(130,70));
- TemplList->Thumb = false;
- Layout2->addWidget( TemplList );
- QWidget* privateLayoutWidget_2 = new QWidget( Splitter1, "Layout3" );
- Layout3 = new QVBoxLayout( privateLayoutWidget_2, 0, 5, "Layout3");
- TextLabel2 = new QLabel( privateLayoutWidget_2, "TextLabel2" );
- TextLabel2->setText( tr( "Document Pages:" ) );
- Layout3->addWidget( TextLabel2 );
- PageView = new SeView(privateLayoutWidget_2);
- PageView->setLeftMargin(0);
- PageView->verticalHeader()->hide();
- PageView->setTopMargin(0);
- PageView->horizontalHeader()->hide();
- PageView->setSorting(false);
- PageView->setSelectionMode(QTable::NoSelection);
- PageView->setColumnMovingEnabled(false);
- PageView->setRowMovingEnabled(false);
-// PageView->setFocusStyle(QTable::FollowStyle);
- PageView->setNumRows(1);
- PageView->setNumCols(1);
- PageView->setMinimumSize(QSize(130,120));
- Layout3->addWidget( PageView );
- SeitenPalLayout->addWidget( Splitter1 );
-
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
-
- Layout4 = new QVBoxLayout;
- Layout4->setSpacing( 6 );
- Layout4->setMargin( 0 );
- DS = new QCheckBox(this, "DS");
- DS->setText( tr( "Facing Pages" ) );
- Layout4->addWidget( DS );
- LP = new QCheckBox(this, "LP");
- LP->setText( tr( "Left Page first" ) );
- Layout4->addWidget( LP );
- Layout1->addLayout( Layout4 );
-
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
-
- Trash = new TrashBin( this );
- Trash->setMinimumSize(QSize(22,22));
- Layout1->addWidget( Trash );
- SeitenPalLayout->addLayout( Layout1 );
- pix = loadIcon("document2.png");
- connect(TemplList, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(selTemplate()));
- connect(TemplList, SIGNAL(ThumbChanged()), this, SLOT(RebuildTemp()));
- connect(PageView, SIGNAL(Click(int, int, int)), this, SLOT(GotoPage(int, int, int)));
- connect(PageView, SIGNAL(MovePage(int, int)), this, SLOT(MPage(int, int)));
- connect(DS, SIGNAL(clicked()), this, SLOT(HandleDS()));
- connect(LP, SIGNAL(clicked()), this, SLOT(HandleLP()));
- connect(Trash, SIGNAL(DelMaster(QString)), this, SLOT(DelMPage(QString)));
- QToolTip::add( Trash, tr( "Drag Pages or Template Pages onto the Trashbin to delete them." ) );
- QToolTip::add( PageView, tr( "Here you can see all Pages of your Document." ) );
- QToolTip::add( TemplList, tr( "Here are all your Templates, to create a new Page\ndrag a Template to the Pageview below." ) );
-}
-
-
-void SeitenPal::closeEvent(QCloseEvent *ce)
-{
- emit Schliessen();
- ce->accept();
-}
-
-void SeitenPal::DelMPage(QString tmp)
-{
- if (tmp == tr("Normal"))
- return;
- int Nr = Vie->MasterNames[tmp];
- Page* Seite = Vie->MasterPages.at(Nr);
- Vie->MasterPages.remove(Nr);
- delete Seite->parentWidget();
- Vie->MasterNames.clear();
- for (uint aa=0; aa < Vie->MasterPages.count(); ++aa)
- {
- Seite = Vie->MasterPages.at(aa);
- Seite->PageNr = aa;
- if (Vie->Doc->PageFP)
- {
- if (Seite->LeftPg)
- {
- Seite->Margins.Left = Vie->Doc->PageM.Right;
- Seite->Margins.Right = Vie->Doc->PageM.Left;
- }
- else
- {
- Seite->Margins.Right = Vie->Doc->PageM.Right;
- Seite->Margins.Left = Vie->Doc->PageM.Left;
- }
- }
- else
- {
- Seite->Margins.Right = Vie->Doc->PageM.Right;
- Seite->Margins.Left = Vie->Doc->PageM.Left;
- }
- Seite->Margins.Top = Vie->Doc->PageM.Top;
- Seite->Margins.Bottom = Vie->Doc->PageM.Bottom;
- Vie->MasterNames[Seite->PageNam] = aa;
- }
- for (uint b=0; b<Vie->DocPages.count(); ++b)
- {
- if (Vie->DocPages.at(b)->MPageNam == tmp)
- Vie->DocPages.at(b)->MPageNam = "Normal";
- }
- Vie->DrawNew();
- RebuildTemp();
- RebuildPage();
- Vie->Doc->setModified();
-}
-
-void SeitenPal::MPage(int r, int c)
-{
- if (r > c)
- Vie->movePage(r, r+1, c, 0);
- else
- {
- if (c > PageView->MaxC)
- Vie->movePage(r, r+1, c, 2);
- else
- Vie->movePage(r, r+1, c, 1);
- }
- RebuildPage();
- Vie->Doc->setModified();
-}
-
-void SeitenPal::GotoPage(int r, int c, int b)
-{
- int p;
- if ((b == LeftButton) && (r != -1) && (c != -1))
- {
- p = PageView->GetPage(r, c);
- emit GotoSeite(p);
- }
-}
-
-void SeitenPal::DisablePal()
-{
- PageView->setEnabled(false);
- TemplList->setEnabled(false);
- DS->setEnabled(false);
- LP->setEnabled(false);
-}
-
-void SeitenPal::EnablePal()
-{
- PageView->setEnabled(true);
- TemplList->setEnabled(true);
- DS->setEnabled(true);
- if (PageView->Doppel)
- LP->setEnabled(true);
- else
- LP->setEnabled(false);
-}
-
-void SeitenPal::HandleDS()
-{
- float tpr = Vie->Doc->PageM.Top;
- float lr = Vie->Doc->PageM.Left;
- float rr = Vie->Doc->PageM.Right;
- float br = Vie->Doc->PageM.Bottom;
- bool fp = DS->isChecked();
- Vie->Doc->resetPage(tpr, lr, rr, br, fp);
- Vie->reformPages();
- Vie->DrawNew();
- Vie->GotoPage(Vie->Doc->ActPage->PageNr);
- RebuildPage();
- Vie->Doc->setModified();
- if (fp)
- LP->setEnabled(true);
- else
- LP->setEnabled(false);
-}
-
-void SeitenPal::HandleLP()
-{
- float tpr = Vie->Doc->PageM.Top;
- float lr = Vie->Doc->PageM.Left;
- float rr = Vie->Doc->PageM.Right;
- float br = Vie->Doc->PageM.Bottom;
- bool fp2 = Vie->Doc->PageFP;
- if (fp2)
- Vie->Doc->FirstPageLeft = LP->isChecked();
- Vie->Doc->resetPage(tpr, lr, rr, br, fp2);
- Vie->reformPages();
- Vie->DrawNew();
- Vie->GotoPage(Vie->Doc->ActPage->PageNr);
- RebuildPage();
- Vie->Doc->setModified();
-}
-
-void SeitenPal::RebuildTemp()
-{
- TemplList->clear();
- if (Vie == 0)
- return;
- QMap<QString,int>::Iterator it;
- for (it = Vie->MasterNames.begin(); it != Vie->MasterNames.end(); ++it)
- {
- if (TemplList->Thumb)
- {
- if (it.key() == "Normal")
- TemplList->insertItem(Vie->MPageToPixmap(it.key(),60), tr("Normal"));
- else
- TemplList->insertItem(Vie->MPageToPixmap(it.key(),60), it.key());
- }
- else
- {
- if (it.key() == "Normal")
- TemplList->insertItem(tr("Normal"));
- else
- TemplList->insertItem(it.key());
- }
- }
-}
-
-void SeitenPal::RebuildPage()
-{
- QString str;
- disconnect(DS, SIGNAL(clicked()), this, SLOT(HandleDS()));
- disconnect(LP, SIGNAL(clicked()), this, SLOT(HandleLP()));
- PageView->setNumRows(1);
- PageView->setNumCols(1);
- if (Vie == 0)
- {
- connect(DS, SIGNAL(clicked()), this, SLOT(HandleDS()));
- connect(LP, SIGNAL(clicked()), this, SLOT(HandleLP()));
- return;
- }
- PageView->Doppel = Vie->Doc->PageFP;
- PageView->Links = Vie->Doc->FirstPageLeft;
- DS->setChecked(PageView->Doppel);
- LP->setChecked(PageView->Links);
- if (PageView->Doppel)
- LP->setEnabled(true);
- PageView->MaxC = Vie->Pages.count()-1;
- if (Vie->Doc->PageFP)
- {
- int cc, cb;
- bool Side;
- if (PageView->Namen)
- resize(240, height());
- else
- resize(180, height());
- PageView->setNumCols(4);
- PageView->setColumnWidth(0, 5);
- PageView->setColumnWidth(2, 5);
- if (PageView->Namen)
- {
- PageView->setColumnWidth(1, 100);
- PageView->setColumnWidth(3, 100);
- }
- else
- {
- PageView->setColumnWidth(1, 35);
- PageView->setColumnWidth(3, 35);
- }
- cc = 1;
- if (Vie->Doc->FirstPageLeft)
- {
- PageView->setNumRows(((Vie->Doc->PageC-1)/2 + 1) * 2 + 1);
- cb = 1;
- }
- else
- {
- PageView->setNumRows((Vie->Doc->PageC/2 + 1) * 2 +1);
- cb = 3;
- }
- for (uint a = 0; a < Vie->Pages.count(); ++a)
- {
- str = Vie->Pages.at(a)->MPageNam;
- Side = cb == 1 ? false : true;
- QTableItem *it = new SeItem( PageView, str, CreateIcon(a, pix), Side);
- PageView->setItem(cc, cb, it);
- PageView->setRowHeight(cc, pix.height());
- PageView->setPixmap(cc, 2, PageView->pix);
- PageView->setPixmap(cc-1, 2, PageView->pix);
- PageView->setRowHeight(cc-1, 10);
- PageView->setRowReadOnly(cc-1, true);
- PageView->adjustRow(cc);
- cb += 2;
- if (cb > 3)
- {
- cb = 1;
- cc += 2;
- }
- }
- }
- else
- {
- PageView->setNumRows(Vie->Pages.count()*2+1);
- PageView->setNumCols(1);
- resize(180, height());
- int cc = 1;
- for (uint a = 0; a < Vie->Pages.count(); ++a)
- {
- str = Vie->Pages.at(a)->MPageNam;
- QTableItem *it = new SeItem( PageView, str, CreateIcon(a, pix), true);
- PageView->setItem(cc, 0, it);
- PageView->setRowHeight(cc, pix.height());
- PageView->adjustRow(cc);
- PageView->setRowHeight(cc-1, 10);
- PageView->setRowReadOnly(cc-1, true);
- cc += 2;
- }
- PageView->adjustColumn(0);
- }
- PageView->setRowHeight(PageView->numRows()-1, 10);
- if (Vie->Doc->PageFP)
- PageView->setPixmap(PageView->numRows()-1, 2, PageView->pix);
- PageView->setRowReadOnly(PageView->numRows()-1, true);
- PageView->repaint();
- connect(DS, SIGNAL(clicked()), this, SLOT(HandleDS()));
- connect(LP, SIGNAL(clicked()), this, SLOT(HandleLP()));
-}
-
-void SeitenPal::Rebuild()
-{
- RebuildTemp();
- RebuildPage();
- if (Vie == 0)
- DisablePal();
- else
- EnablePal();
-}
-
-void SeitenPal::SetView(ScribusView *view)
-{
- Vie = view;
-}
-
-void SeitenPal::selTemplate()
-{
- if (TemplList->CurItem != 0)
- emit EditTemp(TemplList->CurItem->text());
-}
-
-QPixmap SeitenPal::CreateIcon(int nr, QPixmap ret)
-{
- QString tmp;
- QPainter p;
- p.begin(&ret);
- p.setBrush(white);
- p.setBackgroundColor(white);
- p.setBackgroundMode(QPainter::OpaqueMode);
- p.setPen(QPen(black, 1, SolidLine, FlatCap, MiterJoin));
- p.setFont(QFont("Helvetica", 12, QFont::Bold));
- tmp = tmp.setNum(nr+1);
- QRect b = p.boundingRect(3,0, ret.width(), ret.height(), Qt::AlignCenter, tmp);
- p.drawRect(QRect(b.x()-2, b.y()-2, b.width()+4, b.height()+4));
- p.drawText(b, Qt::AlignCenter, tmp);
- p.end();
- return ret;
-}
/Scribus/scribus/seiten.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: Scribus/scribus/scribuswin.cpp
===================================================================
--- Scribus/scribus/scribuswin.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/scribuswin.cpp (.../tags/post) (nonexistent)
@@ -1,115 +0,0 @@
-/***************************************************************************
- scribuswin.cpp - 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. *
- * *
- ***************************************************************************/
-
-#include "scribuswin.h"
-#include "scribuswin.moc"
-extern QPixmap loadIcon(QString nam);
-
-ScribusWin::ScribusWin(QWidget* parent, ScribusDoc* ddoc)
- : QMainWindow(parent, "", WDestructiveClose)
-{
- setIcon(loadIcon("AppIcon.xpm"));
- doc = ddoc;
- muster = NULL;
- NrItems = 0;
- First = 1;
- Last = 0;
-}
-
-void ScribusWin::setView(ScribusView* dview)
-{
- view = dview;
-}
-
-void ScribusWin::closeEvent(QCloseEvent *ce)
-{
- if (doc->isModified())
- {
- int exit=QMessageBox::information(this,
- tr("Warning"),
- tr("Document:")+" "+doc->DocName+"\n"+tr("has been changed since the last save."),
- tr("Save Now"),
- tr("Cancel"),
- tr("Leave Anyway"),
- 0, 1);
- switch (exit)
- {
- case 0:
- emit SaveAndClose();
- ce->accept();
- break;
- case 1:
- break;
- case 2:
- emit Schliessen();
- ce->accept();
- break;
- }
- }
- else
- {
- emit Schliessen();
- ce->accept();
- }
-}
-
-void ScribusWin::CloseCMSProfiles()
-{
-#ifdef HAVE_CMS
- cmsCloseProfile(doc->DocInputProf);
- cmsCloseProfile(doc->DocOutputProf);
- cmsCloseProfile(doc->DocPrinterProf);
- cmsDeleteTransform(stdTrans);
- cmsDeleteTransform(stdProof);
- cmsDeleteTransform(stdTransImg);
- cmsDeleteTransform(stdProofImg);
-#endif
-}
-
-void ScribusWin::OpenCMSProfiles(ProfilesL InPo, ProfilesL MoPo, ProfilesL PrPo)
-{
-#ifdef HAVE_CMS
- QString pfad = PREL;
- pfad += "/lib/scribus/profiles/";
- doc->DocInputProf = cmsOpenProfileFromFile(InPo[doc->CMSSettings.DefaultInputProfile2], "r");
- doc->DocOutputProf = cmsOpenProfileFromFile(pfad + MoPo[doc->CMSSettings.DefaultMonitorProfile], "r");
- doc->DocPrinterProf = cmsOpenProfileFromFile(pfad + PrPo[doc->CMSSettings.DefaultPrinterProfile], "r");
- int dcmsFlags = 0;
- if (Gamut)
- dcmsFlags |= cmsFLAGS_GAMUTCHECK;
- else
- dcmsFlags |= cmsFLAGS_SOFTPROOFING;
- stdProof = cmsCreateProofingTransform(doc->DocInputProf, TYPE_RGB_16,
- doc->DocOutputProf, TYPE_RGB_16,
- doc->DocPrinterProf,
- IntentPrinter,
- IntentMonitor, dcmsFlags);
- stdTrans = cmsCreateTransform(doc->DocInputProf, TYPE_RGB_16,
- doc->DocOutputProf, TYPE_RGB_16,
- IntentMonitor,
- cmsFLAGS_NOTPRECALC);
- stdProofImg = cmsCreateProofingTransform(doc->DocInputProf, TYPE_RGBA_8,
- doc->DocOutputProf, TYPE_RGBA_8,
- doc->DocPrinterProf,
- IntentPrinter,
- IntentMonitor, dcmsFlags);
- stdTransImg = cmsCreateTransform(doc->DocInputProf, TYPE_RGBA_8,
- doc->DocOutputProf, TYPE_RGBA_8,
- IntentMonitor,
- cmsFLAGS_NOTPRECALC);
-#endif
-}
/Scribus/scribus/scribuswin.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: Scribus/scribus/delpages.h
===================================================================
--- Scribus/scribus/delpages.h (.../branches/start) (revision 427)
+++ Scribus/scribus/delpages.h (.../tags/post) (nonexistent)
@@ -1,44 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'DelPage.ui'
-**
-** Created: Thu Jun 14 11:37:35 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef DELPAGES_H
-#define DELPAGES_H
-
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-
-class DelPages : public QDialog
-{
- Q_OBJECT
-
-public:
- DelPages( QWidget* parent, int act, int max );
- ~DelPages() {};
-
- QPushButton* Cancel;
- QPushButton* OK;
- QLabel* TextLabel2;
- QSpinBox* ToPage;
- QLabel* TextLabel1;
- QSpinBox* FromPage;
-
-protected:
- QVBoxLayout* DLayout;
- QHBoxLayout* Layout4;
- QHBoxLayout* Layout3;
-
-public slots:
- virtual void FromChanged(int nr);
- virtual void ToChanged(int nr);
-
-};
-
-#endif // DELPAGES_H
/Scribus/scribus/delpages.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: Scribus/scribus/linkbutton.cpp
===================================================================
--- Scribus/scribus/linkbutton.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/linkbutton.cpp (.../tags/post) (nonexistent)
@@ -1,38 +0,0 @@
-/***************************************************************************
- linkbutton.cpp - description
- -------------------
- begin : Wed Jul 11 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 "linkbutton.h"
-#include "icons6.h"
-#include <qiconset.h>
-LinkButton::LinkButton(QWidget *pa) : QToolButton(pa)
-{
- setBackgroundMode(PaletteBackground);
- QIconSet a = QIconSet();
- a.setPixmap(QPixmap(ChainC), QIconSet::Automatic, QIconSet::Normal, QIconSet::On);
- a.setPixmap(QPixmap(ChainO), QIconSet::Automatic, QIconSet::Normal, QIconSet::Off);
- setIconSet(a);
-}
-
-QSize LinkButton::sizeHint()
-{
- return QSize(QPixmap(ChainC).width(),QPixmap(ChainC).height());
-}
-
-QSize LinkButton::minimumSizeHint()
-{
- return QSize(QPixmap(ChainC).width(),QPixmap(ChainC).height());
-}
/Scribus/scribus/linkbutton.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: Scribus/scribus/cupsoptions.h
===================================================================
--- Scribus/scribus/cupsoptions.h (.../branches/start) (revision 427)
+++ Scribus/scribus/cupsoptions.h (.../tags/post) (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
/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: Scribus/scribus/iso8859-13.enc
===================================================================
--- Scribus/scribus/iso8859-13.enc (.../branches/start) (revision 427)
+++ Scribus/scribus/iso8859-13.enc (.../tags/post) (nonexistent)
@@ -1,37 +0,0 @@
-0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /space /exclam /quotedbl /numbersign
-/dollar /percent /ampersand /quotesingle /parenleft
-/parenright /asterisk /plus /comma /hyphen /period
-/slash /zero /one /two /three /four /five /six /seven
-/eight /nine /colon /semicolon /less /equal /greater
-/question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N
-/O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash
-/bracketright /asciicircum /underscore /grave /a /b /c /d
-/e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w
-/x /y /z /braceleft /bar /braceright /asciitilde /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /space /guillemotright /cent /pounds
-/currency /yen /brokenbar /paragraph /Oslash /copyright
-/ordfeminine /Rcedilla /guillemotleft /logicalnot /less /registered
-/AE /degree /plusminus /twosuperior /threesuperior /quoteleft
-/colon /oslash /onesuperior /rcedilla /guillemotright /onequarter
-/onehalf /threequarters /questiondown /ae /Aogonek /Iogonek
-/Amacron /Cacute /Adieresis /Aring /Eogonek /Emacron
-/Ccaron /Eacute /Zacute /Edotaccent /Gcedilla /Kcedilla
-/Imacron /Lcedilla /Scaron /Nacute /Ncedilla /Oacute
-/Omacron /Otilde /Odieresis /multiply /Uogonek /Lslash
-/Sacute /Umacron /Udieresis /Zdotaccent /Zcaron /germandbls
-/aogonek /iogonek /amacron /cacute /adieresis /aring
-/eogonek /emacron /ccaron /eacute /zacute /edotaccent
-/gcedilla /kcedilla /imacron /lcedilla /scaron /nacute
-/ncedilla /oacute /omacron /otilde /odieresis /divide
-/uogonek /lslash /sacute /umacron /udieresis /zdotaccent
-/zcaron /quoteright
/Scribus/scribus/iso8859-13.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: Scribus/scribus/iso8859-15.enc
===================================================================
--- Scribus/scribus/iso8859-15.enc (.../branches/start) (revision 427)
+++ Scribus/scribus/iso8859-15.enc (.../tags/post) (nonexistent)
@@ -1,32 +0,0 @@
-0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl
-/numbersign /dollar /percent /ampersand /quotesingle /parenleft
-/parenright /asterisk /plus /comma /hyphen /period /slash /zero
-/one /two /three /four /five /six /seven /eight /nine /colon /semicolon
-/less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J
-/K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft
-/backslash /bracketright /asciicircum /underscore /grave /a /b /c
-/d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y
-/z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /space /exclamdown /cent /sterling /Euro /yen
-/Scaron /section /scaron /copyright /ordfeminine /guillemotleft
-/logicalnot /hyphen /registered /macron /degree /plusminus
-/twosuperior /threesuperior /Zcaron /mu /paragraph /bullet /zcaron
-/onesuperior /ordmasculine /guillemotright /OE /oe /Ydieresis
-/questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis
-/Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis
-/Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve
-/Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave
-/Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave
-/aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla
-/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex
-/idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde
-/odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis
-/yacute /thorn /ydieresis
/Scribus/scribus/iso8859-15.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: Scribus/scribus/fpoint.cpp
===================================================================
--- Scribus/scribus/fpoint.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/fpoint.cpp (.../tags/post) (nonexistent)
@@ -1,65 +0,0 @@
-/***************************************************************************
- fpoint.cpp - 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. *
- * *
- ***************************************************************************/
-
-#include "fpoint.h"
-
-FPoint::FPoint(float x, float y)
-{
- xp = x;
- yp = y;
-}
-
-FPoint::FPoint(QPoint p)
-{
- xp = p.x();
- yp = p.y();
-}
-
-float FPoint::x()
-{
- return xp;
-}
-
-float FPoint::y()
-{
- return yp;
-}
-
-void FPoint::setX(float x)
-{
- xp = x;
-}
-
-void FPoint::setY(float y)
-{
- yp = y;
-}
-
-FPoint &FPoint::operator+=( const FPoint &p )
-{
- xp += p.xp;
- yp += p.yp;
- return *this;
-}
-
-FPoint &FPoint::operator-=( const FPoint &p )
-{
- xp -= p.xp;
- yp -= p.yp;
- return *this;
-}
-
/Scribus/scribus/fpoint.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: Scribus/scribus/fpointarray.h
===================================================================
--- Scribus/scribus/fpointarray.h (.../branches/start) (revision 427)
+++ Scribus/scribus/fpointarray.h (.../tags/post) (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
/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: Scribus/scribus/mdup.cpp
===================================================================
--- Scribus/scribus/mdup.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/mdup.cpp (.../tags/post) (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() ) );
-}
-
-
/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: Scribus/scribus/customfdialog.h
===================================================================
--- Scribus/scribus/customfdialog.h (.../branches/start) (revision 427)
+++ Scribus/scribus/customfdialog.h (.../tags/post) (nonexistent)
@@ -1,77 +0,0 @@
-/***************************************************************************
- customfdialog.h - 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. *
- * *
- ***************************************************************************/
-
-#ifndef CUSTOMFDIALOG_H
-#define CUSTOMFDIALOG_H
-
-#include <qfiledialog.h>
-#include <qurl.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qframe.h>
-#include <qtoolbutton.h>
-/**
- *@author Franz Schmid
- */
-class ImIconProvider : public QFileIconProvider
-{
- Q_OBJECT
- QStringList fmts;
- QPixmap imagepm;
- QPixmap docpm;
- QPixmap pspm;
- QPixmap pdfpm;
- QPixmap txtpm;
-
-public:
- ImIconProvider(QWidget *pa);
- ~ImIconProvider() {};
-
- const QPixmap * pixmap(const QFileInfo &fi);
-};
-
-class FDialogPreview : public QLabel, public QFilePreview
-{
- Q_OBJECT
-public:
- FDialogPreview(QWidget *pa);
- ~FDialogPreview() {};
- void GenPreview(QString name);
- virtual void previewUrl(const QUrl &url);
-};
-
-class CustomFDialog : public QFileDialog
-{
- Q_OBJECT
-public:
- CustomFDialog(QWidget *pa, QString cap = "", QString filter = "", bool Pre = false, bool mod = true, bool comp = false);
- ~CustomFDialog();
- QDir cDir;
- QCheckBox* SaveZip;
- QFrame* Layout;
- QToolButton* HomeB;
-private slots:
- void slotHome();
- void HandleComp();
-protected:
- QHBoxLayout* Layout1;
-};
-
-#endif
/Scribus/scribus/customfdialog.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: Scribus/scribus/colorchart.h
===================================================================
--- Scribus/scribus/colorchart.h (.../branches/start) (revision 427)
+++ Scribus/scribus/colorchart.h (.../tags/post) (nonexistent)
@@ -1,49 +0,0 @@
-/***************************************************************************
- colorchart.h - 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. *
- * *
- ***************************************************************************/
-
-#ifndef COLORCHART_H
-#define COLORCHART_H
-
-#include <qlabel.h>
-#include <qpixmap.h>
-
-/**
- *@author Franz Schmid
- */
-
-class ColorChart : public QLabel {
-
-Q_OBJECT
-
-public:
- ColorChart(QWidget *parent);
- ~ColorChart() {};
- void mouseMoveEvent(QMouseEvent *m);
- void mousePressEvent(QMouseEvent *m);
- void mouseReleaseEvent(QMouseEvent *m);
- void paintEvent(QPaintEvent *e);
- void drawMark(int x, int y);
- void setMark(int h, int s);
- void drawPalette(int val);
- int Xp;
- int Yp;
- QPixmap pmx;
-signals:
- void ColorVal(int h, int s, bool ende);
-};
-
-#endif
/Scribus/scribus/colorchart.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: Scribus/scribus/query.cpp
===================================================================
--- Scribus/scribus/query.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/query.cpp (.../tags/post) (nonexistent)
@@ -1,66 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Query.ui'
-**
-** Created: Mon Apr 23 20:49:10 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "query.h"
-extern QPixmap loadIcon(QString nam);
-
-#include <qtooltip.h>
-/*
- * Constructs a Query which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-Query::Query( QWidget* parent, const char* name, bool modal, WFlags fl, QString text, QString titel )
- : QDialog( parent, name, modal, fl )
-{
- if ( !name )
- setName( "Query" );
- setCaption( tr( titel ) );
- setIcon(loadIcon("AppIcon.xpm"));
- QueryLayout = new QVBoxLayout( this );
- QueryLayout->setSpacing( 6 );
- QueryLayout->setMargin( 11 );
- Layout2 = new QHBoxLayout;
- Layout2->setSpacing( 6 );
- Layout2->setMargin( 0 );
- Frage = new QLabel( this, "Frage" );
- Frage->setFrameShape( QLabel::MShape );
- Frage->setFrameShadow( QLabel::MShadow );
- Frage->setText( tr( text ) );
- Frage->adjustSize();
- Layout2->addWidget( Frage );
- Answer = new QLineEdit( this, "Answer" );
- Layout2->addWidget( Answer );
- QueryLayout->addLayout( Layout2 );
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 6 );
- Layout1->setMargin( 0 );
- PushButton1 = new QPushButton( this, "PushButton1" );
- PushButton1->setText( tr( "OK" ) );
- PushButton1->setDefault( true );
- Layout1->addWidget( PushButton1 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer );
- PushButton2 = new QPushButton( this, "PushButton2" );
- PushButton2->setText( tr( "Cancel" ) );
- Layout1->addWidget( PushButton2 );
- QueryLayout->addLayout( Layout1 );
- setMaximumSize(sizeHint());
- Answer->setFocus();
-
- // signals and slots connections
- connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) );
-
- // tab order
- setTabOrder( Answer, PushButton1 );
- setTabOrder( PushButton1, PushButton2 );
-}
-
/Scribus/scribus/query.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/picsearch.h
===================================================================
--- Scribus/scribus/picsearch.h (.../branches/start) (revision 427)
+++ Scribus/scribus/picsearch.h (.../tags/post) (nonexistent)
@@ -1,43 +0,0 @@
-#ifndef PICSEARCH_H
-#define PICSEARCH_H
-
-#include <qdialog.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qstringlist.h>
-
-class PicSearch : public QDialog
-{
- Q_OBJECT
-
-public:
- PicSearch( QWidget* parent, QString name, QStringList alt);
- ~PicSearch() {};
-
- QLabel* TextLabel1;
- QLabel* Datei;
- QListBox* ListBox1;
- QCheckBox* Preview;
- QPushButton* UseB;
- QPushButton* CancelB;
- QLabel* PixmapLabel1;
- QSize minS;
- QString Bild;
-
-private slots:
- void ShowPrev();
- void selBild(QListBoxItem *c);
- void GenPreview();
-
-protected:
- QVBoxLayout* PicSearchLayout;
- QHBoxLayout* Layout2;
- QHBoxLayout* Layout3;
- QVBoxLayout* Layout1;
-};
-
-#endif // PICSEARCH_H
/Scribus/scribus/picsearch.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: Scribus/scribus/kimageeffect.cpp
===================================================================
--- Scribus/scribus/kimageeffect.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/kimageeffect.cpp (.../tags/post) (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]));
- }
-}
-
-
-
-
/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: Scribus/scribus/mpalette.cpp
===================================================================
--- Scribus/scribus/mpalette.cpp (.../branches/start) (revision 427)
+++ Scribus/scribus/mpalette.cpp (.../tags/post) (nonexistent)
@@ -1,1876 +0,0 @@
-#include "mpalette.h"
-#include "mpalette.moc"
-#include <cmath>
-#include <qpoint.h>
-#include <qwmatrix.h>
-extern QPixmap loadIcon(QString nam);
-extern float UmReFaktor;
-
-Mpalette::Mpalette( QWidget* parent, QPopupMenu* FontMenu)
- : QDialog( parent, "Mfloat", false, Qt::WStyle_Customize | Qt::WStyle_Title | Qt::WStyle_Tool)
-{
- setCaption( tr( "Measurements" ) );
- HaveDoc = false;
- HaveItem = false;
- Umrech = UmReFaktor;
- setIcon( loadIcon("AppIcon.xpm") );
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
-
- MpalLayout = new QVBoxLayout( this, 5, 1, "MpalLayout");
- setOrientation(Qt::Vertical);
- QFont f(font());
- f.setPointSize(f.pointSize()-1);
- setFont(f);
- buttonGroup5 = new QButtonGroup( this, "buttonGroup5" );
- buttonGroup5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, buttonGroup5->sizePolicy().hasHeightForWidth() ) );
- buttonGroup5->setFrameShape( QButtonGroup::NoFrame );
- buttonGroup5->setExclusive( TRUE );
- buttonGroup5->setColumnLayout(0, Qt::Vertical );
- buttonGroup5->setTitle( QString::null );
- buttonGroup5->layout()->setSpacing( 0 );
- buttonGroup5->layout()->setMargin( 0 );
- buttonGroup5Layout = new QGridLayout( buttonGroup5->layout() );
- buttonGroup5Layout->setAlignment( Qt::AlignTop );
- SGeom = new QToolButton( buttonGroup5, "toolButton24" );
- SGeom->setToggleButton( true );
- SGeom->setOn( true );
- SGeom->setFont(f);
- SGeom->setText( tr( "X, Y, Z" ) );
- buttonGroup5Layout->addWidget( SGeom, 0, 0 );
- SShape = new QToolButton( buttonGroup5, "toolButton25" );
- SShape->setToggleButton( true );
- SShape->setFont(f);
- SShape->setText( tr( "Shape" ) );
- buttonGroup5Layout->addWidget( SShape, 0, 1 );
- SText = new QToolButton( buttonGroup5, "toolButton26" );
- SText->setToggleButton( true );
- SText->setFont(f);
- SText->setText( tr( "Text" ) );
- buttonGroup5Layout->addWidget( SText, 1, 0 );
- SImage = new QToolButton( buttonGroup5, "toolButton27" );
- SImage->setToggleButton( true );
- SImage->setFont(f);
- SImage->setText( tr( "Image" ) );
- buttonGroup5Layout->addWidget( SImage, 1, 1 );
- SLine = new QToolButton( buttonGroup5, "toolButton28" );
- SLine->setToggleButton( true );
- SLine->setFont(f);
- SLine->setText( tr( "Line" ) );
- buttonGroup5Layout->addWidget( SLine, 2, 0 );
- SColor = new QToolButton( buttonGroup5, "toolButton29" );
- SColor->setToggleButton( true );
- SColor->setFont(f);
- SColor->setText( tr( "Colors" ) );
- buttonGroup5Layout->addWidget( SColor, 2, 1 );
- MpalLayout->addWidget( buttonGroup5 );
- TabStack = new QWidgetStack( this, "TabStack" );
- TabStack->setFrameShape( QWidgetStack::NoFrame );
-
- page = new QWidget( TabStack, "page" );
- pageLayout = new QVBoxLayout( page, 0, 5, "pageLayout");
-
- GeoGroup = new QGroupBox( page, "GeoGroup" );
- GeoGroup->setTitle( tr( "Geometry" ) );
- GeoGroup->setColumnLayout(0, Qt::Vertical );
- GeoGroup->layout()->setSpacing( 4 );
- GeoGroup->layout()->setMargin( 5 );
- GeoGroupLayout = new QGridLayout( GeoGroup->layout() );
- GeoGroupLayout->setAlignment( Qt::AlignTop );
- Text1 = new QLabel( GeoGroup, "Text1" );
- Text1->setText( tr( "X-Pos:" ) );
- GeoGroupLayout->addWidget( Text1, 0, 0 );
- Text1a = new QLabel( GeoGroup, "Text1a" );
- Text1a->setText( tr( "Y-Pos:" ) );
- GeoGroupLayout->addWidget( Text1a, 1, 0 );
- Text2 = new QLabel( GeoGroup, "Text2" );
- Text2->setText( tr( "Width:" ) );
- GeoGroupLayout->addWidget( Text2, 2, 0 );
- Text2a = new QLabel( GeoGroup, "Text2a" );
- Text2a->setText( tr( "Height:" ) );
- GeoGroupLayout->addWidget( Text2a, 3, 0 );
- Xpos = new MSpinBox( GeoGroup, 2 );
- Xpos->setSuffix( tr( " pt" ) );
- Xpos->setMaxValue( 300000 );
- Xpos->setMinValue( -300000 );
- GeoGroupLayout->addWidget( Xpos, 0, 1 );
- Ypos = new MSpinBox( GeoGroup, 2 );
- Ypos->setSuffix( tr( " pt" ) );
- Ypos->setMaxValue( 300000 );
- Ypos->setMinValue( -300000 );
- GeoGroupLayout->addWidget( Ypos, 1, 1 );
- Width = new MSpinBox( GeoGroup, 2 );
- Width->setSuffix( tr( " pt" ) );
- GeoGroupLayout->addWidget( Width, 2, 1 );
- Height = new MSpinBox( GeoGroup, 2 );
- Height->setSuffix( tr( " pt" ) );
- GeoGroupLayout->addWidget( Height, 3, 1 );
- pageLayout->addWidget( GeoGroup );
-
- layout60 = new QHBoxLayout( 0, 0, 5, "layout60");
- QSpacerItem* spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout60->addItem( spacer1 );
-
- LayerGroup = new QGroupBox( page, "LayerGroup" );
- LayerGroup->setTitle( tr( "Level" ) );
- LayerGroup->setColumnLayout(0, Qt::Vertical );
- LayerGroup->layout()->setSpacing( 4 );
- LayerGroup->layout()->setMargin( 5 );
- LayerGroupLayout = new QGridLayout( LayerGroup->layout() );
- LayerGroupLayout->setAlignment( Qt::AlignTop );
- Zup = new QToolButton( LayerGroup, "Zup" );
- Zup->setMaximumSize( QSize( 22, 22 ) );
- Zup->setPixmap(loadIcon("up.png"));
- LayerGroupLayout->addWidget( Zup, 0, 0 );
- ZDown = new QToolButton( LayerGroup, "ZDown" );
- ZDown->setMaximumSize( QSize( 22, 22 ) );
- ZDown->setPixmap(loadIcon("down.png"));
- LayerGroupLayout->addWidget( ZDown, 1, 0 );
- ZTop = new QToolButton( LayerGroup, "ZTop" );
- ZTop->setMaximumSize( QSize( 22, 22 ) );
- ZTop->setPixmap(loadIcon("top.png"));
- LayerGroupLayout->addWidget( ZTop, 0, 1 );
- ZBottom = new QToolButton( LayerGroup, "ZBottom" );
- ZBottom->setMaximumSize( QSize( 22, 22 ) );
- ZBottom->setPixmap(loadIcon("bottom.png"));
- LayerGroupLayout->addWidget( ZBottom, 1, 1 );
-
- layout60->addWidget( LayerGroup );
- QSpacerItem* spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout60->addItem( spacer2 );
-
- Layout44 = new QVBoxLayout( 0, 0, 4, "Layout44");
- QSpacerItem* spacer3 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout44->addItem( spacer3 );
- FlipH = new QToolButton( page, "MirrorH" );
- FlipH->setPixmap(loadIcon("FlipH.xpm"));
- FlipH->setToggleButton( true );
- Layout44->addWidget( FlipH );
- FlipV = new QToolButton( page, "MirrorV" );
- FlipV->setPixmap(loadIcon("FlipV.xpm"));
- FlipV->setToggleButton( true );
- Layout44->addWidget( FlipV );
- QSpacerItem* spacer4 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout44->addItem( spacer4 );
- layout60->addLayout( Layout44 );
- QSpacerItem* spacer5 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout60->addItem( spacer5 );
- pageLayout->addLayout( layout60 );
-
- layout60a = new QHBoxLayout( 0, 0, 5, "layout60a");
- RotationGroup = new QButtonGroup( page, "RotationGroup" );
- RotationGroup->setTitle( tr( "Rotation" ) );
- RotationGroup->setColumnLayout(0, Qt::Vertical );
- RotationGroup->layout()->setSpacing( 4 );
- RotationGroup->layout()->setMargin( 5 );
- RotationGroupLayout = new QHBoxLayout( RotationGroup->layout() );
- RotationGroupLayout->setAlignment( Qt::AlignTop );
- Layout12 = new QGridLayout( 0, 1, 1, 0, 0, "Layout12");
- TopLeft = new QRadioButton( RotationGroup, "TopLeft" );
- TopLeft->setText( tr( "" ) );
- TopLeft->setChecked( true );
- Layout12->addWidget( TopLeft, 0, 0 );
- Line1 = new QFrame( RotationGroup, "Line1" );
- Line1->setMinimumSize( QSize( 20, 4 ) );
- Line1->setMaximumSize( QSize( 20, 4 ) );
- Line1->setFrameShape( QFrame::HLine );
- Line1->setFrameShadow( QFrame::Plain );
- Line1->setLineWidth( 3 );
- Line1->setFrameShape( QFrame::HLine );
- Layout12->addWidget( Line1, 0, 1 );
- TopRight = new QRadioButton( RotationGroup, "TopRight" );
- TopRight->setText( tr( "" ) );
- Layout12->addWidget( TopRight, 0, 2 );
- Line2 = new QFrame( RotationGroup, "Line2" );
- Line2->setMinimumSize( QSize( 4, 20 ) );
- Line2->setMaximumSize( QSize( 4, 20 ) );
- Line2->setFrameShape( QFrame::VLine );
- Line2->setFrameShadow( QFrame::Plain );
- Line2->setLineWidth( 3 );
- Line2->setFrameShape( QFrame::VLine );
- Layout12->addWidget( Line2, 1, 0, Qt::AlignHCenter );
- Center = new QRadioButton( RotationGroup, "Center" );
- Center->setText( tr( "" ) );
- Layout12->addWidget( Center, 1, 1, Qt::AlignHCenter );
- Line4 = new QFrame( RotationGroup, "Line4" );
- Line4->setMinimumSize( QSize( 4, 20 ) );
- Line4->setMaximumSize( QSize( 4, 20 ) );
- Line4->setFrameShape( QFrame::VLine );
- Line4->setFrameShadow( QFrame::Plain );
- Line4->setLineWidth( 3 );
- Line4->setFrameShape( QFrame::VLine );
- Layout12->addWidget( Line4, 1, 2, Qt::AlignHCenter );
- BottomLeft = new QRadioButton( RotationGroup, "BottomLeft" );
- BottomLeft->setText( tr( "" ) );
- Layout12->addWidget( BottomLeft, 2, 0 );
- Line5 = new QFrame( RotationGroup, "Line5" );
- Line5->setMinimumSize( QSize( 20, 4 ) );
- Line5->setMaximumSize( QSize( 20, 4 ) );
- Line5->setFrameShape( QFrame::HLine );
- Line5->setFrameShadow( QFrame::Plain );
- Line5->setLineWidth( 3 );
- Line5->setFrameShape( QFrame::HLine );
- Layout12->addWidget( Line5, 2, 1 );
- BottomRight = new QRadioButton( RotationGroup, "BottomRight" );
- BottomRight->setText( tr( "" ) );
- Layout12->addWidget( BottomRight, 2, 2 );
- RotationGroupLayout->addLayout( Layout12 );
- Layout15_2 = new QVBoxLayout( 0, 3, 0, "Layout15_2");
- Text3 = new QLabel( RotationGroup, "Text3" );
- Text3->setText( tr( "by:" ) );
- Layout15_2->addWidget( Text3 );
- Rot = new MSpinBox( RotationGroup, 2);
- Rot->setSuffix(" °");
- Rot->setWrapping( true );
- Layout15_2->addWidget( Rot );
- RotationGroupLayout->addLayout( Layout15_2 );
- layout60a->addWidget(RotationGroup);
- QSpacerItem* spacer12 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout60a->addItem( spacer12 );
- pageLayout->addLayout(layout60a);
- QSpacerItem* spacer13 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- pageLayout->addItem( spacer13 );
- TabStack->addWidget( page, 0 );
-
- page_2 = new QWidget( TabStack, "page_2" );
- pageLayout_2 = new QVBoxLayout( page_2, 0, 5, "pageLayout_2");
-
- ShapeGroup = new QButtonGroup( page_2, "ShapeGroup" );
- ShapeGroup->setFrameShape( QButtonGroup::NoFrame );
- ShapeGroup->setTitle( tr( "" ) );
- ShapeGroup->setExclusive( true );
- ShapeGroup->setColumnLayout(0, Qt::Vertical );
- ShapeGroup->layout()->setSpacing( 2 );
- ShapeGroup->layout()->setMargin( 0 );
- ShapeGroupLayout = new QHBoxLayout( ShapeGroup->layout() );
- ShapeGroupLayout->setAlignment( Qt::AlignTop );
- SRect = new QToolButton( ShapeGroup, "SRect" );
- SRect->setMaximumSize( QSize( 22, 22 ) );
- SRect->setPixmap(loadIcon("rect.png"));
- ShapeGroupLayout->addWidget( SRect );
- SOval = new QToolButton( ShapeGroup, "SOval" );
- SOval->setMaximumSize( QSize( 22, 22 ) );
- SOval->setPixmap(loadIcon("oval.png"));
- ShapeGroupLayout->addWidget( SOval );
- SCustom = new QToolButton( ShapeGroup, "SCustom" );
- SCustom->setMaximumSize( QSize( 22, 22 ) );
- SCustom->setPixmap(loadIcon("irreg.png"));
- ShapeGroupLayout->addWidget( SCustom );
- pageLayout_2->addWidget( ShapeGroup );
-
- EditShape = new QToolButton( page_2, "EditShape" );
- EditShape->setText( tr( "Edit Shape..." ) );
- pageLayout_2->addWidget( EditShape );
-
- Layout13 = new QHBoxLayout( 0, 0, 2, "Layout13");
-
- Text4 = new QLabel( page_2, "Text4" );
- Text4->setText( tr( "Round\nCorners:" ) );
- Layout13->addWidget( Text4 );
-
- RoundRect = new QSpinBox( page_2, "Corner" );
- RoundRect->setSuffix( tr( " pt" ) );
- Layout13->addWidget( RoundRect );
- pageLayout_2->addLayout( Layout13 );
-
- Textflow = new QCheckBox( page_2, "Textflow" );
- Textflow->setText( tr( "Text flows around Box" ) );
- pageLayout_2->addWidget( Textflow );
-
- Distance = new QGroupBox( page_2, "Distance" );
- Distance->setTitle( tr( "Distance of Text" ) );
- Distance->setColumnLayout(0, Qt::Vertical );
- Distance->layout()->setSpacing( 2 );
- Distance->layout()->setMargin( 5 );
- DistanceLayout = new QGridLayout( Distance->layout() );
- DistanceLayout->setAlignment( Qt::AlignTop );
- Text14 = new QLabel( Distance, "Text14" );
- Text14->setText( tr( "Top:" ) );
- DistanceLayout->addWidget( Text14, 0, 0 );
- Text15 = new QLabel( Distance, "Text15" );
- Text15->setText( tr( "Bottom:" ) );
- DistanceLayout->addWidget( Text15, 1, 0 );
- Text16 = new QLabel( Distance, "Text16" );
- Text16->setText( tr( "Left:" ) );
- DistanceLayout->addWidget( Text16, 2, 0 );
- Text17 = new QLabel( Distance, "Text17" );
- Text17->setText( tr( "Right:" ) );
- DistanceLayout->addWidget( Text17, 3, 0 );
- DTop = new MSpinBox( Distance, 1 );
- DTop->setSuffix( tr( " pt" ) );
- DTop->setMaxValue( 3000 );
- DTop->setMinValue( 0 );
- DistanceLayout->addWidget( DTop, 0, 1 );
- DBottom = new MSpinBox( Distance, 1 );
- DBottom->setSuffix( tr( " pt" ) );
- DBottom->setMaxValue( 3000 );
- DBottom->setMinValue( 0 );
- DistanceLayout->addWidget( DBottom, 1, 1 );
- DLeft = new MSpinBox( Distance, 1 );
- DLeft->setSuffix( tr( " pt" ) );
- DLeft->setMaxValue( 3000 );
- DLeft->setMinValue( 0 );
- DistanceLayout->addWidget( DLeft, 2, 1 );
- DRight = new MSpinBox( Distance, 1 );
- DRight->setSuffix( tr( " pt" ) );
- DRight->setMaxValue( 3000 );
- DRight->setMinValue( 0 );
- DistanceLayout->addWidget( DRight, 3, 1 );
- pageLayout_2->addWidget( Distance );
- QSpacerItem* spacer6 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- pageLayout_2->addItem( spacer6 );
- TabStack->addWidget( page_2, 1 );
-
- page_3 = new QWidget( TabStack, "page_3" );
- pageLayout_3 = new QVBoxLayout( page_3, 0, 5, "pageLayout_3");
-
- layout47 = new QHBoxLayout( 0, 0, 5, "layout47");
-
- layout46 = new QVBoxLayout( 0, 0, 5, "layout46");
-
- layout41 = new QGridLayout( 0, 1, 1, 0, 5, "layout41");
-
- Fonts = new QToolButton( page_3, "Fonts" );
- Fonts->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, 0, 0, Fonts->sizePolicy().hasHeightForWidth() ) );
- Fonts->setMinimumSize( QSize( 150, 0 ) );
- Fonts->setMaximumSize( QSize( 250, 32767 ) );
- Fonts->setPopup(FontMenu);
- Fonts->setPopupDelay(1);
- Fonts->setText( tr( "Font" ) );
- layout41->addMultiCellWidget( Fonts, 0, 0, 0, 1 );
-
- Text20 = new QLabel( page_3, "Text20" );
- Text20->setText(tr("Size:"));
- layout41->addWidget( Text20, 1, 0 );
- Size = new QSpinBox( page_3, "Size" );
- Size->setPrefix( tr( "" ) );
- Size->setSuffix( tr( " pt" ) );
- Size->setMaxValue( 3000 );
- Size->setMinValue( -3000 );
- layout41->addWidget( Size, 1, 1 );
- layout46->addLayout( layout41 );
-
- Layout1 = new QHBoxLayout( 0, 0, 0, "Layout1");
-
- Underline = new QToolButton( page_3, "Underline" );
- Underline->setMaximumSize( QSize( 22, 22 ) );
- Underline->setText( tr( "" ) );
- Underline->setPixmap(loadIcon("Unter.xpm"));
- Underline->setToggleButton( true );
- Layout1->addWidget( Underline );
-
- ButtonGroup1 = new QButtonGroup( page_3, "ButtonGroup1" );
- ButtonGroup1->setFrameShape( QButtonGroup::NoFrame );
- ButtonGroup1->setTitle( tr( "" ) );
- ButtonGroup1->setExclusive( true );
- ButtonGroup1->setRadioButtonExclusive( false );
- ButtonGroup1->setColumnLayout(0, Qt::Vertical );
- ButtonGroup1->layout()->setSpacing( 0 );
- ButtonGroup1->layout()->setMargin( 0 );
- ButtonGroup1Layout = new QHBoxLayout( ButtonGroup1->layout() );
- ButtonGroup1Layout->setAlignment( Qt::AlignTop );
-
- Subs = new QToolButton( ButtonGroup1, "Subs" );
- Subs->setMaximumSize( QSize( 22, 22 ) );
- Subs->setText( tr( "" ) );
- Subs->setPixmap(loadIcon("Tief.xpm"));
- Subs->setToggleButton( true );
- ButtonGroup1Layout->addWidget( Subs );
-
- Supers = new QToolButton( ButtonGroup1, "Supers" );
- Supers->setMaximumSize( QSize( 22, 22 ) );
- Supers->setText( tr( "" ) );
- Supers->setPixmap(loadIcon("Hoch.xpm"));
- Supers->setToggleButton( true );
- ButtonGroup1Layout->addWidget( Supers );
- Layout1->addWidget( ButtonGroup1 );
-
- Kapital = new QToolButton( page_3, "Kapital" );
- Kapital->setMaximumSize( QSize( 22, 22 ) );
- Kapital->setText( tr( "" ) );
- Kapital->setPixmap(loadIcon("Kapital.xpm"));
- Kapital->setToggleButton( true );
- Layout1->addWidget( Kapital );
-
- Strike = new QToolButton( page_3, "Strike" );
- Strike->setMaximumSize( QSize( 22, 22 ) );
- Strike->setText( tr( "" ) );
- Strike->setPixmap(loadIcon("Strike.xpm"));
- Strike->setToggleButton( true );
- Layout1->addWidget( Strike );
- Revert = new QToolButton( page_3, "Bold" );
- Revert->setMaximumSize( QSize( 22, 22 ) );
- Revert->setText( tr( "" ) );
- Revert->setPixmap(loadIcon("Revers.png"));
- Revert->setToggleButton( true );
- Layout1->addWidget( Revert );
- QSpacerItem* spacer7 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer7 );
- layout46->addLayout( Layout1 );
- layout47->addLayout( layout46 );
- pageLayout_3->addLayout( layout47 );
-
- GroupAlign = new QButtonGroup( page_3, "GroupAlign" );
- GroupAlign->setFrameShape( QButtonGroup::NoFrame );
- GroupAlign->setTitle( tr( "" ) );
- GroupAlign->setExclusive( true );
- GroupAlign->setColumnLayout(0, Qt::Vertical );
- GroupAlign->layout()->setSpacing( 0 );
- GroupAlign->layout()->setMargin( 0 );
- GroupAlignLayout = new QGridLayout( GroupAlign->layout() );
- GroupAlignLayout->setAlignment( Qt::AlignTop );
-
- TextL = new QToolButton( GroupAlign, "TextL" );
- TextL->setMaximumSize( QSize( 22, 22 ) );
- TextL->setPixmap(loadIcon("text_left.png"));
- TextL->setToggleButton( true );
- TextL->setOn( true );
- GroupAlignLayout->addWidget( TextL, 0, 0 );
-
- TextR = new QToolButton( GroupAlign, "TextR" );
- TextR->setMaximumSize( QSize( 22, 22 ) );
- TextR->setPixmap(loadIcon("text_right.png"));
- TextR->setToggleButton( true );
- GroupAlignLayout->addWidget( TextR, 0, 1 );
-
- TextC = new QToolButton( GroupAlign, "TextC" );
- TextC->setMaximumSize( QSize( 22, 22 ) );
- TextC->setPixmap(loadIcon("text_center.png"));
- TextC->setToggleButton( true );
- GroupAlignLayout->addWidget( TextC, 0, 2 );
-
- TextB = new QToolButton( GroupAlign, "TextB" );
- TextB->setMaximumSize( QSize( 22, 22 ) );
- TextB->setPixmap(loadIcon("text_block.png"));
- TextB->setToggleButton( true );
- GroupAlignLayout->addWidget( TextB, 0, 3 );
-
- TextF = new QToolButton( GroupAlign, "TextF" );
- TextF->setMaximumSize( QSize( 22, 22 ) );
- TextF->setPixmap(loadIcon("text_force.png"));
- TextF->setToggleButton( true );
- GroupAlignLayout->addWidget( TextF, 0, 4 );
- pageLayout_3->addWidget( GroupAlign );
-
- GroupBox3 = new QGroupBox( page_3, "GroupBox3" );
- GroupBox3->setTitle( tr( "Custom Spacing" ) );
- GroupBox3->setColumnLayout(0, Qt::Vertical );
- GroupBox3->layout()->setSpacing( 2 );
- GroupBox3->layout()->setMargin( 5 );
- GroupBox3Layout = new QGridLayout( GroupBox3->layout() );
- GroupBox3Layout->setAlignment( Qt::AlignTop );
-
- LineSp = new MSpinBox( GroupBox3, 1 );
- LineSp->setSuffix( tr( " pt" ) );
- GroupBox3Layout->addWidget( LineSp, 1, 1 );
-
- Extra = new MSpinBox( GroupBox3, 1 );
- Extra->setSuffix( tr( " pt" ) );
- GroupBox3Layout->addWidget( Extra, 0, 1 );
-
- Text5 = new QLabel( GroupBox3, "Text5" );
- Text5->setText( tr( "Kerning:" ) );
- GroupBox3Layout->addWidget( Text5, 0, 0 );
-
- Text6 = new QLabel( GroupBox3, "Text6" );
- Text6->setText( tr( "Linespacing:" ) );
-
- GroupBox3Layout->addWidget( Text6, 1, 0 );
- pageLayout_3->addWidget( GroupBox3 );
-
- GroupBox3a = new QGroupBox( page_3, "GroupBox3" );
- GroupBox3a->setTitle( tr( "Styles" ) );
- GroupBox3a->setColumnLayout(0, Qt::Vertical );
- GroupBox3a->layout()->setSpacing( 2 );
- GroupBox3a->layout()->setMargin( 5 );
- GroupBox3aLayout = new QVBoxLayout( GroupBox3a->layout() );
- GroupBox3aLayout->setAlignment( Qt::AlignTop );
- Spal = new Spalette(GroupBox3a);
- GroupBox3aLayout->addWidget( Spal );
- pageLayout_3->addWidget( GroupBox3a );
-
- QSpacerItem* spacer8 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- pageLayout_3->addItem( spacer8 );
- TabStack->addWidget( page_3, 2 );
-
- page_4 = new QWidget( TabStack, "page_4" );
- pageLayout_4 = new QVBoxLayout( page_4, 0, 5, "pageLayout_4");
-
- FreeScale = new QRadioButton( page_4, "FreeScale" );
- FreeScale->setText( tr( "Free Scaling" ) );
- FreeScale->setChecked( true );
- pageLayout_4->addWidget( FreeScale );
-
- layout43 = new QGridLayout( 0, 1, 1, 0, 5, "layout43");
- Text11 = new QLabel( page_4, "Text11" );
- Text11->setText( tr( "Position:" ) );
- layout43->addWidget( Text11, 0, 0 );
- LXpos = new MSpinBox( page_4, 2 );
- LXpos->setSuffix( tr( " pt" ) );
- layout43->addWidget( LXpos, 0, 1 );
- LYpos = new MSpinBox( page_4, 2 );
- LYpos->setSuffix( tr( " pt" ) );
- layout43->addWidget( LYpos, 1, 1 );
- Text12 = new QLabel( page_4, "Text12" );
- Text12->setText( tr( "Horiz. Scale:" ) );
- layout43->addWidget( Text12, 2, 0 );
- ScaleX = new MSpinBox( page_4, 1 );
- ScaleX->setSuffix( tr( " %" ) );
- layout43->addWidget( ScaleX, 2, 1 );
- Text13 = new QLabel( page_4, "Text13" );
- Text13->setText( tr( "Vert. Scale:" ) );
- layout43->addWidget( Text13, 3, 0 );
- ScaleY = new MSpinBox( page_4, 1 );
- ScaleY->setSuffix( tr( " %" ) );
- layout43->addWidget( ScaleY, 3, 1 );
- Kette = new LinkButton( page_4 );
- Kette->setToggleButton( true );
- Kette->setAutoRaise( true );
- Kette->setMaximumSize( QSize( 15, 32767 ) );
- layout43->addMultiCellWidget( Kette, 2, 3, 2, 2 );
- pageLayout_4->addLayout( layout43 );
-
- Layout24 = new QVBoxLayout( 0, 0, 3, "Layout24");
-
- FrameScale = new QRadioButton( page_4, "FixedScale" );
- FrameScale->setText( tr( "Scale to Frame Size" ) );
- Layout24->addWidget( FrameScale );
-
- Layout18 = new QHBoxLayout( 0, 0, 6, "Layout18");
-
- Frame4 = new QFrame( page_4, "Frame4" );
- Frame4->setMinimumSize( QSize( 15, 2 ) );
- Frame4->setMaximumSize( QSize( 15, 10 ) );
- Frame4->setFrameShape( QFrame::NoFrame );
- Frame4->setFrameShadow( QFrame::Plain );
- Layout18->addWidget( Frame4 );
-
- Aspect = new QCheckBox( page_4, "Aspect" );
- /*<<<<<<< mpalette.cpp*/
- Aspect->setEnabled( false );
- Aspect->setText( tr( "Keep Aspect Ratio" ) );
- Aspect->setChecked( true );
- /*=======*/
- Aspect->setEnabled( FALSE );
- Aspect->setText( tr( "Proportional" ) );
- Aspect->setChecked( TRUE );
- /*>>>>>>> 1.8*/
- Layout18->addWidget( Aspect );
- Layout24->addLayout( Layout18 );
- pageLayout_4->addLayout( Layout24 );
- QSpacerItem* spacer9 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- pageLayout_4->addItem( spacer9 );
- TabStack->addWidget( page_4, 3 );
-
- page_5 = new QWidget( TabStack, "page_5" );
- pageLayout_5 = new QVBoxLayout( page_5, 0, 5, "pageLayout_5");
-
- Layout13_2 = new QHBoxLayout( 0, 0, 4, "Layout13_2");
-
- LineMode = new QComboBox( true, page_5, "LMode" );
- LineMode->setEditable(false);
- LineMode->insertItem( tr( "Left Point" ) );
- LineMode->insertItem( tr( "Endpoints" ) );
- Layout13_2->addWidget( LineMode );
- LMode = false;
- QSpacerItem* spacer10 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout13_2->addItem( spacer10 );
- pageLayout_5->addLayout( Layout13_2 );
-
- Layout12_2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout12_2");
-
- Text8 = new QLabel( page_5, "Text8" );
- Text8->setText( tr( "Linestyle:" ) );
- Layout12_2->addWidget( Text8, 0, 0 );
- LStyle = new LineCombo(page_5);
- Layout12_2->addWidget( LStyle, 1, 0 );
- TextLabel1 = new QLabel( page_5, "TextLabel1" );
-
- TextLabel1->setText( tr( "Linewidth:" ) );
- Layout12_2->addWidget( TextLabel1, 2, 0 );
- LSize = new MSpinBox( page_5, 1 );
- LSize->setSuffix( tr( " pt" ) );
- LSize->setDecimals(10);
- Layout12_2->addWidget( LSize, 3, 0 );
-
- Text9 = new QLabel( page_5, "Text9" );
- Text9->setText( tr( "Edges:" ) );
- Layout12_2->addWidget( Text9, 4, 0 );
- LJoinStyle = new QComboBox( true, page_5, "LJoin" );
- LJoinStyle->setEditable(false);
- LJoinStyle->insertItem(loadIcon("MiterJoin.png"), tr( "MiterJoin" ) );
- LJoinStyle->insertItem(loadIcon("BevelJoin.png"), tr( "BevelJoin" ) );
- LJoinStyle->insertItem(loadIcon("BevelJoin.png"), tr( "RoundJoin" ) );
- Layout12_2->addWidget( LJoinStyle, 5, 0 );
-
- Text10 = new QLabel( page_5, "Text10" );
- Text10->setText( tr( "Endings:" ) );
- Layout12_2->addWidget( Text10, 6, 0 );
- LEndStyle = new QComboBox( true, page_5, "LCap" );
- LEndStyle->setEditable(false);
- LEndStyle->insertItem(loadIcon("ButtCap.png"), tr( "FlatCap" ) );
- LEndStyle->insertItem(loadIcon("SquareCap.png"), tr( "SquareCap" ) );
- LEndStyle->insertItem(loadIcon("RoundCap.png"), tr( "RoundCap" ) );
- Layout12_2->addWidget( LEndStyle, 7, 0 );
-
- pageLayout_5->addLayout( Layout12_2 );
- QSpacerItem* spacer11 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- pageLayout_5->addItem( spacer11 );
- TabStack->addWidget( page_5, 4 );
- Cpal = new Cpalette(this);
- TabStack->addWidget(Cpal, 5);
- MpalLayout->addWidget( TabStack );
- QToolTip::add( Size, tr( "Font Size" ) );
- QToolTip::add( LineSp, tr( "Linespacing" ) );
- QToolTip::add( Extra, tr( "Manual Kerning" ) );
- QToolTip::add( Revert, tr( "Reverse Writing" ) );
- QToolTip::add( Underline, tr( "Underline" ) );
- QToolTip::add( Kapital, tr( "Small Caps" ) );
- QToolTip::add( Subs, tr( "Subscript" ) );
- QToolTip::add( Supers, tr( "Superscript" ) );
- QToolTip::add( Strike, tr( "Strikeout" ) );
- QToolTip::add( TextL, tr( "Align Text Left" ) );
- QToolTip::add( TextR, tr( "Align Text Right" ) );
- QToolTip::add( TextB, tr( "Align Text Block" ) );
- QToolTip::add( TextC, tr( "Align Text Center" ) );
- QToolTip::add( FlipH, tr( "Flip horizontal" ) );
- QToolTip::add( FlipV, tr( "Flip vertical" ) );
- QToolTip::add( Zup, tr( "Move one Level up" ) );
- QToolTip::add( ZDown, tr( "Move one Level down" ) );
- QToolTip::add( ZTop, tr( "Move to Front" ) );
- QToolTip::add( ZBottom, tr( "Move to Back" ) );
- connect(Xpos, SIGNAL(valueChanged(int)), this, SLOT(NewX()));
- connect(Ypos, SIGNAL(valueChanged(int)), this, SLOT(NewY()));
- connect(Width, SIGNAL(valueChanged(int)), this, SLOT(NewW()));
- connect(Height, SIGNAL(valueChanged(int)), this, SLOT(NewH()));
- connect(Rot, SIGNAL(valueChanged(int)), this, SLOT(NewR()));
- connect(RoundRect, SIGNAL(valueChanged(int)), this, SLOT(NewRR()));
- connect(LineSp, SIGNAL(valueChanged(int)), this, SLOT(NewLsp()));
- connect(Size, SIGNAL(valueChanged(int)), this, SLOT(NewSize()));
- connect(Extra, SIGNAL(valueChanged(int)), this, SLOT(NewExtra()));
- connect(ScaleX, SIGNAL(valueChanged(int)), this, SLOT(HChange()));
- connect(ScaleY, SIGNAL(valueChanged(int)), this, SLOT(VChange()));
- connect(LXpos, SIGNAL(valueChanged(int)), this, SLOT(NewLocalXY()));
- connect(LYpos, SIGNAL(valueChanged(int)), this, SLOT(NewLocalXY()));
- connect(LSize, SIGNAL(valueChanged(int)), this, SLOT(NewLS()));
- connect(LStyle, SIGNAL(activated(int)), this, SLOT(NewLSty()));
- connect(LJoinStyle, SIGNAL(activated(int)), this, SLOT(NewLJoin()));
- connect(LEndStyle, SIGNAL(activated(int)), this, SLOT(NewLEnd()));
- connect(LineMode, SIGNAL(activated(int)), this, SLOT(NewLMode()));
- connect(Kette, SIGNAL(clicked()), this, SLOT(ToggleKette()));
- connect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH()));
- connect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV()));
- connect(GroupAlign, SIGNAL(clicked(int)), this, SLOT(NewAli()));
- connect(Kapital, SIGNAL(clicked()), this, SLOT(setTypeStyle()));
- connect(Revert, SIGNAL(clicked()), this, SLOT(DoRevert()));
- connect(Underline, SIGNAL(clicked()), this, SLOT(setTypeStyle()));
- connect(Strike, SIGNAL(clicked()), this, SLOT(setTypeStyle()));
- connect(Supers, SIGNAL(clicked()), this, SLOT(setTypeStyle()));
- connect(Subs, SIGNAL(clicked()), this, SLOT(setTypeStyle()));
- connect(FreeScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
- connect(FrameScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
- connect(Aspect, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
- connect(Zup, SIGNAL(clicked()), this, SLOT(DoRaise()));
- connect(ZDown, SIGNAL(clicked()), this, SLOT(DoLower()));
- connect(ZTop, SIGNAL(clicked()), this, SLOT(DoFront()));
- connect(ZBottom, SIGNAL(clicked()), this, SLOT(DoBack()));
- connect(RotationGroup, SIGNAL(clicked(int)), this, SLOT(NewRotMode(int)));
- connect(Textflow, SIGNAL(clicked()), this, SLOT(DoFlow()));
- connect(SRect, SIGNAL(clicked()), this, SLOT(MakeRect()));
- connect(SOval, SIGNAL(clicked()), this, SLOT(MakeOval()));
- connect(SCustom, SIGNAL(clicked()), this, SLOT(MakeIrre()));
- connect(EditShape, SIGNAL(clicked()), this, SLOT(EditSh()));
- connect(DTop, SIGNAL(valueChanged(int)), this, SLOT(NewTDist()));
- connect(DLeft, SIGNAL(valueChanged(int)), this, SLOT(NewTDist()));
- connect(DRight, SIGNAL(valueChanged(int)), this, SLOT(NewTDist()));
- connect(DBottom, SIGNAL(valueChanged(int)), this, SLOT(NewTDist()));
- connect(buttonGroup5, SIGNAL(clicked(int)), this, SLOT(SelTab(int)));
- HaveItem = false;
- Xpos->setValue(0);
- Ypos->setValue(0);
- Width->setValue(0);
- Height->setValue(0);
- Rot->setValue(0);
- RoundRect->setValue(0);
- TabStack->raiseWidget(0);
- TabStack->widget(0)->setEnabled(false);
- SGeom->setEnabled(false);
- SShape->setEnabled(false);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(false);
- SColor->setEnabled(false);
-}
-
-
-void Mpalette::closeEvent(QCloseEvent *ce)
-{
- emit Schliessen();
- ce->accept();
-}
-
-void Mpalette::SelTab(int t)
-{
- TabStack->raiseWidget(t);
-}
-
-void Mpalette::SetDoc(ScribusDoc *d)
-{
- doc = d;
- HaveDoc = true;
- Xpos->setMaxValue( 300000 );
- Xpos->setMinValue( -300000 );
- Ypos->setMaxValue( 300000 );
- Ypos->setMinValue( -300000 );
- Width->setMaxValue( 300000 );
- Width->setMinValue( 100 );
- Height->setMaxValue( 300000 );
- Height->setMinValue( 100 );
- Rot->setMaxValue( 36000 );
- Rot->setMinValue( 0 );
- RoundRect->setMaxValue( 3000 );
- RoundRect->setMinValue( -3000 );
- LYpos->setMaxValue( 300000 );
- LYpos->setMinValue( -300000 );
- ScaleY->setMaxValue( 3000 );
- ScaleY->setMinValue( 1 );
- ScaleX->setMaxValue( 3000 );
- ScaleX->setMinValue( 1 );
- LXpos->setMaxValue( 300000 );
- LXpos->setMinValue( -300000 );
- Size->setMaxValue( 512 );
- Size->setMinValue( 1 );
- LineSp->setMaxValue( 3000 );
- LineSp->setMinValue( 1 );
- Extra->setMaxValue( 3000 );
- Extra->setMinValue( -3000 );
- LSize->setMaxValue( 120 );
- LSize->setMinValue( 1 );
- Xpos->setDecimals(100);
- Ypos->setDecimals(100);
- Width->setDecimals(100);
- Height->setDecimals(100);
- Rot->setDecimals(100);
- Extra->setDecimals(10);
- LineSp->setDecimals(10);
- LXpos->setDecimals(100);
- LYpos->setDecimals(100);
- ScaleX->setDecimals(10);
- ScaleY->setDecimals(10);
- DTop->setDecimals(10);
- DLeft->setDecimals(10);
- DBottom->setDecimals(10);
- DRight->setDecimals(10);
-}
-
-void Mpalette::UnsetDoc()
-{
- HaveDoc = false;
-}
-
-void Mpalette::SetCurItem(PageItem *i)
-{
- HaveItem = false;
- CurItem = i;
- if (i->IFont != "");
- Fonts->setText(i->IFont);
- RoundRect->setValue(qRound(i->RadRect));
- DLeft->setValue(static_cast<int>(i->Extra*10));
- DTop->setValue(static_cast<int>(i->TExtra*10));
- DBottom->setValue(static_cast<int>(i->BExtra*10));
- DRight->setValue(static_cast<int>(i->RExtra*10));
- Revert->setOn(i->Reverse);
- if (i->Locked)
- {
- Xpos->setEnabled(false);
- Ypos->setEnabled(false);
- Width->setEnabled(false);
- Height->setEnabled(false);
- Rot->setEnabled(false);
- RoundRect->setEnabled(false);
- return;
- }
- else
- {
- Xpos->setEnabled(true);
- Ypos->setEnabled(true);
- Width->setEnabled(true);
- Height->setEnabled(true);
- Rot->setEnabled(true);
- RoundRect->setEnabled(true);
- }
- if (((i->PType == 4) || (i->PType == 2) || (i->PType == 3)) && (!i->ClipEdited))
- RoundRect->setEnabled(true);
- else
- RoundRect->setEnabled(false);
- if (i->PType == 5)
- {
- if (LMode)
- {
- Text1->setText( tr( "X1:" ) );
- Text2->setText( tr( "X2:" ) );
- Text1a->setText( tr( "Y1:" ) );
- Text2a->setText( tr( "Y2:" ) );
- Rot->setEnabled(false);
- Height->setEnabled(true);
- }
- else
- {
- Text1->setText( tr( "X-Pos:" ) );
- Text2->setText( tr( "Width:" ) );
- Text1a->setText( tr( "Y-Pos:" ) );
- Text2a->setText( tr( "Height:" ) );
- Rot->setEnabled(true);
- Height->setEnabled(false);
- }
- HaveItem = true;
- return;
- }
- else
- {
- if (i->PType == 2)
- {
- if (i->ScaleType)
- {
- FreeScale->setChecked(true);
- FrameScale->setChecked(false);
- Aspect->setEnabled(false);
- Aspect->setChecked(i->AspectRatio);
- }
- else
- {
- FreeScale->setChecked(false);
- FrameScale->setChecked(true);
- Kette->setOn(false);
- Aspect->setEnabled(true);
- Aspect->setChecked(i->AspectRatio);
- }
- }
- }
- HaveItem = true;
-}
-
-void Mpalette::NewSel(int nr)
-{
- if (doc->ActPage->GroupSel)
- {
- Text1->setText( tr( "X-Pos:" ) );
- Text2->setText( tr( "Width:" ) );
- Text1a->setText( tr( "Y-Pos:" ) );
- Text2a->setText( tr( "Height:" ) );
- HaveItem = false;
- Xpos->setValue(0);
- Ypos->setValue(0);
- Width->setValue(0);
- Height->setValue(0);
- Rot->setValue(0);
- RoundRect->setValue(0);
- HaveItem = true;
- Xpos->setEnabled(true);
- Ypos->setEnabled(true);
- Width->setEnabled(true);
- Height->setEnabled(true);
- Rot->setEnabled(true);
- }
- else
- {
- FlipH->setEnabled(false);
- FlipV->setEnabled(false);
- ShapeGroup->setEnabled(false);
- RoundRect->setEnabled(false);
- Distance->setEnabled(false);
- EditShape->setEnabled(false);
- LineMode->setEnabled(false);
- TopLeft->setEnabled(true);
- TopRight->setEnabled(true);
- BottomLeft->setEnabled(true);
- BottomRight->setEnabled(true);
- Center->setEnabled(true);
- SGeom->setOn(true);
- TabStack->widget(0)->setEnabled(true);
- TabStack->widget(1)->setEnabled(false);
- TabStack->widget(2)->setEnabled(false);
- TabStack->widget(3)->setEnabled(false);
- TabStack->widget(4)->setEnabled(false);
- TabStack->widget(5)->setEnabled(true);
- SColor->setEnabled(true);
- switch (nr)
- {
- case -1:
- Text1->setText( tr( "X-Pos:" ) );
- Text2->setText( tr( "Width:" ) );
- Text1a->setText( tr( "Y-Pos:" ) );
- Text2a->setText( tr( "Height:" ) );
- Rot->setEnabled(true);
- Height->setEnabled(true);
- HaveItem = false;
- Xpos->setValue(0);
- Ypos->setValue(0);
- Width->setValue(0);
- Height->setValue(0);
- Rot->setValue(0);
- RoundRect->setValue(0);
- for (int ws = 0; ws < 6; ++ws)
- {
- TabStack->widget(ws)->setEnabled(false);
- }
- SGeom->setEnabled(false);
- SShape->setEnabled(false);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(false);
- SColor->setEnabled(false);
- break;
- case 1:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(true);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(4)->setEnabled(true);
- ShapeGroup->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- case 2:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(false);
- SImage->setEnabled(true);
- SLine->setEnabled(false);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(3)->setEnabled(true);
- FlipH->setEnabled(true);
- FlipV->setEnabled(true);
- ShapeGroup->setEnabled(true);
- RoundRect->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- case 3:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(true);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(4)->setEnabled(true);
- ShapeGroup->setEnabled(true);
- RoundRect->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- case 4:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(true);
- SImage->setEnabled(false);
- SLine->setEnabled(false);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(2)->setEnabled(true);
- FlipH->setEnabled(true);
- FlipV->setEnabled(true);
- ShapeGroup->setEnabled(true);
- RoundRect->setEnabled(true);
- Distance->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- case 5:
- SGeom->setEnabled(true);
- SShape->setEnabled(false);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(true);
- TabStack->widget(4)->setEnabled(true);
- LineMode->setEnabled(true);
- TopLeft->setEnabled(false);
- TopRight->setEnabled(false);
- BottomLeft->setEnabled(false);
- BottomRight->setEnabled(false);
- Center->setEnabled(false);
- HaveItem = true;
- break;
- case 6:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(true);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(4)->setEnabled(true);
- ShapeGroup->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- case 7:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(false);
- SImage->setEnabled(false);
- SLine->setEnabled(true);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(4)->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- case 8:
- SGeom->setEnabled(true);
- SShape->setEnabled(true);
- SText->setEnabled(true);
- SImage->setEnabled(false);
- SLine->setEnabled(false);
- TabStack->widget(1)->setEnabled(true);
- TabStack->widget(2)->setEnabled(true);
- TabStack->widget(4)->setEnabled(true);
- EditShape->setEnabled(true);
- HaveItem = true;
- break;
- }
- }
- updateGeometry();
- setFocus();
- repaint();
-}
-
-void Mpalette::UnitChange()
-{
- float old = Umrech;
- bool tmp = HaveItem;
- HaveItem = false;
- QString ein;
- Umrech = UmReFaktor;
- switch (doc->Einheit)
- {
- case 0:
- ein = " pt";
- break;
- case 1:
- ein = " mm";
- break;
- case 2:
- ein = " in";
- break;
- case 3:
- ein = " p";
- break;
- }
- Xpos->setSuffix( ein );
- Ypos->setSuffix( ein );
- Width->setSuffix( ein );
- Height->setSuffix( ein );
- LXpos->setSuffix( ein );
- LYpos->setSuffix( ein );
- Xpos->setValue(qRound(static_cast<float>(Xpos->value()) / old * UmReFaktor));
- Ypos->setValue(qRound(static_cast<float>(Ypos->value()) / old * UmReFaktor));
- Width->setValue(qRound(static_cast<float>(Width->value()) / old * UmReFaktor));
- Height->setValue(qRound(static_cast<float>(Height->value()) / old * UmReFaktor));
- LXpos->setValue(qRound(static_cast<float>(LXpos->value()) / old * UmReFaktor));
- LYpos->setValue(qRound(static_cast<float>(LYpos->value()) / old * UmReFaktor));
- HaveItem = tmp;
-}
-
-void Mpalette::