TQt4 port kuickshow

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kuickshow@1239028 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 17177ee9cc
commit d5c0d088ad

@ -1,108 +0,0 @@
ifndef _cdbs_bootstrap
_cdbs_scripts_path ?= /usr/lib/cdbs
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
_cdbs_class_path ?= /usr/share/cdbs/1/class
endif
ifndef _cdbs_class_debian-qt-kde
_cdbs_class_debian-qt-kde := 1
# Note: This _must_ be included before autotools.mk, or it won't work.
common-configure-arch common-configure-indep:: debian/stamp-cvs-make
debian/stamp-cvs-make:
if test -n "$(DEB_KDE_CVS_MAKE)" -a ! -f configure; then \
$(MAKE) -C $(DEB_SRCDIR) -f admin/Makefile.common dist; \
fi
touch debian/stamp-cvs-make
include /usr/share/cdbs/1/class/kde.mk$(_cdbs_makefile_suffix)
DEB_PATCHDIRS := debian/patches/common debian/patches
DEB_KDE_ENABLE_FINAL := yes
DEB_INSTALL_DOCS_ALL :=
DEB_DH_MAKESHLIBS_ARGS_ALL := -V
DEB_SHLIBDEPS_INCLUDE = $(foreach p,$(PACKAGES_WITH_LIBS),debian/$(p)/usr/lib)
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
cdbs_treat_me_gently_arches := arm m68k alpha ppc64
ifeq (,$(filter $(DEB_HOST_ARCH_CPU),$(cdbs_treat_me_gently_arches)))
cdbs_kde_enable_final = $(if $(DEB_KDE_ENABLE_FINAL),--enable-final,)
else
cdbs_kde_enable_final =
endif
endif
common-build-arch:: debian/stamp-man-pages
debian/stamp-man-pages:
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
for f in $$(find debian/man -name '*.sgml'); do \
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
done
for f in $$(find debian/man -name '*.man'); do \
soelim -I debian/man $$f \
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
done
touch debian/stamp-man-pages
common-binary-indep::
( set -e; \
tmpf=`mktemp debian/versions.XXXXXX`; \
perl debian/cdbs/versions.pl >$$tmpf; \
for p in $(DEB_INDEP_PACKAGES); do \
cat $$tmpf >>debian/$$p.substvars; \
done; \
rm -f $$tmpf )
common-binary-arch::
( set -e; \
tmpf=`mktemp debian/versions.XXXXXX`; \
perl debian/cdbs/versions.pl >$$tmpf; \
for p in $(DEB_ARCH_PACKAGES); do \
cat $$tmpf >>debian/$$p.substvars; \
done; \
rm -f $$tmpf )
clean::
rm -rf debian/man/out
-rmdir debian/man
rm -f debian/stamp-man-pages
rm -rf debian/shlibs-check
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
if test -x /usr/bin/dh_desktop; then dh_desktop -p$(cdbs_curpkg) $(DEB_DH_DESKTOP_ARGS); fi
if test -e debian/$(cdbs_curpkg).lintian; then \
install -p -D -m644 debian/$(cdbs_curpkg).lintian \
debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
fi
if test -e debian/$(cdbs_curpkg).presubj; then \
install -p -D -m644 debian/$(cdbs_curpkg).presubj \
debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \
fi
binary-install/$(DEB_SOURCE_PACKAGE)-doc-html::
set -e; \
for doc in `cd $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en; find . -name index.docbook`; do \
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
echo Building $$pkg HTML docs...; \
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
cd $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
/usr/kde3/bin/meinproc $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en/$$pkg/index.docbook; \
done
for pkg in $(DOC_HTML_PRUNE) ; do \
rm -rf debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
done
clean::
if test -n "$(DEB_KDE_CVS_MAKE)" && test -d $(DEB_SRCDIR); then \
cd $(DEB_SRCDIR); \
find . -name Makefile.in -print | \
xargs --no-run-if-empty rm -f; \
rm -f Makefile.am acinclude.m4 aclocal.m4 config.h.in \
configure configure.files configure.in stamp-h.in \
subdirs; \
fi
rm -f debian/stamp-cvs-make
endif

@ -1,19 +0,0 @@
#!/usr/bin/env perl
use strict;
use warnings;
my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
($version3 = $version) =~ s/-[^-]+$//;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
($version2_next = $version2) =~ s/(?<=\.)(\d+)$/($1+1)/e;
print "KDE-Version3=$version3\n";
print "KDE-Version2=$version2\n";
print "KDE-Next-Version3=$version3_next\n";
print "KDE-Next-Version2=$version2_next\n";

42
debian/changelog vendored

@ -1,42 +0,0 @@
kuickshow-kde3 (4:3.5.8-0ubuntu3) karmic; urgency=low
* Karmic rebuild
-- Timothy Pearson <kb9vqf@pearsoncomputing.net> Thu, 02 July 2009 16:08:00 -0600
kuickshow-kde3 (4:3.5.8-0ubuntu2) intrepid; urgency=low
* Moved KDE3 to /opt/kde3
* Integrated properly with KDE4.2+
-- Timothy Pearson <kb9vqf@pearsoncomputing.net> Fri, 06 March 2009 01:35:00 -0600
kuickshow-kde3 (4:3.5.8-0ubuntu1) intrepid; urgency=low
* Added -kde3 suffix
-- Timothy Pearson <kb9vqf@pearsoncomputing.net> Fri, 12 Dec 2008 14:28:00 -0600
kuickshow (4:3.5.8-0ubuntu2) hardy; urgency=low
* No change recompile to build against libgif (not libungif)
-- Jonathan Riddell <jriddell@ubuntu.com> Mon, 07 Jan 2008 10:26:21 +0000
kuickshow (4:3.5.8-0ubuntu1) hardy; urgency=low
* New upstream release, extracted from kdegraphics 3.5.8
-- Jonathan Riddell <jriddell@ubuntu.com> Wed, 14 Nov 2007 17:59:49 +0000
kuickshow (4:3.5.7-0ubuntu1) gutsy; urgency=low
* New upstream release, extracted from kdegraphics 3.5.7
-- Jonathan Riddell <jriddell@ubuntu.com> Sun, 03 Jun 2007 14:45:49 +0100
kuickshow (4:3.5.6-0ubuntu1) feisty; urgency=low
* Initial package, separate from kdegraphics due to imlib11 not being in main
-- Jonathan Riddell <jriddell@ubuntu.com> Wed, 28 Feb 2007 16:29:08 +0000

1
debian/compat vendored

@ -1 +0,0 @@
5

24
debian/control vendored

@ -1,24 +0,0 @@
Source: kuickshow-kde3
Section: kde
Priority: optional
Maintainer: Timothy Pearson <kb9vqf@pearsoncomputing.net>
Build-Depends: cdbs (>= 0.4.39-0.1), debhelper (>= 5.0.31), autotools-dev, gawk, kdelibs4-kde3-dev (>= 4:3.5.6), imlib11-dev
Standards-Version: 3.7.2
Package: kuickshow-kde3
Section: graphics
Architecture: any
Depends: ${shlibs:Depends}
Suggests: khelpcenter-kde3
Description: KDE image/slideshow viewer [KDE3]
KuickShow is an image browser/viewer with a nice filebrowser to
select images to be shown, slideshow support and the ability to
display the following image formats: jpg, gif, tiff, png, bmp, psd,
xpm, xbm, pbm and eim. Images can be displayed either in their own
window, as large as the image, or fullscreen (which shrinks images too
large to display). KuickShow also has a slideshow mode.
.
This package is part of KDE, as a component of the KDE graphics
module. See the 'kde' and 'kdegraphics' packages for more information.
.
Homepage: http://kuickshow.sourceforge.net

424
debian/copyright vendored

@ -1,424 +0,0 @@
This package was debianized by Christopher L Cheney <ccheney@debian.org> on
Tue, 16 Apr 2002 22:00:00 -0500.
It was downloaded from: http://www.kde.org/download
Upstream Authors: Stephan Kulow <coolo@kde.org> and many others.
License:
All programs are under the GPL. On Debian systems, the complete text of
the GPL license can be found in the /usr/share/common-licenses/GPL file.
--------------------
DocBook Documentation:
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, with no Front-Cover Texts,
and with no Back-Cover Texts.
A copy of the GNU Free Documentation License (Version 1.2) is
included below.
GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA, 02110-1301, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document 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.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation 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. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

@ -1,41 +0,0 @@
/* XPM */
static char *kuickshow-16[] = {
/* columns rows colors chars-per-pixel */
"16 14 21 1",
" c black",
". c #000033",
"X c gray20",
"o c #006633",
"O c #336633",
"+ c #0033FF",
"@ c #3333FF",
"# c #6666FF",
"$ c #009933",
"% c #669933",
"& c #9900CC",
"* c #9933CC",
"= c #9933FF",
"- c #9966FF",
"; c #CC66CC",
": c #9999FF",
"> c #CC99FF",
", c #CCCCFF",
"< c #FFCCFF",
"1 c gray100",
"2 c None",
/* pixels */
"2222222221,:2222",
"22211,:21,>:2222",
"22-<>1>-::->1122",
"22-,:->--:11>--2",
"222:-++@@-+-::#2",
"-11>-=>* @@+:@+2",
"1<::@=. @-:@*222",
">-@>>:@@##>+oo22",
"@@1+@>,#@>-=$%O2",
"-1-+@1:#--&OOXOO",
"-1;:@<:::*&2oOO2",
"2+@@2<:*22o%2222",
"2222222222o%2222",
"22222222222oo222"
};

@ -1,66 +0,0 @@
/* XPM */
static char *kuickshow[] = {
/* columns rows colors chars-per-pixel */
"32 29 31 1",
" c black",
". c #000033",
"X c #003333",
"o c gray20",
"O c #006633",
"+ c #336633",
"@ c #0033FF",
"# c #3333FF",
"$ c #6666FF",
"% c #009933",
"& c #339933",
"* c #669933",
"= c #6699CC",
"- c #6699FF",
"; c #9900CC",
": c #9900FF",
"> c #9933CC",
", c #9933FF",
"< c #9966CC",
"1 c #9966FF",
"2 c #CC00CC",
"3 c #CC66CC",
"4 c #CC66FF",
"5 c #9999CC",
"6 c #9999FF",
"7 c #CC99FF",
"8 c #FF99FF",
"9 c #CCCCFF",
"0 c #FFCCFF",
"q c gray100",
"w c None",
/* pixels */
"wwwwwwwwwwwwwwwwwww14114wwwwwwww",
"wwwwwwwwwwwwwwwwww6qqqq66wwwwwww",
"wwwwwww464141wwww4q909941wwwwwww",
"wwwwww1qq09976ww1q0917966wwwwwww",
"wwwww4q99171416w7q14117$1764wwww",
"wwwww1q01719176176667167qqqq7www",
"wwwww7q949617116016161qq979916ww",
"wwwww1q94661-761-1@6@q9q4771716w",
"wwwwww499116#@101#@#946$614616#w",
"wwwwwww671#@#@>#@##11@6166666$#w",
"www71717616#>,q, 6@6##@15$11@#>w",
"w1790997616,q7,, #@#@##@#6@##1ww",
"7q971711##>q6>,X#11611@,#@#>,www",
"1q9096@6@#.,,. #@#=1666#,>,wwwww",
"1q71711#@#-;X7#@#@#1611#>wwwwwww",
"1711@##777#67#@##6$6171@,***wwww",
"#66##q71##@710@1@166166#>++%**ww",
">#@#976@1#17961#6#$791#,*%%+++;w",
"w>6q97@6@#q9166$11776@>+o*;%%+:;",
"w1q0614@1#q096<67191#;:+*+%o++%;",
"w7q946616@q68909901@;,w;+o+%%++:",
"w1q963161#@064116@#,%;;w:O++;:;w",
"ww#70616@>,#@####>,w%&,ww;::;www",
"ww,@##@#,ww>,>,>,wwww%*>wwwwwwww",
"www,>,>,wwwwwwwwwwwwww%2wwwwwwww",
"wwwwwwwwwwwwwwwwwwwwww%*2wwwwwww",
"wwwwwwwwwwwwwwwwwwwwwww%:wwwwwww",
"wwwwwwwwwwwwwwwwwwwwwww%*2wwwwww",
"wwwwwwwwwwwwwwwwwwwwwwww>:wwwwww"
};

@ -1,2 +0,0 @@
debian/icons/kuickshow.xpm /opt/kde3/share/pixmaps
debian/icons/kuickshow-16.xpm /opt/kde3/share/pixmaps

@ -1,4 +0,0 @@
kuickshow-kde3: no-shlibs-control-file opt/kde3/lib/libkdeinit_kuickshow.so
kuickshow-kde3: postinst-must-call-ldconfig opt/kde3/lib/libkdeinit_kuickshow.so
kuickshow-kde3: postrm-should-call-ldconfig opt/kde3/lib/libkdeinit_kuickshow.so
kuickshow-kde3: package-name-doesnt-match-sonames libkdeinit-kuickshow

@ -1 +0,0 @@
debian/man/kuickshow.1

@ -1,11 +0,0 @@
?package(kuickshow):\
needs="X11"\
section="Apps/Graphics"\
hints="KDE"\
title="Kuickshow"\
icon32x32="/usr/share/pixmaps/kuickshow.xpm"\
icon16x16="/usr/share/pixmaps/kuickshow-16.xpm"\
command="/opt/kde3/bin/kuickshow"
# Icon 32x32 kuickshow/src/cr32-app-kuickshow.png kuickshow.xpm
# Icon 16x16 kuickshow/src/cr16-app-kuickshow.png kuickshow-16.xpm

@ -1,99 +0,0 @@
.TH KUICKSHOW "1" "September 2002" KDE "KDE Application"
.SH NAME
kuickshow \- KDE Image Viewer
.SH SYNOPSIS
.B kuickshow
[\fIQt-options\fR] [\fIKDE-options\fR] [\fIoptions\fR] [\fIfiles\fR]
.SH DESCRIPTION
This manual page documents briefly the
.B Kuickshow
KDE Application.
This manual page was written for the Debian GNU/Linux distribution
because the original program does not have a manual page.
.P
.B KuickShow
is a comfortable image browser/viewer. It displays a
filebrowser where you can select images which are then shown.
.P
The following image formats are supported:
.P
.RS
\(bu jpg
.br
\(bu gif
.br
\(bu tiff
.br
\(bu png
.br
\(bu bmp
.br
\(bu psd
.br
\(bu xmp
.br
\(bu xbm
.br
\(bu eim
.RE
.P
Images can be displayed either in their own window, as large as the
image, or fullscreen.
.P
This program is part of the official KDE graphics module.
.SS "Generic options:"
.TP
\fB\-\-help\fR
Show help about options
.TP
\fB\-\-help\-qt\fR
Show Qt specific options
.TP
\fB\-\-help\-kde\fR
Show KDE specific options
.TP
\fB\-\-help\-all\fR
Show all options
.TP
\fB\-\-author\fR
Show author information
.TP
\fB\-v\fR, \fB\-\-version\fR
Show version information
.TP
\fB\-\-license\fR
Show license information
.TP
\fB\-\-\fR
End of options
.SH OPTIONS
.TP
\fB\-\-lastdir\fR
Start in the last visited directory, not the current working directory
.SS "Arguments:"
.TP
files
Optional image filenames/urls to show
.SH "SEE ALSO"
The full documentation for
.B Kuickshow
is maintained as a docbook manual. If the
.B khelpcenter
program is properly installed at your site, the command
.IP
.B khelpcenter help:/kuickshow
.PP
should give you access to the complete manual.
.SH AUTHOR
KuickShow was written by
.nh
Carsten Pfeiffer <pfeiffer@kde.org>.
.hy
.br
Please use http://bugs.kde.org to report bugs, do not mail the authors directly.
.br
This manual page was prepared by
.nh
Karolina Lindqvist <pgd\-karolinali@algonet.se>
.hy
for the Debian GNU/Linux system (but may be used by others).

15
debian/rules vendored

@ -1,15 +0,0 @@
#! /usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include debian/cdbs/debian-qt-kde.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/utils.mk
DEB_CONFIGURE_INCLUDEDIR := /opt/kde3/include/kde
DEB_CONFIGURE_MANDIR := /opt/kde3/share/man
DEB_CONFIGURE_PREFIX := /opt/kde3
DEB_CONFIGURE_INFODIR := /opt/kde3/share/info
cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)
DEB_CONFIGURE_EXTRA_FLAGS := --prefix=/opt/kde3 --with-extra-libs=/opt/kde3/lib --with-extra-includes=/opt/kde3/include/kde

@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qdatetime.h> #include <tqdatetime.h>
#include <qevent.h> #include <tqevent.h>
#include <qglobal.h> #include <tqglobal.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kwin.h> #include <kwin.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -31,40 +31,40 @@
#include "aboutwidget.h" #include "aboutwidget.h"
AboutWidget::AboutWidget( QWidget *parent, const char *name ) AboutWidget::AboutWidget( TQWidget *tqparent, const char *name )
: QVBox( parent, name, Qt::WShowModal ) : TQVBox( tqparent, name, TQt::WShowModal )
{ {
KWin::setType( winId(), NET::Override ); KWin::setType( winId(), NET::Override );
KWin::setState( winId(), NET::SkipTaskbar ); KWin::setState( winId(), NET::SkipTaskbar );
setFrameStyle( WinPanel | Raised ); setFrameStyle( WinPanel | Raised );
QGroupBox *gBox = new QGroupBox( 1, Horizontal, this); TQGroupBox *gBox = new TQGroupBox( 1,Qt::Horizontal, this);
gBox->setGeometry( 10, 10, width()-20, height()-20 ); gBox->setGeometry( 10, 10, width()-20, height()-20 );
gBox->setAlignment( AlignHCenter ); gBox->tqsetAlignment( AlignHCenter );
gBox->installEventFilter( this ); gBox->installEventFilter( this );
gBox->setPalette( QPalette( QColor( white ) ) ); gBox->setPalette( TQPalette( TQColor( white ) ) );
gBox->setBackgroundMode( PaletteBackground ); gBox->setBackgroundMode( PaletteBackground );
int hour = QTime::currentTime().hour(); int hour = TQTime::currentTime().hour();
QString file; TQString file;
if ( hour >= 10 && hour < 16 ) if ( hour >= 10 && hour < 16 )
file = locate("appdata", "pics/kuickshow-day.jpg"); file = locate("appdata", "pics/kuickshow-day.jpg");
else else
file = locate("appdata", "pics/kuickshow-night.jpg"); file = locate("appdata", "pics/kuickshow-night.jpg");
QLabel *authors = new QLabel("Kuickshow " KUICKSHOWVERSION TQLabel *authors = new TQLabel("Kuickshow " KUICKSHOWVERSION
" was brought to you by", gBox); " was brought to you by", gBox);
authors->setAlignment( AlignCenter ); authors->tqsetAlignment( AlignCenter );
m_homepage = new KURLWidget("Carsten Pfeiffer", gBox); m_homepage = new KURLWidget("Carsten Pfeiffer", gBox);
m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" ); m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
m_homepage->setAlignment( AlignCenter ); m_homepage->tqsetAlignment( AlignCenter );
QLabel *copy = new QLabel("(C) 1998-2006", gBox); TQLabel *copy = new TQLabel("(C) 1998-2006", gBox);
copy->setAlignment( AlignCenter ); copy->tqsetAlignment( AlignCenter );
ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" ); ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" );
if ( im->loadImage( file ) ) if ( im->loadImage( file ) )
@ -80,16 +80,16 @@ AboutWidget::~AboutWidget()
{ {
} }
bool AboutWidget::eventFilter( QObject *o, QEvent *e ) bool AboutWidget::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == QEvent::MouseButtonPress ) { if ( e->type() == TQEvent::MouseButtonPress ) {
QMouseEvent *ev = static_cast<QMouseEvent*>( e ); TQMouseEvent *ev = TQT_TQMOUSEEVENT( e );
if ( !m_homepage->geometry().contains( ev->pos() ) ) { if ( !m_homepage->tqgeometry().tqcontains( ev->pos() ) ) {
deleteLater(); deleteLater();
return true; return true;
} }
} }
return QVBox::eventFilter( o, e ); return TQVBox::eventFilter( o, e );
} }
#include "aboutwidget.moc" #include "aboutwidget.moc"

@ -19,21 +19,22 @@
#ifndef ABOUTWIDGET_H #ifndef ABOUTWIDGET_H
#define ABOUTWIDGET_H #define ABOUTWIDGET_H
#include <qevent.h> #include <tqevent.h>
#include <qvbox.h> #include <tqvbox.h>
class KURLWidget; class KURLWidget;
class AboutWidget : public QVBox class AboutWidget : public TQVBox
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
AboutWidget(QWidget *parent = 0, const char *name = 0); AboutWidget(TQWidget *tqparent = 0, const char *name = 0);
protected: protected:
~AboutWidget(); ~AboutWidget();
bool eventFilter( QObject*, QEvent * ); bool eventFilter( TQObject*, TQEvent * );
private: private:
KURLWidget *m_homepage; KURLWidget *m_homepage;

@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <kdialog.h> #include <kdialog.h>
@ -31,40 +31,40 @@
#include "imlibwidget.h" #include "imlibwidget.h"
#include "defaultswidget.h" #include "defaultswidget.h"
DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name) DefaultsWidget::DefaultsWidget( TQWidget *tqparent, const char *name)
: QWidget( parent, name ) : TQWidget( tqparent, name )
{ {
imFiltered = 0L; imFiltered = 0L;
cbEnableMods = new QCheckBox( i18n("Apply default image modifications"), this ); cbEnableMods = new TQCheckBox( i18n("Apply default image modifications"), this );
connect( cbEnableMods, SIGNAL( toggled(bool) ), SLOT( enableWidgets(bool) )); connect( cbEnableMods, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( enableWidgets(bool) ));
// create all the widgets // create all the widgets
gbScale = new QGroupBox( i18n("Scaling"), this ); gbScale = new TQGroupBox( i18n("Scaling"), this );
gbScale->setColumnLayout( 0, Qt::Horizontal ); gbScale->setColumnLayout( 0, Qt::Horizontal );
cbDownScale = new QCheckBox( i18n("Shrink image to screen size, if larger"), cbDownScale = new TQCheckBox( i18n("Shrink image to screen size, if larger"),
gbScale, "shrinktoscreen" ); gbScale, "shrinktoscreen" );
cbUpScale = new QCheckBox( i18n("Scale image to screen size, if smaller, up to factor:"), gbScale, "upscale checkbox" ); cbUpScale = new TQCheckBox( i18n("Scale image to screen size, if smaller, up to factor:"), gbScale, "upscale checkbox" );
sbMaxUpScaleFactor = new KIntNumInput( gbScale, "upscale factor" ); sbMaxUpScaleFactor = new KIntNumInput( gbScale, "upscale factor" );
sbMaxUpScaleFactor->setRange( 1, 100, 1, false ); sbMaxUpScaleFactor->setRange( 1, 100, 1, false );
connect(cbUpScale, SIGNAL( toggled(bool)), sbMaxUpScaleFactor, connect(cbUpScale, TQT_SIGNAL( toggled(bool)), sbMaxUpScaleFactor,
SLOT( setEnabled(bool) )); TQT_SLOT( setEnabled(bool) ));
// -- // --
gbGeometry = new QGroupBox( i18n("Geometry"), this ); gbGeometry = new TQGroupBox( i18n("Geometry"), this );
gbGeometry->setColumnLayout( 0, Qt::Horizontal ); gbGeometry->setColumnLayout( 0, Qt::Horizontal );
cbFlipVertically = new QCheckBox( i18n("Flip vertically"), gbGeometry ); cbFlipVertically = new TQCheckBox( i18n("Flip vertically"), gbGeometry );
cbFlipHorizontally = new QCheckBox( i18n("Flip horizontally"), gbGeometry ); cbFlipHorizontally = new TQCheckBox( i18n("Flip horizontally"), gbGeometry );
lbRotate = new QLabel( i18n("Rotate image:"), gbGeometry ); lbRotate = new TQLabel( i18n("Rotate image:"), gbGeometry );
comboRotate = new KComboBox( gbGeometry, "rotate combobox" ); comboRotate = new KComboBox( gbGeometry, "rotate combobox" );
comboRotate->insertItem( i18n("0 Degrees") ); comboRotate->insertItem( i18n("0 Degrees") );
@ -74,7 +74,7 @@ DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
// -- // --
gbAdjust = new QVGroupBox( i18n("Adjustments"), this ); gbAdjust = new TQVGroupBox( i18n("Adjustments"), this );
sbBrightness = new KIntNumInput( gbAdjust, "brightness spinbox" ); sbBrightness = new KIntNumInput( gbAdjust, "brightness spinbox" );
sbBrightness->setRange( -256, 256, 1, true ); sbBrightness->setRange( -256, 256, 1, true );
@ -91,37 +91,37 @@ DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
// -- // --
gbPreview = new QGroupBox( i18n("Preview"), this ); gbPreview = new TQGroupBox( i18n("Preview"), this );
gbPreview->setAlignment( AlignCenter ); gbPreview->tqsetAlignment( AlignCenter );
lbImOrig = new QLabel( i18n("Original"), gbPreview ); lbImOrig = new TQLabel( i18n("Original"), gbPreview );
imOrig = new ImlibWidget( 0L, gbPreview, "original image" ); imOrig = new ImlibWidget( 0L, gbPreview, "original image" );
lbImFiltered = new QLabel( i18n("Modified"), gbPreview ); lbImFiltered = new TQLabel( i18n("Modified"), gbPreview );
imFiltered = new ImlibWidget( 0L, imOrig->getImlibData(), gbPreview, "" ); imFiltered = new ImlibWidget( 0L, imOrig->getImlibData(), gbPreview, "" );
connect( imFiltered, SIGNAL( destroyed() ), SLOT( slotNoImage() )); connect( imFiltered, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotNoImage() ));
//// ////
//////////////// ////////////////
// layout management // tqlayout management
QVBoxLayout *mainLayout = new QVBoxLayout( this, 0, TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 0,
KDialog::spacingHint(), "main layout" ); KDialog::spacingHint(), "main tqlayout" );
QVBoxLayout *gbScaleLayout = new QVBoxLayout( gbScale->layout(), TQVBoxLayout *gbScaleLayout = new TQVBoxLayout( gbScale->tqlayout(),
KDialog::spacingHint()); KDialog::spacingHint());
QVBoxLayout *gbGeometryLayout = new QVBoxLayout(gbGeometry->layout(), TQVBoxLayout *gbGeometryLayout = new TQVBoxLayout(gbGeometry->tqlayout(),
KDialog::spacingHint()); KDialog::spacingHint());
QGridLayout *gbPreviewLayout = new QGridLayout(gbPreview, 2, 3, 0, TQGridLayout *gbPreviewLayout = new TQGridLayout(gbPreview, 2, 3, 0,
KDialog::spacingHint()); KDialog::spacingHint());
QHBoxLayout *scaleLayout = new QHBoxLayout(); TQHBoxLayout *scaleLayout = new TQHBoxLayout();
QHBoxLayout *rotateLayout = new QHBoxLayout(); TQHBoxLayout *rotateLayout = new TQHBoxLayout();
mainLayout->addWidget( cbEnableMods ); mainLayout->addWidget( cbEnableMods );
mainLayout->addWidget( gbScale ); mainLayout->addWidget( gbScale );
QHBoxLayout *hl = new QHBoxLayout(); TQHBoxLayout *hl = new TQHBoxLayout();
hl->addWidget( gbGeometry ); hl->addWidget( gbGeometry );
hl->addWidget( gbAdjust ); hl->addWidget( gbAdjust );
mainLayout->addLayout( hl ); mainLayout->addLayout( hl );
@ -159,19 +159,19 @@ DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
//////////////// ////////////////
// connect them all to the update slot // connect them all to the update slot
connect( cbDownScale, SIGNAL( clicked() ), SLOT( updatePreview() )); connect( cbDownScale, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
connect( cbUpScale, SIGNAL( clicked() ), SLOT( updatePreview() )); connect( cbUpScale, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
connect( cbFlipVertically, SIGNAL( clicked() ), SLOT( updatePreview() )); connect( cbFlipVertically, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
connect( cbFlipHorizontally, SIGNAL( clicked() ), SLOT( updatePreview() )); connect( cbFlipHorizontally, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
connect( sbMaxUpScaleFactor, SIGNAL( valueChanged(int) ), SLOT( updatePreview() )); connect( sbMaxUpScaleFactor, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
connect( sbBrightness, SIGNAL( valueChanged(int) ), SLOT( updatePreview() )); connect( sbBrightness, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
connect( sbContrast, SIGNAL( valueChanged(int) ), SLOT( updatePreview() )); connect( sbContrast, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
connect( sbGamma, SIGNAL( valueChanged(int) ), SLOT( updatePreview() )); connect( sbGamma, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
connect( comboRotate, SIGNAL( activated(int) ), SLOT( updatePreview() )); connect( comboRotate, TQT_SIGNAL( activated(int) ), TQT_SLOT( updatePreview() ));
QString filename = locate( "data", "kuickshow/pics/calibrate.png" ); TQString filename = locate( "data", "kuickshow/pics/calibrate.png" );
if ( !imOrig->loadImage( filename ) ) if ( !imOrig->loadImage( filename ) )
imOrig = 0L; // FIXME - display some errormessage! imOrig = 0L; // FIXME - display some errormessage!
if ( !imFiltered->loadImage( filename ) ) if ( !imFiltered->loadImage( filename ) )

@ -24,18 +24,19 @@
class ImlibWidget; class ImlibWidget;
class ImData; class ImData;
class QCheckBox; class TQCheckBox;
class QLabel; class TQLabel;
class KComboBox; class KComboBox;
class KIntNumInput; class KIntNumInput;
class DefaultsWidget : public QWidget class DefaultsWidget : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DefaultsWidget( QWidget *parent, const char *name ); DefaultsWidget( TQWidget *tqparent, const char *name );
~DefaultsWidget(); ~DefaultsWidget();
void loadSettings( const KuickData& data ); void loadSettings( const KuickData& data );
@ -44,22 +45,22 @@ public:
private: private:
Rotation currentRotation() const; Rotation currentRotation() const;
QCheckBox *cbEnableMods; TQCheckBox *cbEnableMods;
QGroupBox *gbScale; TQGroupBox *gbScale;
QCheckBox *cbUpScale, *cbDownScale; TQCheckBox *cbUpScale, *cbDownScale;
KIntNumInput *sbMaxUpScaleFactor; KIntNumInput *sbMaxUpScaleFactor;
QGroupBox *gbAdjust; TQGroupBox *gbAdjust;
KIntNumInput *sbBrightness, *sbContrast, *sbGamma; KIntNumInput *sbBrightness, *sbContrast, *sbGamma;
QGroupBox *gbGeometry; TQGroupBox *gbGeometry;
QLabel *lbRotate; TQLabel *lbRotate;
KComboBox *comboRotate; KComboBox *comboRotate;
QCheckBox *cbFlipVertically, *cbFlipHorizontally; TQCheckBox *cbFlipVertically, *cbFlipHorizontally;
QGroupBox *gbPreview; TQGroupBox *gbPreview;
QLabel *lbImOrig, *lbImFiltered; TQLabel *lbImOrig, *lbImFiltered;
ImlibWidget *imOrig, *imFiltered; ImlibWidget *imOrig, *imFiltered;

@ -1,6 +1,6 @@
#include <unistd.h> #include <unistd.h>
#include <qstring.h> #include <tqstring.h>
#include <kdebug.h> #include <kdebug.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -41,8 +41,8 @@ FileCache * FileCache::self()
KuickFile * FileCache::getFile( const KURL& url ) KuickFile * FileCache::getFile( const KURL& url )
{ {
QString urlString = url.prettyURL(); TQString urlString = url.prettyURL();
KuickFile *file = m_files.find( urlString ); KuickFile *file = m_files.tqfind( urlString );
if ( !file ) { if ( !file ) {
file = new KuickFile( url ); file = new KuickFile( url );
m_files.insert( urlString, file ); m_files.insert( urlString, file );
@ -51,14 +51,14 @@ KuickFile * FileCache::getFile( const KURL& url )
return file; return file;
} }
QString FileCache::tempDir() TQString FileCache::tempDir()
{ {
if ( !m_tempDir ) { if ( !m_tempDir ) {
m_tempDir = createTempDir(); m_tempDir = createTempDir();
if ( !m_tempDir ) { if ( !m_tempDir ) {
kdWarning() << "Unable to create temporary directory for KuickShow" << endl; kdWarning() << "Unable to create temporary directory for KuickShow" << endl;
return QString::null; return TQString();
} }
} }
@ -68,9 +68,9 @@ QString FileCache::tempDir()
KTempDir * FileCache::createTempDir() KTempDir * FileCache::createTempDir()
{ {
QString tmpName = QString::fromLatin1( KGlobal::instance()->instanceName() ); TQString tmpName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() );
tmpName.append( QString::number( getpid() ) ); tmpName.append( TQString::number( getpid() ) );
QString dirName = locateLocal( "tmp", tmpName ); TQString dirName = locateLocal( "tmp", tmpName );
KTempDir *dir = new KTempDir( dirName ); KTempDir *dir = new KTempDir( dirName );
dir->setAutoDelete( true ); dir->setAutoDelete( true );
if ( dir->status() != 0L ) if ( dir->status() != 0L )

@ -10,7 +10,7 @@
#ifndef FILECACHE_H #ifndef FILECACHE_H
#define FILECACHE_H #define FILECACHE_H
#include <qcache.h> #include <tqcache.h>
#include "kuickfile.h" #include "kuickfile.h"
@ -27,9 +27,9 @@ public:
int getLimit() const { return m_limit; } int getLimit() const { return m_limit; }
/** /**
* @return the temporary directory or QString::null if none available * @return the temporary directory or TQString() if none available
*/ */
QString tempDir(); TQString tempDir();
private: private:
static FileCache *s_self; static FileCache *s_self;
@ -37,7 +37,7 @@ private:
~FileCache(); ~FileCache();
KTempDir * createTempDir(); KTempDir * createTempDir();
QCache<KuickFile> m_files; TQCache<KuickFile> m_files;
int m_limit; int m_limit;
KTempDir *m_tempDir; KTempDir *m_tempDir;

@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qkeycode.h> #include <tqkeycode.h>
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
@ -26,8 +26,8 @@
#include "filefinder.h" #include "filefinder.h"
FileFinder::FileFinder( QWidget *parent, const char *name ) FileFinder::FileFinder( TQWidget *tqparent, const char *name )
: KLineEdit( parent, name ) : KLineEdit( tqparent, name )
{ {
// make this widget just as large, as the font is + 8 Pixels // make this widget just as large, as the font is + 8 Pixels
int height = fontMetrics().height() + 8; int height = fontMetrics().height() + 8;
@ -38,19 +38,19 @@ FileFinder::FileFinder( QWidget *parent, const char *name )
#if KDE_VERSION >= 220 #if KDE_VERSION >= 220
completionBox()->setTabHandling( true ); completionBox()->setTabHandling( true );
#endif #endif
connect( completionBox(), SIGNAL( userCancelled(const QString&) ), connect( completionBox(), TQT_SIGNAL( userCancelled(const TQString&) ),
SLOT( hide() )); TQT_SLOT( hide() ));
connect( completionBox(), SIGNAL( activated( const QString& ) ), connect( completionBox(), TQT_SIGNAL( activated( const TQString& ) ),
SLOT( slotAccept( const QString& ))); TQT_SLOT( slotAccept( const TQString& )));
connect( this, SIGNAL( returnPressed( const QString& )), connect( this, TQT_SIGNAL( returnPressed( const TQString& )),
SLOT( slotAccept( const QString& ) )); TQT_SLOT( slotAccept( const TQString& ) ));
KURLCompletion *comp = new KURLCompletion(); KURLCompletion *comp = new KURLCompletion();
comp->setReplaceHome( true ); comp->setReplaceHome( true );
comp->setReplaceEnv( true ); comp->setReplaceEnv( true );
setCompletionObject( comp, false ); setCompletionObject( comp, false );
setAutoDeleteCompletionObject( true ); setAutoDeleteCompletionObject( true );
setFocusPolicy( ClickFocus ); setFocusPolicy( TQ_ClickFocus );
KConfig *config = KGlobal::config(); KConfig *config = KGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" ); KConfigGroupSaver cs( config, "GeneralConfiguration" );
@ -66,13 +66,13 @@ FileFinder::~FileFinder()
config->writeEntry( "FileFinderCompletionMode", completionMode() ); config->writeEntry( "FileFinderCompletionMode", completionMode() );
} }
void FileFinder::focusOutEvent( QFocusEvent *e ) void FileFinder::focusOutEvent( TQFocusEvent *e )
{ {
if ( e->reason() != QFocusEvent::Popup ) if ( e->reason() != TQFocusEvent::Popup )
hide(); hide();
} }
void FileFinder::keyPressEvent( QKeyEvent *e ) void FileFinder::keyPressEvent( TQKeyEvent *e )
{ {
int key = e->key(); int key = e->key();
if ( key == Key_Escape ) { if ( key == Key_Escape ) {
@ -88,10 +88,10 @@ void FileFinder::keyPressEvent( QKeyEvent *e )
void FileFinder::hide() void FileFinder::hide()
{ {
KLineEdit::hide(); KLineEdit::hide();
parentWidget()->setFocus(); tqparentWidget()->setFocus();
} }
void FileFinder::slotAccept( const QString& dir ) void FileFinder::slotAccept( const TQString& dir )
{ {
hide(); hide();
emit enterDir( dir ); emit enterDir( dir );

@ -19,7 +19,7 @@
#ifndef FILEFINDER_H #ifndef FILEFINDER_H
#define FILEFINDER_H #define FILEFINDER_H
#include <qevent.h> #include <tqevent.h>
#include <klineedit.h> #include <klineedit.h>
@ -28,9 +28,10 @@ class KURLCompletion;
class FileFinder : public KLineEdit class FileFinder : public KLineEdit
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
FileFinder( QWidget *parent=0, const char *name=0 ); FileFinder( TQWidget *tqparent=0, const char *name=0 );
~FileFinder(); ~FileFinder();
KURLCompletion *completion() { KURLCompletion *completion() {
@ -40,14 +41,14 @@ public:
virtual void hide(); virtual void hide();
signals: signals:
void enterDir( const QString& ); void enterDir( const TQString& );
protected: protected:
virtual void focusOutEvent( QFocusEvent * ); virtual void focusOutEvent( TQFocusEvent * );
virtual void keyPressEvent( QKeyEvent * ); virtual void keyPressEvent( TQKeyEvent * );
private slots: private slots:
void slotAccept( const QString& ); void slotAccept( const TQString& );
}; };

@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qkeycode.h> #include <tqkeycode.h>
#include <kdeversion.h> #include <kdeversion.h>
#include <kglobal.h> #include <kglobal.h>
@ -35,8 +35,8 @@
#undef KeyPress #undef KeyPress
#endif #endif
FileWidget::FileWidget( const KURL& url, QWidget *parent, const char *name ) FileWidget::FileWidget( const KURL& url, TQWidget *tqparent, const char *name )
: KDirOperator( url, parent, name ), : KDirOperator( url, tqparent, name ),
m_validCompletion( false ), m_validCompletion( false ),
m_fileFinder( 0L ) m_fileFinder( 0L )
{ {
@ -55,21 +55,21 @@ FileWidget::FileWidget( const KURL& url, QWidget *parent, const char *name )
dirCompletionObject()->setCompletionMode( KGlobalSettings::CompletionAuto); dirCompletionObject()->setCompletionMode( KGlobalSettings::CompletionAuto);
slotViewChanged(); slotViewChanged();
connect( this, SIGNAL( viewChanged( KFileView * )), connect( this, TQT_SIGNAL( viewChanged( KFileView * )),
SLOT( slotViewChanged() )); TQT_SLOT( slotViewChanged() ));
connect( dirLister(), SIGNAL( clear() ), SLOT( slotItemsCleared() )); connect( dirLister(), TQT_SIGNAL( clear() ), TQT_SLOT( slotItemsCleared() ));
connect( dirLister(), SIGNAL( deleteItem( KFileItem * ) ), connect( dirLister(), TQT_SIGNAL( deleteItem( KFileItem * ) ),
SLOT( slotItemDeleted( KFileItem *) )); TQT_SLOT( slotItemDeleted( KFileItem *) ));
connect( this, SIGNAL( fileHighlighted( const KFileItem * )), connect( this, TQT_SIGNAL( fileHighlighted( const KFileItem * )),
SLOT( slotHighlighted( const KFileItem * ))); TQT_SLOT( slotHighlighted( const KFileItem * )));
connect( this, SIGNAL(urlEntered(const KURL&)), connect( this, TQT_SIGNAL(urlEntered(const KURL&)),
SLOT( slotURLEntered( const KURL& ))); TQT_SLOT( slotURLEntered( const KURL& )));
// should actually be KDirOperator's job! // should actually be KDirOperator's job!
connect( this, SIGNAL( finishedLoading() ), SLOT( slotFinishedLoading() )); connect( this, TQT_SIGNAL( finishedLoading() ), TQT_SLOT( slotFinishedLoading() ));
} }
FileWidget::~FileWidget() FileWidget::~FileWidget()
@ -97,9 +97,9 @@ void FileWidget::initActions()
// so we move it to the real bottom // so we move it to the real bottom
menu->remove( coll->action( "properties" ) ); menu->remove( coll->action( "properties" ) );
QPopupMenu *pMenu = menu->popupMenu(); TQPopupMenu *pMenu = menu->popupMenu();
int lastItemId = pMenu->idAt( pMenu->count() - 1 ); int lastItemId = pMenu->idAt( pMenu->count() - 1 );
QMenuItem *mItem = pMenu->findItem( lastItemId ); TQMenuItem *mItem = pMenu->tqfindItem( lastItemId );
if ( mItem && !mItem->isSeparator() ) if ( mItem && !mItem->isSeparator() )
menu->insert( sep ); menu->insert( sep );
@ -113,7 +113,7 @@ void FileWidget::reloadConfiguration()
{ {
if ( kdata->fileFilter != nameFilter() ) { if ( kdata->fileFilter != nameFilter() ) {
// At first, our list must have folders // At first, our list must have folders
QStringList mimes; TQStringList mimes;
mimes.append("inode/directory"); mimes.append("inode/directory");
// Then, all the images! // Then, all the images!
@ -133,7 +133,7 @@ bool FileWidget::hasFiles() const
return (numFiles() > 0); return (numFiles() > 0);
} }
void FileWidget::activatedMenu( const KFileItem *item, const QPoint& pos ) void FileWidget::activatedMenu( const KFileItem *item, const TQPoint& pos )
{ {
bool image = isImage( item ); bool image = isImage( item );
actionCollection()->action("kuick_showInSameWindow")->setEnabled( image ); actionCollection()->action("kuick_showInSameWindow")->setEnabled( image );
@ -149,11 +149,11 @@ void FileWidget::activatedMenu( const KFileItem *item, const QPoint& pos )
KDirOperator::activatedMenu( item, pos ); KDirOperator::activatedMenu( item, pos );
} }
void FileWidget::findCompletion( const QString& text ) void FileWidget::findCompletion( const TQString& text )
{ {
if ( text.at(0) == '/' || text.at(0) == '~' || if ( text.at(0) == '/' || text.at(0) == '~' ||
text.find('/') != -1 ) { text.tqfind('/') != -1 ) {
QString t = m_fileFinder->completion()->makeCompletion( text ); TQString t = m_fileFinder->completion()->makeCompletion( text );
if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup || if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup ||
m_fileFinder->completionMode() == KGlobalSettings::CompletionPopupAuto) m_fileFinder->completionMode() == KGlobalSettings::CompletionPopupAuto)
@ -166,7 +166,7 @@ void FileWidget::findCompletion( const QString& text )
return; return;
} }
QString file = makeDirCompletion( text ); TQString file = makeDirCompletion( text );
if ( file.isNull() ) if ( file.isNull() )
file = makeCompletion( text ); file = makeCompletion( text );
@ -176,10 +176,10 @@ void FileWidget::findCompletion( const QString& text )
KDirOperator::setCurrentItem( file ); KDirOperator::setCurrentItem( file );
} }
bool FileWidget::eventFilter( QObject *o, QEvent *e ) bool FileWidget::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == QEvent::KeyPress ) { if ( e->type() == TQEvent::KeyPress ) {
QKeyEvent *k = static_cast<QKeyEvent*>( e ); TQKeyEvent *k = TQT_TQKEYEVENT( e );
if ( (k->state() & (ControlButton | AltButton)) == 0 ) { if ( (k->state() & (ControlButton | AltButton)) == 0 ) {
int key = k->key(); int key = k->key();
@ -195,17 +195,17 @@ bool FileWidget::eventFilter( QObject *o, QEvent *e )
return true; return true;
} }
const QString& text = k->text(); const TQString& text = k->text();
if ( !text.isEmpty() && text.unicode()->isPrint() ) { if ( !text.isEmpty() && text.tqunicode()->isPrint() ) {
k->accept(); k->accept();
if ( !m_fileFinder ) { if ( !m_fileFinder ) {
m_fileFinder = new FileFinder( this, "file finder" ); m_fileFinder = new FileFinder( this, "file finder" );
connect( m_fileFinder, SIGNAL( completion(const QString&)), connect( m_fileFinder, TQT_SIGNAL( completion(const TQString&)),
SLOT( findCompletion( const QString& ))); TQT_SLOT( findCompletion( const TQString& )));
connect( m_fileFinder, connect( m_fileFinder,
SIGNAL( enterDir( const QString& ) ), TQT_SIGNAL( enterDir( const TQString& ) ),
SLOT( slotReturnPressed( const QString& ))); TQT_SLOT( slotReturnPressed( const TQString& )));
m_fileFinder->move( width() - m_fileFinder->width(), m_fileFinder->move( width() - m_fileFinder->width(),
height() - m_fileFinder->height() ); height() - m_fileFinder->height() );
} }
@ -360,7 +360,7 @@ void FileWidget::slotViewChanged()
void FileWidget::slotItemsCleared() void FileWidget::slotItemsCleared()
{ {
m_currentURL = QString::null; m_currentURL = TQString();
} }
void FileWidget::slotItemDeleted( KFileItem *item ) void FileWidget::slotItemDeleted( KFileItem *item )
@ -383,24 +383,24 @@ void FileWidget::slotHighlighted( const KFileItem *item )
m_currentURL = item->url().url(); m_currentURL = item->url().url();
} }
void FileWidget::slotReturnPressed( const QString& t ) void FileWidget::slotReturnPressed( const TQString& t )
{ {
// we need a / at the end, otherwise replacedPath() will cut off the dir, // we need a / at the end, otherwise replacedPath() will cut off the dir,
// assuming it is a filename // assuming it is a filename
QString text = t; TQString text = t;
if ( text.at( text.length()-1 ) != '/' ) if ( text.at( text.length()-1 ) != '/' )
text += '/'; text += '/';
if ( text.at(0) == '/' || text.at(0) == '~' ) { if ( text.at(0) == '/' || text.at(0) == '~' ) {
QString dir = m_fileFinder->completion()->replacedPath( text ); TQString dir = m_fileFinder->completion()->replacedPath( text );
KURL url; KURL url;
url.setPath( dir ); url.setPath( dir );
setURL( url, true ); setURL( url, true );
} }
else if ( text.find('/') != (int) text.length() -1 ) { // relative path else if ( text.tqfind('/') != (int) text.length() -1 ) { // relative path
QString dir = m_fileFinder->completion()->replacedPath( text ); TQString dir = m_fileFinder->completion()->replacedPath( text );
KURL u( url(), dir ); KURL u( url(), dir );
setURL( u, true ); setURL( u, true );
} }
@ -425,7 +425,7 @@ void FileWidget::setCurrentItem( const KFileItem *item )
} }
} }
void FileWidget::setInitialItem( const QString& filename ) void FileWidget::setInitialItem( const TQString& filename )
{ {
m_initialName = filename; m_initialName = filename;
} }
@ -444,16 +444,16 @@ void FileWidget::slotFinishedLoading()
else if ( !current ) else if ( !current )
setCurrentItem( view()->items()->getFirst() ); setCurrentItem( view()->items()->getFirst() );
m_initialName = QString::null; m_initialName = TQString();
emit finished(); emit finished();
} }
QSize FileWidget::sizeHint() const TQSize FileWidget::tqsizeHint() const
{ {
return QSize( 300, 300 ); return TQSize( 300, 300 );
} }
void FileWidget::resizeEvent( QResizeEvent *e ) void FileWidget::resizeEvent( TQResizeEvent *e )
{ {
KDirOperator::resizeEvent( e ); KDirOperator::resizeEvent( e );
if ( m_fileFinder ) if ( m_fileFinder )

@ -19,7 +19,7 @@
#ifndef FILEWIDGET_H #ifndef FILEWIDGET_H
#define FILEWIDGET_H #define FILEWIDGET_H
#include <qevent.h> #include <tqevent.h>
#include <kdiroperator.h> #include <kdiroperator.h>
@ -29,24 +29,25 @@ class KFileItem;
class FileWidget : public KDirOperator class FileWidget : public KDirOperator
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
enum WhichItem { Previous, Next, Current }; enum WhichItem { Previous, Next, Current };
FileWidget( const KURL& url, QWidget *parent = 0L, const char *name = 0L ); FileWidget( const KURL& url, TQWidget *tqparent = 0L, const char *name = 0L );
~FileWidget(); ~FileWidget();
bool hasFiles() const; bool hasFiles() const;
void reloadConfiguration(); void reloadConfiguration();
void setInitialItem( const QString& filename ); void setInitialItem( const TQString& filename );
KFileItem *getCurrentItem( bool onlyImage ) const { KFileItem *getCurrentItem( bool onlyImage ) const {
return getItem( Current, onlyImage ); return getItem( Current, onlyImage );
} }
void setCurrentItem( const KFileItem * ); void setCurrentItem( const KFileItem * );
void setCurrentItem( const QString& filename ) { void setCurrentItem( const TQString& filename ) {
KDirOperator::setCurrentItem( filename ); KDirOperator::setCurrentItem( filename );
} }
@ -67,14 +68,14 @@ signals:
void finished(); void finished();
protected: protected:
virtual bool eventFilter( QObject *o, QEvent * ); virtual bool eventFilter( TQObject *o, TQEvent * );
virtual void resizeEvent( QResizeEvent * ); virtual void resizeEvent( TQResizeEvent * );
virtual void activatedMenu( const KFileItem *, const QPoint& ); virtual void activatedMenu( const KFileItem *, const TQPoint& );
virtual QSize sizeHint() const; virtual TQSize tqsizeHint() const;
private slots: private slots:
void slotReturnPressed( const QString& text ); void slotReturnPressed( const TQString& text );
void findCompletion( const QString& ); void findCompletion( const TQString& );
void slotViewChanged(); void slotViewChanged();
void slotItemsCleared(); void slotItemsCleared();
@ -89,8 +90,8 @@ private:
bool m_validCompletion; bool m_validCompletion;
FileFinder *m_fileFinder; FileFinder *m_fileFinder;
QString m_currentURL; TQString m_currentURL;
QString m_initialName; TQString m_initialName;
}; };

@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <kapplication.h> #include <kapplication.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
@ -33,13 +33,13 @@
#include "generalwidget.h" #include "generalwidget.h"
GeneralWidget::GeneralWidget( QWidget *parent, const char *name ) GeneralWidget::GeneralWidget( TQWidget *tqparent, const char *name )
: QWidget( parent, name ) : TQWidget( tqparent, name )
{ {
QVBoxLayout *layout = new QVBoxLayout( this ); TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() ); tqlayout->setSpacing( KDialog::spacingHint() );
QPixmap pixmap = UserIcon( "logo" ); TQPixmap pixmap = UserIcon( "logo" );
KURLLabel *logo = new KURLLabel( this ); KURLLabel *logo = new KURLLabel( this );
logo->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" ); logo->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
logo->setPixmap( pixmap ); logo->setPixmap( pixmap );
@ -47,22 +47,22 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
logo->setTipText( i18n( "Open KuickShow Website" ) ); logo->setTipText( i18n( "Open KuickShow Website" ) );
logo->setUseTips( true ); logo->setUseTips( true );
connect( logo, SIGNAL( leftClickedURL( const QString & ) ), connect( logo, TQT_SIGNAL( leftClickedURL( const TQString & ) ),
SLOT( slotURLClicked( const QString & ) ) ); TQT_SLOT( slotURLClicked( const TQString & ) ) );
layout->addWidget( logo, 0, AlignRight ); tqlayout->addWidget( logo, 0, AlignRight );
cbFullscreen = new QCheckBox( i18n("Fullscreen mode"), this, "boscreen" ); cbFullscreen = new TQCheckBox( i18n("Fullscreen mode"), this, "boscreen" );
cbPreload = new QCheckBox( i18n("Preload next image"), this, "preload"); cbPreload = new TQCheckBox( i18n("Preload next image"), this, "preload");
cbLastdir = new QCheckBox( i18n("Remember last folder"), this, "restart_lastdir"); cbLastdir = new TQCheckBox( i18n("Remember last folder"), this, "restart_lastdir");
QGridLayout *gridLayout = new QGridLayout( 2, 2 ); TQGridLayout *gridLayout = new TQGridLayout( 2, 2 );
gridLayout->setSpacing( KDialog::spacingHint() ); gridLayout->setSpacing( KDialog::spacingHint() );
QLabel *l0 = new QLabel( i18n("Background color:"), this ); TQLabel *l0 = new TQLabel( i18n("Background color:"), this );
colorButton = new KColorButton( this ); colorButton = new KColorButton( this );
QLabel *l1 = new QLabel( i18n("Show only files with extension: "), this, "label" ); TQLabel *l1 = new TQLabel( i18n("Show only files with extension: "), this, "label" );
editFilter = new KLineEdit( this, "filteredit" ); editFilter = new KLineEdit( this, "filteredit" );
gridLayout->addWidget( l0, 0, 0 ); gridLayout->addWidget( l0, 0, 0 );
@ -70,31 +70,31 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
gridLayout->addWidget( l1, 1, 0 ); gridLayout->addWidget( l1, 1, 0 );
gridLayout->addWidget( editFilter, 1, 1 ); gridLayout->addWidget( editFilter, 1, 1 );
layout->addWidget( cbFullscreen ); tqlayout->addWidget( cbFullscreen );
layout->addWidget( cbPreload ); tqlayout->addWidget( cbPreload );
layout->addWidget( cbLastdir ); tqlayout->addWidget( cbLastdir );
layout->addLayout( gridLayout ); tqlayout->addLayout( gridLayout );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
QVGroupBox *gbox2 = new QVGroupBox( i18n("Quality/Speed"), TQVGroupBox *gbox2 = new TQVGroupBox( i18n("Quality/Speed"),
this, "qualitybox" ); this, "qualitybox" );
layout->addWidget( gbox2 ); tqlayout->addWidget( gbox2 );
layout->addStretch(); tqlayout->addStretch();
cbSmoothScale = new QCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" ); cbSmoothScale = new TQCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" );
cbFastRender = new QCheckBox( i18n("Fast rendering"), gbox2, "fastrender" ); cbFastRender = new TQCheckBox( i18n("Fast rendering"), gbox2, "fastrender" );
cbDither16bit = new QCheckBox( i18n("Dither in HiColor (15/16bit) modes"), cbDither16bit = new TQCheckBox( i18n("Dither in HiColor (15/16bit) modes"),
gbox2, "dither16bit" ); gbox2, "dither16bit" );
cbDither8bit = new QCheckBox( i18n("Dither in LowColor (<=8bit) modes"), cbDither8bit = new TQCheckBox( i18n("Dither in LowColor (<=8bit) modes"),
gbox2, "dither8bit" ); gbox2, "dither8bit" );
cbOwnPalette = new QCheckBox( i18n("Use own color palette"), cbOwnPalette = new TQCheckBox( i18n("Use own color palette"),
gbox2, "pal"); gbox2, "pal");
connect( cbOwnPalette, SIGNAL( clicked() ), this, SLOT( useOwnPalette() ) ); connect( cbOwnPalette, TQT_SIGNAL( clicked() ), this, TQT_SLOT( useOwnPalette() ) );
cbFastRemap = new QCheckBox( i18n("Fast palette remapping"), gbox2, "remap"); cbFastRemap = new TQCheckBox( i18n("Fast palette remapping"), gbox2, "remap");
maxCacheSpinBox = new KIntNumInput( gbox2, "editmaxcache" ); maxCacheSpinBox = new KIntNumInput( gbox2, "editmaxcache" );
maxCacheSpinBox->setLabel( i18n("Maximum cache size: "), AlignVCenter ); maxCacheSpinBox->setLabel( i18n("Maximum cache size: "), AlignVCenter );
@ -110,7 +110,7 @@ GeneralWidget::~GeneralWidget()
{ {
} }
void GeneralWidget::slotURLClicked( const QString & url ) void GeneralWidget::slotURLClicked( const TQString & url )
{ {
kapp->invokeBrowser( url ); kapp->invokeBrowser( url );
} }

@ -19,31 +19,32 @@
#ifndef GENERALWIDGET_H #ifndef GENERALWIDGET_H
#define GENERALWIDGET_H #define GENERALWIDGET_H
#include <qwidget.h> #include <tqwidget.h>
#include "kuickdata.h" #include "kuickdata.h"
class QCheckBox; class TQCheckBox;
class KColorButton; class KColorButton;
class KLineEdit; class KLineEdit;
class KIntNumInput; class KIntNumInput;
class GeneralWidget : public QWidget class GeneralWidget : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
GeneralWidget( QWidget *parent, const char *name ); GeneralWidget( TQWidget *tqparent, const char *name );
~GeneralWidget(); ~GeneralWidget();
void loadSettings( const KuickData& data ); void loadSettings( const KuickData& data );
void applySettings( KuickData& data ); void applySettings( KuickData& data );
private: private:
QCheckBox *cbFullscreen, *cbActiveWindow, *cbPreload, *cbLastdir; TQCheckBox *cbFullscreen, *cbActiveWindow, *cbPreload, *cbLastdir;
QCheckBox *cbSmoothScale, *cbFastRemap, *cbFastRender; TQCheckBox *cbSmoothScale, *cbFastRemap, *cbFastRender;
QCheckBox *cbDither16bit, *cbDither8bit, *cbOwnPalette; TQCheckBox *cbDither16bit, *cbDither8bit, *cbOwnPalette;
KLineEdit *editFilter; KLineEdit *editFilter;
KIntNumInput *maxCacheSpinBox; KIntNumInput *maxCacheSpinBox;
@ -55,7 +56,7 @@ private:
private slots: private slots:
void useOwnPalette(); void useOwnPalette();
void slotURLClicked( const QString & ); void slotURLClicked( const TQString & );
}; };

@ -18,23 +18,23 @@
#include <stdlib.h> #include <stdlib.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qdrawutil.h> #include <tqdrawutil.h>
#include <qfileinfo.h> #include <tqfileinfo.h>
#include <qkeycode.h> #include <tqkeycode.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpen.h> #include <tqpen.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#ifdef KDE_USE_FINAL #ifdef KDE_USE_FINAL
#undef GrayScale #undef GrayScale
#undef Color #undef Color
#endif #endif
#include <qrect.h> #include <tqrect.h>
#include <qstring.h> #include <tqstring.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
@ -72,17 +72,17 @@
#undef GrayScale #undef GrayScale
QCursor *ImageWindow::s_handCursor = 0L; TQCursor *ImageWindow::s_handCursor = 0L;
ImageWindow::ImageWindow( ImData *_idata, ImlibData *id, QWidget *parent, ImageWindow::ImageWindow( ImData *_idata, ImlibData *id, TQWidget *tqparent,
const char *name ) const char *name )
: ImlibWidget( _idata, id, parent, name ) : ImlibWidget( _idata, id, tqparent, name )
{ {
init(); init();
} }
ImageWindow::ImageWindow( ImData *_idata, QWidget *parent, const char *name ) ImageWindow::ImageWindow( ImData *_idata, TQWidget *tqparent, const char *name )
: ImlibWidget( _idata, parent, name ) : ImlibWidget( _idata, tqparent, name )
{ {
init(); init();
} }
@ -94,7 +94,7 @@ ImageWindow::~ImageWindow()
void ImageWindow::init() void ImageWindow::init()
{ {
setFocusPolicy( QWidget::StrongFocus ); setFocusPolicy( TQ_StrongFocus );
KCursor::setAutoHideCursor( this, true, true ); KCursor::setAutoHideCursor( this, true, true );
KCursor::setHideCursorDelay( 1500 ); KCursor::setHideCursorDelay( 1500 );
@ -114,11 +114,11 @@ void ImageWindow::init()
m_actions = new KActionCollection( this ); m_actions = new KActionCollection( this );
if ( !s_handCursor ) { if ( !s_handCursor ) {
QString file = locate( "appdata", "pics/handcursor.png" ); TQString file = locate( "appdata", "pics/handcursor.png" );
if ( !file.isEmpty() ) if ( !file.isEmpty() )
s_handCursor = new QCursor( file ); s_handCursor = new TQCursor( file );
else else
s_handCursor = new QCursor( arrowCursor ); s_handCursor = new TQCursor( arrowCursor );
} }
setupActions(); setupActions();
@ -133,8 +133,8 @@ void ImageWindow::init()
setAcceptDrops( true ); setAcceptDrops( true );
setBackgroundColor( kdata->backgroundColor ); setBackgroundColor( kdata->backgroundColor );
static QPixmap imageIcon = UserIcon( "imageviewer-medium" ); static TQPixmap imageIcon = UserIcon( "imageviewer-medium" );
static QPixmap miniImageIcon = UserIcon( "imageviewer-small" ); static TQPixmap miniImageIcon = UserIcon( "imageviewer-small" );
KWin::setIcons( winId(), imageIcon, miniImageIcon ); KWin::setIcons( winId(), imageIcon, miniImageIcon );
} }
@ -146,103 +146,103 @@ void ImageWindow::updateActions()
void ImageWindow::setupActions() void ImageWindow::setupActions()
{ {
new KAction( i18n("Show Next Image"), KStdAccel::next(), new KAction( i18n("Show Next Image"), KStdAccel::next(),
this, SLOT( slotRequestNext() ), TQT_TQOBJECT(this), TQT_SLOT( slotRequestNext() ),
m_actions, "next_image" ); m_actions, "next_image" );
new KAction( i18n("Show Previous Image"), KStdAccel::prior(), new KAction( i18n("Show Previous Image"), KStdAccel::prior(),
this, SLOT( slotRequestPrevious() ), TQT_TQOBJECT(this), TQT_SLOT( slotRequestPrevious() ),
m_actions, "previous_image" ); m_actions, "previous_image" );
new KAction( i18n("Delete Image"), SHIFT + Key_Delete, new KAction( i18n("Delete Image"), SHIFT + Key_Delete,
this, SLOT( imageDelete() ), TQT_TQOBJECT(this), TQT_SLOT( imageDelete() ),
m_actions, "delete_image" ); m_actions, "delete_image" );
new KAction( i18n("Move Image to Trash"), Key_Delete, new KAction( i18n("Move Image to Trash"), Key_Delete,
this, SLOT( imageTrash() ), TQT_TQOBJECT(this), TQT_SLOT( imageTrash() ),
m_actions, "trash_image" ); m_actions, "trash_image" );
new KAction( i18n("Zoom In"), Key_Plus, new KAction( i18n("Zoom In"), Key_Plus,
this, SLOT( zoomIn() ), TQT_TQOBJECT(this), TQT_SLOT( zoomIn() ),
m_actions, "zoom_in" ); m_actions, "zoom_in" );
new KAction( i18n("Zoom Out"), Key_Minus, new KAction( i18n("Zoom Out"), Key_Minus,
this, SLOT( zoomOut() ), TQT_TQOBJECT(this), TQT_SLOT( zoomOut() ),
m_actions, "zoom_out" ); m_actions, "zoom_out" );
new KAction( i18n("Restore Original Size"), Key_O, new KAction( i18n("Restore Original Size"), Key_O,
this, SLOT( showImageOriginalSize() ), TQT_TQOBJECT(this), TQT_SLOT( showImageOriginalSize() ),
m_actions, "original_size" ); m_actions, "original_size" );
new KAction( i18n("Maximize"), Key_M, new KAction( i18n("Maximize"), Key_M,
this, SLOT( maximize() ), TQT_TQOBJECT(this), TQT_SLOT( maximize() ),
m_actions, "maximize" ); m_actions, "maximize" );
new KAction( i18n("Rotate 90 Degrees"), Key_9, new KAction( i18n("Rotate 90 Degrees"), Key_9,
this, SLOT( rotate90() ), TQT_TQOBJECT(this), TQT_SLOT( rotate90() ),
m_actions, "rotate90" ); m_actions, "rotate90" );
new KAction( i18n("Rotate 180 Degrees"), Key_8, new KAction( i18n("Rotate 180 Degrees"), Key_8,
this, SLOT( rotate180() ), TQT_TQOBJECT(this), TQT_SLOT( rotate180() ),
m_actions, "rotate180" ); m_actions, "rotate180" );
new KAction( i18n("Rotate 270 Degrees"), Key_7, new KAction( i18n("Rotate 270 Degrees"), Key_7,
this, SLOT( rotate270() ), TQT_TQOBJECT(this), TQT_SLOT( rotate270() ),
m_actions, "rotate270" ); m_actions, "rotate270" );
new KAction( i18n("Flip Horizontally"), Key_Asterisk, new KAction( i18n("FlipQt::Horizontally"), Key_Asterisk,
this, SLOT( flipHoriz() ), TQT_TQOBJECT(this), TQT_SLOT( flipHoriz() ),
m_actions, "flip_horicontally" ); m_actions, "flip_horicontally" );
new KAction( i18n("Flip Vertically"), Key_Slash, new KAction( i18n("FlipQt::Vertically"), Key_Slash,
this, SLOT( flipVert() ), TQT_TQOBJECT(this), TQT_SLOT( flipVert() ),
m_actions, "flip_vertically" ); m_actions, "flip_vertically" );
new KAction( i18n("Print Image..."), KStdAccel::print(), new KAction( i18n("Print Image..."), KStdAccel::print(),
this, SLOT( printImage() ), TQT_TQOBJECT(this), TQT_SLOT( printImage() ),
m_actions, "print_image" ); m_actions, "print_image" );
KStdAction::saveAs( this, SLOT( saveImage() ), KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( saveImage() ),
m_actions, "save_image_as" ); m_actions, "save_image_as" );
KStdAction::close( this, SLOT( close() ), KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( close() ),
m_actions, "close_image" ); m_actions, "close_image" );
// -------- // --------
new KAction( i18n("More Brightness"), Key_B, new KAction( i18n("More Brightness"), Key_B,
this, SLOT( moreBrightness() ), TQT_TQOBJECT(this), TQT_SLOT( moreBrightness() ),
m_actions, "more_brightness" ); m_actions, "more_brightness" );
new KAction( i18n("Less Brightness"), SHIFT + Key_B, new KAction( i18n("Less Brightness"), SHIFT + Key_B,
this, SLOT( lessBrightness() ), TQT_TQOBJECT(this), TQT_SLOT( lessBrightness() ),
m_actions, "less_brightness" ); m_actions, "less_brightness" );
new KAction( i18n("More Contrast"), Key_C, new KAction( i18n("More Contrast"), Key_C,
this, SLOT( moreContrast() ), TQT_TQOBJECT(this), TQT_SLOT( moreContrast() ),
m_actions, "more_contrast" ); m_actions, "more_contrast" );
new KAction( i18n("Less Contrast"), SHIFT + Key_C, new KAction( i18n("Less Contrast"), SHIFT + Key_C,
this, SLOT( lessContrast() ), TQT_TQOBJECT(this), TQT_SLOT( lessContrast() ),
m_actions, "less_contrast" ); m_actions, "less_contrast" );
new KAction( i18n("More Gamma"), Key_G, new KAction( i18n("More Gamma"), Key_G,
this, SLOT( moreGamma() ), TQT_TQOBJECT(this), TQT_SLOT( moreGamma() ),
m_actions, "more_gamma" ); m_actions, "more_gamma" );
new KAction( i18n("Less Gamma"), SHIFT + Key_G, new KAction( i18n("Less Gamma"), SHIFT + Key_G,
this, SLOT( lessGamma() ), TQT_TQOBJECT(this), TQT_SLOT( lessGamma() ),
m_actions, "less_gamma" ); m_actions, "less_gamma" );
// -------- // --------
new KAction( i18n("Scroll Up"), Key_Up, new KAction( i18n("Scroll Up"), Key_Up,
this, SLOT( scrollUp() ), TQT_TQOBJECT(this), TQT_SLOT( scrollUp() ),
m_actions, "scroll_up" ); m_actions, "scroll_up" );
new KAction( i18n("Scroll Down"), Key_Down, new KAction( i18n("Scroll Down"), Key_Down,
this, SLOT( scrollDown() ), TQT_TQOBJECT(this), TQT_SLOT( scrollDown() ),
m_actions, "scroll_down" ); m_actions, "scroll_down" );
new KAction( i18n("Scroll Left"), Key_Left, new KAction( i18n("Scroll Left"), Key_Left,
this, SLOT( scrollLeft() ), TQT_TQOBJECT(this), TQT_SLOT( scrollLeft() ),
m_actions, "scroll_left" ); m_actions, "scroll_left" );
new KAction( i18n("Scroll Right"), Key_Right, new KAction( i18n("Scroll Right"), Key_Right,
this, SLOT( scrollRight() ), TQT_TQOBJECT(this), TQT_SLOT( scrollRight() ),
m_actions, "scroll_right" ); m_actions, "scroll_right" );
// -------- // --------
new KAction( i18n("Pause Slideshow"), Key_P, new KAction( i18n("Pause Slideshow"), Key_P,
this, SLOT( pauseSlideShow() ), TQT_TQOBJECT(this), TQT_SLOT( pauseSlideShow() ),
m_actions, "kuick_slideshow_pause" ); m_actions, "kuick_slideshow_pause" );
KAction *fullscreenAction = KStdAction::fullScreen(this, SLOT( toggleFullscreen() ), m_actions, 0 ); KAction *fullscreenAction = KStdAction::fullScreen(TQT_TQOBJECT(this), TQT_SLOT( toggleFullscreen() ), m_actions, 0 );
KAction *reloadAction = new KAction( i18n("Reload Image"), KStdAccel::shortcut(KStdAccel::Reload), KAction *reloadAction = new KAction( i18n("Reload Image"), KStdAccel::shortcut(KStdAccel::Reload),
this, SLOT( reload() ), TQT_TQOBJECT(this), TQT_SLOT( reload() ),
m_actions, "reload_image" ); m_actions, "reload_image" );
new KAction( i18n("Properties"), ALT + Key_Return, new KAction( i18n("Properties"), ALT + Key_Return,
this, SLOT( slotProperties() ), TQT_TQOBJECT(this), TQT_SLOT( slotProperties() ),
m_actions, "properties" ); m_actions, "properties" );
m_actions->readShortcutSettings(); m_actions->readShortcutSettings();
@ -308,10 +308,10 @@ void ImageWindow::updateGeometry( int imWidth, int imHeight )
updateCursor(); updateCursor();
QString caption = i18n( "Filename (Imagewidth x Imageheight)", TQString caption = i18n( "Filename (Imagewidth x Imageheight)",
"%3 (%1 x %2)" ); "%3 (%1 x %2)" );
caption = caption.arg( m_kuim->originalWidth() ). caption = caption.tqarg( m_kuim->originalWidth() ).
arg( m_kuim->originalHeight() ).arg( m_kuim->url().prettyURL() ); tqarg( m_kuim->originalHeight() ).tqarg( m_kuim->url().prettyURL() );
setCaption( kapp->makeStdCaption( caption ) ); setCaption( kapp->makeStdCaption( caption ) );
} }
@ -321,7 +321,7 @@ void ImageWindow::centerImage()
int w, h; int w, h;
if ( myIsFullscreen ) if ( myIsFullscreen )
{ {
QRect desktopRect = KGlobalSettings::desktopGeometry( this ); TQRect desktopRect = KGlobalSettings::desktopGeometry( this );
w = desktopRect.width(); w = desktopRect.width();
h = desktopRect.height(); h = desktopRect.height();
} }
@ -403,7 +403,7 @@ void ImageWindow::scrollImage( int x, int y, bool restrict )
// XUnmapWindow(); // XUnmapWindow();
// XSetWindowBackgroundPixmap() // XSetWindowBackgroundPixmap()
// resize window to fit image size, center image // resize window to fit image size, center image
// XClearWindow(); // repaint // XClearWindow(); // tqrepaint
// XMapWindow(), XSync(); // XMapWindow(), XSync();
// //
bool ImageWindow::showNextImage( const KURL& url ) bool ImageWindow::showNextImage( const KURL& url )
@ -412,7 +412,7 @@ bool ImageWindow::showNextImage( const KURL& url )
switch ( file->waitForDownload( this ) ) { switch ( file->waitForDownload( this ) ) {
case KuickFile::ERROR: case KuickFile::ERROR:
{ {
QString tmp = i18n("Unable to download the image from %1.").arg(url.prettyURL()); TQString tmp = i18n("Unable to download the image from %1.").tqarg(url.prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -428,9 +428,9 @@ bool ImageWindow::showNextImage( const KURL& url )
bool ImageWindow::showNextImage( KuickFile *file ) bool ImageWindow::showNextImage( KuickFile *file )
{ {
if ( !loadImage( file ) ) { if ( !loadImage( file ) ) {
QString tmp = i18n("Unable to load the image %1.\n" TQString tmp = i18n("Unable to load the image %1.\n"
"Perhaps the file format is unsupported or " "Perhaps the file format is unsupported or "
"your Imlib is not installed properly.").arg(file->url().prettyURL()); "your Imlib is not installed properly.").tqarg(file->url().prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -573,7 +573,7 @@ void ImageWindow::imageTrash()
//// ////
// event handlers // event handlers
void ImageWindow::wheelEvent( QWheelEvent *e ) void ImageWindow::wheelEvent( TQWheelEvent *e )
{ {
e->accept(); e->accept();
static const int WHEEL_DELTA = 120; static const int WHEEL_DELTA = 120;
@ -586,7 +586,7 @@ void ImageWindow::wheelEvent( QWheelEvent *e )
emit requestImage( this, -steps ); emit requestImage( this, -steps );
} }
void ImageWindow::keyPressEvent( QKeyEvent *e ) void ImageWindow::keyPressEvent( TQKeyEvent *e )
{ {
uint key = e->key(); uint key = e->key();
@ -606,7 +606,7 @@ void ImageWindow::keyPressEvent( QKeyEvent *e )
e->accept(); e->accept();
} }
void ImageWindow::keyReleaseEvent( QKeyEvent *e ) void ImageWindow::keyReleaseEvent( TQKeyEvent *e )
{ {
if ( e->state() & ShiftButton ) { // Shift-key released if ( e->state() & ShiftButton ) { // Shift-key released
updateCursor(); updateCursor();
@ -619,7 +619,7 @@ void ImageWindow::keyReleaseEvent( QKeyEvent *e )
e->accept(); e->accept();
} }
void ImageWindow::mousePressEvent( QMouseEvent *e ) void ImageWindow::mousePressEvent( TQMouseEvent *e )
{ {
xmove = e->x(); // for moving the image with the mouse xmove = e->x(); // for moving the image with the mouse
ymove = e->y(); ymove = e->y();
@ -630,7 +630,7 @@ void ImageWindow::mousePressEvent( QMouseEvent *e )
xposPress = xmove; xposPress = xmove;
yposPress = ymove; yposPress = ymove;
if ( e->button() == LeftButton ) { if ( e->button() == Qt::LeftButton ) {
if ( e->state() & ShiftButton ) if ( e->state() & ShiftButton )
updateCursor( ZoomCursor ); updateCursor( ZoomCursor );
else else
@ -640,7 +640,7 @@ void ImageWindow::mousePressEvent( QMouseEvent *e )
ImlibWidget::mousePressEvent( e ); ImlibWidget::mousePressEvent( e );
} }
void ImageWindow::contextMenuEvent( QContextMenuEvent *e ) void ImageWindow::contextMenuEvent( TQContextMenuEvent *e )
{ {
e->accept(); e->accept();
@ -673,26 +673,26 @@ void ImageWindow::updateCursor( KuickCursor cursor )
} }
} }
void ImageWindow::mouseMoveEvent( QMouseEvent *e ) void ImageWindow::mouseMoveEvent( TQMouseEvent *e )
{ {
if ( !(e->state() & LeftButton) ) { // only handle LeftButton actions if ( !(e->state() & Qt::LeftButton) ) { // only handle LeftButton actions
return; return;
} }
if ( e->state() & ShiftButton ) { if ( e->state() & ShiftButton ) {
if ( !transWidget ) { if ( !transWidget ) {
transWidget = new QWidget( this ); transWidget = new TQWidget( this );
transWidget->setGeometry( 0, 0, width(), height() ); transWidget->setGeometry( 0, 0, width(), height() );
transWidget->setBackgroundMode( NoBackground ); transWidget->setBackgroundMode( NoBackground );
} }
transWidget->hide(); transWidget->hide();
QPainter p( transWidget ); TQPainter p( transWidget );
// really required? // really required?
p.eraseRect( transWidget->rect() ); p.eraseRect( transWidget->rect() );
transWidget->show(); transWidget->show();
qApp->processOneEvent(); tqApp->processOneEvent();
int width = e->x() - xposPress; int width = e->x() - xposPress;
int height = e->y() - yposPress; int height = e->y() - yposPress;
@ -707,7 +707,7 @@ void ImageWindow::mouseMoveEvent( QMouseEvent *e )
yzoom = e->y(); yzoom = e->y();
} }
QPen pen( Qt::white, 1, DashLine ); TQPen pen( TQt::white, 1, DashLine );
p.setPen( pen ); // for drawing white dashed line p.setPen( pen ); // for drawing white dashed line
p.drawRect( xzoom, yzoom, width, height ); p.drawRect( xzoom, yzoom, width, height );
p.setPen( DotLine ); // defaults to black dotted line pen p.setPen( DotLine ); // defaults to black dotted line pen
@ -725,7 +725,7 @@ void ImageWindow::mouseMoveEvent( QMouseEvent *e )
} }
} }
void ImageWindow::mouseReleaseEvent( QMouseEvent *e ) void ImageWindow::mouseReleaseEvent( TQMouseEvent *e )
{ {
updateCursor(); updateCursor();
@ -736,7 +736,7 @@ void ImageWindow::mouseReleaseEvent( QMouseEvent *e )
} }
// only proceed if shift-Key is still pressed // only proceed if shift-Key is still pressed
if ( !(e->button() == LeftButton && e->state() & ShiftButton) ) if ( !(e->button() == Qt::LeftButton && e->state() & ShiftButton) )
return; return;
int neww, newh, topX, topY, botX, botY; int neww, newh, topX, topY, botX, botY;
@ -806,14 +806,14 @@ void ImageWindow::mouseReleaseEvent( QMouseEvent *e )
} }
void ImageWindow::focusInEvent( QFocusEvent *ev ) void ImageWindow::focusInEvent( TQFocusEvent *ev )
{ {
ImlibWidget::focusInEvent( ev ); ImlibWidget::focusInEvent( ev );
emit sigFocusWindow( this ); emit sigFocusWindow( this );
} }
void ImageWindow::resizeEvent( QResizeEvent *e ) void ImageWindow::resizeEvent( TQResizeEvent *e )
{ {
ImlibWidget::resizeEvent( e ); ImlibWidget::resizeEvent( e );
@ -822,7 +822,7 @@ void ImageWindow::resizeEvent( QResizeEvent *e )
} }
void ImageWindow::dragEnterEvent( QDragEnterEvent *e ) void ImageWindow::dragEnterEvent( TQDragEnterEvent *e )
{ {
// if ( e->provides( "image/*" ) ) // can't do this right now with Imlib // if ( e->provides( "image/*" ) ) // can't do this right now with Imlib
if ( e->provides( "text/uri-list" ) ) if ( e->provides( "text/uri-list" ) )
@ -832,12 +832,12 @@ void ImageWindow::dragEnterEvent( QDragEnterEvent *e )
} }
void ImageWindow::dropEvent( QDropEvent *e ) void ImageWindow::dropEvent( TQDropEvent *e )
{ {
// FIXME - only preliminary drop-support for now // FIXME - only preliminary drop-support for now
KURL::List list; KURL::List list;
if ( KURLDrag::decode( e, list ) && !list.isEmpty()) { if ( KURLDrag::decode( e, list ) && !list.isEmpty()) {
QString tmpFile; TQString tmpFile;
const KURL &url = list.first(); const KURL &url = list.first();
if (KIO::NetAccess::download( url, tmpFile, this ) ) if (KIO::NetAccess::download( url, tmpFile, this ) )
{ {
@ -858,21 +858,21 @@ void ImageWindow::dropEvent( QDropEvent *e )
void ImageWindow::setPopupMenu() void ImageWindow::setPopupMenu()
{ {
viewerMenu = new QPopupMenu( this ); viewerMenu = new TQPopupMenu( this );
m_actions->action("next_image")->plug( viewerMenu ); m_actions->action("next_image")->plug( viewerMenu );
m_actions->action("previous_image")->plug( viewerMenu ); m_actions->action("previous_image")->plug( viewerMenu );
viewerMenu->insertSeparator(); viewerMenu->insertSeparator();
brightnessMenu = new QPopupMenu( viewerMenu ); brightnessMenu = new TQPopupMenu( viewerMenu );
m_actions->action("more_brightness")->plug(brightnessMenu); m_actions->action("more_brightness")->plug(brightnessMenu);
m_actions->action("less_brightness")->plug(brightnessMenu); m_actions->action("less_brightness")->plug(brightnessMenu);
contrastMenu = new QPopupMenu( viewerMenu ); contrastMenu = new TQPopupMenu( viewerMenu );
m_actions->action("more_contrast")->plug(contrastMenu); m_actions->action("more_contrast")->plug(contrastMenu);
m_actions->action("less_contrast")->plug(contrastMenu); m_actions->action("less_contrast")->plug(contrastMenu);
gammaMenu = new QPopupMenu( viewerMenu ); gammaMenu = new TQPopupMenu( viewerMenu );
m_actions->action("more_gamma")->plug(gammaMenu); m_actions->action("more_gamma")->plug(gammaMenu);
m_actions->action("less_gamma")->plug(gammaMenu); m_actions->action("less_gamma")->plug(gammaMenu);
@ -922,7 +922,7 @@ void ImageWindow::saveImage()
return; return;
KuickData tmp; KuickData tmp;
QCheckBox *keepSize = new QCheckBox( i18n("Keep original image size"), 0L); TQCheckBox *keepSize = new TQCheckBox( i18n("Keep original image size"), 0L);
keepSize->setChecked( true ); keepSize->setChecked( true );
KFileDialog dlg( m_saveDirectory, tmp.fileFilter, this, "filedialog", true KFileDialog dlg( m_saveDirectory, tmp.fileFilter, this, "filedialog", true
#if KDE_VERSION >= 310 #if KDE_VERSION >= 310
@ -930,21 +930,21 @@ void ImageWindow::saveImage()
#endif #endif
); );
QString selection = m_saveDirectory.isEmpty() ? TQString selection = m_saveDirectory.isEmpty() ?
m_kuim->url().url() : m_kuim->url().url() :
m_kuim->url().fileName(); m_kuim->url().fileName();
dlg.setOperationMode( KFileDialog::Saving ); dlg.setOperationMode( KFileDialog::Saving );
dlg.setMode( KFile::File ); dlg.setMode( KFile::File );
dlg.setSelection( selection ); dlg.setSelection( selection );
dlg.setCaption( i18n("Save As") ); dlg.setCaption( i18n("Save As") );
if ( dlg.exec() == QDialog::Accepted ) if ( dlg.exec() == TQDialog::Accepted )
{ {
KURL url = dlg.selectedURL(); KURL url = dlg.selectedURL();
if ( url.isValid() ) if ( url.isValid() )
{ {
if ( !saveImage( url, keepSize->isChecked() ) ) if ( !saveImage( url, keepSize->isChecked() ) )
{ {
QString tmp = i18n("Couldn't save the file.\n" TQString tmp = i18n("Couldn't save the file.\n"
"Perhaps the disk is full, or you don't " "Perhaps the disk is full, or you don't "
"have write permission to the file."); "have write permission to the file.");
KMessageBox::sorry( this, tmp, i18n("File Saving Failed")); KMessageBox::sorry( this, tmp, i18n("File Saving Failed"));
@ -958,7 +958,7 @@ void ImageWindow::saveImage()
} }
} }
QString lastDir = dlg.baseURL().path(+1); TQString lastDir = dlg.baseURL().path(+1);
if ( lastDir != m_saveDirectory ) if ( lastDir != m_saveDirectory )
m_saveDirectory = lastDir; m_saveDirectory = lastDir;
@ -972,22 +972,22 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize )
int w = keepOriginalSize ? m_kuim->originalWidth() : m_kuim->width(); int w = keepOriginalSize ? m_kuim->originalWidth() : m_kuim->width();
int h = keepOriginalSize ? m_kuim->originalHeight() : m_kuim->height(); int h = keepOriginalSize ? m_kuim->originalHeight() : m_kuim->height();
if ( m_kuim->absRotation() == ROT_90 || m_kuim->absRotation() == ROT_270 ) if ( m_kuim->absRotation() == ROT_90 || m_kuim->absRotation() == ROT_270 )
qSwap( w, h ); tqSwap( w, h );
ImlibImage *saveIm = Imlib_clone_scaled_image( id, m_kuim->imlibImage(), ImlibImage *saveIm = Imlib_clone_scaled_image( id, m_kuim->imlibImage(),
w, h ); w, h );
bool success = false; bool success = false;
QString saveFile; TQString saveFile;
if ( dest.isLocalFile() ) if ( dest.isLocalFile() )
saveFile = dest.path(); saveFile = dest.path();
else else
{ {
QString extension = QFileInfo( dest.fileName() ).extension(); TQString extension = TQFileInfo( dest.fileName() ).extension();
if ( !extension.isEmpty() ) if ( !extension.isEmpty() )
extension.prepend( '.' ); extension.prepend( '.' );
KTempFile tmpFile( QString::null, extension ); KTempFile tmpFile( TQString(), extension );
if ( tmpFile.status() != 0 ) if ( tmpFile.status() != 0 )
return false; return false;
tmpFile.close(); tmpFile.close();
@ -1000,7 +1000,7 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize )
{ {
Imlib_apply_modifiers_to_rgb( id, saveIm ); Imlib_apply_modifiers_to_rgb( id, saveIm );
success = Imlib_save_image( id, saveIm, success = Imlib_save_image( id, saveIm,
QFile::encodeName( saveFile ).data(), TQFile::encodeName( saveFile ).data(),
NULL ); NULL );
if ( success && !dest.isLocalFile() ) if ( success && !dest.isLocalFile() )
{ {
@ -1040,12 +1040,12 @@ void ImageWindow::autoScale( KuickImage *kuim )
int newW = kuim->originalWidth(); int newW = kuim->originalWidth();
int newH = kuim->originalHeight(); int newH = kuim->originalHeight();
QSize s = maxImageSize(); TQSize s = maxImageSize();
int mw = s.width(); int mw = s.width();
int mh = s.height(); int mh = s.height();
if ( kuim->absRotation() == ROT_90 || kuim->absRotation() == ROT_270 ) if ( kuim->absRotation() == ROT_90 || kuim->absRotation() == ROT_270 )
qSwap( newW, newH ); tqSwap( newW, newH );
bool doIt = false; bool doIt = false;
@ -1128,7 +1128,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
{ {
if ( myIsFullscreen || totalScreen ) if ( myIsFullscreen || totalScreen )
{ {
return KGlobalSettings::desktopGeometry(topLevelWidget()).width(); return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).width();
} else } else
return Kuick::workArea().width(); return Kuick::workArea().width();
} }
@ -1137,16 +1137,16 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
int ImageWindow::desktopHeight( bool totalScreen ) const int ImageWindow::desktopHeight( bool totalScreen ) const
{ {
if ( myIsFullscreen || totalScreen ) { if ( myIsFullscreen || totalScreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).height(); return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).height();
} else { } else {
return Kuick::workArea().height(); return Kuick::workArea().height();
} }
} }
QSize ImageWindow::maxImageSize() const TQSize ImageWindow::maxImageSize() const
{ {
if ( myIsFullscreen ) { if ( myIsFullscreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).size(); return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).size();
} }
else { else {
return Kuick::workArea().size() - Kuick::frameSize( winId() ); return Kuick::workArea().size() - Kuick::frameSize( winId() );
@ -1155,7 +1155,7 @@ QSize ImageWindow::maxImageSize() const
void ImageWindow::resizeOptimal( int w, int h ) void ImageWindow::resizeOptimal( int w, int h )
{ {
QSize s = maxImageSize(); TQSize s = maxImageSize();
int mw = s.width(); int mw = s.width();
int mh = s.height(); int mh = s.height();
int neww = (w >= mw) ? mw : w; int neww = (w >= mw) ? mw : w;
@ -1193,7 +1193,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) ) if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) )
return false; return false;
QSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size(); TQSize desktopSize = KGlobalSettings::desktopGeometry(tqtopLevelWidget()).size();
int desktopArea = desktopSize.width() * desktopSize.height(); int desktopArea = desktopSize.width() * desktopSize.height();
int imageArea = newWidth * newHeight; int imageArea = newWidth * newHeight;
@ -1203,8 +1203,8 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
return KMessageBox::warningContinueCancel( return KMessageBox::warningContinueCancel(
this, this,
i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?") i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?")
.arg( newWidth ).arg( newHeight ), .tqarg( newWidth ).tqarg( newHeight ),
QString::null, TQString(),
KStdGuiItem::cont(), KStdGuiItem::cont(),
"ImageWindow_confirm_very_large_window" "ImageWindow_confirm_very_large_window"
) == KMessageBox::Continue; ) == KMessageBox::Continue;
@ -1245,7 +1245,7 @@ void ImageWindow::restoreCursor()
bool ImageWindow::isCursorHidden() const bool ImageWindow::isCursorHidden() const
{ {
return cursor().shape() == Qt::BlankCursor; return cursor().shape() == TQt::BlankCursor;
} }
#include "imagewindow.moc" #include "imagewindow.moc"

@ -19,30 +19,31 @@
#ifndef IMAGEWINDOW_H #ifndef IMAGEWINDOW_H
#define IMAGEWINDOW_H #define IMAGEWINDOW_H
#include <qevent.h> #include <tqevent.h>
#include <kaction.h> #include <kaction.h>
#include <kurl.h> #include <kurl.h>
#include "imlibwidget.h" #include "imlibwidget.h"
class QCursor; class TQCursor;
class QPopupMenu; class TQPopupMenu;
class QRect; class TQRect;
class QString; class TQString;
class QTimer; class TQTimer;
class QWidget; class TQWidget;
class KuickFile; class KuickFile;
class ImageWindow : public ImlibWidget class ImageWindow : public ImlibWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ImageWindow( ImData *_idata, ImlibData *id, QWidget *parent=0, ImageWindow( ImData *_idata, ImlibData *id, TQWidget *tqparent=0,
const char *name=0 ); const char *name=0 );
ImageWindow( ImData *_idata=0, QWidget *parent=0, const char *name=0 ); ImageWindow( ImData *_idata=0, TQWidget *tqparent=0, const char *name=0 );
bool showNextImage( KuickFile * file ); bool showNextImage( KuickFile * file );
bool showNextImage( const KURL& url ); bool showNextImage( const KURL& url );
@ -105,17 +106,17 @@ protected:
virtual bool canZoomTo( int newWidth, int newHeight ); virtual bool canZoomTo( int newWidth, int newHeight );
virtual void rotated( KuickImage *kuim, int rotation ); virtual void rotated( KuickImage *kuim, int rotation );
virtual void wheelEvent( QWheelEvent * ); virtual void wheelEvent( TQWheelEvent * );
virtual void keyPressEvent( QKeyEvent * ); virtual void keyPressEvent( TQKeyEvent * );
virtual void keyReleaseEvent( QKeyEvent * ); virtual void keyReleaseEvent( TQKeyEvent * );
virtual void mousePressEvent( QMouseEvent * ); virtual void mousePressEvent( TQMouseEvent * );
virtual void mouseReleaseEvent( QMouseEvent * ); virtual void mouseReleaseEvent( TQMouseEvent * );
virtual void mouseMoveEvent( QMouseEvent * ); virtual void mouseMoveEvent( TQMouseEvent * );
virtual void focusInEvent( QFocusEvent * ); virtual void focusInEvent( TQFocusEvent * );
virtual void resizeEvent( QResizeEvent * ); virtual void resizeEvent( TQResizeEvent * );
virtual void dragEnterEvent( QDragEnterEvent * ); virtual void dragEnterEvent( TQDragEnterEvent * );
virtual void dropEvent( QDropEvent * ); virtual void dropEvent( TQDropEvent * );
virtual void contextMenuEvent( QContextMenuEvent * ); virtual void contextMenuEvent( TQContextMenuEvent * );
void showWindow(); void showWindow();
enum KuickCursor { DefaultCursor = 0, ZoomCursor, MoveCursor }; enum KuickCursor { DefaultCursor = 0, ZoomCursor, MoveCursor };
@ -138,8 +139,8 @@ protected:
uint xposPress, yposPress; uint xposPress, yposPress;
QPopupMenu *viewerMenu, *gammaMenu, *brightnessMenu, *contrastMenu; TQPopupMenu *viewerMenu, *gammaMenu, *brightnessMenu, *contrastMenu;
QWidget *transWidget; TQWidget *transWidget;
protected slots: protected slots:
@ -158,18 +159,18 @@ signals:
private: private:
int desktopWidth( bool totalScreen = false ) const; int desktopWidth( bool totalScreen = false ) const;
int desktopHeight( bool totalScreen = false ) const; int desktopHeight( bool totalScreen = false ) const;
QSize maxImageSize() const; TQSize maxImageSize() const;
void setupActions(); void setupActions();
void setPopupMenu(); void setPopupMenu();
bool isCursorHidden() const; bool isCursorHidden() const;
bool myIsFullscreen; bool myIsFullscreen;
int m_numHeads; int m_numHeads;
QString m_saveDirectory; TQString m_saveDirectory;
KActionCollection *m_actions; KActionCollection *m_actions;
static QCursor * s_handCursor; static TQCursor * s_handCursor;
}; };

@ -24,12 +24,12 @@
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qfile.h> #include <tqfile.h>
#include <qglobal.h> #include <tqglobal.h>
#include <qimage.h> #include <tqimage.h>
#include <qobject.h> #include <tqobject.h>
#include <qpalette.h> #include <tqpalette.h>
#include <kcursor.h> #include <kcursor.h>
#include <kdebug.h> #include <kdebug.h>
@ -43,8 +43,8 @@
const int ImlibWidget::ImlibOffset = 256; const int ImlibWidget::ImlibOffset = 256;
ImlibWidget::ImlibWidget( ImData *_idata, QWidget *parent, const char *name ) : ImlibWidget::ImlibWidget( ImData *_idata, TQWidget *tqparent, const char *name ) :
QWidget( parent, name, WDestructiveClose ) TQWidget( tqparent, name, WDestructiveClose )
{ {
idata = _idata; idata = _idata;
deleteImData = false; deleteImData = false;
@ -82,9 +82,9 @@ ImlibWidget::ImlibWidget( ImData *_idata, QWidget *parent, const char *name ) :
} }
ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, QWidget *parent, ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, TQWidget *tqparent,
const char *name ) const char *name )
: QWidget( parent, name, WDestructiveClose ) : TQWidget( tqparent, name, WDestructiveClose )
{ {
id = _id; id = _id;
idata = _idata; idata = _idata;
@ -104,7 +104,7 @@ void ImlibWidget::init()
{ {
int w = 1; // > 0 for XCreateWindow int w = 1; // > 0 for XCreateWindow
int h = 1; int h = 1;
myBackgroundColor = Qt::black; myBackgroundColor = TQt::black;
m_kuim = 0L; m_kuim = 0L;
m_kuickFile = 0L; m_kuickFile = 0L;
@ -113,12 +113,12 @@ void ImlibWidget::init()
setAutoRender( true ); setAutoRender( true );
setPalette( QPalette( myBackgroundColor )); setPalette( TQPalette( myBackgroundColor ));
setBackgroundMode( PaletteBackground ); setBackgroundMode( PaletteBackground );
imageCache = new ImageCache( id, 4 ); // cache 4 images (FIXME?) imageCache = new ImageCache( id, 4 ); // cache 4 images (FIXME?)
connect( imageCache, SIGNAL( sigBusy() ), SLOT( setBusyCursor() )); connect( imageCache, TQT_SIGNAL( sigBusy() ), TQT_SLOT( setBusyCursor() ));
connect( imageCache, SIGNAL( sigIdle() ), SLOT( restoreCursor() )); connect( imageCache, TQT_SIGNAL( sigIdle() ), TQT_SLOT( restoreCursor() ));
win = XCreateSimpleWindow(x11Display(), winId(), 0,0,w,h,0,0,0); win = XCreateSimpleWindow(x11Display(), winId(), 0,0,w,h,0,0,0);
} }
@ -206,7 +206,7 @@ bool ImlibWidget::cacheImage( const KURL& url )
if ( !file->download() ) { if ( !file->download() ) {
return false; return false;
} }
connect( file, SIGNAL( downloaded( KuickFile * )), SLOT( cacheImage( KuickFile * )) ); connect( file, TQT_SIGNAL( downloaded( KuickFile * )), TQT_SLOT( cacheImage( KuickFile * )) );
return true; // optimistic return true; // optimistic
} }
} }
@ -311,18 +311,16 @@ bool ImlibWidget::autoRotate( KuickImage *kuim )
if ( !metadatas.isValid() ) if ( !metadatas.isValid() )
return false; return false;
KFileMetaInfoItem metaitem = metadatas.item("Orientation"); KFileMetaInfoItem metaitem = metadatas.item("Qt::Orientation");
if ( !metaitem.isValid() if ( !metaitem.isValid()
#if QT_VERSION >= 0x030100
|| metaitem.value().isNull() || metaitem.value().isNull()
#endif
) )
return false; return false;
switch ( metaitem.value().toInt() ) switch ( metaitem.value().toInt() )
{ {
// Orientation: // Qt::Orientation:
// 1: normal // 1: normal
// 2: flipped horizontally // 2: flipped horizontally
// 3: ROT 180 // 3: ROT 180
@ -438,17 +436,17 @@ void ImlibWidget::setFlipMode( int mode )
} }
void ImlibWidget::updateWidget( bool geometryUpdate ) void ImlibWidget::updateWidget( bool tqgeometryUpdate )
{ {
if ( !m_kuim ) if ( !m_kuim )
return; return;
// if ( geometryUpdate ) // if ( tqgeometryUpdate )
// XUnmapWindow( x11Display(), win );// remove the old image -> no flicker // XUnmapWindow( x11Display(), win );// remove the old image -> no flicker
XSetWindowBackgroundPixmap( x11Display(), win, m_kuim->pixmap() ); XSetWindowBackgroundPixmap( x11Display(), win, m_kuim->pixmap() );
if ( geometryUpdate ) if ( tqgeometryUpdate )
updateGeometry( m_kuim->width(), m_kuim->height() ); updateGeometry( m_kuim->width(), m_kuim->height() );
XClearWindow( x11Display(), win ); XClearWindow( x11Display(), win );
@ -466,21 +464,21 @@ void ImlibWidget::updateGeometry( int w, int h )
} }
void ImlibWidget::closeEvent( QCloseEvent *e ) void ImlibWidget::closeEvent( TQCloseEvent *e )
{ {
e->accept(); e->accept();
QWidget::closeEvent( e ); TQWidget::closeEvent( e );
} }
void ImlibWidget::setBackgroundColor( const QColor& color ) void ImlibWidget::setBackgroundColor( const TQColor& color )
{ {
myBackgroundColor = color; myBackgroundColor = color;
setPalette( QPalette( myBackgroundColor )); setPalette( TQPalette( myBackgroundColor ));
repaint( false); // FIXME - false? necessary at all? tqrepaint( false); // FIXME - false? necessary at all?
} }
const QColor& ImlibWidget::backgroundColor() const const TQColor& ImlibWidget::backgroundColor() const
{ {
return myBackgroundColor; return myBackgroundColor;
} }
@ -510,30 +508,30 @@ void ImlibWidget::setBusyCursor()
if ( ownCursor() ) if ( ownCursor() )
m_oldCursor = cursor(); m_oldCursor = cursor();
else else
m_oldCursor = QCursor(); m_oldCursor = TQCursor();
setCursor( KCursor::waitCursor() ); setCursor( KCursor::waitCursor() );
} }
void ImlibWidget::restoreCursor() void ImlibWidget::restoreCursor()
{ {
if ( cursor().shape() == KCursor::waitCursor().shape() ) // only if nobody changed the cursor in the meantime! if ( cursor().shape() == KCursor::waitCursor().tqshape() ) // only if nobody changed the cursor in the meantime!
setCursor( m_oldCursor ); setCursor( m_oldCursor );
} }
// Reparenting a widget in Qt in fact means destroying the old X window of the widget // Retqparenting a widget in TQt in fact means destroying the old X window of the widget
// and creating a new one. And since the X window used for the Imlib image is a child // and creating a new one. And since the X window used for the Imlib image is a child
// of this widget's X window, destroying this widget's X window would mean also // of this widget's X window, destroying this widget's X window would mean also
// destroying the Imlib image X window. Therefore it needs to be temporarily reparented // destroying the Imlib image X window. Therefore it needs to be temporarily reparented
// away and reparented back to the new X window. // away and reparented back to the new X window.
// Reparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes. // Retqparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes.
void ImlibWidget::reparent( QWidget* parent, WFlags f, const QPoint& p, bool showIt ) void ImlibWidget::reparent( TQWidget* tqparent, WFlags f, const TQPoint& p, bool showIt )
{ {
XWindowAttributes attr; XWindowAttributes attr;
XGetWindowAttributes( x11Display(), win, &attr ); XGetWindowAttributes( x11Display(), win, &attr );
XUnmapWindow( x11Display(), win ); XUnmapWindow( x11Display(), win );
XReparentWindow( x11Display(), win, attr.root, 0, 0 ); XReparentWindow( x11Display(), win, attr.root, 0, 0 );
QWidget::reparent( parent, f, p, showIt ); TQWidget::reparent( tqparent, f, p, showIt );
XReparentWindow( x11Display(), win, winId(), attr.x, attr.y ); XReparentWindow( x11Display(), win, winId(), attr.x, attr.y );
if( attr.map_state != IsUnmapped ) if( attr.map_state != IsUnmapped )
XMapWindow( x11Display(), win ); XMapWindow( x11Display(), win );
@ -604,7 +602,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
return 0L; return 0L;
KuickImage *kuim = 0L; KuickImage *kuim = 0L;
int index = fileList.findIndex( file ); int index = fileList.tqfindIndex( file );
if ( index != -1 ) { if ( index != -1 ) {
if ( index == 0 ) if ( index == 0 )
kuim = kuickList.at( 0 ); kuim = kuickList.at( 0 );
@ -630,7 +628,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
// #endif // #endif
ImlibImage *im = Imlib_load_image( myId, ImlibImage *im = Imlib_load_image( myId,
QFile::encodeName( file->localFile() ).data() ); TQFile::encodeName( file->localFile() ).data() );
// #ifndef NDEBUG // #ifndef NDEBUG
// gettimeofday( &tms2, NULL ); // gettimeofday( &tms2, NULL );
@ -641,7 +639,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
slotIdle(); slotIdle();
if ( !im ) { if ( !im ) {
slotBusy(); slotBusy();
im = loadImageWithQt( file->localFile() ); im = loadImageWithTQt( file->localFile() );
slotIdle(); slotIdle();
if ( !im ) if ( !im )
return 0L; return 0L;
@ -649,8 +647,8 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
Imlib_set_image_modifier( myId, im, &mod ); Imlib_set_image_modifier( myId, im, &mod );
kuim = new KuickImage( file, im, myId ); kuim = new KuickImage( file, im, myId );
connect( kuim, SIGNAL( startRendering() ), SLOT( slotBusy() )); connect( kuim, TQT_SIGNAL( startRendering() ), TQT_SLOT( slotBusy() ));
connect( kuim, SIGNAL( stoppedRendering() ), SLOT( slotIdle() )); connect( kuim, TQT_SIGNAL( stoppedRendering() ), TQT_SLOT( slotIdle() ));
kuickList.insert( 0, kuim ); kuickList.insert( 0, kuim );
fileList.prepend( file ); fileList.prepend( file );
@ -668,13 +666,13 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
// Note: the returned image's filename will not be the real filename (which it usually // Note: the returned image's filename will not be the real filename (which it usually
// isn't anyway, according to Imlib's sources). // isn't anyway, according to Imlib's sources).
ImlibImage * ImageCache::loadImageWithQt( const QString& fileName ) const ImlibImage * ImageCache::loadImageWithTQt( const TQString& fileName ) const
{ {
kdDebug() << "Trying to load " << fileName << " with KImageIO..." << endl; kdDebug() << "Trying to load " << fileName << " with KImageIO..." << endl;
KImageIO::registerFormats(); KImageIO::registerFormats();
QImage image( fileName ); TQImage image( fileName );
if ( image.isNull() ) if ( image.isNull() )
return 0L; return 0L;
if ( image.depth() != 32 ) { if ( image.depth() != 32 ) {
@ -695,12 +693,12 @@ ImlibImage * ImageCache::loadImageWithQt( const QString& fileName ) const
int h = image.height(); int h = image.height();
for (int y = 0; y < h; y++) { for (int y = 0; y < h; y++) {
QRgb *scanLine = reinterpret_cast<QRgb *>( image.scanLine(y) ); TQRgb *scanLine = reinterpret_cast<TQRgb *>( image.scanLine(y) );
for (int x = 0; x < w; x++) { for (int x = 0; x < w; x++) {
const QRgb& pixel = scanLine[x]; const TQRgb& pixel = scanLine[x];
*(newData++) = qRed(pixel); *(newData++) = tqRed(pixel);
*(newData++) = qGreen(pixel); *(newData++) = tqGreen(pixel);
*(newData++) = qBlue(pixel); *(newData++) = tqBlue(pixel);
} }
} }

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** $Id: imlibwidget.h 524709 2006-03-31 00:03:44Z pfeiffer $ ** $Id: imlibwidget.h 524709 2006-03-31 00:03:44Z pfeiffer $
** **
** ImlibWidget: maps an Xlib window with Imlib's contents on a QWidget ** ImlibWidget: maps an Xlib window with Imlib's contents on a TQWidget
** **
** Created : 98 ** Created : 98
** **
@ -12,17 +12,17 @@
#ifndef IMLIBWIDGET_H #ifndef IMLIBWIDGET_H
#define IMLIBWIDGET_H #define IMLIBWIDGET_H
#include <qvariant.h> #include <tqvariant.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qevent.h> #include <tqevent.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qwidget.h> #include <tqwidget.h>
#include <kurl.h> #include <kurl.h>
// #include those AFTER Qt-includes! // #include those AFTER TQt-includes!
#include <Imlib.h> #include <Imlib.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -34,9 +34,10 @@
class KuickFile; class KuickFile;
class KuickImage; class KuickImage;
class ImageCache : public QObject class ImageCache : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ImageCache( ImlibData *id, int maxImages=1 ); ImageCache( ImlibData *id, int maxImages=1 );
@ -48,12 +49,12 @@ public:
KuickImage * getKuimage( KuickFile * file, ImlibColorModifier ); KuickImage * getKuimage( KuickFile * file, ImlibColorModifier );
private: private:
ImlibImage * loadImageWithQt( const QString& filename ) const; ImlibImage * loadImageWithTQt( const TQString& filename ) const;
int myMaxImages; int myMaxImages;
QValueList<KuickFile*>fileList; TQValueList<KuickFile*>fileList;
QPtrList<KuickImage> kuickList; TQPtrList<KuickImage> kuickList;
// QPtrList<ImlibImage> imList; // TQPtrList<ImlibImage> imList;
ImlibData * myId; ImlibData * myId;
int idleCount; int idleCount;
@ -70,16 +71,17 @@ signals:
// ------------------------------------------ // ------------------------------------------
class QColor; class TQColor;
class ImlibWidget : public QWidget class ImlibWidget : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ImlibWidget( ImData *_idata=0, QWidget *parent=0, const char *name=0 ); ImlibWidget( ImData *_idata=0, TQWidget *tqparent=0, const char *name=0 );
ImlibWidget( ImData *_idata, ImlibData *id, QWidget *parent=0, ImlibWidget( ImData *_idata, ImlibData *id, TQWidget *tqparent=0,
const char *name=0 ); const char *name=0 );
virtual ~ImlibWidget(); virtual ~ImlibWidget();
@ -108,8 +110,8 @@ public:
bool isAutoRenderEnabled() const { return isAutoRendering; } bool isAutoRenderEnabled() const { return isAutoRendering; }
void setMaxImageCache( int ); void setMaxImageCache( int );
int maxImageCache() const { return myMaxImageCache; } int maxImageCache() const { return myMaxImageCache; }
const QColor& backgroundColor() const; const TQColor& backgroundColor() const;
void setBackgroundColor( const QColor& ); void setBackgroundColor( const TQColor& );
/** /**
* @return true if auto-rotation is not possible, e.g. because no metadata * @return true if auto-rotation is not possible, e.g. because no metadata
@ -119,7 +121,7 @@ public:
ImlibData* getImlibData() const { return id; } ImlibData* getImlibData() const { return id; }
virtual void reparent( QWidget* parent, WFlags f, const QPoint& p, bool showIt = FALSE ); virtual void reparent( TQWidget* tqparent, WFlags f, const TQPoint& p, bool showIt = FALSE );
public slots: public slots:
void rotate90(); void rotate90();
@ -136,17 +138,17 @@ protected:
void showImage(); void showImage();
void setImageModifier(); void setImageModifier();
void rotate( int ); void rotate( int );
void updateWidget( bool geometryUpdate=true ); void updateWidget( bool tqgeometryUpdate=true );
virtual void updateGeometry( int width, int height ); virtual void updateGeometry( int width, int height );
virtual void loaded( KuickImage * ); virtual void loaded( KuickImage * );
virtual bool canZoomTo( int newWidth, int newHeight ); virtual bool canZoomTo( int newWidth, int newHeight );
virtual void rotated( KuickImage *kuim, int rotation ); virtual void rotated( KuickImage *kuim, int rotation );
void closeEvent( QCloseEvent * ); void closeEvent( TQCloseEvent * );
inline void autoUpdate( bool geometryUpdate=false ) { inline void autoUpdate( bool tqgeometryUpdate=false ) {
if ( isAutoRendering ) if ( isAutoRendering )
updateWidget( geometryUpdate ); updateWidget( tqgeometryUpdate );
} }
bool stillResizing, deleteImData, deleteImlibData; bool stillResizing, deleteImData, deleteImlibData;
@ -160,7 +162,7 @@ protected:
ImlibColorModifier mod; ImlibColorModifier mod;
KuickFile *m_kuickFile; KuickFile *m_kuickFile;
QCursor m_oldCursor; TQCursor m_oldCursor;
static const int ImlibOffset; static const int ImlibOffset;
@ -169,7 +171,7 @@ private:
void init(); void init();
bool isAutoRendering; bool isAutoRendering;
int myMaxImageCache; int myMaxImageCache;
QColor myBackgroundColor; TQColor myBackgroundColor;
protected slots: protected slots:
@ -179,7 +181,7 @@ protected slots:
signals: signals:
void sigImageError( const KuickFile * file, const QString& ); void sigImageError( const KuickFile * file, const TQString& );
}; };

@ -1,4 +1,4 @@
#include "kuick.h" #include "kuick.h"
Kuick * Kuick::s_self = 0L; Kuick * Kuick::s_self = 0L;
QSize Kuick::s_frameSize; TQSize Kuick::s_frameSize;

@ -19,8 +19,8 @@
#ifndef KUICKGLOBALS_H #ifndef KUICKGLOBALS_H
#define KUICKGLOBALS_H #define KUICKGLOBALS_H
#include <qrect.h> #include <tqrect.h>
#include <qsize.h> #include <tqsize.h>
#include <kwin.h> #include <kwin.h>
#include <kwinmodule.h> #include <kwinmodule.h>
@ -28,11 +28,11 @@
class Kuick class Kuick
{ {
public: public:
static QRect workArea() { static TQRect workArea() {
return self()->winModule.workArea(); return self()->winModule.workArea();
} }
static QSize frameSize( WId win = 0L ) { static TQSize frameSize( WId win = 0L ) {
if ( win ) { if ( win ) {
KWin::WindowInfo info = KWin::windowInfo(win, NET::WMKDEFrameStrut | NET::WMGeometry); KWin::WindowInfo info = KWin::windowInfo(win, NET::WMKDEFrameStrut | NET::WMGeometry);
int wborder = info.frameGeometry().width() - info.geometry().width(); int wborder = info.frameGeometry().width() - info.geometry().width();
@ -45,7 +45,7 @@ public:
} }
if ( !s_frameSize.isValid() ) if ( !s_frameSize.isValid() )
return QSize( 0, 0 ); return TQSize( 0, 0 );
return s_frameSize; return s_frameSize;
} }
@ -63,7 +63,7 @@ private:
Kuick() {} Kuick() {}
static Kuick * s_self; static Kuick * s_self;
static QSize s_frameSize; static TQSize s_frameSize;
}; };

@ -22,8 +22,8 @@
#endif #endif
#include "kuickconfigdlg.h" #include "kuickconfigdlg.h"
#include <qkeycode.h> #include <tqkeycode.h>
#include <qvbox.h> #include <tqvbox.h>
#include <kaccel.h> #include <kaccel.h>
#include <kconfig.h> #include <kconfig.h>
@ -38,14 +38,14 @@
#include "kuickdata.h" #include "kuickdata.h"
KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, QWidget *parent, KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, TQWidget *tqparent,
const char *name, bool modal ) const char *name, bool modal )
: KDialogBase( Tabbed, i18n("Configure"), : KDialogBase( Tabbed, i18n("Configure"),
Help | Default | Ok | Apply | Cancel, Ok, Help | Default | Ok | Apply | Cancel, Ok,
parent, name, modal ) tqparent, name, modal )
{ {
coll = _coll; coll = _coll;
QVBox *box = addVBoxPage( i18n("&General") ); TQVBox *box = addVBoxPage( i18n("&General") );
generalWidget = new GeneralWidget( box, "general widget" ); generalWidget = new GeneralWidget( box, "general widget" );
box = addVBoxPage( i18n("&Modifications") ); box = addVBoxPage( i18n("&Modifications") );
@ -64,7 +64,7 @@ KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, QWidget *parent,
box = addVBoxPage( i18n("Bro&wser Shortcuts") ); box = addVBoxPage( i18n("Bro&wser Shortcuts") );
browserKeyChooser = new KKeyChooser( coll, box ); browserKeyChooser = new KKeyChooser( coll, box );
connect( this, SIGNAL( defaultClicked() ), SLOT( resetDefaults() )); connect( this, TQT_SIGNAL( defaultClicked() ), TQT_SLOT( resetDefaults() ));
} }
KuickConfigDialog::~KuickConfigDialog() KuickConfigDialog::~KuickConfigDialog()

@ -19,7 +19,7 @@
#ifndef KUICKCONFIGDLG_H #ifndef KUICKCONFIGDLG_H
#define KUICKCONFIGDLG_H #define KUICKCONFIGDLG_H
#include <qevent.h> #include <tqevent.h>
#include <kkeydialog.h> #include <kkeydialog.h>
@ -33,9 +33,10 @@ class ImageWindow;
class KuickConfigDialog : public KDialogBase class KuickConfigDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
KuickConfigDialog( KActionCollection *coll, QWidget *parent=0, KuickConfigDialog( KActionCollection *coll, TQWidget *tqparent=0,
const char *name=0, bool modal=true); const char *name=0, bool modal=true);
~KuickConfigDialog(); ~KuickConfigDialog();

@ -18,7 +18,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <qcolor.h> #include <tqcolor.h>
#include <kconfig.h> #include <kconfig.h>
#include <kglobal.h> #include <kglobal.h>
@ -55,7 +55,7 @@ KuickData::KuickData()
maxZoomFactor = 4.0; maxZoomFactor = 4.0;
maxCachedImages = 4; maxCachedImages = 4;
backgroundColor = Qt::black; backgroundColor = TQt::black;
startInLastDir = true; startInLastDir = true;
@ -106,7 +106,7 @@ void KuickData::load()
maxCachedImages = kc->readUnsignedNumEntry( "MaxCachedImages", maxCachedImages = kc->readUnsignedNumEntry( "MaxCachedImages",
def.maxCachedImages ); def.maxCachedImages );
backgroundColor = kc->readColorEntry( "BackgroundColor", &Qt::black ); backgroundColor = kc->readColorEntry( "BackgroundColor", &TQt::black );
startInLastDir = kc->readBoolEntry( "StartInLastDir", true); startInLastDir = kc->readBoolEntry( "StartInLastDir", true);

@ -19,8 +19,8 @@
#ifndef KUICKDATA_H #ifndef KUICKDATA_H
#define KUICKDATA_H #define KUICKDATA_H
#include <qcolor.h> #include <tqcolor.h>
#include <qstring.h> #include <tqstring.h>
#include "imdata.h" #include "imdata.h"
@ -44,7 +44,7 @@ public:
ImData *idata; ImData *idata;
QString fileFilter; TQString fileFilter;
uint slideDelay; uint slideDelay;
uint slideshowCycles; uint slideshowCycles;
bool slideshowFullscreen :1; bool slideshowFullscreen :1;
@ -75,7 +75,7 @@ public:
uint maxCachedImages; uint maxCachedImages;
Rotation rotation; Rotation rotation;
QColor backgroundColor; TQColor backgroundColor;
}; };

@ -1,4 +1,4 @@
#include <qfile.h> #include <tqfile.h>
#include <kdebug.h> #include <kdebug.h>
#include <kdeversion.h> #include <kdeversion.h>
@ -13,7 +13,7 @@
#include "kuickfile.h" #include "kuickfile.h"
KuickFile::KuickFile(const KURL& url) KuickFile::KuickFile(const KURL& url)
: QObject(), : TQObject(),
m_url( url ), m_url( url ),
m_job( 0L ), m_job( 0L ),
m_progress( 0L ), m_progress( 0L ),
@ -33,15 +33,15 @@ KuickFile::~KuickFile()
delete m_job; delete m_job;
if ( hasDownloaded() ) if ( hasDownloaded() )
QFile::remove( m_localFile ); TQFile::remove( m_localFile );
} }
QString KuickFile::localFile() const TQString KuickFile::localFile() const
{ {
// Note: never call isAvailable() from here, directly or indirectly // Note: never call isAvailable() from here, directly or indirectly
if ( isDownloading() ) if ( isDownloading() )
return QString::null; return TQString();
return m_localFile; return m_localFile;
} }
@ -61,17 +61,17 @@ bool KuickFile::download()
return true; return true;
// reinitialize // reinitialize
m_localFile = QString::null; m_localFile = TQString();
m_currentProgress = 0; m_currentProgress = 0;
QString ext; TQString ext;
QString fileName = m_url.fileName(); TQString fileName = m_url.fileName();
int extIndex = fileName.findRev('.'); int extIndex = fileName.tqfindRev('.');
if ( extIndex > 0 ) if ( extIndex > 0 )
ext = fileName.mid( extIndex + 1 ); ext = fileName.mid( extIndex + 1 );
QString tempDir = FileCache::self()->tempDir(); TQString tempDir = FileCache::self()->tempDir();
KTempFile tempFile( tempDir, ext ); KTempFile tempFile( tempDir, ext );
tempFile.setAutoDelete( tempDir.isNull() ); // in case there is no proper tempdir, make sure to delete those files! tempFile.setAutoDelete( tempDir.isNull() ); // in case there is no proper tempdir, make sure to delete those files!
if ( tempFile.status() != 0 ) if ( tempFile.status() != 0 )
@ -86,15 +86,15 @@ bool KuickFile::download()
m_job = KIO::file_copy( m_url, destURL, -1, true, false, false ); // handling progress ourselves m_job = KIO::file_copy( m_url, destURL, -1, true, false, false ); // handling progress ourselves
m_job->setAutoErrorHandlingEnabled( true ); m_job->setAutoErrorHandlingEnabled( true );
connect( m_job, SIGNAL( result( KIO::Job * )), SLOT( slotResult( KIO::Job * ) )); connect( m_job, TQT_SIGNAL( result( KIO::Job * )), TQT_SLOT( slotResult( KIO::Job * ) ));
connect( m_job, SIGNAL( percent( KIO::Job *, unsigned long )), SLOT( slotProgress( KIO::Job *, unsigned long ) )); connect( m_job, TQT_SIGNAL( percent( KIO::Job *, unsigned long )), TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ));
// TODO: generify background/foreground downloading? // TODO: generify background/foreground downloading?
return m_job != 0L; return m_job != 0L;
} }
KuickFile::DownloadStatus KuickFile::waitForDownload( QWidget *parent ) KuickFile::DownloadtqStatus KuickFile::waitForDownload( TQWidget *tqparent )
{ {
if ( isAvailable() ) if ( isAvailable() )
return OK; return OK;
@ -104,10 +104,10 @@ KuickFile::DownloadStatus KuickFile::waitForDownload( QWidget *parent )
return ERROR; return ERROR;
} }
KProgressDialog *dialog = new KProgressDialog( parent ); KProgressDialog *dialog = new KProgressDialog( tqparent );
dialog->setModal( true ); dialog->setModal( true );
dialog->setCaption( i18n("Downloading %1...").arg( m_url.fileName() ) ); dialog->setCaption( i18n("Downloading %1...").tqarg( m_url.fileName() ) );
dialog->setLabel( i18n("Please wait while downloading\n%1").arg( m_url.prettyURL() )); dialog->setLabel( i18n("Please wait while downloading\n%1").tqarg( m_url.prettyURL() ));
dialog->setAllowCancel( true ); dialog->setAllowCancel( true );
dialog->setAutoClose( true ); dialog->setAutoClose( true );
@ -150,9 +150,9 @@ void KuickFile::slotResult( KIO::Job *job )
if ( job->error() != KIO::ERR_USER_CANCELED ) if ( job->error() != KIO::ERR_USER_CANCELED )
kdWarning() << "ERROR: KuickFile::slotResult: " << job->errorString() << endl; kdWarning() << "ERROR: KuickFile::slotResult: " << job->errorString() << endl;
QString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); TQString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
QFile::remove( canceledFile ); TQFile::remove( canceledFile );
m_progress->topLevelWidget()->hide(); m_progress->tqtopLevelWidget()->hide();
} }
else { else {
m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
@ -162,7 +162,7 @@ void KuickFile::slotResult( KIO::Job *job )
m_progress->setProgress( 100 ); m_progress->setProgress( 100 );
#define BUGGY_VERSION KDE_MAKE_VERSION(3,5,2) #define BUGGY_VERSION KDE_MAKE_VERSION(3,5,2)
if ( KDE::version() <= BUGGY_VERSION ) { if ( KDE::version() <= BUGGY_VERSION ) {
m_progress->topLevelWidget()->hide(); // ### workaround broken KProgressDialog m_progress->tqtopLevelWidget()->hide(); // ### workaround broken KProgressDialog
} }
} }
} }

@ -10,8 +10,8 @@
#ifndef KUICKFILE_H #ifndef KUICKFILE_H
#define KUICKFILE_H #define KUICKFILE_H
#include <qobject.h> #include <tqobject.h>
#include <qstring.h> #include <tqstring.h>
#include <kurl.h> #include <kurl.h>
#include <kprogress.h> #include <kprogress.h>
@ -21,12 +21,13 @@ namespace KIO {
class FileCopyJob; class FileCopyJob;
} }
class KuickFile : public QObject class KuickFile : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
enum DownloadStatus enum DownloadtqStatus
{ {
OK = 1, OK = 1,
CANCELED, CANCELED,
@ -43,7 +44,7 @@ public:
const KURL& url() const { return m_url; } const KURL& url() const { return m_url; }
QString localFile() const; TQString localFile() const;
bool download(); bool download();
@ -71,7 +72,7 @@ public:
* immediately. * immediately.
* @return true when the download has finished or false when the user aborted the dialog * @return true when the download has finished or false when the user aborted the dialog
*/ */
KuickFile::DownloadStatus waitForDownload( QWidget *parent ); KuickFile::DownloadtqStatus waitForDownload( TQWidget *tqparent );
// bool needsDownload(); // bool needsDownload();
@ -87,7 +88,7 @@ private slots:
private: private:
KURL m_url; KURL m_url;
QString m_localFile; TQString m_localFile;
KIO::FileCopyJob *m_job; KIO::FileCopyJob *m_job;
KProgress *m_progress; KProgress *m_progress;
int m_currentProgress; int m_currentProgress;

@ -1,7 +1,7 @@
#include "kuickimage.h" #include "kuickimage.h"
KuickImage::KuickImage( const KuickFile * file, ImlibImage *im, ImlibData *id) KuickImage::KuickImage( const KuickFile * file, ImlibImage *im, ImlibData *id)
: QObject( 0L, 0L ) : TQObject( 0L, 0L )
{ {
myFile = file; myFile = file;
myOrigIm = 0L; myOrigIm = 0L;
@ -82,7 +82,7 @@ void KuickImage::rotate( Rotation rot )
} }
else if ( rot == ROT_90 || rot == ROT_270 ) { else if ( rot == ROT_90 || rot == ROT_270 ) {
qSwap( myWidth, myHeight ); tqSwap( myWidth, myHeight );
Imlib_rotate_image( myId, myIm, -1 ); Imlib_rotate_image( myId, myIm, -1 );
if ( rot == ROT_90 ) // rotate 90 degrees if ( rot == ROT_90 ) // rotate 90 degrees
@ -178,7 +178,7 @@ void KuickImage::restoreOriginalSize()
myIsDirty = true; myIsDirty = true;
if ( myRotation == ROT_90 || myRotation == ROT_270 ) if ( myRotation == ROT_90 || myRotation == ROT_270 )
qSwap( myWidth, myHeight ); tqSwap( myWidth, myHeight );
} }
void KuickImage::resize( int width, int height, KuickImage::ResizeMode mode ) void KuickImage::resize( int width, int height, KuickImage::ResizeMode mode )
@ -212,9 +212,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
{ {
// qDebug("-- smoothResize: %i x %i", newWidth, newHeight); // qDebug("-- smoothResize: %i x %i", newWidth, newHeight);
QImage *image = newQImage(); TQImage *image = newTQImage();
// Note: QImage::ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small) // Note: TQ_ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small)
QImage scaledImage = image->smoothScale(newWidth, newHeight, QImage::ScaleFree); TQImage scaledImage = image->smoothScale(newWidth, newHeight, TQ_ScaleFree);
delete image; delete image;
@ -235,11 +235,11 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
return false; return false;
} }
QImage * KuickImage::newQImage() const TQImage * KuickImage::newTQImage() const
{ {
ImlibImage *im; ImlibImage *im;
// qDebug("-- newQImage"); // qDebug("-- newTQImage");
if ( myOrigIm != 0L && myRotation == ROT_0 && myFlipMode == FlipNone ) if ( myOrigIm != 0L && myRotation == ROT_0 && myFlipMode == FlipNone )
{ {
@ -255,9 +255,9 @@ QImage * KuickImage::newQImage() const
int w = im->rgb_width; int w = im->rgb_width;
int h = im->rgb_height; int h = im->rgb_height;
QImage *image = new QImage( w, h, 32 ); TQImage *image = new TQImage( w, h, 32 );
uchar *rgb = im->rgb_data; uchar *rgb = im->rgb_data;
QRgb **destImageData = reinterpret_cast<QRgb**>( image->jumpTable() ); TQRgb **destImageData = reinterpret_cast<TQRgb**>( image->jumpTable() );
int byteIndex = 0; int byteIndex = 0;
@ -275,14 +275,14 @@ QImage * KuickImage::newQImage() const
uchar g = rgb[byteIndex++]; uchar g = rgb[byteIndex++];
uchar b = rgb[byteIndex++]; uchar b = rgb[byteIndex++];
QRgb rgbPixel = qRgb( r, g, b ); TQRgb rgbPixel = tqRgb( r, g, b );
destImageData[destLineIndex][destByteIndex++] = rgbPixel; destImageData[destLineIndex][destByteIndex++] = rgbPixel;
} }
return image; return image;
} }
ImlibImage * KuickImage::toImage( ImlibData *id, QImage& image ) ImlibImage * KuickImage::toImage( ImlibData *id, TQImage& image )
{ {
if ( image.isNull() ) if ( image.isNull() )
return 0L; return 0L;
@ -306,12 +306,12 @@ ImlibImage * KuickImage::toImage( ImlibData *id, QImage& image )
int h = image.height(); int h = image.height();
for (int y = 0; y < h; y++) { for (int y = 0; y < h; y++) {
QRgb *scanLine = reinterpret_cast<QRgb *>( image.scanLine(y) ); TQRgb *scanLine = reinterpret_cast<TQRgb *>( image.scanLine(y) );
for (int x = 0; x < w; x++) { for (int x = 0; x < w; x++) {
const QRgb& pixel = scanLine[x]; const TQRgb& pixel = scanLine[x];
*(newData++) = qRed(pixel); *(newData++) = tqRed(pixel);
*(newData++) = qGreen(pixel); *(newData++) = tqGreen(pixel);
*(newData++) = qBlue(pixel); *(newData++) = tqBlue(pixel);
} }
} }
@ -339,9 +339,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// int w = myOrigWidth; //myViewport.width(); // int w = myOrigWidth; //myViewport.width();
//int h = myOrigHeight; //myViewport.height(); //int h = myOrigHeight; //myViewport.height();
//QImage dst(w, h, myIm->depth(), myIm->numColors(), myIm->bitOrder()); //TQImage dst(w, h, myIm->depth(), myIm->numColors(), myIm->bitOrder());
//QRgb *scanline; //TQRgb *scanline;
int basis_ox, basis_oy, basis_xx, basis_yy; int basis_ox, basis_oy, basis_xx, basis_yy;
@ -363,10 +363,10 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
int max_x2 = (myOrigWidth << 12); int max_x2 = (myOrigWidth << 12);
int max_y2 = (myOrigHeight << 12); int max_y2 = (myOrigHeight << 12);
// QRgb background = idata->backgroundColor.rgb(); // TQRgb background = idata->backgroundColor.rgb();
// QRgb **imdata = (QRgb **) myIm->jumpTable(); // TQRgb **imdata = (TQRgb **) myIm->jumpTable();
// QRgb *imdata = reinterpret_cast<QRgb*>( myIm->rgb_data ); // TQRgb *imdata = reinterpret_cast<TQRgb*>( myIm->rgb_data );
uchar *imdata = myIm->rgb_data; uchar *imdata = myIm->rgb_data;
@ -380,15 +380,15 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// if ((y2 >= 0 && (y2 >> 12) < myIm->height()) || y >= h) // if ((y2 >= 0 && (y2 >> 12) < myIm->height()) || y >= h)
// break; // break;
// //
// scanline = (QRgb*) dst.scanLine(y); // scanline = (TQRgb*) dst.scanLine(y);
// for (int i = 0; i < w; i++) // for (int i = 0; i < w; i++)
// *(scanline++) = background; //qRgb(0,255,0); // *(scanline++) = background; //tqRgb(0,255,0);
// y++; // y++;
// } // }
for (; y < newHeight; y++) for (; y < newHeight; y++)
{ {
// scanline = (QRgb*) dst.scanLine(y); // scanline = (TQRgb*) dst.scanLine(y);
x2 = basis_ox; x2 = basis_ox;
y2 = basis_oy + y * basis_yy; y2 = basis_oy + y * basis_yy;
@ -400,7 +400,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// while ((x2 < 0 || (x2 >> 12) >= myIm->width()) && x < w) //fill the left of the target pixmap with the background color // while ((x2 < 0 || (x2 >> 12) >= myIm->width()) && x < w) //fill the left of the target pixmap with the background color
// { // {
// *(scanline++) = background; //qRgb(0,0,255); // *(scanline++) = background; //tqRgb(0,0,255);
// x2 += basis_xx; // x2 += basis_xx;
// x++; // x++;
// } // }
@ -425,14 +425,14 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
unsigned int iwx = 0xfff - wx; unsigned int iwx = 0xfff - wx;
unsigned int iwy = 0xfff - wy; unsigned int iwy = 0xfff - wy;
QRgb tl = 0, tr = 0, bl = 0, br = 0; TQRgb tl = 0, tr = 0, bl = 0, br = 0;
int ind = 0; int ind = 0;
ind = (left + top * myOrigWidth) * 3; ind = (left + top * myOrigWidth) * 3;
tl = (imdata[ind] << 16); tl = (imdata[ind] << 16);
tl |= (imdata[ind + 1] << 8); tl |= (imdata[ind + 1] << 8);
tl |= (imdata[ind + 2] << 0); tl |= (imdata[ind + 2] << 0);
int bar = imdata[ind + 2] << 8; int bar = imdata[ind + 2] << 8;
bar = qBlue(bar); bar = tqBlue(bar);
ind = (right + top * myOrigWidth) * 3; ind = (right + top * myOrigWidth) * 3;
tr = (imdata[ind] << 16); tr = (imdata[ind] << 16);
@ -462,9 +462,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
br=getValidPixel(myIm, right, bottom, x, y); br=getValidPixel(myIm, right, bottom, x, y);
*/ */
unsigned int r = (unsigned int) (qRed(tl) * iwx * iwy + qRed(tr) * wx* iwy + qRed(bl) * iwx * wy + qRed(br) * wx * wy); // NB 12+12+8 == 32 unsigned int r = (unsigned int) (tqRed(tl) * iwx * iwy + tqRed(tr) * wx* iwy + tqRed(bl) * iwx * wy + tqRed(br) * wx * wy); // NB 12+12+8 == 32
unsigned int g = (unsigned int) (qGreen(tl) * iwx * iwy + qGreen(tr) * wx * iwy + qGreen(bl) * iwx * wy + qGreen(br) * wx * wy); unsigned int g = (unsigned int) (tqGreen(tl) * iwx * iwy + tqGreen(tr) * wx * iwy + tqGreen(bl) * iwx * wy + tqGreen(br) * wx * wy);
unsigned int b = (unsigned int) (qBlue(tl) * iwx * iwy + qBlue(tr) * wx * iwy + qBlue(bl) * iwx * wy + qBlue(br) * wx * wy); unsigned int b = (unsigned int) (tqBlue(tl) * iwx * iwy + tqBlue(tr) * wx * iwy + tqBlue(bl) * iwx * wy + tqBlue(br) * wx * wy);
// ### endianness // ### endianness
//we're actually off by one in 255 here! (254 instead of 255) //we're actually off by one in 255 here! (254 instead of 255)
@ -474,7 +474,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
newImageData[(y * newWidth * 3) + (x * 3) + 0] = (r >> 24); newImageData[(y * newWidth * 3) + (x * 3) + 0] = (r >> 24);
newImageData[(y * newWidth * 3) + (x * 3) + 1] = (g >> 24); newImageData[(y * newWidth * 3) + (x * 3) + 1] = (g >> 24);
newImageData[(y * newWidth * 3) + (x * 3) + 2] = (b >> 24); newImageData[(y * newWidth * 3) + (x * 3) + 2] = (b >> 24);
// *(scanline++) = qRgb(r >> 24, g >> 24, b >> 24); //we're actually off by one in 255 here // *(scanline++) = tqRgb(r >> 24, g >> 24, b >> 24); //we're actually off by one in 255 here
x2 += basis_xx; x2 += basis_xx;
@ -488,7 +488,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// while (x < w) //fill the right of each scanline with the background colour // while (x < w) //fill the right of each scanline with the background colour
// { // {
// *(scanline++) = background; //qRgb(255,0,0); // *(scanline++) = background; //tqRgb(255,0,0);
// x++; // x++;
// } // }
} }
@ -500,9 +500,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// if (y >= h) // if (y >= h)
// break; // break;
// //
// scanline = (QRgb*) dst.scanLine(y); // scanline = (TQRgb*) dst.scanLine(y);
// for (int i = 0; i < w; i++) // for (int i = 0; i < w; i++)
// *(scanline++) = background; //qRgb(255,255,0); // *(scanline++) = background; //tqRgb(255,255,0);
// y++; // y++;
// } // }

@ -10,24 +10,25 @@
#ifndef KUICKIMAGE_H #ifndef KUICKIMAGE_H
#define KUICKIMAGE_H #define KUICKIMAGE_H
#include <qimage.h> #include <tqimage.h>
#include <qobject.h> #include <tqobject.h>
#include <kurl.h> #include <kurl.h>
#include "kuickdata.h" #include "kuickdata.h"
#include "kuickfile.h" #include "kuickfile.h"
// #include those AFTER Qt-includes! // #include those AFTER TQt-includes!
#include <Imlib.h> #include <Imlib.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
// #include <X11/extensions/shape.h> // #include <X11/extensions/shape.h>
class KuickImage : public QObject class KuickImage : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
enum ResizeMode { FAST, SMOOTH }; enum ResizeMode { FAST, SMOOTH };
@ -49,7 +50,7 @@ public:
ImlibImage * imlibImage() const { return myIm; } ImlibImage * imlibImage() const { return myIm; }
Pixmap& pixmap(); Pixmap& pixmap();
void renderPixmap(); void renderPixmap();
// const QString& filename() const { return myFilename;} // const TQString& filename() const { return myFilename;}
const KuickFile& file() const { return *myFile; } const KuickFile& file() const { return *myFile; }
const KURL& url() const { return myFile->url(); } const KURL& url() const { return myFile->url(); }
@ -58,7 +59,7 @@ public:
Rotation absRotation() const { return myRotation; } Rotation absRotation() const { return myRotation; }
FlipMode flipMode() const { return myFlipMode; } FlipMode flipMode() const { return myFlipMode; }
static ImlibImage * toImage( ImlibData *id, QImage& image ); static ImlibImage * toImage( ImlibData *id, TQImage& image );
private: private:
void fastResize( int newWidth, int newHeight ); void fastResize( int newWidth, int newHeight );
@ -66,7 +67,7 @@ private:
/** /**
* Note: caller must delete it! * Note: caller must delete it!
*/ */
QImage * newQImage() const; TQImage * newTQImage() const;
const KuickFile * myFile; const KuickFile * myFile;

@ -19,14 +19,14 @@
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include <qdir.h> #include <tqdir.h>
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <qdialog.h> #include <tqdialog.h>
#include <qglobal.h> #include <tqglobal.h>
#include <qkeycode.h> #include <tqkeycode.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qsize.h> #include <tqsize.h>
#include <qstring.h> #include <tqstring.h>
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kaccel.h> #include <kaccel.h>
@ -89,7 +89,7 @@ KuickData* kdata;
static const int URL_ITEM = 0; static const int URL_ITEM = 0;
static const int META_ITEM = 1; static const int META_ITEM = 1;
QValueList<ImageWindow*> KuickShow::s_viewers; TQValueList<ImageWindow*> KuickShow::s_viewers;
KuickShow::KuickShow( const char *name ) KuickShow::KuickShow( const char *name )
: KMainWindow( 0L, name ), : KMainWindow( 0L, name ),
@ -110,8 +110,8 @@ KuickShow::KuickShow( const char *name )
initImlib(); initImlib();
resize( 400, 500 ); resize( 400, 500 );
m_slideTimer = new QTimer( this ); m_slideTimer = new TQTimer( this );
connect( m_slideTimer, SIGNAL( timeout() ), SLOT( nextSlide() )); connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() ));
KConfig *kc = KGlobal::config(); KConfig *kc = KGlobal::config();
@ -124,7 +124,7 @@ KuickShow::KuickShow( const char *name )
// files to display // files to display
// either a directory to display, an absolute path, a relative path, or a URL // either a directory to display, an absolute path, a relative path, or a URL
KURL startDir; KURL startDir;
startDir.setPath( QDir::currentDirPath() + '/' ); startDir.setPath( TQDir::currentDirPath() + '/' );
int numArgs = args->count(); int numArgs = args->count();
if ( numArgs >= 10 ) if ( numArgs >= 10 )
@ -133,7 +133,7 @@ KuickShow::KuickShow( const char *name )
if ( KMessageBox::warningYesNo( if ( KMessageBox::warningYesNo(
this, this,
i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.",
"Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).arg(KStdGuiItem::no().plainText()), "Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).tqarg(KStdGuiItem::no().plainText()),
i18n("Display Multiple Images?")) i18n("Display Multiple Images?"))
!= KMessageBox::Yes ) != KMessageBox::Yes )
{ {
@ -164,7 +164,7 @@ KuickShow::KuickShow( const char *name )
else if ( !url.isLocalFile() ) else if ( !url.isLocalFile() )
{ {
KMimeType::Ptr mime = KMimeType::findByURL( url ); KMimeType::Ptr mime = KMimeType::findByURL( url );
QString name = mime->name(); TQString name = mime->name();
if ( name == "application/octet-stream" ) // unknown -> stat() if ( name == "application/octet-stream" ) // unknown -> stat()
name = KIO::NetAccess::mimetype( url, this ); name = KIO::NetAccess::mimetype( url, this );
@ -231,39 +231,39 @@ void KuickShow::initGUI( const KURL& startDir )
redirectDeleteAndTrashActions(coll); redirectDeleteAndTrashActions(coll);
connect( fileWidget, SIGNAL( fileSelected( const KFileItem * ) ), connect( fileWidget, TQT_SIGNAL( fileSelected( const KFileItem * ) ),
this, SLOT( slotSelected( const KFileItem * ) )); TQT_TQOBJECT(this), TQT_SLOT( slotSelected( const KFileItem * ) ));
connect( fileWidget, SIGNAL( fileHighlighted( const KFileItem * )), connect( fileWidget, TQT_SIGNAL( fileHighlighted( const KFileItem * )),
this, SLOT( slotHighlighted( const KFileItem * ) )); TQT_TQOBJECT(this), TQT_SLOT( slotHighlighted( const KFileItem * ) ));
connect( fileWidget, SIGNAL( urlEntered( const KURL& )), connect( fileWidget, TQT_SIGNAL( urlEntered( const KURL& )),
this, SLOT( dirSelected( const KURL& )) ); TQT_TQOBJECT(this), TQT_SLOT( dirSelected( const KURL& )) );
fileWidget->setAcceptDrops(true); fileWidget->setAcceptDrops(true);
connect( fileWidget, SIGNAL( dropped( const KFileItem *, QDropEvent *, const KURL::List & )), connect( fileWidget, TQT_SIGNAL( dropped( const KFileItem *, TQDropEvent *, const KURL::List & )),
this, SLOT( slotDropped( const KFileItem *, QDropEvent *, const KURL::List &)) ); TQT_TQOBJECT(this), TQT_SLOT( slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &)) );
// setup actions // setup actions
KAction *open = KStdAction::open( this, SLOT( slotOpenURL() ), KAction *open = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotOpenURL() ),
coll, "openURL" ); coll, "openURL" );
KAction *print = KStdAction::print( this, SLOT( slotPrint() ), KAction *print = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( slotPrint() ),
coll, "kuick_print" ); coll, "kuick_print" );
print->setText( i18n("Print Image...") ); print->setText( i18n("Print Image...") );
KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure", KAction *configure = new KAction( i18n("Configure %1...").tqarg( KGlobal::instance()->aboutData()->programName() ), "configure",
KShortcut(), KShortcut(),
this, SLOT( configuration() ), TQT_TQOBJECT(this), TQT_SLOT( configuration() ),
coll, "kuick_configure" ); coll, "kuick_configure" );
KAction *slide = new KAction( i18n("Start Slideshow" ), "ksslide", KAction *slide = new KAction( i18n("Start Slideshow" ), "ksslide",
KShortcut( Key_F2 ), KShortcut( Key_F2 ),
this, SLOT( startSlideShow() ), TQT_TQOBJECT(this), TQT_SLOT( startSlideShow() ),
coll, "kuick_slideshow" ); coll, "kuick_slideshow" );
KAction *about = new KAction( i18n( "About KuickShow" ), "about", KAction *about = new KAction( i18n( "About KuickShow" ), "about",
KShortcut(), KShortcut(),
this, SLOT( about() ), coll, "about" ); TQT_TQOBJECT(this), TQT_SLOT( about() ), coll, "about" );
oneWindowAction = new KToggleAction( i18n("Open Only One Image Window"), oneWindowAction = new KToggleAction( i18n("Open Only One Image Window"),
"window_new", "window_new",
@ -272,29 +272,29 @@ void KuickShow::initGUI( const KURL& startDir )
m_toggleBrowserAction = new KToggleAction( i18n("Show File Browser"), KShortcut( Key_Space ), coll, "toggleBrowser" ); m_toggleBrowserAction = new KToggleAction( i18n("Show File Browser"), KShortcut( Key_Space ), coll, "toggleBrowser" );
m_toggleBrowserAction->setCheckedState(i18n("Hide File Browser")); m_toggleBrowserAction->setCheckedState(i18n("Hide File Browser"));
connect( m_toggleBrowserAction, SIGNAL( toggled( bool ) ), connect( m_toggleBrowserAction, TQT_SIGNAL( toggled( bool ) ),
SLOT( toggleBrowser() )); TQT_SLOT( toggleBrowser() ));
KAction *showInOther = new KAction( i18n("Show Image"), KShortcut(), KAction *showInOther = new KAction( i18n("Show Image"), KShortcut(),
this, SLOT( slotShowInOtherWindow() ), TQT_TQOBJECT(this), TQT_SLOT( slotShowInOtherWindow() ),
coll, "kuick_showInOtherWindow" ); coll, "kuick_showInOtherWindow" );
KAction *showInSame = new KAction( i18n("Show Image in Active Window"), KAction *showInSame = new KAction( i18n("Show Image in Active Window"),
KShortcut(), KShortcut(),
this, SLOT( slotShowInSameWindow() ), TQT_TQOBJECT(this), TQT_SLOT( slotShowInSameWindow() ),
coll, "kuick_showInSameWindow" ); coll, "kuick_showInSameWindow" );
KAction *showFullscreen = new KAction( i18n("Show Image in Fullscreen Mode"), KAction *showFullscreen = new KAction( i18n("Show Image in Fullscreen Mode"),
KShortcut(), this, SLOT( slotShowFullscreen() ), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotShowFullscreen() ),
coll, "kuick_showFullscreen" ); coll, "kuick_showFullscreen" );
KAction *quit = KStdAction::quit( this, SLOT(slotQuit()), coll, "quit"); KAction *quit = KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), coll, "quit");
// remove QString::null parameter -- ellis // remove TQString() parameter -- ellis
coll->readShortcutSettings( QString::null ); coll->readShortcutSettings( TQString() );
m_accel = coll->accel(); m_accel = coll->accel();
// menubar // menubar
KMenuBar *mBar = menuBar(); KMenuBar *mBar = menuBar();
QPopupMenu *fileMenu = new QPopupMenu( mBar, "file" ); TQPopupMenu *fileMenu = new TQPopupMenu( mBar, "file" );
open->plug( fileMenu ); open->plug( fileMenu );
showInOther->plug( fileMenu ); showInOther->plug( fileMenu );
showInSame->plug( fileMenu ); showInSame->plug( fileMenu );
@ -305,7 +305,7 @@ void KuickShow::initGUI( const KURL& startDir )
fileMenu->insertSeparator(); fileMenu->insertSeparator();
quit->plug( fileMenu ); quit->plug( fileMenu );
QPopupMenu *editMenu = new QPopupMenu( mBar, "edit" ); TQPopupMenu *editMenu = new TQPopupMenu( mBar, "edit" );
coll->action("mkdir")->plug( editMenu ); coll->action("mkdir")->plug( editMenu );
coll->action("delete")->plug( editMenu ); coll->action("delete")->plug( editMenu );
editMenu->insertSeparator(); editMenu->insertSeparator();
@ -316,10 +316,10 @@ void KuickShow::initGUI( const KURL& startDir )
// from the main contextmenu // from the main contextmenu
KActionMenu *sortingMenu = static_cast<KActionMenu*>( coll->action("sorting menu")); KActionMenu *sortingMenu = static_cast<KActionMenu*>( coll->action("sorting menu"));
KActionMenu *mainActionMenu = static_cast<KActionMenu*>( coll->action("popupMenu")); KActionMenu *mainActionMenu = static_cast<KActionMenu*>( coll->action("popupMenu"));
QPopupMenu *mainPopup = mainActionMenu->popupMenu(); TQPopupMenu *mainPopup = mainActionMenu->popupMenu();
int sortingIndex = mainPopup->indexOf( sortingMenu->itemId( 0 ) ); int sortingIndex = mainPopup->indexOf( sortingMenu->itemId( 0 ) );
int separatorId = mainPopup->idAt( sortingIndex + 1 ); int separatorId = mainPopup->idAt( sortingIndex + 1 );
QMenuItem *separatorItem = mainPopup->findItem( separatorId ); TQMenuItem *separatorItem = mainPopup->tqfindItem( separatorId );
if ( separatorItem && separatorItem->isSeparator() ) if ( separatorItem && separatorItem->isSeparator() )
mainPopup->removeItem( separatorId ); mainPopup->removeItem( separatorId );
mainActionMenu->remove( sortingMenu ); mainActionMenu->remove( sortingMenu );
@ -330,7 +330,7 @@ void KuickShow::initGUI( const KURL& startDir )
sortingMenu->plug( viewActionMenu->popupMenu(), 0 ); // on top of the menu sortingMenu->plug( viewActionMenu->popupMenu(), 0 ); // on top of the menu
QPopupMenu *settingsMenu = new QPopupMenu( mBar, "settings" ); TQPopupMenu *settingsMenu = new TQPopupMenu( mBar, "settings" );
configure->plug( settingsMenu ); configure->plug( settingsMenu );
mBar->insertItem( i18n("&File"), fileMenu ); mBar->insertItem( i18n("&File"), fileMenu );
@ -363,14 +363,14 @@ void KuickShow::initGUI( const KURL& startDir )
tBar->insertSeparator(); tBar->insertSeparator();
about->plug( tBar ); about->plug( tBar );
QPopupMenu *help = helpMenu( QString::null, false ); TQPopupMenu *help = helpMenu( TQString(), false );
mBar->insertItem( KStdGuiItem::help().text() , help ); mBar->insertItem( KStdGuiItem::help().text() , help );
KStatusBar* sBar = statusBar(); KStatusBar* sBar = statusBar();
sBar->insertItem( " ", URL_ITEM, 10 ); sBar->insertItem( " ", URL_ITEM, 10 );
sBar->insertItem( " ", META_ITEM, 2 ); sBar->insertItem( " ", META_ITEM, 2 );
sBar->setItemAlignment(URL_ITEM, QLabel::AlignVCenter | QLabel::AlignLeft); sBar->setItemAlignment(URL_ITEM, TQLabel::AlignVCenter | TQLabel::AlignLeft);
fileWidget->setFocus(); fileWidget->setFocus();
@ -394,10 +394,10 @@ void KuickShow::initGUI( const KURL& startDir )
addressToolBar->insertWidget( ID_ADDRESSBAR, 1, cmbPath); addressToolBar->insertWidget( ID_ADDRESSBAR, 1, cmbPath);
addressToolBar->setItemAutoSized( ID_ADDRESSBAR ); addressToolBar->setItemAutoSized( ID_ADDRESSBAR );
connect( cmbPath, SIGNAL( urlActivated( const KURL& )), connect( cmbPath, TQT_SIGNAL( urlActivated( const KURL& )),
this, SLOT( slotSetURL( const KURL& ))); TQT_TQOBJECT(this), TQT_SLOT( slotSetURL( const KURL& )));
connect( cmbPath, SIGNAL( returnPressed()), connect( cmbPath, TQT_SIGNAL( returnPressed()),
this, SLOT( slotURLComboReturnPressed())); TQT_TQOBJECT(this), TQT_SLOT( slotURLComboReturnPressed()));
fileWidget->initActions(); fileWidget->initActions();
@ -422,14 +422,14 @@ void KuickShow::redirectDeleteAndTrashActions(KActionCollection *coll)
if (action) if (action)
{ {
action->disconnect(fileWidget); action->disconnect(fileWidget);
connect(action, SIGNAL(activated()), this, SLOT(slotDeleteCurrentImage())); connect(action, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteCurrentImage()));
} }
action = coll->action("trash"); action = coll->action("trash");
if (action) if (action)
{ {
action->disconnect(fileWidget); action->disconnect(fileWidget);
connect(action, SIGNAL(activated()), this, SLOT(slotTrashCurrentImage())); connect(action, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotTrashCurrentImage()));
} }
} }
@ -478,7 +478,7 @@ void KuickShow::slotHighlighted( const KFileItem *fi )
statusBar()->changeItem( item->getStatusBarInfo(), URL_ITEM ); statusBar()->changeItem( item->getStatusBarInfo(), URL_ITEM );
bool image = FileWidget::isImage( fi ); bool image = FileWidget::isImage( fi );
QString meta; TQString meta;
if ( image ) if ( image )
{ {
KFileMetaInfo info = item->metaInfo(); KFileMetaInfo info = item->metaInfo();
@ -488,7 +488,7 @@ void KuickShow::slotHighlighted( const KFileItem *fi )
KFileMetaInfoGroup group = info.group( "Technical" ); KFileMetaInfoGroup group = info.group( "Technical" );
if ( group.isValid() ) if ( group.isValid() )
{ {
QString bpp = group.item( "BitDepth" ).string(); TQString bpp = group.item( "BitDepth" ).string();
if ( !bpp.isEmpty() ) if ( !bpp.isEmpty() )
meta.append( ", " ).append( bpp ); meta.append( ", " ).append( bpp );
} }
@ -537,22 +537,22 @@ bool KuickShow::showImage( const KFileItem *fi,
m_viewer->setFullscreen( fullscreen ); m_viewer->setFullscreen( fullscreen );
s_viewers.append( m_viewer ); s_viewers.append( m_viewer );
connect( m_viewer, SIGNAL( destroyed() ), SLOT( viewerDeleted() )); connect( m_viewer, TQT_SIGNAL( destroyed() ), TQT_SLOT( viewerDeleted() ));
connect( m_viewer, SIGNAL( sigFocusWindow( ImageWindow *) ), connect( m_viewer, TQT_SIGNAL( sigFocusWindow( ImageWindow *) ),
this, SLOT( slotSetActiveViewer( ImageWindow * ) )); TQT_TQOBJECT(this), TQT_SLOT( slotSetActiveViewer( ImageWindow * ) ));
connect( m_viewer, SIGNAL( sigImageError(const KuickFile *, const QString& ) ), connect( m_viewer, TQT_SIGNAL( sigImageError(const KuickFile *, const TQString& ) ),
this, SLOT( messageCantLoadImage(const KuickFile *, const QString &) )); TQT_TQOBJECT(this), TQT_SLOT( messageCantLoadImage(const KuickFile *, const TQString &) ));
connect( m_viewer, SIGNAL( requestImage( ImageWindow *, int )), connect( m_viewer, TQT_SIGNAL( requestImage( ImageWindow *, int )),
this, SLOT( slotAdvanceImage( ImageWindow *, int ))); TQT_TQOBJECT(this), TQT_SLOT( slotAdvanceImage( ImageWindow *, int )));
connect( m_viewer, SIGNAL( pauseSlideShowSignal() ), connect( m_viewer, TQT_SIGNAL( pauseSlideShowSignal() ),
this, SLOT( pauseSlideShow() ) ); TQT_TQOBJECT(this), TQT_SLOT( pauseSlideShow() ) );
connect( m_viewer, SIGNAL (deleteImage (ImageWindow *)), connect( m_viewer, TQT_SIGNAL (deleteImage (ImageWindow *)),
this, SLOT (slotDeleteCurrentImage (ImageWindow *))); TQT_TQOBJECT(this), TQT_SLOT (slotDeleteCurrentImage (ImageWindow *)));
connect( m_viewer, SIGNAL (trashImage (ImageWindow *)), connect( m_viewer, TQT_SIGNAL (trashImage (ImageWindow *)),
this, SLOT (slotTrashCurrentImage (ImageWindow *))); TQT_TQOBJECT(this), TQT_SLOT (slotTrashCurrentImage (ImageWindow *)));
if ( s_viewers.count() == 1 && moveToTopLeft ) { if ( s_viewers.count() == 1 && moveToTopLeft ) {
// we have to move to 0x0 before showing _and_ // we have to move to 0x0 before showing _and_
// after showing, otherwise we get some bogus geometry() // after showing, otherwise we get some bogus tqgeometry()
m_viewer->move( Kuick::workArea().topLeft() ); m_viewer->move( Kuick::workArea().topLeft() );
} }
@ -568,7 +568,7 @@ bool KuickShow::showImage( const KFileItem *fi,
ImageWindow *safeViewer = m_viewer; ImageWindow *safeViewer = m_viewer;
// file->waitForDownload( this ); // file->waitForDownload( this );
// QString filename; // TQString filename;
// KIO::NetAccess::download(fi->url(), filename, this); // KIO::NetAccess::download(fi->url(), filename, this);
if ( !safeViewer->showNextImage( fi->url() ) ) { if ( !safeViewer->showNextImage( fi->url() ) ) {
@ -631,7 +631,7 @@ void KuickShow::slotTrashCurrentImage(ImageWindow *viewer)
performTrashCurrentImage(viewer); performTrashCurrentImage(viewer);
} }
void KuickShow::performDeleteCurrentImage(QWidget *parent) void KuickShow::performDeleteCurrentImage(TQWidget *tqparent)
{ {
assert(fileWidget != 0L); assert(fileWidget != 0L);
@ -640,8 +640,8 @@ void KuickShow::performDeleteCurrentImage(QWidget *parent)
list.append (item); list.append (item);
if (KMessageBox::warningContinueCancel( if (KMessageBox::warningContinueCancel(
parent, tqparent,
i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()), i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()),
i18n("Delete File"), i18n("Delete File"),
KStdGuiItem::del(), KStdGuiItem::del(),
"Kuick_delete_current_image") "Kuick_delete_current_image")
@ -654,7 +654,7 @@ void KuickShow::performDeleteCurrentImage(QWidget *parent)
fileWidget->del(list, false, false); fileWidget->del(list, false, false);
} }
void KuickShow::performTrashCurrentImage(QWidget *parent) void KuickShow::performTrashCurrentImage(TQWidget *tqparent)
{ {
assert(fileWidget != 0L); assert(fileWidget != 0L);
@ -665,8 +665,8 @@ void KuickShow::performTrashCurrentImage(QWidget *parent)
list.append (item); list.append (item);
if (KMessageBox::warningContinueCancel( if (KMessageBox::warningContinueCancel(
parent, tqparent,
i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()), i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()),
i18n("Trash File"), i18n("Trash File"),
KGuiItem(i18n("to trash", "&Trash"),"edittrash"), KGuiItem(i18n("to trash", "&Trash"),"edittrash"),
"Kuick_trash_current_image") "Kuick_trash_current_image")
@ -676,7 +676,7 @@ void KuickShow::performTrashCurrentImage(QWidget *parent)
} }
tryShowNextImage(); tryShowNextImage();
fileWidget->trash(list, parent, false, false); fileWidget->trash(list, tqparent, false, false);
} }
void KuickShow::tryShowNextImage() void KuickShow::tryShowNextImage()
@ -698,7 +698,7 @@ void KuickShow::tryShowNextImage()
if (!haveBrowser()) if (!haveBrowser())
{ {
// ### when simply calling toggleBrowser(), this main window is completely messed up // ### when simply calling toggleBrowser(), this main window is completely messed up
QTimer::singleShot(0, this, SLOT(toggleBrowser())); TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(toggleBrowser()));
} }
m_viewer->deleteLater(); m_viewer->deleteLater();
} }
@ -805,7 +805,7 @@ void KuickShow::slotShowFullscreen()
showImage( fileWidget->getCurrentItem( false ), false, true ); showImage( fileWidget->getCurrentItem( false ), false, true );
} }
void KuickShow::slotDropped( const KFileItem *, QDropEvent *, const KURL::List &urls) void KuickShow::slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &urls)
{ {
KURL::List::ConstIterator it = urls.begin(); KURL::List::ConstIterator it = urls.begin();
for ( ; it != urls.end(); ++it ) for ( ; it != urls.end(); ++it )
@ -855,7 +855,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
} }
if ( FileWidget::isImage( item ) ) { if ( FileWidget::isImage( item ) ) {
// QString filename; // TQString filename;
// KIO::NetAccess::download(item->url(), filename, this); // KIO::NetAccess::download(item->url(), filename, this);
view->showNextImage( item->url() ); view->showNextImage( item->url() );
if (m_slideTimer->isActive() && kdata->slideDelay) if (m_slideTimer->isActive() && kdata->slideDelay)
@ -869,7 +869,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
} }
} }
bool KuickShow::eventFilter( QObject *o, QEvent *e ) bool KuickShow::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( m_delayedRepeatItem ) // we probably need to install an eventFilter over if ( m_delayedRepeatItem ) // we probably need to install an eventFilter over
{ {
@ -878,9 +878,9 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
bool ret = false; bool ret = false;
int eventType = e->type(); int eventType = e->type();
QKeyEvent *k = 0L; TQKeyEvent *k = 0L;
if ( eventType == QEvent::KeyPress ) if ( eventType == TQEvent::KeyPress )
k = static_cast<QKeyEvent *>( e ); k = TQT_TQKEYEVENT( e );
if ( k ) { if ( k ) {
if ( KStdAccel::quit().contains( KKey( k ) ) ) { if ( KStdAccel::quit().contains( KKey( k ) ) ) {
@ -903,11 +903,11 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
// switching images, causing enter- and leaveevents for this // switching images, causing enter- and leaveevents for this
// ImageWindow, leading to the cursor being unhidden. So we simply // ImageWindow, leading to the cursor being unhidden. So we simply
// don't pass those events to KCursor to prevent that. // don't pass those events to KCursor to prevent that.
if ( eventType != QEvent::Leave && eventType != QEvent::Enter ) if ( eventType != TQEvent::Leave && eventType != TQEvent::Enter )
KCursor::autoHideEventFilter( o, e ); KCursor::autoHideEventFilter( o, e );
m_viewer = window; m_viewer = window;
QString img; TQString img;
KFileItem *item = 0L; // the image to be shown KFileItem *item = 0L; // the image to be shown
KFileItem *item_next = 0L; // the image to be cached KFileItem *item_next = 0L; // the image to be cached
@ -925,7 +925,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( key != Key_Escape && key != Key_Shift && key != Key_Alt ) if ( key != Key_Escape && key != Key_Shift && key != Key_Alt )
{ {
KuickFile *file = m_viewer->currentFile(); KuickFile *file = m_viewer->currentFile();
// QFileInfo fi( m_viewer->filename() ); // TQFileInfo fi( m_viewer->filename() );
// start.setPath( fi.dirPath( true ) ); // start.setPath( fi.dirPath( true ) );
initGUI( file->url().upURL() ); initGUI( file->url().upURL() );
@ -952,7 +952,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( fileWidget->dirLister()->rootItem() ) if ( fileWidget->dirLister()->rootItem() )
{ {
fileWidget->setCurrentItem( file->url().fileName() ); fileWidget->setCurrentItem( file->url().fileName() );
QTimer::singleShot( 0, this, SLOT( slotReplayEvent())); TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( slotReplayEvent()));
} }
else // finished, but no root-item -- probably an error, kill repeat-item! else // finished, but no root-item -- probably an error, kill repeat-item!
{ {
@ -962,8 +962,8 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
else // not finished yet else // not finished yet
{ {
fileWidget->setInitialItem( file->url().fileName() ); fileWidget->setInitialItem( file->url().fileName() );
connect( fileWidget, SIGNAL( finished() ), connect( fileWidget, TQT_SIGNAL( finished() ),
SLOT( slotReplayEvent() )); TQT_SLOT( slotReplayEvent() ));
} }
return true; return true;
@ -1018,7 +1018,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( FileWidget::isImage( item ) ) { if ( FileWidget::isImage( item ) ) {
// QString filename; // TQString filename;
// KIO::NetAccess::download(item->url(), filename, this); // KIO::NetAccess::download(item->url(), filename, this);
m_viewer->showNextImage( item->url() ); m_viewer->showNextImage( item->url() );
@ -1034,17 +1034,17 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
// doubleclick closes image window // doubleclick closes image window
// and shows browser when last window closed via doubleclick // and shows browser when last window closed via doubleclick
else if ( eventType == QEvent::MouseButtonDblClick ) else if ( eventType == TQEvent::MouseButtonDblClick )
{ {
QMouseEvent *ev = static_cast<QMouseEvent*>( e ); TQMouseEvent *ev = TQT_TQMOUSEEVENT( e );
if ( ev->button() == LeftButton ) if ( ev->button() == Qt::LeftButton )
{ {
if ( s_viewers.count() == 1 ) if ( s_viewers.count() == 1 )
{ {
if ( !fileWidget ) if ( !fileWidget )
{ {
// KURL start; // KURL start;
// QFileInfo fi( window->filename() ); // TQFileInfo fi( window->filename() );
// start.setPath( fi.dirPath( true ) ); // start.setPath( fi.dirPath( true ) );
initGUI( window->currentFile()->url().fileName() ); initGUI( window->currentFile()->url().fileName() );
} }
@ -1072,8 +1072,8 @@ void KuickShow::configuration()
{ {
if ( !m_accel ) { if ( !m_accel ) {
KURL start; KURL start;
start.setPath( QDir::homeDirPath() ); start.setPath( TQDir::homeDirPath() );
initGUI( KURL::fromPathOrURL( QDir::homeDirPath() ) ); initGUI( KURL::fromPathOrURL( TQDir::homeDirPath() ) );
} }
dialog = new KuickConfigDialog( fileWidget->actionCollection(), 0L, dialog = new KuickConfigDialog( fileWidget->actionCollection(), 0L,
@ -1081,12 +1081,12 @@ void KuickShow::configuration()
dialog->resize( 540, 510 ); dialog->resize( 540, 510 );
dialog->setIcon( kapp->miniIcon() ); dialog->setIcon( kapp->miniIcon() );
connect( dialog, SIGNAL( okClicked() ), connect( dialog, TQT_SIGNAL( okClicked() ),
this, SLOT( slotConfigApplied() ) ); TQT_TQOBJECT(this), TQT_SLOT( slotConfigApplied() ) );
connect( dialog, SIGNAL( applyClicked() ), connect( dialog, TQT_SIGNAL( applyClicked() ),
this, SLOT( slotConfigApplied() ) ); TQT_TQOBJECT(this), TQT_SLOT( slotConfigApplied() ) );
connect( dialog, SIGNAL( finished() ), connect( dialog, TQT_SIGNAL( finished() ),
this, SLOT( slotConfigClosed() ) ); TQT_TQOBJECT(this), TQT_SLOT( slotConfigClosed() ) );
fileWidget->actionCollection()->action( "kuick_configure" )->setEnabled( false ); fileWidget->actionCollection()->action( "kuick_configure" )->setEnabled( false );
dialog->show(); dialog->show();
@ -1101,7 +1101,7 @@ void KuickShow::slotConfigApplied()
kdata->save(); kdata->save();
ImageWindow *viewer; ImageWindow *viewer;
QValueListIterator<ImageWindow*> it = s_viewers.begin(); TQValueListIterator<ImageWindow*> it = s_viewers.begin();
while ( it != s_viewers.end() ) { while ( it != s_viewers.end() ) {
viewer = *it; viewer = *it;
viewer->updateActions(); viewer->updateActions();
@ -1129,12 +1129,12 @@ void KuickShow::about()
KDialog::centerOnScreen( aboutWidget ); KDialog::centerOnScreen( aboutWidget );
#else #else
// Not fixed because it must be dead code now. // Not fixed because it must be dead code now.
QDesktopWidget *desktop = QApplication::desktop(); TQDesktopWidget *desktop = TQApplication::desktop();
int screen = desktop->screenNumber( aboutWidget ); int screen = desktop->screenNumber( aboutWidget );
if ( screen == -1 ) if ( screen == -1 )
screen = desktop->primaryScreen(); screen = desktop->primaryScreen();
QRect r = desktop->screenGeometry( screen ); TQRect r = desktop->screenGeometry( screen );
aboutWidget->move( r.center().x() - aboutWidget->width()/2, aboutWidget->move( r.center().x() - aboutWidget->width()/2,
r.center().y() - aboutWidget->height()/2 ); r.center().y() - aboutWidget->height()/2 );
#endif #endif
@ -1146,15 +1146,15 @@ void KuickShow::about()
void KuickShow::readProperties( KConfig *kc ) void KuickShow::readProperties( KConfig *kc )
{ {
assert( fileWidget ); // from SM, we should always have initGUI on startup assert( fileWidget ); // from SM, we should always have initGUI on startup
QString dir = kc->readPathEntry( "CurrentDirectory" ); TQString dir = kc->readPathEntry( "CurrentDirectory" );
if ( !dir.isEmpty() ) { if ( !dir.isEmpty() ) {
fileWidget->setURL( KURL::fromPathOrURL( dir ), true ); fileWidget->setURL( KURL::fromPathOrURL( dir ), true );
fileWidget->clearHistory(); fileWidget->clearHistory();
} }
const KURL& listedURL = fileWidget->url(); const KURL& listedURL = fileWidget->url();
QStringList images = kc->readPathListEntry( "Images shown" ); TQStringList images = kc->readPathListEntry( "Images shown" );
QStringList::Iterator it; TQStringList::Iterator it;
bool hasCurrentURL = false; bool hasCurrentURL = false;
for ( it = images.begin(); it != images.end(); ++it ) { for ( it = images.begin(); it != images.end(); ++it ) {
@ -1179,8 +1179,8 @@ void KuickShow::saveProperties( KConfig *kc )
if (fileWidget) if (fileWidget)
kc->writePathEntry( "CurrentDirectory", fileWidget->url().url() ); kc->writePathEntry( "CurrentDirectory", fileWidget->url().url() );
QStringList urls; TQStringList urls;
QValueListIterator<ImageWindow*> it; TQValueListIterator<ImageWindow*> it;
for ( it = s_viewers.begin(); it != s_viewers.end(); ++it ) for ( it = s_viewers.begin(); it != s_viewers.end(); ++it )
{ {
const KURL& url = (*it)->currentFile()->url(); const KURL& url = (*it)->currentFile()->url();
@ -1212,7 +1212,7 @@ void KuickShow::saveSettings()
} }
void KuickShow::messageCantLoadImage( const KuickFile *, const QString& message ) void KuickShow::messageCantLoadImage( const KuickFile *, const TQString& message )
{ {
m_viewer->clearFocus(); m_viewer->clearFocus();
KMessageBox::information( m_viewer, message, i18n("Error"), "kuick_cant_load_image" ); KMessageBox::information( m_viewer, message, i18n("Error"), "kuick_cant_load_image" );
@ -1229,7 +1229,7 @@ void KuickShow::initImlib()
initImlibParams( idata, &par ); initImlibParams( idata, &par );
qWarning("*** KuickShow: Whoops, can't initialize imlib, trying my own palettefile now."); qWarning("*** KuickShow: Whoops, can't initialize imlib, trying my own palettefile now.");
QString paletteFile = locate( "data", "kuickshow/im_palette.pal" ); TQString paletteFile = locate( "data", "kuickshow/im_palette.pal" );
// ### - does the qstrdup() cure the segfault in imlib eventually? // ### - does the qstrdup() cure the segfault in imlib eventually?
char *file = qstrdup( paletteFile.local8Bit() ); char *file = qstrdup( paletteFile.local8Bit() );
par.palettefile = file; par.palettefile = file;
@ -1240,7 +1240,7 @@ void KuickShow::initImlib()
id = Imlib_init_with_params( x11Display(), &par ); id = Imlib_init_with_params( x11Display(), &par );
if ( !id ) { if ( !id ) {
QString tmp = i18n("Unable to initialize \"Imlib\".\n" TQString tmp = i18n("Unable to initialize \"Imlib\".\n"
"Start kuickshow from the command line " "Start kuickshow from the command line "
"and look for error messages.\n" "and look for error messages.\n"
"The program will now quit."); "The program will now quit.");
@ -1281,9 +1281,9 @@ bool KuickShow::haveBrowser() const
return fileWidget && fileWidget->isVisible(); return fileWidget && fileWidget->isVisible();
} }
void KuickShow::delayedRepeatEvent( ImageWindow *w, QKeyEvent *e ) void KuickShow::delayedRepeatEvent( ImageWindow *w, TQKeyEvent *e )
{ {
m_delayedRepeatItem = new DelayedRepeatEvent( w, new QKeyEvent( *e ) ); m_delayedRepeatItem = new DelayedRepeatEvent( w, new TQKeyEvent( *e ) );
} }
void KuickShow::abortDelayedEvent() void KuickShow::abortDelayedEvent()
@ -1294,19 +1294,19 @@ void KuickShow::abortDelayedEvent()
void KuickShow::slotReplayEvent() void KuickShow::slotReplayEvent()
{ {
disconnect( fileWidget, SIGNAL( finished() ), disconnect( fileWidget, TQT_SIGNAL( finished() ),
this, SLOT( slotReplayEvent() )); TQT_TQOBJECT(this), TQT_SLOT( slotReplayEvent() ));
DelayedRepeatEvent *e = m_delayedRepeatItem; DelayedRepeatEvent *e = m_delayedRepeatItem;
m_delayedRepeatItem = 0L; // otherwise, eventFilter aborts m_delayedRepeatItem = 0L; // otherwise, eventFilter aborts
eventFilter( e->viewer, e->event ); eventFilter( TQT_TQOBJECT(e->viewer), TQT_TQEVENT(e->event) );
delete e; delete e;
// ### WORKAROUND for QIconView bug in Qt <= 3.0.3 at least // ### WORKAROUND for TQIconView bug in TQt <= 3.0.3 at least
if ( fileWidget && fileWidget->view() ) { if ( fileWidget && fileWidget->view() ) {
QWidget *widget = fileWidget->view()->widget(); TQWidget *widget = fileWidget->view()->widget();
if ( widget->inherits( "QIconView" ) || widget->child(0, "QIconView" ) ){ if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) || widget->child(0, TQICONVIEW_OBJECT_NAME_STRING ) ){
fileWidget->setSorting( fileWidget->sorting() ); fileWidget->setSorting( fileWidget->sorting() );
} }
} }
@ -1315,12 +1315,12 @@ void KuickShow::slotReplayEvent()
void KuickShow::replayAdvance(DelayedRepeatEvent *event) void KuickShow::replayAdvance(DelayedRepeatEvent *event)
{ {
// ### WORKAROUND for QIconView bug in Qt <= 3.0.3 at least // ### WORKAROUND for TQIconView bug in TQt <= 3.0.3 at least
// Sigh. According to qt-bugs, they won't fix this bug ever. So you can't // Sigh. According to qt-bugs, they won't fix this bug ever. So you can't
// rely on sorting to be correct before the QIconView has been show()n. // rely on sorting to be correct before the TQIconView has been show()n.
if ( fileWidget && fileWidget->view() ) { if ( fileWidget && fileWidget->view() ) {
QWidget *widget = fileWidget->view()->widget(); TQWidget *widget = fileWidget->view()->widget();
if ( widget->inherits( "QIconView" ) || widget->child(0, "QIconView" ) ){ if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) || widget->child(0, TQICONVIEW_OBJECT_NAME_STRING ) ){
fileWidget->setSorting( fileWidget->sorting() ); fileWidget->setSorting( fileWidget->sorting() );
} }
} }
@ -1337,7 +1337,7 @@ void KuickShow::delayAction(DelayedRepeatEvent *event)
m_delayedRepeatItem = event; m_delayedRepeatItem = event;
KURL url = event->viewer->currentFile()->url(); KURL url = event->viewer->currentFile()->url();
// QFileInfo fi( event->viewer->filename() ); // TQFileInfo fi( event->viewer->filename() );
// start.setPath( fi.dirPath( true ) ); // start.setPath( fi.dirPath( true ) );
initGUI( url.upURL() ); initGUI( url.upURL() );
@ -1346,13 +1346,13 @@ void KuickShow::delayAction(DelayedRepeatEvent *event)
fileWidget->dirLister()->rootItem() ) fileWidget->dirLister()->rootItem() )
{ {
fileWidget->setCurrentItem( url.fileName() ); fileWidget->setCurrentItem( url.fileName() );
QTimer::singleShot( 0, this, SLOT( doReplay())); TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( doReplay()));
} }
else else
{ {
fileWidget->setInitialItem( url.fileName() ); fileWidget->setInitialItem( url.fileName() );
connect( fileWidget, SIGNAL( finished() ), connect( fileWidget, TQT_SIGNAL( finished() ),
SLOT( doReplay() )); TQT_SLOT( doReplay() ));
} }
} }
@ -1361,16 +1361,16 @@ void KuickShow::doReplay()
if (!m_delayedRepeatItem) if (!m_delayedRepeatItem)
return; return;
disconnect( fileWidget, SIGNAL( finished() ), disconnect( fileWidget, TQT_SIGNAL( finished() ),
this, SLOT( doReplay() )); TQT_TQOBJECT(this), TQT_SLOT( doReplay() ));
switch (m_delayedRepeatItem->action) switch (m_delayedRepeatItem->action)
{ {
case DelayedRepeatEvent::DeleteCurrentFile: case DelayedRepeatEvent::DeleteCurrentFile:
performDeleteCurrentImage((QWidget *) m_delayedRepeatItem->data); performDeleteCurrentImage((TQWidget *) m_delayedRepeatItem->data);
break; break;
case DelayedRepeatEvent::TrashCurrentFile: case DelayedRepeatEvent::TrashCurrentFile:
performTrashCurrentImage((QWidget *) m_delayedRepeatItem->data); performTrashCurrentImage((TQWidget *) m_delayedRepeatItem->data);
break; break;
case DelayedRepeatEvent::AdvanceViewer: case DelayedRepeatEvent::AdvanceViewer:
replayAdvance(m_delayedRepeatItem); replayAdvance(m_delayedRepeatItem);
@ -1401,11 +1401,11 @@ void KuickShow::toggleBrowser()
void KuickShow::slotOpenURL() void KuickShow::slotOpenURL()
{ {
KFileDialog dlg(QString::null, kdata->fileFilter, this, "filedialog", true); KFileDialog dlg(TQString(), kdata->fileFilter, this, "filedialog", true);
dlg.setMode( KFile::Files | KFile::Directory ); dlg.setMode( KFile::Files | KFile::Directory );
dlg.setCaption( i18n("Select Files or Folder to Open") ); dlg.setCaption( i18n("Select Files or Folder to Open") );
if ( dlg.exec() == QDialog::Accepted ) if ( dlg.exec() == TQDialog::Accepted )
{ {
KURL::List urls = dlg.selectedURLs(); KURL::List urls = dlg.selectedURLs();
KURL::List::ConstIterator it = urls.begin(); KURL::List::ConstIterator it = urls.begin();
@ -1422,9 +1422,9 @@ void KuickShow::slotOpenURL()
void KuickShow::deleteAllViewers() void KuickShow::deleteAllViewers()
{ {
QValueListIterator<ImageWindow*> it = s_viewers.begin(); TQValueListIterator<ImageWindow*> it = s_viewers.begin();
for ( ; it != s_viewers.end(); ++it ) { for ( ; it != s_viewers.end(); ++it ) {
(*it)->disconnect( SIGNAL( destroyed() ), this, SLOT( viewerDeleted() )); (*it)->disconnect( TQT_SIGNAL( destroyed() ), TQT_TQOBJECT(this), TQT_SLOT( viewerDeleted() ));
(*it)->close( true ); (*it)->close( true );
} }

@ -19,10 +19,10 @@
#ifndef KUICKSHOW_H #ifndef KUICKSHOW_H
#define KUICKSHOW_H #define KUICKSHOW_H
#include <qevent.h> #include <tqevent.h>
#include <qguardedptr.h> #include <tqguardedptr.h>
#include <qstring.h> #include <tqstring.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kfileitem.h> #include <kfileitem.h>
#include <kmainwindow.h> #include <kmainwindow.h>
@ -50,7 +50,7 @@ class KuickFile;
class DelayedRepeatEvent class DelayedRepeatEvent
{ {
public: public:
DelayedRepeatEvent( ImageWindow *view, QKeyEvent *ev ) { DelayedRepeatEvent( ImageWindow *view, TQKeyEvent *ev ) {
viewer = view; viewer = view;
event = ev; event = ev;
} }
@ -73,7 +73,7 @@ public:
}; };
ImageWindow *viewer; ImageWindow *viewer;
QKeyEvent *event; TQKeyEvent *event;
int action; int action;
void *data; void *data;
}; };
@ -82,13 +82,14 @@ public:
class KuickShow : public KMainWindow class KuickShow : public KMainWindow
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
KuickShow( const char *name=0 ); KuickShow( const char *name=0 );
~KuickShow(); ~KuickShow();
virtual void show(); virtual void show();
static QValueList<ImageWindow*> s_viewers; static TQValueList<ImageWindow*> s_viewers;
// overridden to make KDCOPActionProxy work -- all our actions are not // overridden to make KDCOPActionProxy work -- all our actions are not
// in the mainwindow's collection, but in the filewidget's. // in the mainwindow's collection, but in the filewidget's.
@ -106,7 +107,7 @@ private slots:
void slotPrint(); void slotPrint();
void slotConfigApplied(); void slotConfigApplied();
void slotConfigClosed(); void slotConfigClosed();
void messageCantLoadImage( const KuickFile * file, const QString& message); void messageCantLoadImage( const KuickFile * file, const TQString& message);
bool showImage(const KFileItem *, bool newWindow = false, bool showImage(const KFileItem *, bool newWindow = false,
bool fullscreen = false, bool moveToTopLeft = true ); bool fullscreen = false, bool moveToTopLeft = true );
void showFileItem( ImageWindow *, const KFileItem * ); void showFileItem( ImageWindow *, const KFileItem * );
@ -120,7 +121,7 @@ private slots:
void nextSlide(); void nextSlide();
void nextSlide( KFileItem *item ); void nextSlide( KFileItem *item );
void viewerDeleted(); void viewerDeleted();
void slotDropped( const KFileItem *, QDropEvent *, const KURL::List &); void slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &);
void slotSetActiveViewer( ImageWindow *i ) { m_viewer = i; } void slotSetActiveViewer( ImageWindow *i ) { m_viewer = i; }
void slotAdvanceImage( ImageWindow *, int steps ); void slotAdvanceImage( ImageWindow *, int steps );
@ -132,7 +133,7 @@ private slots:
void slotOpenURL(); void slotOpenURL();
void slotSetURL( const KURL& ); void slotSetURL( const KURL& );
void slotURLComboReturnPressed(); void slotURLComboReturnPressed();
// void invalidateImages( const KFileItemList& items ); // void tqinvalidateImages( const KFileItemList& items );
void slotDeleteCurrentImage(ImageWindow *viewer); void slotDeleteCurrentImage(ImageWindow *viewer);
void slotTrashCurrentImage(ImageWindow *viewer); void slotTrashCurrentImage(ImageWindow *viewer);
void slotDeleteCurrentImage(); void slotDeleteCurrentImage();
@ -142,12 +143,12 @@ private slots:
private: private:
void initGUI( const KURL& startDir ); void initGUI( const KURL& startDir );
bool eventFilter( QObject *, QEvent * ); bool eventFilter( TQObject *, TQEvent * );
void initImlib(); void initImlib();
void saveProperties( KConfig * ); void saveProperties( KConfig * );
void saveSettings(); void saveSettings();
bool haveBrowser() const; bool haveBrowser() const;
void delayedRepeatEvent( ImageWindow *, QKeyEvent * ); void delayedRepeatEvent( ImageWindow *, TQKeyEvent * );
void abortDelayedEvent(); void abortDelayedEvent();
void deleteAllViewers(); void deleteAllViewers();
void redirectDeleteAndTrashActions(KActionCollection *coll); void redirectDeleteAndTrashActions(KActionCollection *coll);
@ -155,8 +156,8 @@ private:
void delayAction(DelayedRepeatEvent *event); void delayAction(DelayedRepeatEvent *event);
void replayAdvance(DelayedRepeatEvent *event); void replayAdvance(DelayedRepeatEvent *event);
void performDeleteCurrentImage(QWidget *parent); void performDeleteCurrentImage(TQWidget *tqparent);
void performTrashCurrentImage(QWidget *parent); void performTrashCurrentImage(TQWidget *tqparent);
uint viewItem, renameItem, deleteItem, printItem; uint viewItem, renameItem, deleteItem, printItem;
uint m_slideshowCycle; uint m_slideshowCycle;
@ -169,10 +170,10 @@ private:
KToggleAction *oneWindowAction; KToggleAction *oneWindowAction;
KAccel *m_accel; KAccel *m_accel;
DelayedRepeatEvent *m_delayedRepeatItem; DelayedRepeatEvent *m_delayedRepeatItem;
QTimer *m_slideTimer; TQTimer *m_slideTimer;
bool m_slideShowStopped; bool m_slideShowStopped;
KToggleAction *m_toggleBrowserAction; KToggleAction *m_toggleBrowserAction;
QGuardedPtr<AboutWidget> aboutWidget; TQGuardedPtr<AboutWidget> aboutWidget;
}; };
#endif #endif

@ -16,18 +16,18 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qtooltip.h> #include <tqtooltip.h>
#include <kurl.h> #include <kurl.h>
#include <krun.h> #include <krun.h>
#include "kurlwidget.h" #include "kurlwidget.h"
KURLWidget::KURLWidget(const QString& text, QWidget *parent, const char *name) KURLWidget::KURLWidget(const TQString& text, TQWidget *tqparent, const char *name)
: KURLLabel( parent, name ) : KURLLabel( tqparent, name )
{ {
setText( text ); setText( text );
connect( this, SIGNAL( leftClickedURL() ), SLOT( run() )); connect( this, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( run() ));
setUseTips( true ); setUseTips( true );
} }

@ -24,9 +24,10 @@
class KURLWidget : public KURLLabel class KURLWidget : public KURLLabel
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
KURLWidget( const QString& text, QWidget *, const char *name=0 ); KURLWidget( const TQString& text, TQWidget *, const char *name=0 );
protected slots: protected slots:
virtual void run(); virtual void run();

@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qstring.h> #include <tqstring.h>
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kapplication.h> #include <kapplication.h>

@ -21,10 +21,10 @@
#include "mainwidget.h" #include "mainwidget.h"
MainWidget::MainWidget( QString startDir, QWidget *parent, MainWidget::MainWidget( TQString startDir, TQWidget *tqparent,
const char *name ) : QWidget ( parent, name ) const char *name ) : TQWidget ( tqparent, name )
{ {
box = new FileView( startDir, true, (QDir::Dirs | QDir::Files), box = new FileView( startDir, true, (TQDir::Dirs | TQDir::Files),
this, "fileview" ); this, "fileview" );
} }
@ -35,8 +35,8 @@ MainWidget::~MainWidget()
} }
// for now, no layout managers // for now, no tqlayout managers
void MainWidget::resizeEvent( QResizeEvent * ) void MainWidget::resizeEvent( TQResizeEvent * )
{ {
box->resize( width(), height() ); box->resize( width(), height() );
} }

@ -19,24 +19,25 @@
#ifndef MAINWIDGET_H #ifndef MAINWIDGET_H
#define MAINWIDGET_H #define MAINWIDGET_H
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qwidget.h> #include <tqwidget.h>
class FileView; class FileView;
class MainWidget : public QWidget class MainWidget : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
MainWidget( QString, QWidget *parent, const char *name=0L); MainWidget( TQString, TQWidget *tqparent, const char *name=0L);
~MainWidget(); ~MainWidget();
FileView* getFileBox() { return box; } FileView* getFileBox() { return box; }
protected: protected:
virtual void resizeEvent( QResizeEvent * ); virtual void resizeEvent( TQResizeEvent * );
private: private:
FileView *box; FileView *box;

@ -16,19 +16,19 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qfont.h> #include <tqfont.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qgrid.h> #include <tqgrid.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qimage.h> #include <tqimage.h>
#include <kimageeffect.h> #include <kimageeffect.h>
#include <qpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qvbuttongroup.h> #include <tqvbuttongroup.h>
#include <qcolor.h> #include <tqcolor.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <kdialog.h> #include <kdialog.h>
@ -43,23 +43,23 @@
#include "printing.h" #include "printing.h"
#include "version.h" #include "version.h"
bool Printing::printImage( ImageWindow& imageWin, QWidget *parent ) bool Printing::printImage( ImageWindow& imageWin, TQWidget *tqparent )
{ {
QString imageURL = imageWin.url().prettyURL(); TQString imageURL = imageWin.url().prettyURL();
KPrinter printer; KPrinter printer;
printer.setDocName( imageURL ); printer.setDocName( imageURL );
printer.setCreator( "KuickShow-" KUICKSHOWVERSION ); printer.setCreator( "KuickShow-" KUICKSHOWVERSION );
KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page")); KPrinter::addDialogPage( new KuickPrintDialogPage( tqparent, "kuick page"));
if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) ) if ( printer.setup( tqparent, i18n("Print %1").tqarg(printer.docName().section('/', -1)) ) )
{ {
KTempFile tmpFile( QString::null, ".png" ); KTempFile tmpFile( TQString(), ".png" );
if ( tmpFile.status() == 0 ) if ( tmpFile.status() == 0 )
{ {
tmpFile.setAutoDelete( true ); tmpFile.setAutoDelete( true );
if ( imageWin.saveImage( tmpFile.name(), true ) ) if ( imageWin.saveImage( tmpFile.name(), true ) )
return printImageWithQt( tmpFile.name(), printer, return printImageWithTQt( tmpFile.name(), printer,
imageURL ); imageURL );
} }
@ -69,27 +69,27 @@ bool Printing::printImage( ImageWindow& imageWin, QWidget *parent )
return true; // user aborted return true; // user aborted
} }
bool Printing::printImageWithQt( const QString& filename, KPrinter& printer, bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
const QString& originalFileName ) const TQString& originalFileName )
{ {
QImage image( filename ); TQImage image( filename );
if ( image.isNull() ) { if ( image.isNull() ) {
kdWarning() << "Can't load image: " << filename << " for printing.\n"; kdWarning() << "Can't load image: " << filename << " for printing.\n";
return false; return false;
} }
QPainter p; TQPainter p;
p.begin( &printer ); p.begin( &printer );
QPaintDeviceMetrics metrics( &printer ); TQPaintDeviceMetrics metrics( &printer );
p.setFont( KGlobalSettings::generalFont() ); p.setFont( KGlobalSettings::generalFont() );
QFontMetrics fm = p.fontMetrics(); TQFontMetrics fm = p.fontMetrics();
int w = metrics.width(); int w = metrics.width();
int h = metrics.height(); int h = metrics.height();
QString t = "true"; TQString t = "true";
QString f = "false"; TQString f = "false";
// Black & white print? // Black & white print?
if ( printer.option( "app-kuickshow-blackwhite" ) != f) { if ( printer.option( "app-kuickshow-blackwhite" ) != f) {
@ -107,9 +107,9 @@ bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
// shrink image to pagesize, if necessary // shrink image to pagesize, if necessary
// //
bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f); bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f);
QSize imagesize = image.size(); TQSize imagesize = image.size();
if ( shrinkToFit && (image.width() > w || image.height() > h) ) { if ( shrinkToFit && (image.width() > w || image.height() > h) ) {
imagesize.scale( w, h, QSize::ScaleMin ); imagesize.tqscale( w, h, TQSize::ScaleMin );
} }
@ -117,38 +117,38 @@ bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
// align image // align image
// //
bool ok = false; bool ok = false;
int alignment = printer.option("app-kuickshow-alignment").toInt( &ok ); int tqalignment = printer.option("app-kuickshow-tqalignment").toInt( &ok );
if ( !ok ) if ( !ok )
alignment = Qt::AlignCenter; // default tqalignment = TQt::AlignCenter; // default
int x = 0; int x = 0;
int y = 0; int y = 0;
// ### need a GUI for this in KuickPrintDialogPage! // ### need a GUI for this in KuickPrintDialogPage!
// x - alignment // x - tqalignment
if ( alignment & Qt::AlignHCenter ) if ( tqalignment & TQt::AlignHCenter )
x = (w - imagesize.width())/2; x = (w - imagesize.width())/2;
else if ( alignment & Qt::AlignLeft ) else if ( tqalignment & TQt::AlignLeft )
x = 0; x = 0;
else if ( alignment & Qt::AlignRight ) else if ( tqalignment & TQt::AlignRight )
x = w - imagesize.width(); x = w - imagesize.width();
// y - alignment // y - tqalignment
if ( alignment & Qt::AlignVCenter ) if ( tqalignment & TQt::AlignVCenter )
y = (h - imagesize.height())/2; y = (h - imagesize.height())/2;
else if ( alignment & Qt::AlignTop ) else if ( tqalignment & TQt::AlignTop )
y = 0; y = 0;
else if ( alignment & Qt::AlignBottom ) else if ( tqalignment & TQt::AlignBottom )
y = h - imagesize.height(); y = h - imagesize.height();
// //
// perform the actual drawing // perform the actual drawing
// //
p.drawImage( QRect( x, y, imagesize.width(), imagesize.height()), image ); p.drawImage( TQRect( x, y, imagesize.width(), imagesize.height()), image );
if ( printFilename ) if ( printFilename )
{ {
QString fname = minimizeString( originalFileName, fm, w ); TQString fname = minimizeString( originalFileName, fm, w );
if ( !fname.isEmpty() ) if ( !fname.isEmpty() )
{ {
int fw = fm.width( fname ); int fw = fm.width( fname );
@ -163,11 +163,11 @@ bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
return true; return true;
} }
QString Printing::minimizeString( QString text, const QFontMetrics& TQString Printing::minimizeString( TQString text, const TQFontMetrics&
metrics, int maxWidth ) metrics, int maxWidth )
{ {
if ( text.length() <= 5 ) if ( text.length() <= 5 )
return QString::null; // no sense to cut that tiny little string return TQString(); // no sense to cut that tiny little string
bool changed = false; bool changed = false;
while ( metrics.width( text ) > maxWidth ) while ( metrics.width( text ) > maxWidth )
@ -181,9 +181,9 @@ QString Printing::minimizeString( QString text, const QFontMetrics&
{ {
int mid = text.length() / 2; int mid = text.length() / 2;
if ( mid <= 5 ) // sanity check if ( mid <= 5 ) // sanity check
return QString::null; return TQString();
text.replace( mid - 1, 3, "..." ); text.tqreplace( mid - 1, 3, "..." );
} }
return text; return text;
@ -194,42 +194,42 @@ QString Printing::minimizeString( QString text, const QFontMetrics&
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
KuickPrintDialogPage::KuickPrintDialogPage( QWidget *parent, const char *name ) KuickPrintDialogPage::KuickPrintDialogPage( TQWidget *tqparent, const char *name )
: KPrintDialogPage( parent, name ) : KPrintDialogPage( tqparent, name )
{ {
setTitle( i18n("Image Settings") ); setTitle( i18n("Image Settings") );
QVBoxLayout *layout = new QVBoxLayout( this ); TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
layout->setMargin( KDialog::marginHint() ); tqlayout->setMargin( KDialog::marginHint() );
layout->setSpacing( KDialog::spacingHint() ); tqlayout->setSpacing( KDialog::spacingHint() );
m_addFileName = new QCheckBox( i18n("Print fi&lename below image"), this); m_addFileName = new TQCheckBox( i18n("Print fi&lename below image"), this);
m_addFileName->setChecked( true ); m_addFileName->setChecked( true );
layout->addWidget( m_addFileName ); tqlayout->addWidget( m_addFileName );
m_blackwhite = new QCheckBox ( i18n("Print image in &black and white"), this); m_blackwhite = new TQCheckBox ( i18n("Print image in &black and white"), this);
m_blackwhite->setChecked( false ); m_blackwhite->setChecked( false );
layout->addWidget (m_blackwhite ); tqlayout->addWidget (m_blackwhite );
QVButtonGroup *group = new QVButtonGroup( i18n("Scaling"), this ); TQVButtonGroup *group = new TQVButtonGroup( i18n("Scaling"), this );
group->setRadioButtonExclusive( true ); group->setRadioButtonExclusive( true );
layout->addWidget( group ); tqlayout->addWidget( group );
// m_shrinkToFit = new QRadioButton( i18n("Shrink image to &fit, if necessary"), group ); // m_shrinkToFit = new TQRadioButton( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit = new QCheckBox( i18n("Shrink image to &fit, if necessary"), group ); m_shrinkToFit = new TQCheckBox( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit->setChecked( true ); m_shrinkToFit->setChecked( true );
QWidget *widget = new QWidget( group ); TQWidget *widget = new TQWidget( group );
QGridLayout *grid = new QGridLayout( widget, 3, 3 ); TQGridLayout *grid = new TQGridLayout( widget, 3, 3 );
grid->addColSpacing( 0, 30 ); grid->addColSpacing( 0, 30 );
grid->setColStretch( 0, 0 ); grid->setColStretch( 0, 0 );
grid->setColStretch( 1, 1 ); grid->setColStretch( 1, 1 );
grid->setColStretch( 2, 10 ); grid->setColStretch( 2, 10 );
m_scale = new QRadioButton( i18n("Print e&xact size: "), widget ); m_scale = new TQRadioButton( i18n("Print e&xact size: "), widget );
m_scale->setEnabled( false ); // ### m_scale->setEnabled( false ); // ###
grid->addMultiCellWidget( m_scale, 0, 0, 0, 1 ); grid->addMultiCellWidget( m_scale, 0, 0, 0, 1 );
group->insert( m_scale ); group->insert( m_scale );
connect( m_scale, SIGNAL( toggled( bool )), SLOT( toggleScaling( bool ))); connect( m_scale, TQT_SIGNAL( toggled( bool )), TQT_SLOT( toggleScaling( bool )));
m_units = new KComboBox( false, widget, "unit combobox" ); m_units = new KComboBox( false, widget, "unit combobox" );
grid->addWidget( m_units, 0, 2, AlignLeft ); grid->addWidget( m_units, 0, 2, AlignLeft );
@ -252,26 +252,26 @@ KuickPrintDialogPage::~KuickPrintDialogPage()
{ {
} }
void KuickPrintDialogPage::getOptions( QMap<QString,QString>& opts, void KuickPrintDialogPage::getOptions( TQMap<TQString,TQString>& opts,
bool /*incldef*/ ) bool /*incldef*/ )
{ {
QString t = "true"; TQString t = "true";
QString f = "false"; TQString f = "false";
// ### opts["app-kuickshow-alignment"] = ; // ### opts["app-kuickshow-tqalignment"] = ;
opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f; opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f;
opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f; opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f;
opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f; opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f;
opts["app-kuickshow-scale"] = m_scale->isChecked() ? t : f; opts["app-kuickshow-scale"] = m_scale->isChecked() ? t : f;
opts["app-kuickshow-scale-unit"] = m_units->currentText(); opts["app-kuickshow-scale-unit"] = m_units->currentText();
opts["app-kuickshow-scale-width-pixels"] = QString::number( scaleWidth() ); opts["app-kuickshow-scale-width-pixels"] = TQString::number( scaleWidth() );
opts["app-kuickshow-scale-height-pixels"] = QString::number( scaleHeight() ); opts["app-kuickshow-scale-height-pixels"] = TQString::number( scaleHeight() );
} }
void KuickPrintDialogPage::setOptions( const QMap<QString,QString>& opts ) void KuickPrintDialogPage::setOptions( const TQMap<TQString,TQString>& opts )
{ {
QString t = "true"; TQString t = "true";
QString f = "false"; TQString f = "false";
m_addFileName->setChecked( opts["app-kuickshow-printFilename"] != f ); m_addFileName->setChecked( opts["app-kuickshow-printFilename"] != f );
// This sound strange, but if I copy the code on the line above, the checkbox // This sound strange, but if I copy the code on the line above, the checkbox

@ -19,13 +19,13 @@
#ifndef PRINTING_H #ifndef PRINTING_H
#define PRINTING_H #define PRINTING_H
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qstring.h> #include <tqstring.h>
#include <kdeprint/kprintdialogpage.h> #include <kdeprint/kprintdialogpage.h>
class QCheckBox; class TQCheckBox;
class QRadioButton; class TQRadioButton;
class KComboBox; class KComboBox;
class KPrinter; class KPrinter;
class KIntNumInput; class KIntNumInput;
@ -36,13 +36,13 @@ class ImageWindow;
class Printing class Printing
{ {
public: public:
static bool printImage( ImageWindow& imageWin, QWidget *parent = 0L); static bool printImage( ImageWindow& imageWin, TQWidget *tqparent = 0L);
static bool printImageWithQt( const QString& filename, KPrinter& printer, static bool printImageWithTQt( const TQString& filename, KPrinter& printer,
const QString& originalFileName ); const TQString& originalFileName );
private: private:
static void addConfigPages(); static void addConfigPages();
static QString minimizeString( QString text, const QFontMetrics& metrics, static TQString minimizeString( TQString text, const TQFontMetrics& metrics,
int maxWidth ); int maxWidth );
}; };
@ -50,13 +50,14 @@ private:
class KuickPrintDialogPage : public KPrintDialogPage class KuickPrintDialogPage : public KPrintDialogPage
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
KuickPrintDialogPage( QWidget *parent = 0L, const char *name = 0 ); KuickPrintDialogPage( TQWidget *tqparent = 0L, const char *name = 0 );
~KuickPrintDialogPage(); ~KuickPrintDialogPage();
virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false); virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
virtual void setOptions(const QMap<QString,QString>& opts); virtual void setOptions(const TQMap<TQString,TQString>& opts);
private slots: private slots:
void toggleScaling( bool enable ); void toggleScaling( bool enable );
@ -72,13 +73,13 @@ private:
int fromUnitToPixels( float val ) const; int fromUnitToPixels( float val ) const;
float pixelsToUnit( int pixels ) const; float pixelsToUnit( int pixels ) const;
QCheckBox *m_shrinkToFit; TQCheckBox *m_shrinkToFit;
QRadioButton *m_scale; TQRadioButton *m_scale;
KIntNumInput *m_width; KIntNumInput *m_width;
KIntNumInput *m_height; KIntNumInput *m_height;
KComboBox *m_units; KComboBox *m_units;
QCheckBox *m_addFileName; TQCheckBox *m_addFileName;
QCheckBox *m_blackwhite; TQCheckBox *m_blackwhite;
}; };

@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
@ -26,16 +26,16 @@
#include "slideshowwidget.h" #include "slideshowwidget.h"
SlideShowWidget::SlideShowWidget( QWidget *parent, const char *name ) SlideShowWidget::SlideShowWidget( TQWidget *tqparent, const char *name )
: QWidget( parent, name ) : TQWidget( tqparent, name )
{ {
// setTitle( i18n("Slideshow") ); // setTitle( i18n("Slideshow") );
QVBoxLayout *layout = new QVBoxLayout( this ); TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() ); tqlayout->setSpacing( KDialog::spacingHint() );
m_fullScreen = new QCheckBox( i18n("Switch to &full-screen"), this ); m_fullScreen = new TQCheckBox( i18n("Switch to &full-screen"), this );
m_startWithCurrent = new QCheckBox( i18n("S&tart with current image"), this); m_startWithCurrent = new TQCheckBox( i18n("S&tart with current image"), this);
m_delayTime = new KIntNumInput( this, "delay time" ); m_delayTime = new KIntNumInput( this, "delay time" );
m_delayTime->setLabel( i18n("De&lay between slides:") ); m_delayTime->setLabel( i18n("De&lay between slides:") );
@ -48,11 +48,11 @@ SlideShowWidget::SlideShowWidget( QWidget *parent, const char *name )
m_cycles->setSpecialValueText( i18n("infinite") ); m_cycles->setSpecialValueText( i18n("infinite") );
m_cycles->setRange( 0, 500 ); m_cycles->setRange( 0, 500 );
layout->addWidget( m_fullScreen ); tqlayout->addWidget( m_fullScreen );
layout->addWidget( m_startWithCurrent ); tqlayout->addWidget( m_startWithCurrent );
layout->addWidget( m_delayTime ); tqlayout->addWidget( m_delayTime );
layout->addWidget( m_cycles ); tqlayout->addWidget( m_cycles );
layout->addStretch( 1 ); tqlayout->addStretch( 1 );
loadSettings( *kdata ); loadSettings( *kdata );
} }

@ -21,14 +21,15 @@
#include "kuickdata.h" #include "kuickdata.h"
class QCheckBox; class TQCheckBox;
class KIntNumInput; class KIntNumInput;
class SlideShowWidget : public QWidget class SlideShowWidget : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SlideShowWidget( QWidget *parent, const char *name ); SlideShowWidget( TQWidget *tqparent, const char *name );
~SlideShowWidget(); ~SlideShowWidget();
virtual void loadSettings( const KuickData& data ); virtual void loadSettings( const KuickData& data );
@ -37,8 +38,8 @@ public:
private: private:
KIntNumInput *m_delayTime; KIntNumInput *m_delayTime;
KIntNumInput *m_cycles; KIntNumInput *m_cycles;
QCheckBox *m_fullScreen; TQCheckBox *m_fullScreen;
QCheckBox *m_startWithCurrent; TQCheckBox *m_startWithCurrent;
}; };
#endif // SLIDESHOWWIDGET_H #endif // SLIDESHOWWIDGET_H

Loading…
Cancel
Save