summaryrefslogtreecommitdiffstats
path: root/style
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-03-10 17:53:54 +0200
committerMavridis Philippe <mavridisf@gmail.com>2024-03-10 17:53:54 +0200
commit7f408ad635a5e2a7829db68c19e51a295d55b9d1 (patch)
treea494c34a4c7a10d114a6b95fc4216f3eabce4e81 /style
downloadtde-style-polyester-7f408ad635a5e2a7829db68c19e51a295d55b9d1.tar.gz
tde-style-polyester-7f408ad635a5e2a7829db68c19e51a295d55b9d1.zip
Imported from Pling
Diffstat (limited to 'style')
-rwxr-xr-xstyle/Makefile.am21
-rw-r--r--style/Makefile.in903
-rw-r--r--style/config/Makefile.am12
-rw-r--r--style/config/Makefile.in787
-rw-r--r--style/config/configdialog.cpp987
-rw-r--r--style/config/configdialog.ui1616
-rwxr-xr-xstyle/config/polyesterconf.cpp392
-rwxr-xr-xstyle/config/polyesterconf.h103
-rwxr-xr-xstyle/misc.cpp38
-rwxr-xr-xstyle/misc.h24
-rwxr-xr-xstyle/polyester.cpp4786
-rwxr-xr-xstyle/polyester.h438
-rwxr-xr-xstyle/polyester.themerc7
13 files changed, 10114 insertions, 0 deletions
diff --git a/style/Makefile.am b/style/Makefile.am
new file mode 100755
index 0000000..47292a3
--- /dev/null
+++ b/style/Makefile.am
@@ -0,0 +1,21 @@
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = config
+
+KDE_CXXFLAGS = -DQT_PLUGIN
+
+METASOURCES = AUTO
+
+INCLUDES = $(all_includes)
+
+stylercdir = $(kde_datadir)/kstyle/themes
+stylerc_DATA = polyester.themerc
+
+EXTRA_DIST = $(stylerc_DATA)
+
+noinst_HEADERS = polyester.h misc.h
+
+kde_style_LTLIBRARIES = polyester.la
+polyester_la_SOURCES = polyester.cpp misc.cpp
+polyester_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+polyester_la_LIBADD = -lkdefx
diff --git a/style/Makefile.in b/style/Makefile.in
new file mode 100644
index 0000000..b078e29
--- /dev/null
+++ b/style/Makefile.in
@@ -0,0 +1,903 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = style
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(kde_styledir)" \
+ "$(DESTDIR)$(stylercdir)"
+kde_styleLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(kde_style_LTLIBRARIES)
+polyester_la_DEPENDENCIES =
+am_polyester_la_OBJECTS = polyester.lo misc.lo
+#>- polyester_la_OBJECTS = $(am_polyester_la_OBJECTS)
+#>+ 4
+polyester_la_final_OBJECTS = polyester_la.all_cpp.lo
+polyester_la_nofinal_OBJECTS = polyester.lo misc.lo
+@KDE_USE_FINAL_FALSE@polyester_la_OBJECTS = $(polyester_la_nofinal_OBJECTS)
+@KDE_USE_FINAL_TRUE@polyester_la_OBJECTS = $(polyester_la_final_OBJECTS)
+#>- polyester_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+#>- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(polyester_la_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 3
+polyester_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(polyester_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+#>- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+#>- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+#>- $(LDFLAGS) -o $@
+#>+ 3
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(polyester_la_SOURCES)
+DIST_SOURCES = $(polyester_la_SOURCES)
+#>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+#>- html-recursive info-recursive install-data-recursive \
+#>- install-dvi-recursive install-exec-recursive \
+#>- install-html-recursive install-info-recursive \
+#>- install-pdf-recursive install-ps-recursive install-recursive \
+#>- installcheck-recursive installdirs-recursive pdf-recursive \
+#>- ps-recursive uninstall-recursive
+#>+ 7
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive nmcheck-recursive bcheck-recursive
+stylercDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(stylerc_DATA)
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = config
+KDE_CXXFLAGS = -DQT_PLUGIN
+#>- METASOURCES = AUTO
+INCLUDES = $(all_includes)
+stylercdir = $(kde_datadir)/kstyle/themes
+stylerc_DATA = polyester.themerc
+EXTRA_DIST = $(stylerc_DATA)
+noinst_HEADERS = polyester.h misc.h
+kde_style_LTLIBRARIES = polyester.la
+polyester_la_SOURCES = polyester.cpp misc.cpp
+polyester_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+polyester_la_LIBADD = -lkdefx
+#>- all: all-recursive
+#>+ 1
+all: docs-am all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign style/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --foreign style/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign style/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign style/Makefile
+ cd $(top_srcdir) && perl admin/am_edit -padmin style/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-kde_styleLTLIBRARIES: $(kde_style_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(kde_styledir)" || $(MKDIR_P) "$(DESTDIR)$(kde_styledir)"
+ @list='$(kde_style_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(kde_styleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(kde_styledir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(kde_styleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(kde_styledir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-kde_styleLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(kde_style_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(kde_styledir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(kde_styledir)/$$p"; \
+ done
+
+clean-kde_styleLTLIBRARIES:
+ -test -z "$(kde_style_LTLIBRARIES)" || rm -f $(kde_style_LTLIBRARIES)
+ @list='$(kde_style_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+polyester.la: $(polyester_la_OBJECTS) $(polyester_la_DEPENDENCIES)
+ $(polyester_la_LINK) -rpath $(kde_styledir) $(polyester_la_OBJECTS) $(polyester_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyester.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-stylercDATA: $(stylerc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(stylercdir)" || $(MKDIR_P) "$(DESTDIR)$(stylercdir)"
+ @list='$(stylerc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(stylercDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(stylercdir)/$$f'"; \
+ $(stylercDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(stylercdir)/$$f"; \
+ done
+
+uninstall-stylercDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(stylerc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(stylercdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(stylercdir)/$$f"; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(kde_styledir)" "$(DESTDIR)$(stylercdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#>- clean: clean-recursive
+#>+ 1
+clean: kde-rpo-clean clean-recursive
+
+#>- clean-am: clean-generic clean-kde_styleLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-metasources clean-bcheck clean-final clean-generic clean-kde_styleLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-kde_styleLTLIBRARIES install-stylercDATA
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-kde_styleLTLIBRARIES uninstall-stylercDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic \
+ clean-kde_styleLTLIBRARIES clean-libtool ctags ctags-recursive \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-kde_styleLTLIBRARIES install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip install-stylercDATA installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-kde_styleLTLIBRARIES uninstall-stylercDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+
+#>+ 3
+polyester.moc: $(srcdir)/polyester.h
+ $(MOC) $(srcdir)/polyester.h -o polyester.moc
+
+#>+ 2
+mocs: polyester.moc
+
+#>+ 3
+clean-metasources:
+ -rm -f polyester.moc
+
+#>+ 2
+KDE_DIST=polyester.themerc Makefile.in Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign style/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign style/Makefile
+ cd $(top_srcdir) && perl admin/am_edit -padmin style/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-recursive
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 11
+polyester_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/polyester.cpp $(srcdir)/misc.cpp polyester.moc
+ @echo 'creating polyester_la.all_cpp.cpp ...'; \
+ rm -f polyester_la.all_cpp.files polyester_la.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> polyester_la.all_cpp.final; \
+ for file in polyester.cpp misc.cpp ; do \
+ echo "#include \"$$file\"" >> polyester_la.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> polyester_la.all_cpp.final; \
+ done; \
+ cat polyester_la.all_cpp.final polyester_la.all_cpp.files > polyester_la.all_cpp.cpp; \
+ rm -f polyester_la.all_cpp.final polyester_la.all_cpp.files
+
+#>+ 3
+clean-final:
+ -rm -f polyester_la.all_cpp.cpp
+
+#>+ 3
+final:
+ $(MAKE) polyester_la_OBJECTS="$(polyester_la_final_OBJECTS)" all-am
+
+#>+ 3
+final-install:
+ $(MAKE) polyester_la_OBJECTS="$(polyester_la_final_OBJECTS)" install-am
+
+#>+ 3
+no-final:
+ $(MAKE) polyester_la_OBJECTS="$(polyester_la_nofinal_OBJECTS)" all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) polyester_la_OBJECTS="$(polyester_la_nofinal_OBJECTS)" install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 5
+nmcheck:
+polyester.lo: polyester.moc
+nmcheck-am: nmcheck
+polyester.o: polyester.moc
diff --git a/style/config/Makefile.am b/style/config/Makefile.am
new file mode 100644
index 0000000..f893a87
--- /dev/null
+++ b/style/config/Makefile.am
@@ -0,0 +1,12 @@
+INCLUDES = $(all_includes)
+
+METASOURCES = AUTO
+
+noinst_HEADERS = polyesterconf.h
+kde_module_LTLIBRARIES = kstyle_polyester_config.la
+kstyle_polyester_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kstyle_polyester_config_la_LIBADD = $(LIB_KDEUI)
+kstyle_polyester_config_la_SOURCES = polyesterconf.cpp configdialog.ui
+
+messages:
+ $(XGETTEXT) *.cpp *.h -o $(podir)/kstyle_polyester_config.pot
diff --git a/style/config/Makefile.in b/style/config/Makefile.in
new file mode 100644
index 0000000..cad5b40
--- /dev/null
+++ b/style/config/Makefile.in
@@ -0,0 +1,787 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = style/config
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(kde_moduledir)"
+kde_moduleLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(kde_module_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+kstyle_polyester_config_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_kstyle_polyester_config_la_OBJECTS = polyesterconf.lo
+#>- kstyle_polyester_config_la_OBJECTS = \
+#>- $(am_kstyle_polyester_config_la_OBJECTS)
+#>+ 4
+kstyle_polyester_config_la_final_OBJECTS = kstyle_polyester_config_la.all_cpp.lo
+kstyle_polyester_config_la_nofinal_OBJECTS = polyesterconf.lo configdialog.lo
+@KDE_USE_FINAL_FALSE@kstyle_polyester_config_la_OBJECTS = $(kstyle_polyester_config_la_nofinal_OBJECTS)
+@KDE_USE_FINAL_TRUE@kstyle_polyester_config_la_OBJECTS = $(kstyle_polyester_config_la_final_OBJECTS)
+#>- kstyle_polyester_config_la_LINK = $(LIBTOOL) --tag=CXX \
+#>- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS) \
+#>- $(kstyle_polyester_config_la_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 4
+kstyle_polyester_config_la_LINK = $(LIBTOOL) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) \
+ $(kstyle_polyester_config_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+#>- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+#>- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+#>- $(LDFLAGS) -o $@
+#>+ 3
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(kstyle_polyester_config_la_SOURCES)
+DIST_SOURCES = $(kstyle_polyester_config_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+INCLUDES = $(all_includes)
+#>- METASOURCES = AUTO
+noinst_HEADERS = polyesterconf.h
+kde_module_LTLIBRARIES = kstyle_polyester_config.la
+kstyle_polyester_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kstyle_polyester_config_la_LIBADD = $(LIB_KDEUI)
+#>- kstyle_polyester_config_la_SOURCES = polyesterconf.cpp configdialog.ui
+#>+ 1
+kstyle_polyester_config_la_SOURCES=polyesterconf.cpp configdialog.cpp
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu style/config/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu style/config/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu style/config/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu style/config/Makefile
+ cd $(top_srcdir) && perl admin/am_edit -padmin style/config/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-kde_moduleLTLIBRARIES: $(kde_module_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(kde_moduledir)" || $(MKDIR_P) "$(DESTDIR)$(kde_moduledir)"
+ @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(kde_moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(kde_moduledir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(kde_moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(kde_moduledir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-kde_moduleLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(kde_moduledir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(kde_moduledir)/$$p"; \
+ done
+
+clean-kde_moduleLTLIBRARIES:
+ -test -z "$(kde_module_LTLIBRARIES)" || rm -f $(kde_module_LTLIBRARIES)
+ @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+kstyle_polyester_config.la: $(kstyle_polyester_config_la_OBJECTS) $(kstyle_polyester_config_la_DEPENDENCIES)
+ $(kstyle_polyester_config_la_LINK) -rpath $(kde_moduledir) $(kstyle_polyester_config_la_OBJECTS) $(kstyle_polyester_config_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyesterconf.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(kde_moduledir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#>- clean: clean-am
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-kde_moduleLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-metasources clean-ui clean-bcheck clean-final clean-generic clean-kde_moduleLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+#>- install-data-am: install-kde_moduleLTLIBRARIES
+#>+ 1
+install-data-am:
+
+install-dvi: install-dvi-am
+
+#>- install-exec-am:
+#>+ 1
+install-exec-am: install-kde_moduleLTLIBRARIES
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-kde_moduleLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-kde_moduleLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-kde_moduleLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-kde_moduleLTLIBRARIES
+
+
+messages:
+ $(XGETTEXT) *.cpp *.h -o $(podir)/kstyle_polyester_config.pot
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+
+#>+ 3
+polyesterconf.moc: $(srcdir)/polyesterconf.h
+ $(MOC) $(srcdir)/polyesterconf.h -o polyesterconf.moc
+
+#>+ 2
+mocs: polyesterconf.moc
+
+#>+ 3
+clean-metasources:
+ -rm -f polyesterconf.moc
+
+#>+ 2
+KDE_DIST=Makefile.in configdialog.ui Makefile.am
+
+#>+ 4
+clean-ui:
+ -rm -f \
+ configdialog.cpp configdialog.h configdialog.moc
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu style/config/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu style/config/Makefile
+ cd $(top_srcdir) && perl admin/am_edit -padmin style/config/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 11
+kstyle_polyester_config_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/polyesterconf.cpp $(srcdir)/configdialog.cpp configdialog.moc polyesterconf.moc
+ @echo 'creating kstyle_polyester_config_la.all_cpp.cpp ...'; \
+ rm -f kstyle_polyester_config_la.all_cpp.files kstyle_polyester_config_la.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> kstyle_polyester_config_la.all_cpp.final; \
+ for file in polyesterconf.cpp configdialog.cpp ; do \
+ echo "#include \"$$file\"" >> kstyle_polyester_config_la.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> kstyle_polyester_config_la.all_cpp.final; \
+ done; \
+ cat kstyle_polyester_config_la.all_cpp.final kstyle_polyester_config_la.all_cpp.files > kstyle_polyester_config_la.all_cpp.cpp; \
+ rm -f kstyle_polyester_config_la.all_cpp.final kstyle_polyester_config_la.all_cpp.files
+
+#>+ 3
+clean-final:
+ -rm -f kstyle_polyester_config_la.all_cpp.cpp
+
+#>+ 3
+final:
+ $(MAKE) kstyle_polyester_config_la_OBJECTS="$(kstyle_polyester_config_la_final_OBJECTS)" all-am
+
+#>+ 3
+final-install:
+ $(MAKE) kstyle_polyester_config_la_OBJECTS="$(kstyle_polyester_config_la_final_OBJECTS)" install-am
+
+#>+ 3
+no-final:
+ $(MAKE) kstyle_polyester_config_la_OBJECTS="$(kstyle_polyester_config_la_nofinal_OBJECTS)" all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) kstyle_polyester_config_la_OBJECTS="$(kstyle_polyester_config_la_nofinal_OBJECTS)" install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 6
+nmcheck:
+polyesterconf.lo: polyesterconf.moc
+polyesterconf.o: polyesterconf.moc
+$(srcdir)/polyesterconf.cpp: configdialog.h
+nmcheck-am: nmcheck
+
+#>+ 15
+configdialog.cpp: $(srcdir)/configdialog.ui configdialog.h configdialog.moc
+ rm -f configdialog.cpp
+ echo '#include <kdialog.h>' > configdialog.cpp
+ echo '#include <klocale.h>' >> configdialog.cpp
+ $(UIC) -tr ${UIC_TR} -i configdialog.h $(srcdir)/configdialog.ui > configdialog.cpp.temp ; ret=$$?; \
+ $(PERL) -pe "s,${UIC_TR}( \"\" ),QString::null,g" configdialog.cpp.temp | $(PERL) -pe "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | $(PERL) -pe "s,image([0-9][0-9]*)_data,img\$$1_configdialog,g" | $(PERL) -pe "s,: QWizard\(,: KWizard(,g" >> configdialog.cpp ;\
+ rm -f configdialog.cpp.temp ;\
+ if test "$$ret" = 0; then echo '#include "configdialog.moc"' >> configdialog.cpp; else rm -f configdialog.cpp ; exit $$ret ; fi
+
+configdialog.h: $(srcdir)/configdialog.ui
+ rm -rf configdialog.h;
+ $(UIC) $(srcdir)/configdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> configdialog.h ;
+configdialog.moc: configdialog.h
+ $(MOC) configdialog.h -o configdialog.moc
diff --git a/style/config/configdialog.cpp b/style/config/configdialog.cpp
new file mode 100644
index 0000000..58ccd14
--- /dev/null
+++ b/style/config/configdialog.cpp
@@ -0,0 +1,987 @@
+#include <kdialog.h>
+#include <klocale.h>
+/****************************************************************************
+** Form implementation generated from reading ui file './configdialog.ui'
+**
+** Created: Mon Jun 23 19:18:44 2008
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.8 edited Jan 11 14:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "configdialog.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <kcolorbutton.h>
+#include <qspinbox.h>
+#include <qframe.h>
+#include <qtextbrowser.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a ConfigDialog as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "ConfigDialog" );
+ setMinimumSize( QSize( 0, 0 ) );
+ setBaseSize( QSize( 0, 0 ) );
+ ConfigDialogLayout = new QVBoxLayout( this, 11, 6, "ConfigDialogLayout");
+
+ tabWidget2 = new QTabWidget( this, "tabWidget2" );
+ tabWidget2->setMinimumSize( QSize( 610, 0 ) );
+
+ tab = new QWidget( tabWidget2, "tab" );
+ tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout");
+
+ buttons = new QLabel( tab, "buttons" );
+ QFont buttons_font( buttons->font() );
+ buttons_font.setBold( TRUE );
+ buttons->setFont( buttons_font );
+ buttons->setAlignment( int( QLabel::AlignBottom ) );
+
+ tabLayout->addWidget( buttons, 0, 0 );
+
+ animations = new QLabel( tab, "animations" );
+ QFont animations_font( animations->font() );
+ animations_font.setBold( TRUE );
+ animations->setFont( animations_font );
+ animations->setAlignment( int( QLabel::AlignBottom ) );
+
+ tabLayout->addWidget( animations, 5, 0 );
+
+ lightBorder = new QCheckBox( tab, "lightBorder" );
+ lightBorder->setChecked( TRUE );
+ lightBorder->setTristate( FALSE );
+
+ tabLayout->addMultiCellWidget( lightBorder, 2, 2, 1, 2 );
+
+ layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
+ spacer1 = new QSpacerItem( 30, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+ layout1->addItem( spacer1 );
+
+ animateButtonToDark = new QCheckBox( tab, "animateButtonToDark" );
+ layout1->addWidget( animateButtonToDark );
+
+ tabLayout->addMultiCellLayout( layout1, 7, 7, 1, 2 );
+
+ shadowedButtonsText = new QCheckBox( tab, "shadowedButtonsText" );
+ shadowedButtonsText->setChecked( TRUE );
+
+ tabLayout->addMultiCellWidget( shadowedButtonsText, 3, 3, 1, 2 );
+
+ buttonStyle = new QComboBox( FALSE, tab, "buttonStyle" );
+
+ tabLayout->addMultiCellWidget( buttonStyle, 1, 1, 1, 2 );
+
+ animateButton = new QCheckBox( tab, "animateButton" );
+
+ tabLayout->addMultiCellWidget( animateButton, 6, 6, 1, 2 );
+
+ animateProgressBar = new QCheckBox( tab, "animateProgressBar" );
+
+ tabLayout->addMultiCellWidget( animateProgressBar, 8, 8, 1, 2 );
+ spacer9 = new QSpacerItem( 141, 31, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ tabLayout->addItem( spacer9, 7, 0 );
+ spacer8 = new QSpacerItem( 61, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ tabLayout->addItem( spacer8, 2, 0 );
+
+ textLabel1 = new QLabel( tab, "textLabel1" );
+ textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ tabLayout->addWidget( textLabel1, 1, 0 );
+ spacer11 = new QSpacerItem( 80, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ tabLayout->addItem( spacer11, 7, 3 );
+
+ textLabel1_4 = new QLabel( tab, "textLabel1_4" );
+ textLabel1_4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ tabLayout->addWidget( textLabel1_4, 11, 0 );
+
+ coloredScrollBar = new QCheckBox( tab, "coloredScrollBar" );
+ coloredScrollBar->setChecked( TRUE );
+
+ tabLayout->addMultiCellWidget( coloredScrollBar, 12, 12, 1, 2 );
+
+ scrollBarLines = new QCheckBox( tab, "scrollBarLines" );
+
+ tabLayout->addMultiCellWidget( scrollBarLines, 13, 13, 1, 2 );
+
+ scrollBarStyle = new QComboBox( FALSE, tab, "scrollBarStyle" );
+
+ tabLayout->addMultiCellWidget( scrollBarStyle, 10, 10, 1, 2 );
+
+ textLabel1_3 = new QLabel( tab, "textLabel1_3" );
+ textLabel1_3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ tabLayout->addWidget( textLabel1_3, 10, 0 );
+
+ scrollbars = new QLabel( tab, "scrollbars" );
+ QFont scrollbars_font( scrollbars->font() );
+ scrollbars_font.setBold( TRUE );
+ scrollbars->setFont( scrollbars_font );
+ scrollbars->setAlignment( int( QLabel::AlignBottom ) );
+
+ tabLayout->addWidget( scrollbars, 9, 0 );
+
+ layout21 = new QHBoxLayout( 0, 0, 6, "layout21");
+
+ customCheckMarkColor = new QCheckBox( tab, "customCheckMarkColor" );
+ customCheckMarkColor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, customCheckMarkColor->sizePolicy().hasHeightForWidth() ) );
+ layout21->addWidget( customCheckMarkColor );
+
+ checkMarkColor = new KColorButton( tab, "checkMarkColor" );
+ layout21->addWidget( checkMarkColor );
+
+ tabLayout->addMultiCellLayout( layout21, 17, 17, 1, 2 );
+
+ textLabel10 = new QLabel( tab, "textLabel10" );
+ textLabel10->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ tabLayout->addWidget( textLabel10, 17, 0 );
+
+ textLabel9 = new QLabel( tab, "textLabel9" );
+ textLabel9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ tabLayout->addWidget( textLabel9, 16, 0 );
+
+ layout20 = new QHBoxLayout( 0, 0, 6, "layout20");
+
+ customOverHighlightColor = new QCheckBox( tab, "customOverHighlightColor" );
+ customOverHighlightColor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, customOverHighlightColor->sizePolicy().hasHeightForWidth() ) );
+ layout20->addWidget( customOverHighlightColor );
+
+ overHighlightColor = new KColorButton( tab, "overHighlightColor" );
+ layout20->addWidget( overHighlightColor );
+
+ tabLayout->addMultiCellLayout( layout20, 16, 16, 1, 2 );
+
+ textLabel8 = new QLabel( tab, "textLabel8" );
+ textLabel8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ tabLayout->addWidget( textLabel8, 15, 0 );
+
+ layout22 = new QHBoxLayout( 0, 0, 6, "layout22");
+
+ customFocusHighlightColor = new QCheckBox( tab, "customFocusHighlightColor" );
+ customFocusHighlightColor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, customFocusHighlightColor->sizePolicy().hasHeightForWidth() ) );
+ layout22->addWidget( customFocusHighlightColor );
+
+ focusHighlightColor = new KColorButton( tab, "focusHighlightColor" );
+ layout22->addWidget( focusHighlightColor );
+
+ tabLayout->addMultiCellLayout( layout22, 15, 15, 1, 2 );
+
+ textLabel7 = new QLabel( tab, "textLabel7" );
+ QFont textLabel7_font( textLabel7->font() );
+ textLabel7_font.setBold( TRUE );
+ textLabel7->setFont( textLabel7_font );
+ textLabel7->setAlignment( int( QLabel::AlignBottom ) );
+
+ tabLayout->addWidget( textLabel7, 14, 0 );
+
+ scrollBarSize = new QSpinBox( tab, "scrollBarSize" );
+ scrollBarSize->setMaxValue( 48 );
+ scrollBarSize->setMinValue( 8 );
+ scrollBarSize->setValue( 16 );
+
+ tabLayout->addWidget( scrollBarSize, 11, 1 );
+ spacer11_2 = new QSpacerItem( 141, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ tabLayout->addItem( spacer11_2, 11, 2 );
+
+ useLowerCaseText = new QCheckBox( tab, "useLowerCaseText" );
+
+ tabLayout->addMultiCellWidget( useLowerCaseText, 4, 4, 1, 2 );
+ tabWidget2->insertTab( tab, QString::fromLatin1("") );
+
+ TabPage = new QWidget( tabWidget2, "TabPage" );
+ TabPageLayout = new QGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout");
+
+ buttonMenuItem = new QCheckBox( TabPage, "buttonMenuItem" );
+ buttonMenuItem->setChecked( TRUE );
+ buttonMenuItem->setTristate( FALSE );
+
+ TabPageLayout->addMultiCellWidget( buttonMenuItem, 2, 2, 1, 2 );
+
+ menuStripe = new QCheckBox( TabPage, "menuStripe" );
+ menuStripe->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( menuStripe, 3, 3, 1, 2 );
+
+ shadowedMenuBarText = new QCheckBox( TabPage, "shadowedMenuBarText" );
+ shadowedMenuBarText->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( shadowedMenuBarText, 4, 4, 1, 2 );
+
+ menuBarEmphasis = new QCheckBox( TabPage, "menuBarEmphasis" );
+
+ TabPageLayout->addMultiCellWidget( menuBarEmphasis, 5, 5, 1, 2 );
+
+ layout9 = new QHBoxLayout( 0, 0, 6, "layout9");
+ spacer1_2_2_3 = new QSpacerItem( 30, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+ layout9->addItem( spacer1_2_2_3 );
+
+ menuBarEmphasisBorder = new QCheckBox( TabPage, "menuBarEmphasisBorder" );
+ menuBarEmphasisBorder->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, menuBarEmphasisBorder->sizePolicy().hasHeightForWidth() ) );
+ menuBarEmphasisBorder->setChecked( TRUE );
+ layout9->addWidget( menuBarEmphasisBorder );
+
+ TabPageLayout->addMultiCellLayout( layout9, 6, 6, 1, 2 );
+
+ textLabel1_2 = new QLabel( TabPage, "textLabel1_2" );
+ textLabel1_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+
+ TabPageLayout->addWidget( textLabel1_2, 1, 0 );
+
+ highLightTab = new QCheckBox( TabPage, "highLightTab" );
+ highLightTab->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( highLightTab, 14, 14, 1, 2 );
+
+ statusBarFrame = new QCheckBox( TabPage, "statusBarFrame" );
+ statusBarFrame->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( statusBarFrame, 12, 12, 1, 2 );
+
+ drawTriangularExpander = new QCheckBox( TabPage, "drawTriangularExpander" );
+
+ TabPageLayout->addMultiCellWidget( drawTriangularExpander, 15, 15, 1, 2 );
+
+ centeredTabBar = new QCheckBox( TabPage, "centeredTabBar" );
+
+ TabPageLayout->addMultiCellWidget( centeredTabBar, 13, 13, 1, 2 );
+
+ colorizeSortedHeader = new QCheckBox( TabPage, "colorizeSortedHeader" );
+ colorizeSortedHeader->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( colorizeSortedHeader, 17, 17, 1, 2 );
+
+ inputFocusHighlight = new QCheckBox( TabPage, "inputFocusHighlight" );
+
+ TabPageLayout->addMultiCellWidget( inputFocusHighlight, 16, 16, 1, 2 );
+
+ drawToolBarItemSeparator = new QCheckBox( TabPage, "drawToolBarItemSeparator" );
+ drawToolBarItemSeparator->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( drawToolBarItemSeparator, 10, 10, 1, 2 );
+
+ drawToolBarSeparator = new QCheckBox( TabPage, "drawToolBarSeparator" );
+ drawToolBarSeparator->setChecked( TRUE );
+
+ TabPageLayout->addMultiCellWidget( drawToolBarSeparator, 9, 9, 1, 2 );
+ spacer10 = new QSpacerItem( 190, 31, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TabPageLayout->addMultiCell( spacer10, 9, 10, 0, 0 );
+
+ misc = new QLabel( TabPage, "misc" );
+ QFont misc_font( misc->font() );
+ misc_font.setBold( TRUE );
+ misc->setFont( misc_font );
+ misc->setAlignment( int( QLabel::AlignBottom ) );
+
+ TabPageLayout->addWidget( misc, 11, 0 );
+
+ toolbars = new QLabel( TabPage, "toolbars" );
+ QFont toolbars_font( toolbars->font() );
+ toolbars_font.setBold( TRUE );
+ toolbars->setFont( toolbars_font );
+ toolbars->setAlignment( int( QLabel::AlignBottom ) );
+
+ TabPageLayout->addWidget( toolbars, 8, 0 );
+
+ menus = new QLabel( TabPage, "menus" );
+ QFont menus_font( menus->font() );
+ menus_font.setBold( TRUE );
+ menus->setFont( menus_font );
+ menus->setAlignment( int( QLabel::AlignBottom ) );
+
+ TabPageLayout->addWidget( menus, 0, 0 );
+
+ menuItemSpacing = new QSpinBox( TabPage, "menuItemSpacing" );
+ menuItemSpacing->setMaxValue( 12 );
+ menuItemSpacing->setMinValue( 2 );
+ menuItemSpacing->setValue( 8 );
+
+ TabPageLayout->addWidget( menuItemSpacing, 1, 1 );
+ spacer12 = new QSpacerItem( 101, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TabPageLayout->addItem( spacer12, 1, 2 );
+ spacer21 = new QSpacerItem( 187, 170, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TabPageLayout->addMultiCell( spacer21, 12, 17, 0, 0 );
+ spacer1_2 = new QSpacerItem( 187, 160, QSizePolicy::Minimum, QSizePolicy::Minimum );
+ TabPageLayout->addMultiCell( spacer1_2, 2, 7, 0, 0 );
+ spacer22 = new QSpacerItem( 147, 30, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TabPageLayout->addItem( spacer22, 3, 3 );
+
+ frameCustomEmphColor = new QFrame( TabPage, "frameCustomEmphColor" );
+ frameCustomEmphColor->setFrameShape( QFrame::NoFrame );
+ frameCustomEmphColor->setFrameShadow( QFrame::Raised );
+ frameCustomEmphColor->setLineWidth( 0 );
+ frameCustomEmphColorLayout = new QHBoxLayout( frameCustomEmphColor, 0, 6, "frameCustomEmphColorLayout");
+ spacer1_2_2 = new QSpacerItem( 30, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+ frameCustomEmphColorLayout->addItem( spacer1_2_2 );
+
+ customMenuBarEmphasisColor = new QCheckBox( frameCustomEmphColor, "customMenuBarEmphasisColor" );
+ customMenuBarEmphasisColor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, customMenuBarEmphasisColor->sizePolicy().hasHeightForWidth() ) );
+ frameCustomEmphColorLayout->addWidget( customMenuBarEmphasisColor );
+
+ menuBarEmphasisColor = new KColorButton( frameCustomEmphColor, "menuBarEmphasisColor" );
+ frameCustomEmphColorLayout->addWidget( menuBarEmphasisColor );
+
+ TabPageLayout->addMultiCellWidget( frameCustomEmphColor, 7, 7, 1, 2 );
+ tabWidget2->insertTab( TabPage, QString::fromLatin1("") );
+
+ tab_2 = new QWidget( tabWidget2, "tab_2" );
+ tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2");
+
+ textBrowser1 = new QTextBrowser( tab_2, "textBrowser1" );
+ tabLayout_2->addWidget( textBrowser1 );
+ tabWidget2->insertTab( tab_2, QString::fromLatin1("") );
+
+ TabPage_2 = new QWidget( tabWidget2, "TabPage_2" );
+ TabPageLayout_2 = new QVBoxLayout( TabPage_2, 11, 6, "TabPageLayout_2");
+
+ textBrowser2 = new QTextBrowser( TabPage_2, "textBrowser2" );
+ TabPageLayout_2->addWidget( textBrowser2 );
+ tabWidget2->insertTab( TabPage_2, QString::fromLatin1("") );
+ ConfigDialogLayout->addWidget( tabWidget2 );
+ languageChange();
+ resize( QSize(632, 583).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+
+ // signals and slots connections
+ connect( animateButton, SIGNAL( toggled(bool) ), animateButtonToDark, SLOT( setEnabled(bool) ) );
+ connect( customFocusHighlightColor, SIGNAL( toggled(bool) ), focusHighlightColor, SLOT( setEnabled(bool) ) );
+ connect( customOverHighlightColor, SIGNAL( toggled(bool) ), overHighlightColor, SLOT( setEnabled(bool) ) );
+ connect( customCheckMarkColor, SIGNAL( toggled(bool) ), checkMarkColor, SLOT( setEnabled(bool) ) );
+ connect( menuBarEmphasis, SIGNAL( toggled(bool) ), menuBarEmphasisBorder, SLOT( setEnabled(bool) ) );
+ connect( customMenuBarEmphasisColor, SIGNAL( toggled(bool) ), menuBarEmphasisColor, SLOT( setEnabled(bool) ) );
+ connect( menuBarEmphasis, SIGNAL( toggled(bool) ), frameCustomEmphColor, SLOT( setEnabled(bool) ) );
+
+ // buddies
+ textLabel10->setBuddy( customCheckMarkColor );
+ textLabel9->setBuddy( customOverHighlightColor );
+ textLabel8->setBuddy( customFocusHighlightColor );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+ConfigDialog::~ConfigDialog()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void ConfigDialog::languageChange()
+{
+ setCaption( tr2i18n( "Form1" ) );
+ buttons->setText( tr2i18n( "Buttons" ) );
+ animations->setText( tr2i18n( "Animations" ) );
+ lightBorder->setText( tr2i18n( "Lighter &button borders" ) );
+ lightBorder->setAccel( QKeySequence( tr2i18n( "Alt+B" ) ) );
+ animateButtonToDark->setText( tr2i18n( "Animate buttons to a &darker color" ) );
+ animateButtonToDark->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) );
+ shadowedButtonsText->setText( tr2i18n( "&Use shadowed button text" ) );
+ shadowedButtonsText->setAccel( QKeySequence( tr2i18n( "Alt+U" ) ) );
+ buttonStyle->clear();
+ buttonStyle->insertItem( tr2i18n( "Glass buttons" ) );
+ buttonStyle->insertItem( tr2i18n( "Gradients" ) );
+ buttonStyle->insertItem( tr2i18n( "Reverse gradients" ) );
+ buttonStyle->insertItem( tr2i18n( "Flat" ) );
+ animateButton->setText( tr2i18n( "Ani&mate buttons" ) );
+ animateButton->setAccel( QKeySequence( tr2i18n( "Alt+M" ) ) );
+ animateProgressBar->setText( tr2i18n( "&Animate progress bars" ) );
+ animateProgressBar->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
+ textLabel1->setText( tr2i18n( "Button style:" ) );
+ textLabel1_4->setText( tr2i18n( "Scrollbar size:" ) );
+ coloredScrollBar->setText( tr2i18n( "&Colored scrollbars" ) );
+ coloredScrollBar->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) );
+ scrollBarLines->setText( tr2i18n( "&Scrollbar handle lines" ) );
+ scrollBarLines->setAccel( QKeySequence( tr2i18n( "Alt+S" ) ) );
+ scrollBarStyle->clear();
+ scrollBarStyle->insertItem( tr2i18n( "KDE style" ) );
+ scrollBarStyle->insertItem( tr2i18n( "Platinum style" ) );
+ scrollBarStyle->insertItem( tr2i18n( "Next style" ) );
+ scrollBarStyle->insertItem( tr2i18n( "Windows style" ) );
+ textLabel1_3->setText( tr2i18n( "Scrollbar Style:" ) );
+ scrollbars->setText( tr2i18n( "Scrollbars" ) );
+ customCheckMarkColor->setText( QString::null );
+ customCheckMarkColor->setAccel( QKeySequence( QString::null ) );
+ checkMarkColor->setText( QString::null );
+ textLabel10->setText( tr2i18n( "Chec&kmark:" ) );
+ textLabel9->setText( tr2i18n( "Mouseo&ver highlight:" ) );
+ customOverHighlightColor->setText( QString::null );
+ customOverHighlightColor->setAccel( QKeySequence( QString::null ) );
+ overHighlightColor->setText( QString::null );
+ textLabel8->setText( tr2i18n( "Te&xt input highlight:" ) );
+ customFocusHighlightColor->setText( QString::null );
+ customFocusHighlightColor->setAccel( QKeySequence( QString::null ) );
+ focusHighlightColor->setText( QString::null );
+ textLabel7->setText( tr2i18n( "Custom colors" ) );
+ scrollBarSize->setSuffix( tr2i18n( " pixels" ) );
+ useLowerCaseText->setText( tr2i18n( "&Lower case buttons text" ) );
+ useLowerCaseText->setAccel( QKeySequence( tr2i18n( "Alt+L" ) ) );
+ tabWidget2->changeTab( tab, tr2i18n( "&General" ) );
+ buttonMenuItem->setText( tr2i18n( "Button-li&ke menu items" ) );
+ buttonMenuItem->setAccel( QKeySequence( tr2i18n( "Alt+K" ) ) );
+ menuStripe->setText( tr2i18n( "&Menu stripe" ) );
+ menuStripe->setAccel( QKeySequence( tr2i18n( "Alt+M" ) ) );
+ shadowedMenuBarText->setText( tr2i18n( "Sh&adowed menubar text" ) );
+ shadowedMenuBarText->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
+ menuBarEmphasis->setText( tr2i18n( "Men&ubar emphasis" ) );
+ menuBarEmphasis->setAccel( QKeySequence( tr2i18n( "Alt+U" ) ) );
+ menuBarEmphasisBorder->setText( tr2i18n( "Menubar Empasis &border" ) );
+ menuBarEmphasisBorder->setAccel( QKeySequence( tr2i18n( "Alt+B" ) ) );
+ textLabel1_2->setText( tr2i18n( "Menu items spacing:" ) );
+ highLightTab->setText( tr2i18n( "&Highlight selected tab" ) );
+ highLightTab->setAccel( QKeySequence( tr2i18n( "Alt+H" ) ) );
+ statusBarFrame->setText( tr2i18n( "&Draw statusbar frame" ) );
+ statusBarFrame->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) );
+ drawTriangularExpander->setText( tr2i18n( "Triangular tree e&xpander" ) );
+ drawTriangularExpander->setAccel( QKeySequence( tr2i18n( "Alt+X" ) ) );
+ centeredTabBar->setText( tr2i18n( "&Centered tabbars" ) );
+ centeredTabBar->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) );
+ colorizeSortedHeader->setText( tr2i18n( "Colori&ze sorted header in listviews" ) );
+ colorizeSortedHeader->setAccel( QKeySequence( tr2i18n( "Alt+Z" ) ) );
+ inputFocusHighlight->setText( tr2i18n( "H&ighlight focused text input fields" ) );
+ inputFocusHighlight->setAccel( QKeySequence( tr2i18n( "Alt+I" ) ) );
+ drawToolBarItemSeparator->setText( tr2i18n( "Draw toolbar &item separator" ) );
+ drawToolBarItemSeparator->setAccel( QKeySequence( tr2i18n( "Alt+I" ) ) );
+ drawToolBarSeparator->setText( tr2i18n( "&Draw toolbar separator" ) );
+ drawToolBarSeparator->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) );
+ misc->setText( tr2i18n( "Misc" ) );
+ toolbars->setText( tr2i18n( "Toolbars" ) );
+ menus->setText( tr2i18n( "Menus" ) );
+ menuItemSpacing->setSuffix( tr2i18n( " pixels" ) );
+ customMenuBarEmphasisColor->setText( tr2i18n( "&Custom color:" ) );
+ customMenuBarEmphasisColor->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) );
+ menuBarEmphasisColor->setText( QString::null );
+ menuBarEmphasisColor->setAccel( QKeySequence( QString::null ) );
+ tabWidget2->changeTab( TabPage, tr2i18n( "&Advanced" ) );
+ textBrowser1->setText( tr2i18n( "<h1>Polyester 1.0.3</h1>\n"
+"<p>\n"
+" Copyright &copy; 2005-2006 Marco Martin <br/>\n"
+" notmart@gmail.com<br/>\n"
+" http://www.notmart.org\n"
+"</p>\n"
+"<p>\n"
+" based on Plastik widget style for KDE 3<br/>\n"
+" Copyright (C) 2003 Sandro Giessl\n"
+"</p>\n"
+"<p>\n"
+" Polyester window decoration derived from Smooth Blend\n"
+" Copyright (c) 2005 Ryan Nickell\n"
+"</p>\n"
+"<h2>Additional thanks</h2>\n"
+"<p>Tomek Argasiński for the Polish translation</p>\n"
+"<p>Some code and ideas from</p>\n"
+"<ul>\n"
+" <li>Linspire Clear by Sandro Giessl</li>\n"
+" <li>Lipstik by Patrice Tremblay</li>\n"
+" <li>Baghira by Thomas Lbking</li>\n"
+" <li>Trolltech winXP style and Daniel Molkentin for the password dialog</li>\n"
+"</ul>" ) );
+ tabWidget2->changeTab( tab_2, tr2i18n( "Ab&out" ) );
+ textBrowser2->setText( tr2i18n( "GNU LIBRARY GENERAL PUBLIC LICENSE\n"
+" Version 2, June 1991\n"
+"\n"
+" Copyright (C) 1991 Free Software Foundation, Inc.\n"
+" 51 Franklin Street, Fifth Floor\n"
+" Boston, MA 02110-1301, USA.\n"
+" Everyone is permitted to copy and distribute verbatim copies\n"
+" of this license document, but changing it is not allowed.\n"
+"\n"
+"[This is the first released version of the library GPL. It is\n"
+" numbered 2 because it goes with version 2 of the ordinary GPL.]\n"
+"\n"
+" Preamble\n"
+"\n"
+" The licenses for most software are designed to take away your\n"
+"freedom to share and change it. By contrast, the GNU General Public\n"
+"Licenses are intended to guarantee your freedom to share and change\n"
+"free software--to make sure the software is free for all its users.\n"
+"\n"
+" This license, the Library General Public License, applies to some\n"
+"specially designated Free Software Foundation software, and to any\n"
+"other libraries whose authors decide to use it. You can use it for\n"
+"your libraries, too.\n"
+"\n"
+" When we speak of free software, we are referring to freedom, not\n"
+"price. Our General Public Licenses are designed to make sure that you\n"
+"have the freedom to distribute copies of free software (and charge for\n"
+"this service if you wish), that you receive source code or can get it\n"
+"if you want it, that you can change the software or use pieces of it\n"
+"in new free programs; and that you know you can do these things.\n"
+"\n"
+" To protect your rights, we need to make restrictions that forbid\n"
+"anyone to deny you these rights or to ask you to surrender the rights.\n"
+"These restrictions translate to certain responsibilities for you if\n"
+"you distribute copies of the library, or if you modify it.\n"
+"\n"
+" For example, if you distribute copies of the library, whether gratis\n"
+"or for a fee, you must give the recipients all the rights that we gave\n"
+"you. You must make sure that they, too, receive or can get the source\n"
+"code. If you link a program with the library, you must provide\n"
+"complete object files to the recipients so that they can relink them\n"
+"with the library, after making changes to the library and recompiling\n"
+"it. And you must show them these terms so they know their rights.\n"
+"\n"
+" Our method of protecting your rights has two steps: (1) copyright\n"
+"the library, and (2) offer you this license which gives you legal\n"
+"permission to copy, distribute and/or modify the library.\n"
+"\n"
+" Also, for each distributor's protection, we want to make certain\n"
+"that everyone understands that there is no warranty for this free\n"
+"library. If the library is modified by someone else and passed on, we\n"
+"want its recipients to know that what they have is not the original\n"
+"version, so that any problems introduced by others will not reflect on\n"
+"the original authors' reputations.\n"
+" \n"
+" Finally, any free program is threatened constantly by software\n"
+"patents. We wish to avoid the danger that companies distributing free\n"
+"software will individually obtain patent licenses, thus in effect\n"
+"transforming the program into proprietary software. To prevent this,\n"
+"we have made it clear that any patent must be licensed for everyone's\n"
+"free use or not licensed at all.\n"
+"\n"
+" Most GNU software, including some libraries, is covered by the ordinary\n"
+"GNU General Public License, which was designed for utility programs. This\n"
+"license, the GNU Library General Public License, applies to certain\n"
+"designated libraries. This license is quite different from the ordinary\n"
+"one; be sure to read it in full, and don't assume that anything in it is\n"
+"the same as in the ordinary license.\n"
+"\n"
+" The reason we have a separate public license for some libraries is that\n"
+"they blur the distinction we usually make between modifying or adding to a\n"
+"program and simply using it. Linking a program with a library, without\n"
+"changing the library, is in some sense simply using the library, and is\n"
+"analogous to running a utility program or application program. However, in\n"
+"a textual and legal sense, the linked executable is a combined work, a\n"
+"derivative of the original library, and the ordinary General Public License\n"
+"treats it as such.\n"
+"\n"
+" Because of this blurred distinction, using the ordinary General\n"
+"Public License for libraries did not effectively promote software\n"
+"sharing, because most developers did not use the libraries. We\n"
+"concluded that weaker conditions might promote sharing better.\n"
+"\n"
+" However, unrestricted linking of non-free programs would deprive the\n"
+"users of those programs of all benefit from the free status of the\n"
+"libraries themselves. This Library General Public License is intended to\n"
+"permit developers of non-free programs to use free libraries, while\n"
+"preserving your freedom as a user of such programs to change the free\n"
+"libraries that are incorporated in them. (We have not seen how to achieve\n"
+"this as regards changes in header files, but we have achieved it as regards\n"
+"changes in the actual functions of the Library.) The hope is that this\n"
+"will lead to faster development of free libraries.\n"
+"\n"
+" The precise terms and conditions for copying, distribution and\n"
+"modification follow. Pay close attention to the difference between a\n"
+"\"work based on the library\" and a \"work that uses the library\". The\n"
+"former contains code derived from the library, while the latter only\n"
+"works together with the library.\n"
+"\n"
+" Note that it is possible for a library to be covered by the ordinary\n"
+"General Public License rather than by this special one.\n"
+" \n"
+" GNU LIBRARY GENERAL PUBLIC LICENSE\n"
+" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n"
+"\n"
+" 0. This License Agreement applies to any software library which\n"
+"contains a notice placed by the copyright holder or other authorized\n"
+"party saying it may be distributed under the terms of this Library\n"
+"General Public License (also called \"this License\"). Each licensee is\n"
+"addressed as \"you\".\n"
+"\n"
+" A \"library\" means a collection of software functions and/or data\n"
+"prepared so as to be conveniently linked with application programs\n"
+"(which use some of those functions and data) to form executables.\n"
+"\n"
+" The \"Library\", below, refers to any such software library or work\n"
+"which has been distributed under these terms. A \"work based on the\n"
+"Library\" means either the Library or any derivative work under\n"
+"copyright law: that is to say, a work containing the Library or a\n"
+"portion of it, either verbatim or with modifications and/or translated\n"
+"straightforwardly into another language. (Hereinafter, translation is\n"
+"included without limitation in the term \"modification\".)\n"
+"\n"
+" \"Source code\" for a work means the preferred form of the work for\n"
+"making modifications to it. For a library, complete source code means\n"
+"all the source code for all modules it contains, plus any associated\n"
+"interface definition files, plus the scripts used to control compilation\n"
+"and installation of the library.\n"
+"\n"
+" Activities other than copying, distribution and modification are not\n"
+"covered by this License; they are outside its scope. The act of\n"
+"running a program using the Library is not restricted, and output from\n"
+"such a program is covered only if its contents constitute a work based\n"
+"on the Library (independent of the use of the Library in a tool for\n"
+"writing it). Whether that is true depends on what the Library does\n"
+"and what the program that uses the Library does.\n"
+" \n"
+" 1. You may copy and distribute verbatim copies of the Library's\n"
+"complete source code as you receive it, in any medium, provided that\n"
+"you conspicuously and appropriately publish on each copy an\n"
+"appropriate copyright notice and disclaimer of warranty; keep intact\n"
+"all the notices that refer to this License and to the absence of any\n"
+"warranty; and distribute a copy of this License along with the\n"
+"Library.\n"
+"\n"
+" You may charge a fee for the physical act of transferring a copy,\n"
+"and you may at your option offer warranty protection in exchange for a\n"
+"fee.\n"
+" \n"
+" 2. You may modify your copy or copies of the Library or any portion\n"
+"of it, thus forming a work based on the Library, and copy and\n"
+"distribute such modifications or work under the terms of Section 1\n"
+"above, provided that you also meet all of these conditions:\n"
+"\n"
+" a) The modified work must itself be a software library.\n"
+"\n"
+" b) You must cause the files modified to carry prominent notices\n"
+" stating that you changed the files and the date of any change.\n"
+"\n"
+" c) You must cause the whole of the work to be licensed at no\n"
+" charge to all third parties under the terms of this License.\n"
+"\n"
+" d) If a facility in the modified Library refers to a function or a\n"
+" table of data to be supplied by an application program that uses\n"
+" the facility, other than as an argument passed when the facility\n"
+" is invoked, then you must make a good faith effort to ensure that,\n"
+" in the event an application does not supply such function or\n"
+" table, the facility still operates, and performs whatever part of\n"
+" its purpose remains meaningful.\n"
+"\n"
+" (For example, a function in a library to compute square roots has\n"
+" a purpose that is entirely well-defined independent of the\n"
+" application. Therefore, Subsection 2d requires that any\n"
+" application-supplied function or table used by this function must\n"
+" be optional: if the application does not supply it, the square\n"
+" root function must still compute square roots.)\n"
+"\n"
+"These requirements apply to the modified work as a whole. If\n"
+"identifiable sections of that work are not derived from the Library,\n"
+"and can be reasonably considered independent and separate works in\n"
+"themselves, then this License, and its terms, do not apply to those\n"
+"sections when you distribute them as separate works. But when you\n"
+"distribute the same sections as part of a whole which is a work based\n"
+"on the Library, the distribution of the whole must be on the terms of\n"
+"this License, whose permissions for other licensees extend to the\n"
+"entire whole, and thus to each and every part regardless of who wrote\n"
+"it.\n"
+"\n"
+"Thus, it is not the intent of this section to claim rights or contest\n"
+"your rights to work written entirely by you; rather, the intent is to\n"
+"exercise the right to control the distribution of derivative or\n"
+"collective works based on the Library.\n"
+"\n"
+"In addition, mere aggregation of another work not based on the Library\n"
+"with the Library (or with a work based on the Library) on a volume of\n"
+"a storage or distribution medium does not bring the other work under\n"
+"the scope of this License.\n"
+"\n"
+" 3. You may opt to apply the terms of the ordinary GNU General Public\n"
+"License instead of this License to a given copy of the Library. To do\n"
+"this, you must alter all the notices that refer to this License, so\n"
+"that they refer to the ordinary GNU General Public License, version 2,\n"
+"instead of to this License. (If a newer version than version 2 of the\n"
+"ordinary GNU General Public License has appeared, then you can specify\n"
+"that version instead if you wish.) Do not make any other change in\n"
+"these notices.\n"
+" \n"
+" Once this change is made in a given copy, it is irreversible for\n"
+"that copy, so the ordinary GNU General Public License applies to all\n"
+"subsequent copies and derivative works made from that copy.\n"
+"\n"
+" This option is useful when you wish to copy part of the code of\n"
+"the Library into a program that is not a library.\n"
+"\n"
+" 4. You may copy and distribute the Library (or a portion or\n"
+"derivative of it, under Section 2) in object code or executable form\n"
+"under the terms of Sections 1 and 2 above provided that you accompany\n"
+"it with the complete corresponding machine-readable source code, which\n"
+"must be distributed under the terms of Sections 1 and 2 above on a\n"
+"medium customarily used for software interchange.\n"
+"\n"
+" If distribution of object code is made by offering access to copy\n"
+"from a designated place, then offering equivalent access to copy the\n"
+"source code from the same place satisfies the requirement to\n"
+"distribute the source code, even though third parties are not\n"
+"compelled to copy the source along with the object code.\n"
+"\n"
+" 5. A program that contains no derivative of any portion of the\n"
+"Library, but is designed to work with the Library by being compiled or\n"
+"linked with it, is called a \"work that uses the Library\". Such a\n"
+"work, in isolation, is not a derivative work of the Library, and\n"
+"therefore falls outside the scope of this License.\n"
+"\n"
+" However, linking a \"work that uses the Library\" with the Library\n"
+"creates an executable that is a derivative of the Library (because it\n"
+"contains portions of the Library), rather than a \"work that uses the\n"
+"library\". The executable is therefore covered by this License.\n"
+"Section 6 states terms for distribution of such executables.\n"
+"\n"
+" When a \"work that uses the Library\" uses material from a header file\n"
+"that is part of the Library, the object code for the work may be a\n"
+"derivative work of the Library even though the source code is not.\n"
+"Whether this is true is especially significant if the work can be\n"
+"linked without the Library, or if the work is itself a library. The\n"
+"threshold for this to be true is not precisely defined by law.\n"
+"\n"
+" If such an object file uses only numerical parameters, data\n"
+"structure layouts and accessors, and small macros and small inline\n"
+"functions (ten lines or less in length), then the use of the object\n"
+"file is unrestricted, regardless of whether it is legally a derivative\n"
+"work. (Executables containing this object code plus portions of the\n"
+"Library will still fall under Section 6.)\n"
+"\n"
+" Otherwise, if the work is a derivative of the Library, you may\n"
+"distribute the object code for the work under the terms of Section 6.\n"
+"Any executables containing that work also fall under Section 6,\n"
+"whether or not they are linked directly with the Library itself.\n"
+" \n"
+" 6. As an exception to the Sections above, you may also compile or\n"
+"link a \"work that uses the Library\" with the Library to produce a\n"
+"work containing portions of the Library, and distribute that work\n"
+"under terms of your choice, provided that the terms permit\n"
+"modification of the work for the customer's own use and reverse\n"
+"engineering for debugging such modifications.\n"
+"\n"
+" You must give prominent notice with each copy of the work that the\n"
+"Library is used in it and that the Library and its use are covered by\n"
+"this License. You must supply a copy of this License. If the work\n"
+"during execution displays copyright notices, you must include the\n"
+"copyright notice for the Library among them, as well as a reference\n"
+"directing the user to the copy of this License. Also, you must do one\n"
+"of these things:\n"
+"\n"
+" a) Accompany the work with the complete corresponding\n"
+" machine-readable source code for the Library including whatever\n"
+" changes were used in the work (which must be distributed under\n"
+" Sections 1 and 2 above); and, if the work is an executable linked\n"
+" with the Library, with the complete machine-readable \"work that\n"
+" uses the Library\", as object code and/or source code, so that the\n"
+" user can modify the Library and then relink to produce a modified\n"
+" executable containing the modified Library. (It is understood\n"
+" that the user who changes the contents of definitions files in the\n"
+" Library will not necessarily be able to recompile the application\n"
+" to use the modified definitions.)\n"
+"\n"
+" b) Accompany the work with a written offer, valid for at\n"
+" least three years, to give the same user the materials\n"
+" specified in Subsection 6a, above, for a charge no more\n"
+" than the cost of performing this distribution.\n"
+"\n"
+" c) If distribution of the work is made by offering access to copy\n"
+" from a designated place, offer equivalent access to copy the above\n"
+" specified materials from the same place.\n"
+"\n"
+" d) Verify that the user has already received a copy of these\n"
+" materials or that you have already sent this user a copy.\n"
+"\n"
+" For an executable, the required form of the \"work that uses the\n"
+"Library\" must include any data and utility programs needed for\n"
+"reproducing the executable from it. However, as a special exception,\n"
+"the source code distributed need not include anything that is normally\n"
+"distributed (in either source or binary form) with the major\n"
+"components (compiler, kernel, and so on) of the operating system on\n"
+"which the executable runs, unless that component itself accompanies\n"
+"the executable.\n"
+"\n"
+" It may happen that this requirement contradicts the license\n"
+"restrictions of other proprietary libraries that do not normally\n"
+"accompany the operating system. Such a contradiction means you cannot\n"
+"use both them and the Library together in an executable that you\n"
+"distribute.\n"
+" \n"
+" 7. You may place library facilities that are a work based on the\n"
+"Library side-by-side in a single library together with other library\n"
+"facilities not covered by this License, and distribute such a combined\n"
+"library, provided that the separate distribution of the work based on\n"
+"the Library and of the other library facilities is otherwise\n"
+"permitted, and provided that you do these two things:\n"
+"\n"
+" a) Accompany the combined library with a copy of the same work\n"
+" based on the Library, uncombined with any other library\n"
+" facilities. This must be distributed under the terms of the\n"
+" Sections above.\n"
+"\n"
+" b) Give prominent notice with the combined library of the fact\n"
+" that part of it is a work based on the Library, and explaining\n"
+" where to find the accompanying uncombined form of the same work.\n"
+"\n"
+" 8. You may not copy, modify, sublicense, link with, or distribute\n"
+"the Library except as expressly provided under this License. Any\n"
+"attempt otherwise to copy, modify, sublicense, link with, or\n"
+"distribute the Library is void, and will automatically terminate your\n"
+"rights under this License. However, parties who have received copies,\n"
+"or rights, from you under this License will not have their licenses\n"
+"terminated so long as such parties remain in full compliance.\n"
+"\n"
+" 9. You are not required to accept this License, since you have not\n"
+"signed it. However, nothing else grants you permission to modify or\n"
+"distribute the Library or its derivative works. These actions are\n"
+"prohibited by law if you do not accept this License. Therefore, by\n"
+"modifying or distributing the Library (or any work based on the\n"
+"Library), you indicate your acceptance of this License to do so, and\n"
+"all its terms and conditions for copying, distributing or modifying\n"
+"the Library or works based on it.\n"
+"\n"
+" 10. Each time you redistribute the Library (or any work based on the\n"
+"Library), the recipient automatically receives a license from the\n"
+"original licensor to copy, distribute, link with or modify the Library\n"
+"subject to these terms and conditions. You may not impose any further\n"
+"restrictions on the recipients' exercise of the rights granted herein.\n"
+"You are not responsible for enforcing compliance by third parties to\n"
+"this License.\n"
+" \n"
+" 11. If, as a consequence of a court judgment or allegation of patent\n"
+"infringement or for any other reason (not limited to patent issues),\n"
+"conditions are imposed on you (whether by court order, agreement or\n"
+"otherwise) that contradict the conditions of this License, they do not\n"
+"excuse you from the conditions of this License. If you cannot\n"
+"distribute so as to satisfy simultaneously your obligations under this\n"
+"License and any other pertinent obligations, then as a consequence you\n"
+"may not distribute the Library at all. For example, if a patent\n"
+"license would not permit royalty-free redistribution of the Library by\n"
+"all those who receive copies directly or indirectly through you, then\n"
+"the only way you could satisfy both it and this License would be to\n"
+"refrain entirely from distribution of the Library.\n"
+"\n"
+"If any portion of this section is held invalid or unenforceable under any\n"
+"particular circumstance, the balance of the section is intended to apply,\n"
+"and the section as a whole is intended to apply in other circumstances.\n"
+"\n"
+"It is not the purpose of this section to induce you to infringe any\n"
+"patents or other property right claims or to contest validity of any\n"
+"such claims; this section has the sole purpose of protecting the\n"
+"integrity of the free software distribution system which is\n"
+"implemented by public license practices. Many people have made\n"
+"generous contributions to the wide range of software distributed\n"
+"through that system in reliance on consistent application of that\n"
+"system; it is up to the author/donor to decide if he or she is willing\n"
+"to distribute software through any other system and a licensee cannot\n"
+"impose that choice.\n"
+"\n"
+"This section is intended to make thoroughly clear what is believed to\n"
+"be a consequence of the rest of this License.\n"
+"\n"
+" 12. If the distribution and/or use of the Library is restricted in\n"
+"certain countries either by patents or by copyrighted interfaces, the\n"
+"original copyright holder who places the Library under this License may add\n"
+"an explicit geographical distribution limitation excluding those countries,\n"
+"so that distribution is permitted only in or among countries not thus\n"
+"excluded. In such case, this License incorporates the limitation as if\n"
+"written in the body of this License.\n"
+"\n"
+" 13. The Free Software Foundation may publish revised and/or new\n"
+"versions of the Library General Public License from time to time.\n"
+"Such new versions will be similar in spirit to the present version,\n"
+"but may differ in detail to address new problems or concerns.\n"
+"\n"
+"Each version is given a distinguishing version number. If the Library\n"
+"specifies a version number of this License which applies to it and\n"
+"\"any later version\", you have the option of following the terms and\n"
+"conditions either of that version or of any later version published by\n"
+"the Free Software Foundation. If the Library does not specify a\n"
+"license version number, you may choose any version ever published by\n"
+"the Free Software Foundation.\n"
+" \n"
+" 14. If you wish to incorporate parts of the Library into other free\n"
+"programs whose distribution conditions are incompatible with these,\n"
+"write to the author to ask for permission. For software which is\n"
+"copyrighted by the Free Software Foundation, write to the Free\n"
+"Software Foundation; we sometimes make exceptions for this. Our\n"
+"decision will be guided by the two goals of preserving the free status\n"
+"of all derivatives of our free software and of promoting the sharing\n"
+"and reuse of software generally.\n"
+"\n"
+" NO WARRANTY\n"
+"\n"
+" 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\n"
+"WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\n"
+"EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\n"
+"OTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\n"
+"KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\n"
+"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n"
+"PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\n"
+"LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\n"
+"THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"
+"\n"
+" 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\n"
+"WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\n"
+"AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\n"
+"FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\n"
+"CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\n"
+"LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\n"
+"RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\n"
+"FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\n"
+"SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n"
+"DAMAGES.\n"
+"\n"
+" END OF TERMS AND CONDITIONS\n"
+"\n"
+" How to Apply These Terms to Your New Libraries\n"
+"\n"
+" If you develop a new library, and you want it to be of the greatest\n"
+"possible use to the public, we recommend making it free software that\n"
+"everyone can redistribute and change. You can do so by permitting\n"
+"redistribution under these terms (or, alternatively, under the terms of the\n"
+"ordinary General Public License).\n"
+"\n"
+" To apply these terms, attach the following notices to the library. It is\n"
+"safest to attach them to the start of each source file to most effectively\n"
+"convey the exclusion of warranty; and each file should have at least the\n"
+"\"copyright\" line and a pointer to where the full notice is found.\n"
+"\n"
+" <one line to give the library's name and a brief idea of what it does.>\n"
+" Copyright (C) <year> <name of author>\n"
+"\n"
+" This library is free software; you can redistribute it and/or\n"
+" modify it under the terms of the GNU Lesser General Public\n"
+" License as published by the Free Software Foundation; either\n"
+" version 2 of the License, or (at your option) any later version.\n"
+"\n"
+" This library is distributed in the hope that it will be useful,\n"
+" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
+" Lesser General Public License for more details.\n"
+"\n"
+" You should have received a copy of the GNU Lesser General Public\n"
+" License along with this library; if not, write to the Free Software\n"
+" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
+"\n"
+"Also add information on how to contact you by electronic and paper mail.\n"
+"\n"
+"You should also get your employer (if you work as a programmer) or your\n"
+"school, if any, to sign a \"copyright disclaimer\" for the library, if\n"
+"necessary. Here is a sample; alter the names:\n"
+"\n"
+" Yoyodyne, Inc., hereby disclaims all copyright interest in the\n"
+" library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n"
+"\n"
+" <signature of Ty Coon>, 1 April 1990\n"
+" Ty Coon, President of Vice\n"
+"\n"
+"That's all there is to it!" ) );
+ tabWidget2->changeTab( TabPage_2, tr2i18n( "Lice&nse agreement" ) );
+}
+
+void ConfigDialog::animateButton_toggled(bool)
+{
+ qWarning( "ConfigDialog::animateButton_toggled(bool): Not implemented yet" );
+}
+
+#include "configdialog.moc"
diff --git a/style/config/configdialog.ui b/style/config/configdialog.ui
new file mode 100644
index 0000000..2ffe295
--- /dev/null
+++ b/style/config/configdialog.ui
@@ -0,0 +1,1616 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ConfigDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ConfigDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>632</width>
+ <height>583</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabWidget2</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>610</width>
+ <height>0</height>
+ </size>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;General</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>buttons</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Buttons</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>animations</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Animations</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lightBorder</cstring>
+ </property>
+ <property name="text">
+ <string>Lighter &amp;button borders</string>
+ </property>
+ <property name="accel">
+ <string>Alt+B</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="7" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Minimum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>animateButtonToDark</cstring>
+ </property>
+ <property name="text">
+ <string>Animate buttons to a &amp;darker color</string>
+ </property>
+ <property name="accel">
+ <string>Alt+D</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>shadowedButtonsText</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Use shadowed button text</string>
+ </property>
+ <property name="accel">
+ <string>Alt+U</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="2">
+ <item>
+ <property name="text">
+ <string>Glass buttons</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Gradients</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Reverse gradients</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Flat</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>animateButton</cstring>
+ </property>
+ <property name="text">
+ <string>Ani&amp;mate buttons</string>
+ </property>
+ <property name="accel">
+ <string>Alt+M</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="8" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>animateProgressBar</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Animate progress bars</string>
+ </property>
+ <property name="accel">
+ <string>Alt+A</string>
+ </property>
+ </widget>
+ <spacer row="7" column="0">
+ <property name="name">
+ <cstring>spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>141</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>61</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Button style:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <spacer row="7" column="3">
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>80</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="11" column="0">
+ <property name="name">
+ <cstring>textLabel1_4</cstring>
+ </property>
+ <property name="text">
+ <string>Scrollbar size:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="12" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>coloredScrollBar</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Colored scrollbars</string>
+ </property>
+ <property name="accel">
+ <string>Alt+C</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="13" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>scrollBarLines</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Scrollbar handle lines</string>
+ </property>
+ <property name="accel">
+ <string>Alt+S</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="10" column="1" rowspan="1" colspan="2">
+ <item>
+ <property name="text">
+ <string>KDE style</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Platinum style</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Next style</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Windows style</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>scrollBarStyle</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="10" column="0">
+ <property name="name">
+ <cstring>textLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Scrollbar Style:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="9" column="0">
+ <property name="name">
+ <cstring>scrollbars</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Scrollbars</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="17" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout21</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>customCheckMarkColor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>checkMarkColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="17" column="0">
+ <property name="name">
+ <cstring>textLabel10</cstring>
+ </property>
+ <property name="text">
+ <string>Chec&amp;kmark:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>customCheckMarkColor</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="16" column="0">
+ <property name="name">
+ <cstring>textLabel9</cstring>
+ </property>
+ <property name="text">
+ <string>Mouseo&amp;ver highlight:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>customOverHighlightColor</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="16" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout20</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>customOverHighlightColor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>overHighlightColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="15" column="0">
+ <property name="name">
+ <cstring>textLabel8</cstring>
+ </property>
+ <property name="text">
+ <string>Te&amp;xt input highlight:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>customFocusHighlightColor</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="15" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout22</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>customFocusHighlightColor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>focusHighlightColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="14" column="0">
+ <property name="name">
+ <cstring>textLabel7</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Custom colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="11" column="1">
+ <property name="name">
+ <cstring>scrollBarSize</cstring>
+ </property>
+ <property name="suffix">
+ <string> pixels</string>
+ </property>
+ <property name="maxValue">
+ <number>48</number>
+ </property>
+ <property name="minValue">
+ <number>8</number>
+ </property>
+ <property name="value">
+ <number>16</number>
+ </property>
+ </widget>
+ <spacer row="11" column="2">
+ <property name="name">
+ <cstring>spacer11_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>141</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>useLowerCaseText</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Lower case buttons text</string>
+ </property>
+ <property name="accel">
+ <string>Alt+L</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Advanced</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonMenuItem</cstring>
+ </property>
+ <property name="text">
+ <string>Button-li&amp;ke menu items</string>
+ </property>
+ <property name="accel">
+ <string>Alt+K</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>menuStripe</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Menu stripe</string>
+ </property>
+ <property name="accel">
+ <string>Alt+M</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>shadowedMenuBarText</cstring>
+ </property>
+ <property name="text">
+ <string>Sh&amp;adowed menubar text</string>
+ </property>
+ <property name="accel">
+ <string>Alt+A</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>menuBarEmphasis</cstring>
+ </property>
+ <property name="text">
+ <string>Men&amp;ubar emphasis</string>
+ </property>
+ <property name="accel">
+ <string>Alt+U</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="6" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1_2_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Minimum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>menuBarEmphasisBorder</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Menubar Empasis &amp;border</string>
+ </property>
+ <property name="accel">
+ <string>Alt+B</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Menu items spacing:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="14" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>highLightTab</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Highlight selected tab</string>
+ </property>
+ <property name="accel">
+ <string>Alt+H</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="12" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>statusBarFrame</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Draw statusbar frame</string>
+ </property>
+ <property name="accel">
+ <string>Alt+D</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="15" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>drawTriangularExpander</cstring>
+ </property>
+ <property name="text">
+ <string>Triangular tree e&amp;xpander</string>
+ </property>
+ <property name="accel">
+ <string>Alt+X</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="13" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>centeredTabBar</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Centered tabbars</string>
+ </property>
+ <property name="accel">
+ <string>Alt+C</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="17" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>colorizeSortedHeader</cstring>
+ </property>
+ <property name="text">
+ <string>Colori&amp;ze sorted header in listviews</string>
+ </property>
+ <property name="accel">
+ <string>Alt+Z</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="16" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>inputFocusHighlight</cstring>
+ </property>
+ <property name="text">
+ <string>H&amp;ighlight focused text input fields</string>
+ </property>
+ <property name="accel">
+ <string>Alt+I</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="10" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>drawToolBarItemSeparator</cstring>
+ </property>
+ <property name="text">
+ <string>Draw toolbar &amp;item separator</string>
+ </property>
+ <property name="accel">
+ <string>Alt+I</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="9" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>drawToolBarSeparator</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Draw toolbar separator</string>
+ </property>
+ <property name="accel">
+ <string>Alt+D</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="9" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>190</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="11" column="0">
+ <property name="name">
+ <cstring>misc</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Misc</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0">
+ <property name="name">
+ <cstring>toolbars</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Toolbars</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>menus</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Menus</string>
+ </property>
+ <property name="alignment">
+ <set>AlignBottom</set>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>menuItemSpacing</cstring>
+ </property>
+ <property name="suffix">
+ <string> pixels</string>
+ </property>
+ <property name="maxValue">
+ <number>12</number>
+ </property>
+ <property name="minValue">
+ <number>2</number>
+ </property>
+ <property name="value">
+ <number>8</number>
+ </property>
+ </widget>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>101</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="12" column="0" rowspan="6" colspan="1">
+ <property name="name">
+ <cstring>spacer21</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>187</width>
+ <height>170</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="0" rowspan="6" colspan="1">
+ <property name="name">
+ <cstring>spacer1_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Minimum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>187</width>
+ <height>160</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="3" column="3">
+ <property name="name">
+ <cstring>spacer22</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>147</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QFrame" row="7" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>frameCustomEmphColor</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Minimum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>customMenuBarEmphasisColor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Custom color:</string>
+ </property>
+ <property name="accel">
+ <string>Alt+C</string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>menuBarEmphasisColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Ab&amp;out</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTextBrowser">
+ <property name="name">
+ <cstring>textBrowser1</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;h1&gt;Polyester 1.0.3&lt;/h1&gt;
+&lt;p&gt;
+ Copyright &amp;copy; 2005-2006 Marco Martin &lt;br/&gt;
+ notmart@gmail.com&lt;br/&gt;
+ http://www.notmart.org
+&lt;/p&gt;
+&lt;p&gt;
+ based on Plastik widget style for KDE 3&lt;br/&gt;
+ Copyright (C) 2003 Sandro Giessl
+&lt;/p&gt;
+&lt;p&gt;
+ Polyester window decoration derived from Smooth Blend
+ Copyright (c) 2005 Ryan Nickell
+&lt;/p&gt;
+&lt;h2&gt;Additional thanks&lt;/h2&gt;
+&lt;p&gt;Tomek Argasiński for the Polish translation&lt;/p&gt;
+&lt;p&gt;Some code and ideas from&lt;/p&gt;
+&lt;ul&gt;
+ &lt;li&gt;Linspire Clear by Sandro Giessl&lt;/li&gt;
+ &lt;li&gt;Lipstik by Patrice Tremblay&lt;/li&gt;
+ &lt;li&gt;Baghira by Thomas Lbking&lt;/li&gt;
+ &lt;li&gt;Trolltech winXP style and Daniel Molkentin for the password dialog&lt;/li&gt;
+&lt;/ul&gt;</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>Lice&amp;nse agreement</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTextBrowser">
+ <property name="name">
+ <cstring>textBrowser2</cstring>
+ </property>
+ <property name="text">
+ <string>GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor
+ Boston, MA 02110-1301, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library 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.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>animateButton</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>animateButtonToDark</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>customFocusHighlightColor</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>focusHighlightColor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>customOverHighlightColor</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>overHighlightColor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>customCheckMarkColor</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>checkMarkColor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>menuBarEmphasis</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>menuBarEmphasisBorder</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>customMenuBarEmphasisColor</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>menuBarEmphasisColor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>menuBarEmphasis</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>frameCustomEmphColor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>animateButton_toggled( bool )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/style/config/polyesterconf.cpp b/style/config/polyesterconf.cpp
new file mode 100755
index 0000000..8f4bbec
--- /dev/null
+++ b/style/config/polyesterconf.cpp
@@ -0,0 +1,392 @@
+/*
+based on the Keramik and Plastik configuration dialog:
+
+Plastik:
+Copyright (C) 2003 Sandro Giessl <ceebx@users.sourceforge.net>
+
+Keramik:
+Copyright (c) 2003 Maksim Orlovich <maksim.orlovich@kdemail.net>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qhbox.h>
+#include <qspinbox.h>
+#include <qsettings.h>
+#include <qcolor.h>
+#include <qgroupbox.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kcolorbutton.h>
+#include <kdemacros.h>
+
+#include "polyesterconf.h"
+#include "configdialog.h"
+
+extern "C"
+{
+ KDE_EXPORT QWidget* allocate_kstyle_config(QWidget* parent)
+ {
+ KGlobal::locale()->insertCatalogue("polyester");
+ return new PolyesterStyleConfig(parent);
+ }
+}
+
+PolyesterStyleConfig::PolyesterStyleConfig(QWidget* parent): QWidget(parent)
+{
+
+ //Should have no margins here, the dialog provides them
+ QVBoxLayout* layout = new QVBoxLayout(this, 0, 0);
+ dialog_ = new ConfigDialog(this);
+ KGlobal::locale()->insertCatalogue("kstyle_polyester_config");
+
+
+ layout->addWidget(dialog_);
+ dialog_->show();
+
+ QSettings s;
+ origScrollBarLines = s.readBoolEntry("/polyesterstyle/Settings/scrollBarLines", false);
+ dialog_->scrollBarLines->setChecked(origScrollBarLines);
+ origColoredScrollBar = s.readBoolEntry("/polyesterstyle/Settings/coloredScrollBar", true);
+ dialog_->coloredScrollBar->setChecked(origColoredScrollBar);
+ origScrollBarStyle = s.readEntry("/polyesterstyle/Settings/scrollBarStyle", "ThreeButtonScrollBar");
+ dialog_->scrollBarStyle->setCurrentItem(scrollBarItem(origScrollBarStyle));
+ origScrollBarSize = s.readNumEntry("/polyesterstyle/Settings/scrollBarSize", 16);
+ dialog_->scrollBarSize->setValue(origScrollBarSize);
+ origCenteredTabBar = s.readBoolEntry("/polyesterstyle/Settings/centeredTabBar", false);
+ dialog_->centeredTabBar->setChecked(origCenteredTabBar);
+ origHighLightTab = s.readBoolEntry("/polyesterstyle/Settings/highLightTab", true);
+ dialog_->highLightTab->setChecked(origHighLightTab);
+ origStatusBarFrame = s.readBoolEntry("/polyesterstyle/Settings/statusBarFrame", true);
+ dialog_->statusBarFrame->setChecked(origStatusBarFrame);
+
+ //MENUS
+ origMenuItemSpacing = s.readNumEntry("/polyesterstyle/Settings/menuItemSpacing", 8);
+ dialog_->menuItemSpacing->setValue(origMenuItemSpacing);
+ origButtonMenuItem = s.readBoolEntry("/polyesterstyle/Settings/buttonMenuItem", true);
+ dialog_->buttonMenuItem->setChecked(origButtonMenuItem);
+ origMenuBarEmphasis = s.readBoolEntry("/polyesterstyle/Settings/menuBarEmphasis", false);
+ dialog_->menuBarEmphasis->setChecked(origMenuBarEmphasis);
+ origMenuBarEmphasisBorder = s.readBoolEntry("/polyesterstyle/Settings/menuBarEmphasisBorder", true);
+ dialog_->menuBarEmphasisBorder->setChecked(origMenuBarEmphasisBorder);
+ origCustomMenuBarEmphasisColor = s.readBoolEntry("/polyesterstyle/Settings/customMenuBarEmphasisColor", false);
+ dialog_->customMenuBarEmphasisColor->setChecked(origCustomMenuBarEmphasisColor);
+
+ origMenuBarEmphasisColor = s.readEntry("/polyesterstyle/Settings/menuBarEmphasisColor", "black");
+ dialog_->menuBarEmphasisColor->setColor(origMenuBarEmphasisColor);
+
+ origMenuStripe = s.readBoolEntry("/polyesterstyle/Settings/menuStripe", true);
+ dialog_->menuStripe->setChecked(origMenuStripe);
+
+ origShadowedButtonsText = s.readBoolEntry("/polyesterstyle/Settings/shadowedButtonsText", true);
+ dialog_->shadowedButtonsText->setChecked(origShadowedButtonsText);
+ origShadowedMenuBarText = s.readBoolEntry("/polyesterstyle/Settings/shadowedMenuBarText", true);
+ dialog_->shadowedMenuBarText->setChecked(origShadowedMenuBarText);
+
+ //MISC
+ origColorizeSortedHeader = s.readBoolEntry("/polyesterstyle/Settings/colorizeSortedHeader", true);
+ dialog_->colorizeSortedHeader->setChecked(origColorizeSortedHeader);
+ origUseLowerCaseText = s.readBoolEntry("/polyesterstyle/Settings/useLowerCaseText", false);
+ dialog_->useLowerCaseText->setChecked(origUseLowerCaseText);
+ origAnimProgressBar = s.readBoolEntry("/polyesterstyle/Settings/animateProgressBar", false);
+ dialog_->animateProgressBar->setChecked(origAnimProgressBar);
+ origLightBorder = s.readBoolEntry("/polyesterstyle/Settings/lightBorder", true);
+ dialog_->lightBorder->setChecked(origLightBorder);
+ origAnimButton = s.readBoolEntry("/polyesterstyle/Settings/animateButton", false);
+ dialog_->animateButton->setChecked(origAnimButton);
+ origAnimButtonToDark = s.readBoolEntry("/polyesterstyle/Settings/animateButtonToDark", false);
+ dialog_->animateButtonToDark->setChecked(origAnimButtonToDark);
+ origDrawToolBarSeparator = s.readBoolEntry("/polyesterstyle/Settings/drawToolBarSeparator", true);
+ dialog_->drawToolBarSeparator->setChecked(origDrawToolBarSeparator);
+ origDrawToolBarItemSeparator = s.readBoolEntry("/polyesterstyle/Settings/drawToolBarItemSeparator", true);
+ dialog_->drawToolBarItemSeparator->setChecked(origDrawToolBarItemSeparator);
+// origDrawFocusRect = s.readBoolEntry("/polyesterstyle/Settings/drawFocusRect", true);
+// drawFocusRect->setChecked(origDrawFocusRect);
+ origDrawTriangularExpander = s.readBoolEntry("/polyesterstyle/Settings/drawTriangularExpander", false);
+ dialog_->drawTriangularExpander->setChecked(origDrawTriangularExpander);
+ origInputFocusHighlight = s.readBoolEntry("/polyesterstyle/Settings/inputFocusHighlight", true);
+ dialog_->inputFocusHighlight->setChecked(origInputFocusHighlight);
+ origButtonStyle = s.readEntry("/polyesterstyle/Settings/buttonStyle", "glass");
+ dialog_->buttonStyle->setCurrentItem(buttonItem(origButtonStyle));
+ origCustomOverHighlightColor = s.readBoolEntry("/polyesterstyle/Settings/customOverHighlightColor", false);
+ dialog_->customOverHighlightColor->setChecked(origCustomOverHighlightColor);
+ origOverHighlightColor = s.readEntry("/polyesterstyle/Settings/overHighlightColor", "black");
+ dialog_->overHighlightColor->setColor(origOverHighlightColor);
+ origCustomFocusHighlightColor = s.readBoolEntry("/polyesterstyle/Settings/customFocusHighlightColor", false);
+ dialog_->customFocusHighlightColor->setChecked(origCustomFocusHighlightColor);
+ origFocusHighlightColor = s.readEntry("/polyesterstyle/Settings/focusHighlightColor", "black");
+ dialog_->focusHighlightColor->setColor(origFocusHighlightColor);
+ origCustomCheckMarkColor = s.readBoolEntry("/polyesterstyle/Settings/customCheckMarkColor", false);
+ dialog_->customCheckMarkColor->setChecked(origCustomCheckMarkColor);
+ origCheckMarkColor = s.readEntry("/polyesterstyle/Settings/checkMarkColor", "black");
+ dialog_->checkMarkColor->setColor(origCheckMarkColor);
+
+ connect(dialog_->useLowerCaseText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->scrollBarLines, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->scrollBarStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) );
+ connect(dialog_->scrollBarSize, SIGNAL( valueChanged( int ) ), SLOT( updateChanged() ) );
+ connect(dialog_->coloredScrollBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->centeredTabBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->highLightTab, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->statusBarFrame, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->menuItemSpacing, SIGNAL( valueChanged(int) ), SLOT( updateChanged() ) );
+ connect(dialog_->buttonMenuItem, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->menuBarEmphasis, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->menuBarEmphasisBorder, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->customMenuBarEmphasisColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->menuBarEmphasisColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->menuStripe, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->shadowedButtonsText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->shadowedMenuBarText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->animateProgressBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->lightBorder, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->animateButton, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->animateButtonToDark, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->drawToolBarSeparator, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->drawToolBarItemSeparator, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->drawTriangularExpander, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->inputFocusHighlight, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->colorizeSortedHeader, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->buttonStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) );
+ connect(dialog_->customOverHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->overHighlightColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->customFocusHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->focusHighlightColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->customCheckMarkColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
+ connect(dialog_->checkMarkColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+
+ if ( dialog_->animateButton->isChecked() )
+ dialog_->animateButtonToDark->setEnabled(true);
+ else
+ dialog_->animateButtonToDark->setEnabled(false);
+
+ if ( dialog_->menuBarEmphasis->isChecked() )
+ {
+ dialog_->menuBarEmphasisBorder->setEnabled(true);
+ dialog_->customMenuBarEmphasisColor->setEnabled(true);
+ if ( dialog_->customMenuBarEmphasisColor->isChecked() )
+ dialog_->menuBarEmphasisColor->setEnabled(true);
+ else
+ dialog_->menuBarEmphasisColor->setEnabled(false);
+ }
+ else
+ {
+ dialog_->menuBarEmphasisBorder->setEnabled(false);
+ dialog_->customMenuBarEmphasisColor->setEnabled(false);
+ dialog_->menuBarEmphasisColor->setEnabled(false);
+ }
+
+ if ( dialog_->customOverHighlightColor->isChecked() )
+ dialog_->overHighlightColor->setEnabled(true);
+ else
+ dialog_->overHighlightColor->setEnabled(false);
+
+ if ( dialog_->customFocusHighlightColor->isChecked() )
+ dialog_->focusHighlightColor->setEnabled(true);
+ else
+ dialog_->focusHighlightColor->setEnabled(false);
+
+ if ( dialog_->customCheckMarkColor->isChecked() )
+ dialog_->checkMarkColor->setEnabled(true);
+ else
+ dialog_->checkMarkColor->setEnabled(false);
+}
+
+PolyesterStyleConfig::~PolyesterStyleConfig()
+{
+}
+
+
+void PolyesterStyleConfig::save()
+{
+ QSettings s;
+ s.writeEntry("/polyesterstyle/Settings/useLowerCaseText", dialog_->useLowerCaseText->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/scrollBarLines", dialog_->scrollBarLines->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/scrollBarStyle",
+ scrollBarType(dialog_->scrollBarStyle->currentItem()));
+ s.writeEntry("/polyesterstyle/Settings/scrollBarSize", dialog_->scrollBarSize->value());
+ s.writeEntry("/polyesterstyle/Settings/coloredScrollBar", dialog_->coloredScrollBar->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/centeredTabBar", dialog_->centeredTabBar->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/highLightTab", dialog_->highLightTab->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/statusBarFrame", dialog_->statusBarFrame->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/menuItemSpacing", dialog_->menuItemSpacing->value());
+ s.writeEntry("/polyesterstyle/Settings/buttonMenuItem", dialog_->buttonMenuItem->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/menuBarEmphasis", dialog_->menuBarEmphasis->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/colorizeSortedHeader", dialog_->colorizeSortedHeader->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisBorder", dialog_->menuBarEmphasisBorder->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/customMenuBarEmphasisColor", dialog_->customMenuBarEmphasisColor->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisColor", QColor(dialog_->menuBarEmphasisColor->color()).name());
+
+ s.writeEntry("/polyesterstyle/Settings/menuStripe", dialog_->menuStripe->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/shadowedButtonsText", dialog_->shadowedButtonsText->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/shadowedMenuBarText", dialog_->shadowedMenuBarText->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/animateProgressBar", dialog_->animateProgressBar->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/lightBorder", dialog_->lightBorder->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/animateButton", dialog_->animateButton->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/animateButtonToDark", dialog_->animateButtonToDark->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/drawToolBarSeparator", dialog_->drawToolBarSeparator->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/drawToolBarItemSeparator", dialog_->drawToolBarItemSeparator->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/drawTriangularExpander", dialog_->drawTriangularExpander->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/inputFocusHighlight", dialog_->inputFocusHighlight->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/buttonStyle", buttonType(dialog_->buttonStyle->currentItem()));
+ s.writeEntry("/polyesterstyle/Settings/customOverHighlightColor", dialog_->customOverHighlightColor->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/overHighlightColor", QColor(dialog_->overHighlightColor->color()).name());
+ s.writeEntry("/polyesterstyle/Settings/customFocusHighlightColor", dialog_->customFocusHighlightColor->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/focusHighlightColor", QColor(dialog_->focusHighlightColor->color()).name());
+ s.writeEntry("/polyesterstyle/Settings/customCheckMarkColor", dialog_->customCheckMarkColor->isChecked());
+ s.writeEntry("/polyesterstyle/Settings/checkMarkColor", QColor(dialog_->checkMarkColor->color()).name());
+}
+
+void PolyesterStyleConfig::defaults()
+{
+ dialog_->useLowerCaseText->setChecked(false);
+ dialog_->scrollBarLines->setChecked(false);
+ dialog_->scrollBarStyle->setCurrentItem(0);
+ dialog_->scrollBarSize->setValue(16);
+ dialog_->coloredScrollBar->setChecked(true);
+ dialog_->centeredTabBar->setChecked(false);
+ dialog_->highLightTab->setChecked(true);
+ dialog_->statusBarFrame->setChecked(true);
+ dialog_->menuBarEmphasis->setChecked(false);
+ dialog_->menuBarEmphasisBorder->setChecked(true);
+ dialog_->customMenuBarEmphasisColor->setChecked(false);
+ dialog_->menuBarEmphasisColor->setColor("black");
+
+ dialog_->menuStripe->setChecked(true);
+ dialog_->animateProgressBar->setChecked(false);
+ dialog_->colorizeSortedHeader->setChecked(true);
+ dialog_->lightBorder->setChecked(true);
+ dialog_->animateButton->setChecked(false);
+ dialog_->animateButtonToDark->setChecked(false);
+ dialog_->drawToolBarSeparator->setChecked(true);
+ dialog_->drawToolBarItemSeparator->setChecked(true);
+ dialog_->drawTriangularExpander->setChecked(false);
+ dialog_->inputFocusHighlight->setChecked(true);
+ dialog_->buttonStyle->setCurrentItem(0);
+ dialog_->customOverHighlightColor->setChecked(false);
+ dialog_->overHighlightColor->setColor("black");
+ dialog_->customFocusHighlightColor->setChecked(false);
+ dialog_->focusHighlightColor->setColor("black");
+ dialog_->customCheckMarkColor->setChecked(false);
+ dialog_->checkMarkColor->setColor("black");
+ //updateChanged would be done by setChecked already
+}
+
+void PolyesterStyleConfig::updateChanged()
+{
+
+ if ((dialog_->scrollBarLines->isChecked() == origScrollBarLines) &&
+ (dialog_->scrollBarStyle->currentText() == origScrollBarStyle) &&
+ (dialog_->scrollBarSize->value() == origScrollBarSize) &&
+ (dialog_->coloredScrollBar->isChecked() == origColoredScrollBar) &&
+ (dialog_->centeredTabBar->isChecked() == origCenteredTabBar) &&
+ (dialog_->highLightTab->isChecked() == origHighLightTab) &&
+ (dialog_->statusBarFrame->isChecked() == origStatusBarFrame) &&
+ (dialog_->menuItemSpacing->value() == origMenuItemSpacing) &&
+ (dialog_->buttonMenuItem->isChecked() == origButtonMenuItem) &&
+ (dialog_->menuBarEmphasis->isChecked() == origMenuBarEmphasis) &&
+ (dialog_->menuBarEmphasisBorder->isChecked() == origMenuBarEmphasisBorder) &&
+ (dialog_->customMenuBarEmphasisColor->isChecked() == origCustomMenuBarEmphasisColor) &&
+ (dialog_->menuBarEmphasisColor->color() == origMenuBarEmphasisColor) &&
+ (dialog_->menuStripe->isChecked() == origMenuStripe) &&
+ (dialog_->shadowedButtonsText->isChecked() == origShadowedButtonsText) &&
+ (dialog_->shadowedMenuBarText->isChecked() == origShadowedMenuBarText) &&
+ (dialog_->animateProgressBar->isChecked() == origAnimProgressBar) &&
+ (dialog_->lightBorder->isChecked() == origLightBorder) &&
+ (dialog_->colorizeSortedHeader->isChecked() == origColorizeSortedHeader) &&
+ (dialog_->animateButton->isChecked() == origAnimButton) &&
+ (dialog_->animateButtonToDark->isChecked() == origAnimButtonToDark) &&
+ (dialog_->drawToolBarSeparator->isChecked() == origDrawToolBarSeparator) &&
+ (dialog_->drawToolBarItemSeparator->isChecked() == origDrawToolBarItemSeparator) &&
+ (dialog_->drawTriangularExpander->isChecked() == origDrawTriangularExpander) &&
+ (dialog_->inputFocusHighlight->isChecked() == origInputFocusHighlight) &&
+ (dialog_->customOverHighlightColor->isChecked() == origCustomOverHighlightColor) &&
+ (dialog_->overHighlightColor->color() == origOverHighlightColor) &&
+ (dialog_->buttonStyle->currentText() == origButtonStyle) &&
+ (dialog_->customFocusHighlightColor->isChecked() == origCustomFocusHighlightColor) &&
+ (dialog_->focusHighlightColor->color() == origFocusHighlightColor) &&
+ (dialog_->customCheckMarkColor->isChecked() == origCustomCheckMarkColor) &&
+ (dialog_->checkMarkColor->color() == origCheckMarkColor) &&
+ (dialog_->useLowerCaseText->isChecked() == origUseLowerCaseText)
+ )
+ emit changed(false);
+ else
+ emit changed(true);
+}
+
+//button types
+QString PolyesterStyleConfig::buttonType( int listnr )
+{
+ switch ( listnr ) {
+ case 1:
+ return QString("gradients");
+ case 2:
+ return QString("reverseGradients");
+ case 3:
+ return QString("flat");
+ default:
+ return QString("glass");
+ }
+}
+
+int PolyesterStyleConfig::buttonItem( QString kBType )
+{
+ if( !strcmp(kBType,"gradients") )
+ return 1;
+ else if( !strcmp(kBType,"reverseGradients") )
+ return 2;
+ else if( !strcmp(kBType,"flat") )
+ return 3;
+ else
+ return 0;
+}
+
+//scrollBar types
+QString PolyesterStyleConfig::scrollBarType( int listnr )
+{
+ switch ( listnr ) {
+ case 1:
+ return QString("PlatinumStyleScrollBar");
+ case 2:
+ return QString("NextStyleScrollBar");
+ case 3:
+ return QString("WindowsStyleScrollBar");
+ default:
+ return QString("ThreeButtonScrollBar");
+ }
+}
+
+int PolyesterStyleConfig::scrollBarItem( QString kSType )
+{
+ if( !strcmp(kSType,"PlatinumStyleScrollBar") )
+ return 1;
+ else if( !strcmp(kSType,"NextStyleScrollBar") )
+ return 2;
+ else if( !strcmp(kSType,"WindowsStyleScrollBar") )
+ return 3;
+ else
+ return 0;
+}
+
+#include "polyesterconf.moc"
diff --git a/style/config/polyesterconf.h b/style/config/polyesterconf.h
new file mode 100755
index 0000000..589ad88
--- /dev/null
+++ b/style/config/polyesterconf.h
@@ -0,0 +1,103 @@
+/*
+based on the Keramik and Plastik configuration dialog:
+
+Plastik:
+Copyright (C) 2003 Sandro Giessl <ceebx@users.sourceforge.net>
+
+Keramik:
+Copyright (c) 2003 Maksim Orlovich <maksim.orlovich@kdemail.net>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef POLYMER_CONF_H
+#define POLYMER_CONF_H
+
+class QCheckBox;
+class QComboBox;
+class ConfigDialog;
+
+class PolyesterStyleConfig: public QWidget
+{
+ Q_OBJECT
+public:
+ PolyesterStyleConfig(QWidget* parent);
+ ~PolyesterStyleConfig();
+
+ //This signal and the next two slots are the plugin
+ //page interface
+signals:
+ void changed(bool);
+
+public slots:
+ void save();
+ void defaults();
+
+ //Everything below this is internal.
+protected slots:
+ void updateChanged();
+
+protected:
+ QString buttonType( int listnr );
+ int buttonItem( QString kBType );
+ QString scrollBarType( int listnr );
+ int scrollBarItem( QString kSType );
+
+ //Original settings, for accurate dirtiness tracking
+ bool origUseLowerCaseText;
+ bool origScrollBarLines;
+ QString origScrollBarStyle;
+ int origScrollBarSize;
+ bool origColoredScrollBar;
+ bool origCenteredTabBar;
+ bool origHighLightTab;
+ bool origStatusBarFrame;
+ int origMenuItemSpacing;
+ bool origButtonMenuItem;
+ bool origMenuBarEmphasis;
+ bool origMenuBarEmphasisBorder;
+ bool origCustomMenuBarEmphasisColor;
+ QColor origMenuBarEmphasisColor;
+ bool origMenuStripe;
+ bool origColorizeSortedHeader;
+ bool origShadowedButtonsText;
+ bool origShadowedMenuBarText;
+ bool origAnimProgressBar;
+ bool origLightBorder;
+ bool origAnimButton;
+ bool origAnimButtonToDark;
+ bool origDrawToolBarSeparator;
+ bool origDrawToolBarItemSeparator;
+// bool origDrawFocusRect;
+ bool origDrawTriangularExpander;
+ bool origInputFocusHighlight;
+ QString origButtonStyle;
+ bool origCustomOverHighlightColor;
+ QColor origOverHighlightColor;
+ bool origCustomFocusHighlightColor;
+ QColor origFocusHighlightColor;
+ bool origCustomCheckMarkColor;
+ QColor origCheckMarkColor;
+
+private:
+ ConfigDialog *dialog_;
+};
+
+#endif
diff --git a/style/misc.cpp b/style/misc.cpp
new file mode 100755
index 0000000..2f1d30c
--- /dev/null
+++ b/style/misc.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2003, Sandro Giessl <ceebx@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <qcolor.h>
+#include "misc.h"
+
+QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a)
+{
+
+ // normal button...
+ QRgb rgb = bgColor.rgb();
+ QRgb rgb_b = fgColor.rgb();
+ int alpha = a;
+ if(alpha>255) alpha = 255;
+ if(alpha<0) alpha = 0;
+ int inv_alpha = 255 - alpha;
+
+ QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
+ qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255,
+ qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) );
+
+ return result;
+}
diff --git a/style/misc.h b/style/misc.h
new file mode 100755
index 0000000..835c277
--- /dev/null
+++ b/style/misc.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2003, Sandro Giessl <ceebx@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __MISC_H
+#define __MISC_H
+
+QColor alphaBlendColors(const QColor &backgroundColor, const QColor &foregroundColor, const int alpha);
+
+#endif // __MISC_H
diff --git a/style/polyester.cpp b/style/polyester.cpp
new file mode 100755
index 0000000..f837874
--- /dev/null
+++ b/style/polyester.cpp
@@ -0,0 +1,4786 @@
+/* Polyester widget style for KDE 3
+ Copyright (C) 2006 Marco Martin <notmart@gmail.com>
+
+ based on Plastik widget style for KDE 3
+ Copyright (C) 2003 Sandro Giessl <ceebx@users.sourceforge.net>
+
+ based on the KDE style "dotNET":
+
+ Copyright (C) 2001-2002, Chris Lee <clee@kde.org>
+ Carsten Pfeiffer <pfeiffer@kde.org>
+ Karol Szwed <gallium@kde.org>
+ Drawing routines completely reimplemented from KDE3 HighColor, which was
+ originally based on some stuff from the KDE2 HighColor.
+
+ based on drawing routines of the style "Keramik":
+
+ Copyright (c) 2002 Malte Starostik <malte@kde.org>
+ (c) 2002,2003 Maksim Orlovich <mo002j@mail.rochester.edu>
+ based on the KDE3 HighColor Style
+ Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
+ (C) 2001-2002 Fredrik H�lund <fredrik@kde.org>
+ Drawing routines adapted from the KDE2 HCStyle,
+ Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
+ (C) 2000 Dirk Mueller <mueller@kde.org>
+ (C) 2001 Martijn Klingens <klingens@kde.org>
+ Progressbar code based on KStyle,
+ Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <qimage.h>
+#include <qstylefactory.h>
+#include <qpointarray.h>
+#include <qpainter.h>
+#include <qtabbar.h>
+#include <qprogressbar.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qcleanuphandler.h>
+#include <qheader.h>
+#include <qlistview.h>
+#include <qlineedit.h>
+#include <qlistbox.h>
+#include <qscrollbar.h>
+#include <qstyleplugin.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qtimer.h>
+#include <qtoolbutton.h>
+#include <qtoolbar.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qdrawutil.h>
+#include <qapplication.h>
+#include <qvariant.h>
+#include <qradiobutton.h>
+#include <qregion.h>
+#include <qslider.h>
+#include <qsettings.h>
+#include <kpixmap.h>
+#include <kimageeffect.h>
+#include <kglobal.h>
+
+#include "polyester.h"
+#include "polyester.moc"
+#include "misc.h"
+
+// some bitmaps for the radio button so it's easier to handle the circle stuff...
+// 13x13
+static unsigned char radiobutton_mask_bits[] = {
+ 0xf8, 0x03, 0xfc, 0x07, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
+ 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xfe, 0x0f, 0xfc, 0x07,
+ 0xf8, 0x03};
+static unsigned char radiobutton_contour_bits[] = {
+ 0xf0, 0x01, 0x0c, 0x06, 0x02, 0x08, 0x02, 0x08, 0x01, 0x10, 0x01, 0x10,
+ 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x02, 0x08, 0x02, 0x08, 0x0c, 0x06,
+ 0xf0, 0x01};
+static unsigned char radiobutton_aa_inside_bits[] = {
+ 0x00, 0x00, 0x10, 0x01, 0x04, 0x04, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x04, 0x04, 0x10, 0x01,
+ 0x00, 0x00};
+static unsigned char radiobutton_aa_outside_bits[] = {
+ 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x02};
+static unsigned char radiobutton_highlight1_bits[] = {
+ 0x00, 0x00, 0xf0, 0x01, 0x1c, 0x07, 0x04, 0x04, 0x06, 0x0c, 0x02, 0x08,
+ 0x02, 0x08, 0x02, 0x08, 0x06, 0x0c, 0x04, 0x04, 0x1c, 0x07, 0xf0, 0x01,
+ 0x00, 0x00};
+static unsigned char radiobutton_highlight2_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x18, 0x03, 0x08, 0x02, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x08, 0x02, 0x18, 0x03, 0xe0, 0x00, 0x00, 0x00,
+ 0x00, 0x00};
+// check mark
+const uint CHECKMARKSIZE = 9; // 9x9
+static unsigned char checkmark_aa_bits[] = {
+ 0x45, 0x01, 0x28, 0x00, 0x11, 0x01, 0x82, 0x00, 0x44, 0x00, 0x82, 0x00,
+ 0x11, 0x01, 0x28, 0x00, 0x45, 0x01};
+static unsigned char checkmark_dark_bits[] = {
+ 0x82, 0x00, 0x45, 0x01, 0xaa, 0x00, 0x54, 0x00, 0x28, 0x00, 0x74, 0x00,
+ 0xea, 0x00, 0xc5, 0x01, 0x82, 0x00};
+static unsigned char checkmark_light_bits[] = {
+ 0x00, 0xfe, 0x82, 0xfe, 0x44, 0xfe, 0x28, 0xfe, 0x10, 0xfe, 0x08, 0xfe,
+ 0x04, 0xfe, 0x02, 0xfe, 0x00, 0xfe};
+static unsigned char checkmark_tristate_bits[] = {
+ 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01,
+ 0x00, 0x00, 0xff, 0x01, 0x00, 0x00};
+// radio mark
+const uint RADIOMARKSIZE = 9; // 9x9
+static unsigned char radiomark_aa_bits[] = {
+ 0x00, 0x00, 0x44, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x82, 0x00, 0x44, 0x00, 0x00, 0x00};
+static unsigned char radiomark_dark_bits[] = {
+ 0x00, 0x00, 0x38, 0x00, 0x44, 0x00, 0xf2, 0x00, 0xfa, 0x00, 0xfa, 0x00,
+ 0x7c, 0x00, 0x38, 0x00, 0x00, 0x00};
+static unsigned char radiomark_light_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+// popupmenu item constants...
+static const int itemHMargin = 6;
+static const int itemFrame = 2;
+static const int arrowHMargin = 6;
+static const int rightBorder = 12;
+static const uint TIMERINTERVAL = 25; // msec
+static const int ANIMATIONSTEPS = 20;
+
+// -- Style Plugin Interface -------------------------
+class PolyesterStylePlugin : public QStylePlugin
+{
+ public:
+ PolyesterStylePlugin() {}
+ ~PolyesterStylePlugin() {}
+
+ QStringList keys() const {
+ return QStringList() << "Polyester";
+ }
+
+ QStyle* create( const QString& key ) {
+ if (key.lower() == "polyester")
+ return new PolyesterStyle;
+ return 0;
+ }
+};
+
+KDE_Q_EXPORT_PLUGIN( PolyesterStylePlugin )
+// -- end --
+
+PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollBar),
+ kickerMode(false),
+ kornMode(false),
+ flatMode(false)
+{
+ hoverWidget = 0;
+ hoverTab = 0;
+ hoverHeaderId = -1;
+
+ horizontalDots = 0;
+ verticalDots = 0;
+
+ horizontalLine = 0;
+ verticalLine = 0;
+
+ QSettings settings;
+ _contrast = settings.readNumEntry("/Qt/KDE/contrast", 6);
+
+ settings.beginGroup("/polyesterstyle/Settings");
+ _useLowerCaseText = settings.readBoolEntry("/useLowerCaseText", false);
+ _scrollBarLines = settings.readBoolEntry("/scrollBarLines", false);
+ _scrollBarStyle = settings.readEntry("/scrollBarStyle", "ThreeButtonScrollBar");
+ _scrollBarExtent = settings.readNumEntry("/scrollBarSize", 16);
+ if(_scrollBarExtent < 8 || _scrollBarExtent > 48)
+ _scrollBarExtent = 16;
+ _animateProgressBar = settings.readBoolEntry("/animateProgressBar", false);
+ _animateButton = settings.readBoolEntry("/animateButton", false);
+ /*don't animate buttons in gtk-qt or openoffice, they aren't able to do so :-)*/
+ if( ( qstrcmp( qApp->argv() [ 0 ], "unknown" ) == 0 ) ||
+ ( qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ) == 0 ))
+ _animateButton = false;
+ _animateButtonToDark = settings.readBoolEntry("/animateButtonToDark", false);
+ _buttonStyle = settings.readEntry("/buttonStyle", "glass");
+ _lightBorder= settings.readBoolEntry("/lightBorder", true);
+ _coloredScrollBar = settings.readBoolEntry("/coloredScrollBar", true);
+ _centeredTabBar = settings.readBoolEntry("/centeredTabBar", false);
+ _highLightTab = settings.readBoolEntry("/highLightTab", true);
+ _statusBarFrame = settings.readBoolEntry("/statusBarFrame", true);
+ _colorizeSortedHeader = settings.readBoolEntry("/colorizeSortedHeader", true);
+ _menuItemSpacing = settings.readNumEntry("/menuItemSpacing", 8);
+ if( _menuItemSpacing > 12 || _menuItemSpacing < 0 )
+ _menuItemSpacing = 8;
+ _buttonMenuItem = settings.readBoolEntry("/buttonMenuItem", true);
+ _menuBarEmphasis = settings.readBoolEntry("/menuBarEmphasis", false);
+ _menuBarEmphasisBorder = settings.readBoolEntry("/menuBarEmphasisBorder", true);
+ if( _menuBarEmphasis )
+ _customMenuBarEmphasisColor = settings.readBoolEntry("/customMenuBarEmphasisColor", false);
+ else
+ _customMenuBarEmphasisColor = false;
+ _menuBarEmphasisColor = settings.readEntry("/menuBarEmphasisColor", "black");
+ _menuStripe = settings.readBoolEntry("/menuStripe", true);
+ _shadowedMenuBarText = settings.readBoolEntry("/shadowedMenuBarText", true);
+ _shadowedButtonsText = settings.readBoolEntry("/shadowedButtonsText", true);
+ _drawToolBarSeparator = settings.readBoolEntry("/drawToolBarSeparator", true);
+ _drawToolBarItemSeparator = settings.readBoolEntry("/drawToolBarItemSeparator", true);
+ _drawFocusRect = settings.readBoolEntry("/drawFocusRect", true);
+ _drawTriangularExpander = settings.readBoolEntry("/drawTriangularExpander", false);
+ _inputFocusHighlight = settings.readBoolEntry("/inputFocusHighlight", true);
+ _customOverHighlightColor = settings.readBoolEntry("/customOverHighlightColor", false);
+ _overHighlightColor.setNamedColor( settings.readEntry("/overHighlightColor", "black") );
+ _customFocusHighlightColor = settings.readBoolEntry("/customFocusHighlightColor", false);
+ _focusHighlightColor.setNamedColor( settings.readEntry("/focusHighlightColor", "black") );
+ _customCheckMarkColor = settings.readBoolEntry("/customCheckMarkColor", false);
+ _checkMarkColor.setNamedColor( settings.readEntry("/checkMarkColor", "black") );
+ settings.endGroup();
+
+ /*HACK: hack for gtk-qt: mozillas only works with windows style scrollbars,
+ even if the other gtk apps works with other styles, at the moment
+ I don't have a way to choose only mozilla apps, because
+ qstrcmp( qApp->argv() [ 0 ], "firefox-bin" ) == 0
+ does not work (qApp->argv() [ 0 ] is always unknown on gtk-qt apps)
+ also, the menu stripe is turned off because it's managed too bad,
+ in particular by (of course) firefox
+ this hack may be disabled in the future, let's see...*/
+ if( !qstrcmp( qApp->argv() [ 0 ], "unknown" ) )
+ {
+ _scrollBarType = KStyle::WindowsStyleScrollBar;
+ _menuStripe = false;
+ }
+
+ //Thanks, Lipstik :-)
+ else if( !strcmp(_scrollBarStyle,"ThreeButtonScrollBar" ) )
+ _scrollBarType = KStyle::ThreeButtonScrollBar;
+ else if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) )
+ _scrollBarType = KStyle::WindowsStyleScrollBar;
+ else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) )
+ _scrollBarType = KStyle::PlatinumStyleScrollBar;
+ else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) )
+ _scrollBarType = KStyle::NextStyleScrollBar;
+
+ //HACK for gtk-qt: if setScrollBarType is called wxwidgets applications will broke
+ /*if( qstrcmp( qApp->argv() [ 0 ], "unknown" ) )
+ this->setScrollBarType(_scrollBarType);*/
+ this->setScrollBarType(_scrollBarType);
+
+ // setup pixmap cache...
+ pixmapCache = new QIntCache<CacheEntry>(150000, 499);
+ pixmapCache->setAutoDelete(true);
+
+ if ( _animateProgressBar )
+ {
+ animationTimer = new QTimer( this );
+ connect( animationTimer, SIGNAL(timeout()), this, SLOT(updateProgressPos()) );
+ }
+
+ if ( _animateButton )
+ {
+ btnAnimTimer = new QTimer( this );
+ connect( btnAnimTimer, SIGNAL(timeout()), this, SLOT(animate()) );
+ }
+
+ //create and empty image for the alpha blended menu stripe
+ alphaStripe = new QImage();
+}
+
+
+void PolyesterStyle::updateProgressPos()
+{
+ QProgressBar* pb;
+ //Update the registered progressbars.
+ QMap<QWidget*, int>::iterator iter;
+ bool visible = false;
+ for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); iter++)
+ {
+ if ( !::qt_cast<QProgressBar*>(iter.key()) )
+ continue;
+
+ pb = dynamic_cast<QProgressBar*>(iter.key());
+ if ( iter.key() -> isEnabled() &&
+ pb -> progress() != pb->totalSteps() )
+ {
+ // update animation Offset of the current Widget
+ iter.data() = (iter.data() + 1) % 20;
+ iter.key()->update();
+ }
+ if (iter.key()->isVisible())
+ visible = true;
+ }
+ if (!visible)
+ animationTimer->stop();
+}
+
+void PolyesterStyle::animate() {
+
+ btnAnimTimer->stop();
+
+ int animationDelta = 1;
+ if( _animateButtonToDark )
+ animationDelta = -1;
+
+ bool mustStop = true;
+
+ for ( AnimWidgetMap::iterator it = animWidgets.begin(); it != animWidgets.end(); ++it) {
+ QWidget *widget = it.key();
+
+ if( animWidgets[widget].active == true ) {
+ mustStop = false;
+ if(abs(animWidgets[widget].animFrame) < ANIMATIONSTEPS) {
+ if ( _animateButton ) {
+ animWidgets[widget].animFrame += animationDelta;
+ widget->repaint(false);
+ } else {
+ animWidgets[widget].animFrame = ANIMATIONSTEPS;
+ }
+ }
+ } else {
+ if(abs(animWidgets[widget].animFrame) > 0) {
+ mustStop = false;
+ if ( _animateButton ) {
+ animWidgets[widget].animFrame -= animationDelta;
+ widget->repaint(false);
+ } else {
+ animWidgets[widget].animFrame = 0;
+ }
+ // btnAnimTimer->start(TIMERINTERVAL, true); // single-shot
+ }
+ }
+ }
+
+ if( !mustStop )
+ btnAnimTimer->start(TIMERINTERVAL, true); // single-shot
+}
+
+
+PolyesterStyle::~PolyesterStyle()
+{
+ delete pixmapCache;
+ delete horizontalDots;
+ delete verticalDots;
+ delete horizontalLine;
+ delete verticalLine;
+}
+
+void PolyesterStyle::polish(QApplication* app)
+{
+ if (!qstrcmp(app->argv()[0], "kicker"))
+ kickerMode = true;
+ else if (!qstrcmp(app->argv()[0], "korn"))
+ kornMode = true;
+}
+
+void PolyesterStyle::polish(QWidget* widget)
+{
+ if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
+ khtmlWidgets[widget] = true;
+ connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(khtmlWidgetDestroyed(QObject*)));
+ }
+
+ // use qt_cast where possible to check if the widget inheits one of the classes. might improve
+ // performance compared to QObject::inherits()
+ if ( ::qt_cast<QPushButton*>(widget) || ::qt_cast<QComboBox*>(widget) ||
+ ::qt_cast<QSpinWidget*>(widget) || ::qt_cast<QSlider*>(widget) ||
+ ::qt_cast<QCheckBox*>(widget) || ::qt_cast<QRadioButton*>(widget) ||
+ ::qt_cast<QToolButton*>(widget) || widget->inherits("QSplitterHandle") )
+ {
+// widget->setBackgroundMode(PaletteBackground);
+ widget->installEventFilter(this);
+
+ if( _animateButton )
+ {
+ //TODO: discover if it's going to stay deleted...
+ //if (!btnAnimTimer->isActive())
+ // btnAnimTimer->start( TIMERINTERVAL, false );
+
+ animWidgets[widget].active = false;
+ connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(animWidgetDestroyed(QObject*)));
+ }
+
+ QSlider *slider = ::qt_cast<QSlider*>(widget);
+ if(slider)
+ {
+ connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(sliderThumbMoved(int)));
+ connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderThumbMoved(int)));
+ }
+ } else if (::qt_cast<QLineEdit*>(widget)) {
+ widget->installEventFilter(this);
+ } else if (::qt_cast<QTabBar*>(widget)) {
+ widget->setMouseTracking(true);
+ widget->installEventFilter(this);
+ } else if (::qt_cast<QPopupMenu*>(widget)) {
+ widget->setBackgroundMode( NoBackground );
+ } else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
+ widget->installEventFilter(this);
+ } else if (::qt_cast<QHeader*>(widget)) {
+ connect(widget->parent(), SIGNAL(contentsMoving(int, int)), widget, SLOT(update()));
+ widget->installEventFilter(this);
+ }else if (::qt_cast<QScrollBar*>(widget)) {
+ widget->installEventFilter(this);
+ }
+
+ if( _animateProgressBar && ::qt_cast<QProgressBar*>(widget) )
+ {
+ widget->installEventFilter(this);
+ progAnimWidgets[widget] = 0;
+ connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*)));
+ if (!animationTimer->isActive())
+ animationTimer->start( 50, false );
+ }
+
+
+
+ KStyle::polish(widget);
+}
+
+void PolyesterStyle::unPolish(QWidget* widget)
+{
+ if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
+ khtmlWidgets.remove(widget);
+ }
+
+ // use qt_cast to check if the widget inheits one of the classes.
+ if ( ::qt_cast<QPushButton*>(widget) || ::qt_cast<QComboBox*>(widget) ||
+ ::qt_cast<QSpinWidget*>(widget) || ::qt_cast<QSlider*>(widget) ||
+ ::qt_cast<QCheckBox*>(widget) || ::qt_cast<QRadioButton*>(widget) ||
+ ::qt_cast<QToolButton*>(widget) || ::qt_cast<QLineEdit*>(widget) ||
+ widget->inherits("QSplitterHandle") )
+ {
+ widget->removeEventFilter(this);
+ animWidgets.remove(widget);
+ }
+ else if (::qt_cast<QTabBar*>(widget) || ::qt_cast<QHeader*>(widget)
+ || ::qt_cast<QScrollBar*>(widget)) {
+ widget->setMouseTracking(false);
+ widget->removeEventFilter(this);
+ } else if (::qt_cast<QPopupMenu*>(widget)) {
+ widget->setBackgroundMode( PaletteBackground );
+ } else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
+ widget->removeEventFilter(this);
+ }
+
+ const QSlider *slider = ::qt_cast<QSlider*>(widget);
+ if(slider && sliderValues.contains(slider))
+ sliderValues.remove(slider);
+
+ if ( ::qt_cast<QProgressBar*>(widget) )
+ {
+ progAnimWidgets.remove(widget);
+ }
+
+ KStyle::unPolish(widget);
+}
+
+/*a bunch of slots stuff...*/
+void PolyesterStyle::khtmlWidgetDestroyed(QObject* obj)
+{
+ khtmlWidgets.remove(static_cast<QWidget*>(obj));
+}
+
+void PolyesterStyle::progressBarDestroyed(QObject* obj)
+{
+ progAnimWidgets.remove(static_cast<QWidget*>(obj));
+}
+
+void PolyesterStyle::animWidgetDestroyed(QObject* obj)
+{
+ animWidgets.remove(static_cast<QWidget*>(obj));
+}
+
+void PolyesterStyle::renderContour(QPainter *p,
+ const QRect &r,
+ const QColor &backgroundColor,
+ const QColor &contour,
+ const uint flags) const
+{
+ if((r.width() <= 0)||(r.height() <= 0))
+ return;
+
+ const bool drawLeft = flags&Draw_Left;
+ const bool drawRight = flags&Draw_Right;
+ const bool drawTop = flags&Draw_Top;
+ const bool drawBottom = flags&Draw_Bottom;
+ const bool disabled = flags&Is_Disabled;
+ const bool alphaBlend = flags&Draw_AlphaBlend;
+
+ const bool sharpTopLeft = flags&Sharp_UpperLeft;
+ const bool sharpTopRight = flags&Sharp_UpperRight;
+ const bool sharpBottomLeft = flags&Sharp_BottomLeft;
+ const bool sharpBottomRight = flags&Sharp_BottomRight;
+
+ QColor contourColor;
+ if (disabled) {
+ contourColor = backgroundColor.dark(150);
+ } else {
+ contourColor = contour;
+ }
+
+// sides
+ p->setPen( alphaBlendColors(backgroundColor, contourColor, 50) );
+ if(drawLeft)
+ p->drawLine(r.left(), drawTop?r.top()+2:r.top(), r.left(), drawBottom?r.bottom()-2:r.bottom());
+ if(drawRight)
+ p->drawLine(r.right(), drawTop?r.top()+2:r.top(), r.right(), drawBottom?r.bottom()-2:r.bottom());
+ if(drawTop)
+ p->drawLine(drawLeft?r.left()+2:r.left(), r.top(), drawRight?r.right()-2:r.right(), r.top());
+ if(drawBottom)
+ p->drawLine(drawLeft?r.left()+2:r.left(), r.bottom(), drawRight?r.right()-2:r.right(), r.bottom());
+
+// edges
+ const int alphaAA = 110; // the alpha value for anti-aliasing...
+
+ // first part...
+ p->setPen(alphaBlendColors(backgroundColor, contourColor, 50) );
+ if(drawLeft && drawTop) {
+ switch(flags&Round_UpperLeft) {
+ case false:
+ p->drawPoint(r.left()+1, r.top());
+ p->drawPoint(r.left(), r.top()+1);
+ break;
+ default:
+ p->drawPoint(r.left()+1, r.top()+1);
+ }
+ }
+ if(drawLeft && drawBottom) {
+ switch(flags&Round_BottomLeft) {
+ case false:
+ p->drawPoint(r.left()+1, r.bottom());
+ p->drawPoint(r.left(), r.bottom()-1);
+ break;
+ default:
+ p->drawPoint(r.left()+1, r.bottom()-1);
+ }
+ }
+ if(drawRight && drawTop) {
+ switch(flags&Round_UpperRight) {
+ case false:
+ p->drawPoint(r.right()-1, r.top());
+ p->drawPoint(r.right(), r.top()+1);
+ break;
+ default:
+ p->drawPoint(r.right()-1, r.top()+1);
+ }
+ }
+ if(drawRight && drawBottom) {
+ switch(flags&Round_BottomRight) {
+ case false:
+ p->drawPoint(r.right()-1, r.bottom());
+ p->drawPoint(r.right(), r.bottom()-1);
+ break;
+ default:
+ p->drawPoint(r.right()-1, r.bottom()-1);
+ }
+ }
+
+ // second part... fill edges in case we don't paint alpha-blended
+ p->setPen( backgroundColor );
+ if (!alphaBlend) {
+ if(flags&Round_UpperLeft && drawLeft && drawTop) {
+ p->drawPoint( r.x(), r.y() );
+ }
+ if(flags&Round_BottomLeft && drawLeft && drawBottom) {
+ p->drawPoint( r.x(), r.bottom() );
+ }
+ if(flags&Round_UpperRight && drawRight && drawTop) {
+ p->drawPoint( r.right(), r.y() );
+ }
+ if(flags&Round_BottomRight && drawRight && drawBottom) {
+ p->drawPoint( r.right(), r.bottom() );
+ }
+ }
+
+ // third part... anti-aliasing...
+ if(drawLeft && drawTop) {
+ switch(flags&Round_UpperLeft) {
+ case false:
+ renderPixel(p,QPoint(r.left(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ break;
+ default:
+ renderPixel(p,QPoint(r.left()+1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,QPoint(r.left(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ }
+ }
+ if(drawLeft && drawBottom) {
+ switch(flags&Round_BottomLeft) {
+ case false:
+ renderPixel(p,QPoint(r.left(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ break;
+ default:
+ renderPixel(p,QPoint(r.left()+1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,QPoint(r.left(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ }
+ }
+ if(drawRight && drawTop) {
+ switch(flags&Round_UpperRight) {
+ case false:
+ renderPixel(p,QPoint(r.right(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ break;
+ default:
+ renderPixel(p,QPoint(r.right()-1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,QPoint(r.right(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ }
+ }
+ if(drawRight && drawBottom) {
+ switch(flags&Round_BottomRight) {
+ case false:
+ renderPixel(p,QPoint(r.right(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ break;
+ default:
+ renderPixel(p,QPoint(r.right()-1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,QPoint(r.right(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ }
+ }
+
+ //HACK: paint the sharp border over the rest, it's NoGooD(tm)
+ p->setPen( alphaBlendColors(backgroundColor, contourColor, 50) );
+ if( !(flags&Round_UpperLeft) && sharpTopLeft )
+ p->drawPoint( r.left(), r.top() );
+ if( !(flags&Round_UpperRight) && sharpTopRight )
+ p->drawPoint( r.right(), r.top() );
+ if( !(flags&Round_BottomLeft) && sharpBottomLeft )
+ p->drawPoint( r.left(), r.bottom() );
+ if( !(flags&Round_BottomRight) && sharpBottomRight )
+ p->drawPoint( r.right(), r.bottom() );
+
+}
+
+void PolyesterStyle::renderMask(QPainter *p,
+ const QRect &r,
+ const QColor &color,
+ const uint flags) const
+{
+ if((r.width() <= 0)||(r.height() <= 0))
+ return;
+
+ const bool roundUpperLeft = flags&Round_UpperLeft;
+ const bool roundUpperRight = flags&Round_UpperRight;
+ const bool roundBottomLeft = flags&Round_BottomLeft;
+ const bool roundBottomRight = flags&Round_BottomRight;
+
+
+ p->fillRect (QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) , color);
+
+ p->setPen(color);
+ // sides
+ p->drawLine(roundUpperLeft?r.x()+1:r.x(), r.y(),
+ roundUpperRight?r.right()-1:r.right(), r.y() );
+ p->drawLine(roundBottomLeft?r.x()+1:r.x(), r.bottom(),
+ roundBottomRight?r.right()-1:r.right(), r.bottom() );
+ p->drawLine(r.x(), roundUpperLeft?r.y()+1:r.y(),
+ r.x(), roundBottomLeft?r.bottom()-1:r.bottom() );
+ p->drawLine(r.right(), roundUpperLeft?r.y()+1:r.y(),
+ r.right(), roundBottomLeft?r.bottom()-1:r.bottom() );
+}
+
+void PolyesterStyle::renderSurface(QPainter *p,
+ const QRect &r,
+ const QColor &backgroundColor,
+ const QColor &buttonColor,
+ const QColor &highlightColor,
+ int intensity,
+ const uint flags) const
+{
+ if((r.width() <= 0)||(r.height() <= 0))
+ return;
+
+ const bool disabled = flags&Is_Disabled;
+
+ const bool drawLeft = flags&Draw_Left;
+ const bool drawRight = flags&Draw_Right;
+ const bool drawTop = flags&Draw_Top;
+ const bool drawBottom = flags&Draw_Bottom;
+ const bool roundUpperLeft = flags&Round_UpperLeft;
+ const bool roundUpperRight = flags&Round_UpperRight;
+ const bool roundBottomLeft = flags&Round_BottomLeft;
+ const bool roundBottomRight = flags&Round_BottomRight;
+ const bool sunken = flags&Is_Sunken;
+ const bool horizontal = flags&Is_Horizontal;
+ bool highlight = false,
+ highlightLeft = false,
+ highlightRight = false,
+ highlightTop = false,
+ highlightBottom = false;
+ // only highlight if not sunken & not disabled...
+ if(!sunken && !disabled) {
+ highlight = (flags&Is_Highlight);
+ highlightLeft = (flags&Highlight_Left);
+ highlightRight = (flags&Highlight_Right);
+ highlightTop = (flags&Highlight_Top);
+ highlightBottom = (flags&Highlight_Bottom);
+ }
+
+ QColor baseColor = alphaBlendColors(backgroundColor, disabled?backgroundColor:buttonColor, 10);
+ if (disabled) {
+ intensity = 2;
+ } else if (highlight) {
+ // blend this _slightly_ with the background
+ baseColor = alphaBlendColors(baseColor, highlightColor, 240);
+ } else if (sunken) {
+ // enforce a common sunken-style...
+ baseColor = baseColor.dark(110+intensity);
+ //intensity = _contrast*2;
+ }
+
+// some often needed colors...
+ // 1 more intensive than 2.
+ const QColor colorTop1 = alphaBlendColors(baseColor,
+ sunken?baseColor.dark(100+intensity*2):baseColor.light(100+intensity*2), 80);
+ const QColor colorTop2 = alphaBlendColors(baseColor,
+ sunken?baseColor.dark(100+intensity):baseColor.light(100+intensity), 80);
+ const QColor colorBottom1 = alphaBlendColors(baseColor,
+ sunken?baseColor.light(100+intensity*2):baseColor.dark(100+intensity*2), 80);
+ const QColor colorBottom2 = alphaBlendColors(baseColor,
+ sunken?baseColor.light(100+intensity):baseColor.dark(100+intensity), 80);
+
+ const QColor colorBorder = colorTop1.light(100+_contrast);
+
+// sides
+ if (drawLeft) {
+ if (horizontal && !_lightBorder) {
+ int height = r.height();
+ if (roundUpperLeft || !drawTop) height--;
+ if (roundBottomLeft || !drawBottom) height--;
+ renderGradient(p, QRect(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(), 1, height),
+ colorBorder, baseColor);
+ } else {
+ p->setPen(colorBorder );
+ p->drawLine(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(),
+ r.left(), (roundBottomLeft&&drawBottom)?r.bottom()-1:r.bottom() );
+ }
+ }
+ if (drawRight) {
+ if (horizontal && !_lightBorder) {
+ int height = r.height();
+ // TODO: there's still a bogus in it: when edge4 is Thick
+ // and we don't whant to draw the Top, we have a unpainted area
+ if (roundUpperRight || !drawTop) height--;
+ if (roundBottomRight || !drawBottom) height--;
+ renderGradient(p, QRect(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(), 1, height),
+ baseColor, _lightBorder&&!sunken?colorBorder:colorBottom1);
+ } else {
+ /*3d effect or light borders?*/
+ p->setPen(_lightBorder&&!sunken?colorBorder:colorBottom1 );
+ p->drawLine(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(),
+ r.right(), (roundBottomRight&&drawBottom)?r.bottom()-1:r.bottom() );
+ }
+ }
+ if (drawTop) {
+ if ( horizontal || _lightBorder ) {
+ p->setPen( colorBorder );
+ p->drawLine((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(),
+ (roundUpperRight&&drawRight)?r.right()-1:r.right(), r.top() );
+ } else {
+ int width = r.width();
+ if (roundUpperLeft || !drawLeft) width--;
+ if (roundUpperRight || !drawRight) width--;
+ renderGradient(p, QRect((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(), width, 1),
+ colorTop2, colorBorder, false );
+ }
+ }
+ if (drawBottom) {
+ if ( horizontal|| _lightBorder ) {
+ p->setPen(_lightBorder&&!sunken?colorBorder:colorBottom1 );
+ p->drawLine((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(),
+ (roundBottomRight&&drawRight)?r.right()-1:r.right(), r.bottom() );
+ } else {
+ int width = r.width();
+ if (roundBottomLeft || !drawLeft) width--;
+ if (roundBottomRight || !drawRight) width--;
+ renderGradient(p, QRect((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(), width, 1),
+ colorBottom2, _lightBorder&&!sunken?colorBorder:colorBottom1, false);
+ }
+ }
+
+// button area...
+ int width = r.width();
+ int height = r.height();
+ if (drawLeft) width--;
+ if (drawRight) width--;
+ if (drawTop) height--;
+ if (drawBottom) height--;
+
+ int left = r.left();
+ int top = r.top();
+ if (drawLeft) left++;
+ if (drawTop) top++;
+
+ if( !strcmp(_buttonStyle,"gradients" ) /*|| sunken*/ ){
+ //polyester style
+ renderGradient(p, QRect(drawLeft?r.left()+1:r.left(),
+ drawTop?r.top()+1:r.top(), width, height),
+ colorTop2, colorBottom2, horizontal);
+ }
+ else if( !strcmp(_buttonStyle,"glass" ) ){
+ //glass buttons
+ /*create a copy of the two colors, otherwise ugly things(tm) happens...*/
+ const QColor colorTop3 = QColor(colorTop1.rgb()).light(100+_contrast);
+ const QColor colorBottom3 = QColor(colorBottom2.rgb()).light(100+_contrast);
+
+ //halfsize is half of height or width depending in the scrollbar is horizontal
+ // round on upper int if the size is odd
+ int halfsize;
+ if( horizontal )
+ halfsize = height%2==0?height/2:(height/2)+1;
+ else
+ halfsize = width%2==0?width/2:(width/2)+1;
+
+ renderGradient(p, QRect(left, top,
+ horizontal?width:width/2, horizontal?height/2:height),
+ colorTop2, colorBottom3, horizontal);
+ renderGradient(p, QRect(horizontal?left:left+width/2,
+ horizontal?top+height/2:top,
+ horizontal?width:halfsize, horizontal?halfsize:height),
+ colorBottom2, colorTop2, horizontal);
+ }else if( !strcmp(_buttonStyle,"reverseGradients" ) ){
+ //lipstik style
+ renderGradient(p, QRect(drawLeft?r.left()+1:r.left(),
+ drawTop?r.top()+1:r.top(), width, height),
+ colorBottom2, colorTop2, horizontal);
+ }else{
+ //flat style
+ renderGradient(p, QRect(drawLeft?r.left()+1:r.left(),
+ drawTop?r.top()+1:r.top(), width, height),
+ buttonColor, buttonColor, horizontal);
+ }
+// highlighting...
+ if(highlightTop) {
+ p->setPen(alphaBlendColors(colorTop1 , highlightColor, 20) );
+ p->drawLine((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(),
+ (roundUpperRight&&drawRight)?r.right()-1:r.right(), r.top() );
+
+ p->setPen(alphaBlendColors(colorTop2 , highlightColor, 90) );
+ p->drawLine(highlightLeft?r.left()+1:r.left(), r.top()+1,
+ highlightRight?r.right()-1:r.right(), r.top()+1 );
+
+ if( roundUpperLeft&&drawLeft&&!highlightLeft )
+ {
+ p->drawPoint(r.left(),r.top()+2);
+ p->setPen(alphaBlendColors(colorTop1 , highlightColor, 20) );
+ p->drawPoint(r.left(),r.top()+1);
+ }
+ if( roundUpperRight&&drawRight&&!highlightRight )
+ {
+ p->setPen(alphaBlendColors(colorTop1 , highlightColor, 20) );
+ p->drawPoint(r.right(),r.top()+1);
+ p->setPen(alphaBlendColors(colorTop2 , highlightColor, 90) );
+ p->drawPoint(r.right(),r.top()+2);
+ }
+ }
+ if(highlightBottom) {
+ p->setPen(alphaBlendColors(colorBottom1 , highlightColor, 20) );
+ p->drawLine((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(),
+ (roundBottomRight&&drawRight)?r.right()-1:r.right(), r.bottom() );
+ p->setPen(alphaBlendColors(colorBottom2 , highlightColor, 90) );
+ p->drawLine(highlightLeft?r.left()+1:r.left(), r.bottom()-1,
+ highlightRight?r.right()-1:r.right(), r.bottom()-1 );
+
+ if( roundBottomLeft&&drawLeft&&!highlightLeft )
+ {
+ p->drawPoint(r.left(),r.bottom()-2);
+ p->setPen(alphaBlendColors(colorBottom1 , highlightColor, 20) );
+ p->drawPoint(r.left(),r.bottom()-1);
+ }
+ if( roundBottomRight&&drawRight&&!highlightRight )
+ {
+ p->setPen(alphaBlendColors(colorBottom2 , highlightColor, 90) );
+ p->drawPoint(r.right(),r.bottom()-2);
+ p->setPen(alphaBlendColors(colorBottom1 , highlightColor, 20) );
+ p->drawPoint(r.right(),r.bottom()-1);
+ }
+ }
+ if(highlightLeft) {
+ p->setPen(alphaBlendColors(colorTop1 , highlightColor, 20) );
+ p->drawLine(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(),
+ r.left(), (roundBottomLeft&&drawBottom)?r.bottom()-1:r.bottom() );
+ p->setPen(alphaBlendColors(colorTop2 , highlightColor, 90) );
+ p->drawLine(r.left()+1, highlightTop?r.top()+1:r.top(),
+ r.left()+1, highlightBottom?r.bottom()-1:r.bottom() );
+ }
+ if(highlightRight) {
+ p->setPen(alphaBlendColors(colorBottom1 , highlightColor, 20) );
+ p->drawLine(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(),
+ r.right(), (roundBottomRight&&drawBottom)?r.bottom()-1:r.bottom() );
+ p->setPen(alphaBlendColors(colorBottom2 , highlightColor, 90) );
+ p->drawLine(r.right()-1, highlightTop?r.top()+1:r.top(),
+ r.right()-1, highlightBottom?r.bottom()-1:r.bottom() );
+ }
+}
+
+void PolyesterStyle::renderPixel(QPainter *p,
+ const QPoint &pos,
+ const int alpha,
+ const QColor &color,
+ const QColor &background,
+ bool fullAlphaBlend) const
+{
+ if(fullAlphaBlend)
+ // full alpha blend: paint into an image with alpha buffer and convert to a pixmap ...
+ {
+ QRgb rgb = color.rgb();
+ // generate a quite unique key -- use the unused width field to store the alpha value.
+ CacheEntry search(cAlphaDot, alpha, 0, rgb);
+ int key = search.key();
+
+ CacheEntry *cacheEntry;
+ if( (cacheEntry = pixmapCache->find(key)) ) {
+ if( search == *cacheEntry ) { // match! we can draw now...
+ if(cacheEntry->pixmap)
+ p->drawPixmap(pos, *(cacheEntry->pixmap) );
+ return;
+ } else { //Remove old entry in case of a conflict!
+ pixmapCache->remove( key );
+ }
+ }
+
+
+ QImage aImg(1,1,32); // 1x1
+ aImg.setAlphaBuffer(true);
+ aImg.setPixel(0,0,qRgba(qRed(rgb),qGreen(rgb),qBlue(rgb),alpha));
+ QPixmap *result = new QPixmap(aImg);
+
+ p->drawPixmap(pos, *result);
+
+ // add to the cache...
+ CacheEntry *toAdd = new CacheEntry(search);
+ toAdd->pixmap = result;
+ bool insertOk = pixmapCache->insert( key, toAdd, result->depth()/8);
+ if(!insertOk)
+ delete result;
+ } else
+ // don't use an alpha buffer: calculate the resulting color from the alpha value, the fg- and the bg-color.
+ {
+ QRgb rgb_a = color.rgb();
+ QRgb rgb_b = background.rgb();
+ int a = alpha;
+ if(a>255) a = 255;
+ if(a<0) a = 0;
+ int a_inv = 255 - a;
+
+ QColor res = QColor( qRgb(qRed(rgb_b)*a_inv/255 + qRed(rgb_a)*a/255,
+ qGreen(rgb_b)*a_inv/255 + qGreen(rgb_a)*a/255,
+ qBlue(rgb_b)*a_inv/255 + qBlue(rgb_a)*a/255) );
+ p->setPen(res);
+ p->drawPoint(pos);
+ }
+}
+
+void PolyesterStyle::renderButton(QPainter *p,
+ const QRect &r,
+ const QColorGroup &g,
+ bool sunken,
+ bool mouseOver,
+ bool horizontal,
+ bool enabled,
+ bool khtmlMode,
+ int animFrame,
+ bool isDefault //TODO: move here all the default-button related code?
+ ) const
+{
+ // small fix for the kicker buttons...
+ if(kickerMode) enabled = true;
+
+
+ const QPen oldPen( p->pen() );
+
+ uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
+ if(!enabled) contourFlags|=Is_Disabled;
+ if(khtmlMode) contourFlags|=Draw_AlphaBlend;
+
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
+ if(horizontal) surfaceFlags|=Is_Horizontal;
+ if(!enabled) surfaceFlags|=Is_Disabled;
+ else
+ {
+ if(sunken)
+ surfaceFlags|=Is_Sunken;
+ else
+ {
+ if(((animFrame != 0) || mouseOver) &&
+ (!_animateButton||!isDefault))
+ {
+ surfaceFlags|=Is_Highlight;
+ if(horizontal)
+ {
+ surfaceFlags|=Highlight_Top;
+ surfaceFlags|=Highlight_Bottom;
+ }
+ else
+ {
+ surfaceFlags|=Highlight_Left;
+ surfaceFlags|=Highlight_Right;
+ }
+ }
+ }
+ }
+
+ if (!flatMode) {
+ contourFlags |= Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight;
+ surfaceFlags |= Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight;
+
+ renderContour(p, r, g.background(),
+ (isDefault?getColor(g,ButtonContour).dark(100+_contrast*10):getColor(g,ButtonContour)),
+ contourFlags);
+
+ /*Colorize to mouseHover only the default button, the others will get lighter or darker*/
+ if(!isDefault)
+ {
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ g.background(), g.button().light(100+animFrame),
+ (_animateButton?alphaBlendColors( getColor(g,MouseOverHighlight),g.button(), 20*animFrame ):getColor(g,MouseOverHighlight)),
+ _contrast, surfaceFlags);
+ }
+ else
+ {
+ //12.8 is the maximum amount of blending (256) / ANIMATIONSTEPS (20)
+ QColor buttonColor = alphaBlendColors( g.highlight(), g.button(), (int)(12.8*animFrame)+50);
+
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ g.background(), buttonColor.light(100+animFrame), getColor(g,MouseOverHighlight), _contrast+animFrame, surfaceFlags);
+ }
+
+ } else {
+ renderContour(p, r, g.background(), g.button().dark(105+_contrast*3),
+ contourFlags);
+
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast/2, surfaceFlags);
+
+ flatMode = false;
+ }
+
+ p->setPen(oldPen);
+
+
+}
+
+void PolyesterStyle::renderDot(QPainter *p,
+ const QPoint &point,
+ const QColor &baseColor,
+ const bool thick,
+ const bool sunken) const
+{
+ const QColor topColor = alphaBlendColors(baseColor, sunken?baseColor.dark(130):baseColor.light(150), 70);
+ const QColor bottomColor = alphaBlendColors(baseColor, sunken?baseColor.light(150):baseColor.dark(130), 70);
+ p->setPen(topColor );
+ p->drawLine(point.x(), point.y(), point.x()+1, point.y());
+ p->drawPoint(point.x(), point.y()+1);
+ p->setPen(bottomColor );
+ if(thick) {
+ p->drawLine(point.x()+1, point.y()+2, point.x()+2, point.y()+2);
+ p->drawPoint(point.x()+2, point.y()+1);
+ } else {
+ p->drawPoint(point.x()+1, point.y()+1);
+ }
+}
+
+void PolyesterStyle::renderGradient(QPainter *painter,
+ const QRect &rect,
+ const QColor &c1,
+ const QColor &c2,
+ bool horizontal) const
+{
+ if((rect.width() <= 0)||(rect.height() <= 0))
+ return;
+
+ // generate a quite unique key for this surface.
+ CacheEntry search(cGradientTile,
+ horizontal ? 0 : rect.width(),
+ horizontal ? rect.height() : 0,
+ c1.rgb(), c2.rgb(), horizontal );
+ int key = search.key();
+
+ CacheEntry *cacheEntry;
+ if( (cacheEntry = pixmapCache->find(key)) ) {
+ if( search == *cacheEntry ) { // match! we can draw now...
+ if(cacheEntry->pixmap) {
+ painter->drawTiledPixmap(rect, *(cacheEntry->pixmap) );
+ }
+ return;
+ } else {
+ // Remove old entry in case of a conflict!
+ // This shouldn't happen very often, see comment in CacheEntry.
+ pixmapCache->remove(key);
+ }
+ }
+
+ // there wasn't anything matching in the cache, create the pixmap now...
+ QPixmap *result = new QPixmap(horizontal ? 10 : rect.width(),
+ horizontal ? rect.height() : 10);
+ QPainter p(result);
+
+ int r_w = result->rect().width();
+ int r_h = result->rect().height();
+ int r_x, r_y, r_x2, r_y2;
+ result->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
+
+ int rDiff, gDiff, bDiff;
+ int rc, gc, bc;
+
+ register int x, y;
+
+ rDiff = ( c2.red()) - (rc = c1.red());
+ gDiff = ( c2.green()) - (gc = c1.green());
+ bDiff = ( c2.blue()) - (bc = c1.blue());
+
+ register int rl = rc << 16;
+ register int gl = gc << 16;
+ register int bl = bc << 16;
+
+ int rdelta = ((1<<16) / (horizontal ? r_h : r_w)) * rDiff;
+ int gdelta = ((1<<16) / (horizontal ? r_h : r_w)) * gDiff;
+ int bdelta = ((1<<16) / (horizontal ? r_h : r_w)) * bDiff;
+
+ // these for-loops could be merged, but the if's in the inner loop
+ // would make it slow
+ if(horizontal) {
+ for ( y = 0; y < r_h; y++ ) {
+ rl += rdelta;
+ gl += gdelta;
+ bl += bdelta;
+
+ p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.drawLine(r_x, r_y+y, r_x2, r_y+y);
+ }
+ } else {
+ for( x = 0; x < r_w; x++) {
+ rl += rdelta;
+ gl += gdelta;
+ bl += bdelta;
+
+ p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.drawLine(r_x+x, r_y, r_x+x, r_y2);
+ }
+ }
+
+ p.end();
+
+ // draw the result...
+ painter->drawTiledPixmap(rect, *result);
+
+ // insert into cache using the previously created key.
+ CacheEntry *toAdd = new CacheEntry(search);
+ toAdd->pixmap = result;
+ bool insertOk = pixmapCache->insert( key, toAdd, result->width()*result->height()*result->depth()/8 );
+
+ if(!insertOk)
+ delete result;
+}
+
+void PolyesterStyle::renderPanel(QPainter *p,
+ const QRect &r,
+ const QColorGroup &g,
+ const bool pseudo3d,
+ const bool sunken) const
+{
+ int x, x2, y, y2, w, h;
+ r.rect(&x,&y,&w,&h);
+ r.coords(&x, &y, &x2, &y2);
+
+ if (kickerMode &&
+ p->device() && p->device()->devType() == QInternal::Widget &&
+ QCString(static_cast<QWidget*>(p->device())->className()) == "FittsLawFrame") {
+ // Stolen wholesale from Keramik. I don't like it, but oh well.
+ if (sunken) {
+ const QCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
+ p->setPen(g.background().dark());
+ p->drawConvexPolygon(QPointArray(4, corners));
+ p->setPen(g.background().light());
+ p->drawPolyline(QPointArray(4, corners), 0, 3);
+ } else {
+ const QCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
+ p->setPen(g.background().dark());
+ p->drawPolygon(QPointArray(4, corners));
+ p->setPen(g.background().light());
+ p->drawPolyline(QPointArray(4, corners), 0, 3);
+ }
+ } else {
+ renderContour(p, r, g.background(), getColor(g, PanelContour) );
+
+ if(pseudo3d) {
+ if (sunken) {
+ p->setPen(getColor(g, PanelDark) );
+ } else {
+ p->setPen(getColor(g, PanelLight) );
+ }
+ p->drawLine(r.left()+2, r.top()+1, r.right()-2, r.top()+1);
+ p->drawLine(r.left()+1, r.top()+2, r.left()+1, r.bottom()-2);
+ if (sunken) {
+ p->setPen(getColor(g, PanelLight) );
+ } else {
+ p->setPen(getColor(g, PanelDark) );
+ }
+ p->drawLine(r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1);
+ p->drawLine(r.right()-1, r.top()+2, r.right()-1, r.bottom()-2);
+ }
+ }
+}
+
+void PolyesterStyle::renderMenuBlendPixmap( KPixmap &pix, const QColorGroup &cg,
+ const QPopupMenu* /* popup */ ) const
+{
+ pix.fill( cg.background().light(105) );
+}
+
+void PolyesterStyle::renderTab(QPainter *p,
+ const QRect &r,
+ const QColorGroup &g,
+ bool mouseOver,
+ const SelectedTab selected,
+ const bool bottom,
+ const TabPosition pos,
+ const bool triangular,
+ bool cornerWidget) const
+{
+ const bool reverseLayout = QApplication::reverseLayout();
+ const bool isFirst = (pos == First) || (pos == Single);
+ const bool isLast = (pos == Last);
+ const bool isSingle = (pos == Single);
+
+
+
+ /*if the tabbar is centered always render the left
+ rounded connection of the first tab*/
+ if( _centeredTabBar && !reverseLayout && isFirst )
+ cornerWidget = true;
+
+ if (selected == ThisTab) {
+ // is selected
+
+ // the top part of the tab which is nearly the same for all positions
+ QRect Rc; // contour
+ if (!bottom) {
+ if (isFirst && !cornerWidget && !reverseLayout) {
+ Rc = QRect(r.x(), r.y(), r.width()-1, r.height()-3);
+ } else if (isFirst && !cornerWidget && reverseLayout) {
+ Rc = QRect(r.x()+1, r.y(), r.width()-1, r.height()-3);
+ } else {
+ Rc = QRect(r.x()+1, r.y(), r.width()-2, r.height()-3);
+ }
+ } else {
+ if (isFirst && !cornerWidget && !reverseLayout) {
+ Rc = QRect(r.x(), r.y()+3, r.width()-1, r.height()-3);
+ } else if (isFirst && !cornerWidget && reverseLayout) {
+ Rc = QRect(r.x()+1, r.y()+3, r.width()-1, r.height()-3);
+ } else {
+ Rc = QRect(r.x()+1, r.y()+3, r.width()-2, r.height()-3);
+ }
+ }
+ const QRect Rs(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1); // the resulting surface
+ // the area where the fake border shoudl appear
+ const QRect Rb(r.x(), bottom?r.top():Rc.bottom()+1, r.width(), r.height()-Rc.height() );
+
+ uint contourFlags = Draw_Left|Draw_Right;
+ if(!bottom) {
+ contourFlags |= Draw_Top|Round_UpperLeft|Round_UpperRight;
+ } else {
+ contourFlags |= Draw_Bottom|Round_BottomLeft|Round_BottomRight;
+ }
+ renderContour(p, Rc,
+ g.background(), getColor(g,PanelContour),
+ contourFlags);
+
+ // surface
+ if(!bottom) {
+ p->setPen(getColor(g,PanelLight) );
+ p->drawLine(Rs.x()+1, Rs.y(), Rs.right()-1, Rs.y() );
+ renderGradient(p, QRect(Rs.x(), Rs.y()+1, 1, Rs.height()-1),
+ getColor(g,PanelLight), getColor(g,PanelLight2));
+ renderGradient(p, QRect(Rs.right(), Rs.y()+1, 1, Rs.height()-1),
+ getColor(g,PanelDark), getColor(g,PanelDark2));
+
+ if( !strcmp(_buttonStyle,"glass" ) ){
+ renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2, Rs.height()/2),
+ g.background().light(100+_contrast),
+ g.background());
+ renderGradient(p, QRect(Rs.x()+1, Rs.y()+Rs.height()/2, Rs.width()-2, Rs.height()/2),
+ g.background().dark(100+_contrast),
+ g.background());
+ }else if( !strcmp(_buttonStyle,"gradients" ) )
+ renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2, Rs.height()-1),
+ getColor(g,PanelLight), g.background());
+ else if( !strcmp(_buttonStyle,"reverseGradients" ) )
+ renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2,
+ Rs.height()-1),
+ g.background().dark(100+_contrast), g.background());
+ else
+ renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2,
+ Rs.height()-1),
+ g.background(), g.background());
+
+ if( _highLightTab )
+ {
+ p->fillRect( QRect(Rs.x()+1, Rs.y(), Rs.width()-2, 2),
+ g.highlight());
+ p->setPen( g.highlight() );
+ p->drawLine( Rs.x(), Rs.y()+1, Rs.x(), Rs.y()+2 );
+ p->drawLine( Rs.right(), Rs.y()+1, Rs.right(), Rs.y()+2 );
+ }
+ /*renderSurface(p, Rs,
+ g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
+ Draw_Top|Draw_Bottom|Is_Horizontal);*/
+
+ } else {
+ p->setPen(g.highlight());
+ //p->drawLine(Rs.x()+1, Rs.bottom(), Rs.right()-1, Rs.bottom() );
+ if( _highLightTab )
+ {
+ p->fillRect(Rs.x()+1, Rs.bottom()-1, Rs.width()-2, 2, g.highlight() );
+ p->drawLine(Rs.x(), Rs.bottom()-2, Rs.x(), Rs.bottom()-1 );
+ p->drawLine(Rs.right(), Rs.bottom()-2, Rs.right(), Rs.bottom()-1 );
+ }
+
+ renderGradient(p, QRect(Rs.x(), Rs.y(), 1, Rs.height()-4),
+ getColor(g,PanelLight), getColor(g,PanelLight2));
+ renderGradient(p, QRect(Rs.right(), Rs.y(), 1, Rs.height()-4),
+ getColor(g,PanelDark), getColor(g,PanelDark2));
+
+ renderSurface(p, QRect(Rs.x()+1, Rs.y(), Rs.width()-2, Rs.height()-3), g.background(), g.button(), g.highlight(), _contrast, Is_Horizontal);
+
+
+ }
+
+ // some "position specific" paintings...
+ // draw parts of the inactive tabs around...
+ if(!isSingle) {
+ p->setPen(alphaBlendColors(g.background(), getColor(g, ButtonContour), 50) );
+ if((!isFirst&&!reverseLayout) || (!isLast&&reverseLayout) ) {
+ p->drawPoint(r.left(), bottom?(triangular?r.bottom()-2:r.bottom()-3):(triangular?r.top()+2:r.top()+3) );
+ /*renderSurface(p, QRect(r.left(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
+ g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
+ Draw_Top|Draw_Bottom|Is_Horizontal);*/
+ }
+ if((!isLast&&!reverseLayout) || (!isFirst&&reverseLayout) ) {
+ //for some strange cause i must set the pen color again...
+ p->setPen(alphaBlendColors(g.background(), getColor(g, ButtonContour), 50) );
+ p->drawPoint(r.right(), bottom?(triangular?r.bottom()-2:r.bottom()-3):(triangular?r.top()+2:r.top()+3) );
+#if 0
+ renderSurface(p, QRect(r.right(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
+ g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
+ Draw_Top|Draw_Bottom|Is_Horizontal/*|((bottom?Highlight_Bottom:Highlight_Top):0)*/);
+#endif
+ }
+ }
+ // left connection from the panel border to the tab. :)
+ if(isFirst && !reverseLayout && !cornerWidget) {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawLine(Rb.x(), Rb.y(), Rb.x(), Rb.bottom() );
+ p->setPen(getColor(g,PanelLight) );
+ p->drawLine(Rb.x()+1, Rb.y(), Rb.x()+1, Rb.bottom() );
+ } else if(isFirst && reverseLayout && !cornerWidget) {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawLine(Rb.right(), Rb.y(), Rb.right(), Rb.bottom() );
+ p->setPen(getColor(g,PanelDark) );
+ p->drawLine(Rb.right()-1, Rb.y(), Rb.right()-1, Rb.bottom() );
+ }
+ // rounded connections to the panel...
+ if(!bottom) {
+ // left
+ if( (!isFirst && !reverseLayout) || (reverseLayout) || (isFirst && !reverseLayout && cornerWidget) ) {
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.x(), Rb.y());
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.x(), Rb.y()+1);
+ p->drawPoint(Rb.x()+1, Rb.y());
+ }
+ // right
+ if( (!reverseLayout) || (!isFirst && reverseLayout) || (isFirst && reverseLayout) ) {
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.right(), Rb.y());
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.right(), Rb.y()+1);
+ p->drawPoint(Rb.right()-1, Rb.y());
+ }
+ } else {
+ // left
+ if( (!isFirst && !reverseLayout) || (reverseLayout) || (isFirst && !reverseLayout && cornerWidget) ) {
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.x(), Rb.bottom());
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.x(), Rb.bottom()-1);
+ p->drawPoint(Rb.x()+1, Rb.bottom());
+ }
+ // right
+ if( (!reverseLayout) || (!isFirst && reverseLayout) || (isFirst && reverseLayout && cornerWidget) ) {
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.right(), Rb.bottom());
+ p->setPen( alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.right(), Rb.bottom()-1);
+ p->drawPoint(Rb.right()-1, Rb.bottom());
+ }
+ }
+
+ } else {
+ // inactive tabs
+
+ // the top part of the tab which is nearly the same for all positions
+ QRect Rc; // contour
+ if (isFirst&&reverseLayout ) {
+ Rc = QRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-2, (triangular?r.height()-4:r.height()-5) );
+ } else {
+ Rc = QRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-1, (triangular?r.height()-4:r.height()-5) );
+ }
+ QRect Rs; // the resulting surface
+ if ( (isFirst&&!reverseLayout) || (isLast&&reverseLayout) )
+ Rs = QRect(Rc.x()+1,
+ bottom?Rc.y():Rc.y()+1,
+ Rc.width()-(selected == OtherTab?2:1),
+ Rc.height()-1);
+ else if( reverseLayout ){
+ Rs = QRect(Rc.x()-(selected == NextTab?1:0),
+ bottom?Rc.y():Rc.y()+1,
+ Rc.width()-(selected == OtherTab?1:0),
+ Rc.height()-1);
+ }
+ else{
+ Rs = QRect(Rc.x()-(selected == PrevTab?1:0),
+ bottom?Rc.y():Rc.y()+1,
+ Rc.width()-(selected == OtherTab?1:0),
+ Rc.height()-1);
+ }
+ // the area where the fake border shoudl appear
+ const QRect Rb(r.x(), bottom?r.y():Rc.bottom()+1, r.width(), 2 );
+
+ uint contourFlags;
+ if(!bottom) {
+ if ( (isFirst&&!reverseLayout) || (isLast&&reverseLayout) ) {
+ contourFlags = Draw_Left|Draw_Right|Draw_Top|Sharp_UpperRight|Round_UpperLeft;
+ } else if ( (isLast&&!reverseLayout) || (isFirst&&reverseLayout) ) {
+ contourFlags = Draw_Right|Draw_Top|Sharp_UpperLeft|Round_UpperRight;
+ } else {
+ contourFlags = Draw_Right|Draw_Top|Sharp_UpperLeft|Sharp_UpperRight;
+ }
+ } else {
+ if ( (isFirst&&!reverseLayout) || (isLast&&reverseLayout) ) {
+ contourFlags = Draw_Left|Draw_Right|Draw_Bottom|Sharp_BottomRight|Round_BottomLeft;
+ } else if ( (isLast&&!reverseLayout) || (isFirst&&reverseLayout) ) {
+ contourFlags = Draw_Right|Draw_Bottom|Sharp_BottomLeft|Round_BottomRight;
+ } else {
+ contourFlags = Draw_Right|Draw_Bottom|Sharp_BottomLeft|Sharp_BottomRight;
+ }
+ }
+ renderContour(p, Rc,
+ g.background(), getColor(g, ButtonContour),
+ contourFlags);
+
+ uint surfaceFlags = Is_Horizontal;
+ if(mouseOver) {
+ surfaceFlags |= (bottom?Highlight_Bottom:Highlight_Top);
+ surfaceFlags |= Is_Highlight;
+ }
+ if ( (isFirst&&!reverseLayout) || (isLast&&reverseLayout) ) {
+ if(!bottom)
+ surfaceFlags |= Draw_Left|Draw_Top|Round_UpperLeft;
+ else
+ surfaceFlags |= Draw_Left|Draw_Bottom|Round_BottomLeft;
+ } else if ( (isLast&&!reverseLayout) || (isFirst&&reverseLayout) ) {
+ if(!bottom)
+ surfaceFlags |= Draw_Right|Draw_Top|Round_UpperRight;
+ else
+ surfaceFlags |= Draw_Right|Draw_Bottom|Round_BottomRight;
+ } else {
+ surfaceFlags |= (!bottom?Draw_Top:Draw_Bottom);
+ }
+ renderSurface(p, Rs,
+ g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
+ surfaceFlags);
+
+ // some "position specific" paintings...
+ // fake parts of the panel border
+ if(!bottom) {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawLine(Rb.x(), Rb.y(), ((isLast&&!reverseLayout)||(isFirst&&reverseLayout&&cornerWidget))?Rb.right():Rb.right()-1, Rb.y());
+ p->setPen(getColor(g,PanelLight) );
+ p->drawLine(Rb.x(), Rb.y()+1, ((isLast&&!reverseLayout)||(isFirst&&reverseLayout&&cornerWidget))?Rb.right():Rb.right()-1, Rb.y()+1 );
+ } else {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawLine(Rb.x(), Rb.bottom(), ((isLast&&!reverseLayout)||(isFirst&&reverseLayout&&cornerWidget))?Rb.right():Rb.right()-1, Rb.bottom());
+ p->setPen(getColor(g,PanelDark) );
+ p->drawLine(Rb.x(), Rb.bottom()-1, ((isLast&&!reverseLayout)||(isFirst&&reverseLayout&&cornerWidget))?Rb.right():Rb.right()-1, Rb.bottom()-1 );
+ }
+ // fake the panel border edge for tabs which are aligned left-most
+ // (i.e. only if there is no widget in the corner of the tabwidget!)
+ if(isFirst&&!reverseLayout&&!cornerWidget)
+ // normal layout
+ {
+ if (!bottom) {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.x()+1, Rb.y()+1 );
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.x(), Rb.y()+1 );
+ p->setPen(g.background() );
+ p->drawPoint(Rb.x(), Rb.y() );
+ p->setPen(alphaBlendColors( alphaBlendColors(g.background(), getColor(g, ButtonContour), 50), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.x()+1, Rb.y() );
+ } else {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.x()+1, Rb.bottom()-1 );
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.x(), Rb.bottom()-1 );
+ p->setPen(g.background() );
+ p->drawPoint(Rb.x(), Rb.bottom() );
+ p->setPen(alphaBlendColors( alphaBlendColors(g.background(), getColor(g, ButtonContour), 50), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.x()+1, Rb.bottom() );
+ }
+ } else if(isFirst&&reverseLayout&&!cornerWidget)
+ // reverse layout
+ {
+ if (!bottom) {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.right()-1, Rb.y()+1 );
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.right(), Rb.y()+1 );
+ p->setPen(g.background() );
+ p->drawPoint(Rb.right(), Rb.y() );
+ p->setPen(alphaBlendColors( alphaBlendColors(g.background(), getColor(g, ButtonContour), 50), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.right()-1, Rb.y() );
+ } else {
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
+ p->drawPoint(Rb.right()-1, Rb.bottom()-1 );
+ p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.right(), Rb.bottom()-1 );
+ p->setPen(g.background() );
+ p->drawPoint(Rb.right(), Rb.bottom() );
+ p->setPen(alphaBlendColors( alphaBlendColors(g.background(), getColor(g, ButtonContour), 50), getColor(g,PanelContour), 150) );
+ p->drawPoint(Rb.right()-1, Rb.bottom() );
+ }
+ }
+ }
+}
+
+void PolyesterStyle::sliderThumbMoved(int val)
+{
+ QSlider *slider = ::qt_cast<QSlider*>(sender());
+ if(slider) {
+ sliderValues.insert(slider, val);
+ slider->repaint(false);
+ }
+}
+
+void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
+ QPainter *p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ const QStyleOption& opt) const
+{
+ // some "global" vars...
+ const bool enabled = (flags & Style_Enabled);
+
+// SLIDER
+// ------
+ switch( kpe ) {
+ case KPE_SliderGroove: {
+ const QSlider* slider = (const QSlider*)widget;
+ bool horizontal = slider->orientation() == Horizontal;
+
+ int value = slider->value();
+ if(sliderValues.contains(slider))
+ value = sliderValues[slider];
+
+ if (horizontal) {
+ int center = r.y()+r.height()/2;
+ //double coloredWidth = ((double)r.width()/slider->maxValue())*slider->value();
+ double sliderLength = pixelMetric( PM_SliderLength, widget);
+ double halfSliderLength = pixelMetric( PM_SliderLength, widget)/2;
+ double coloredWidth = ((((double)r.width()-sliderLength)/
+ (slider->maxValue()-slider->minValue()))*
+ (slider->value() - slider->minValue())
+ )+halfSliderLength;
+
+
+ if( QApplication::reverseLayout() )
+ coloredWidth = r.width() - coloredWidth;
+
+ /*renderContour(p, QRect(r.left(), center-3, r.width(), 5),
+ cg.background(), cg.background().dark(enabled?150:130),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);*/
+
+ /*p->fillRect(r.left()+1, center-1, (int)(coloredWidth), 2,
+ enabled?cg.highlight():cg.background().dark(120));*/
+ //colored part
+ renderContour(p, QRect(r.left(), center-3, (int)coloredWidth, 5),
+ cg.background(),
+ enabled && _coloredScrollBar?getColor(cg, DragButtonContour, IsEnabled)
+ :cg.background().dark(130),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
+ renderGradient(p, QRect(r.left()+1, center-2,
+ (int)coloredWidth, 3),
+ enabled && _coloredScrollBar?cg.highlight().light(100+_contrast*4)
+ :cg.background().dark(120-_contrast),
+ enabled && _coloredScrollBar?cg.highlight()
+ :cg.background().dark(120), true);
+
+ //empty part
+ renderContour(p, QRect((int)coloredWidth, center-3,
+ r.width()-(int)coloredWidth, 5),
+ cg.background(), cg.background().dark(enabled?150:130),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
+ renderGradient(p, QRect((int)coloredWidth, center-2,
+ r.width()-(int)coloredWidth-1, 3),
+ cg.background().dark(100+_contrast*4),
+ cg.background().light(100+_contrast), true);
+ } else {
+ int center = r.x()+r.width()/2;
+ //double coloredHeight = ((double)r.height()/slider->maxValue())*slider->value();
+ double sliderLength = pixelMetric( PM_SliderLength, widget);
+ double halfSliderLength = pixelMetric( PM_SliderLength, widget)/2;
+ double nonColoredHeight = ((((double)r.height()-sliderLength)/
+ (slider->maxValue()-slider->minValue()))*
+ (slider->value() - slider->minValue())
+ )+halfSliderLength;
+ /*renderContour(p, QRect(center-3, r.top(), 5, r.height()),
+ cg.background(), cg.background().dark(enabled?150:130),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);*/
+
+ /*p->fillRect(center-1, (int)(coloredHeight), 3, r.height(),
+ enabled?cg.highlight():cg.background().dark(120));*/
+ //colored part
+ renderContour(p, QRect(center-3, (int)nonColoredHeight,
+ 5, r.height()-(int)nonColoredHeight),
+ cg.background(),
+ enabled && _coloredScrollBar?getColor(cg, DragButtonContour, IsEnabled)
+ :cg.background().dark(130),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
+ renderGradient(p, QRect(center-2, (int)nonColoredHeight,
+ 3, r.height()-(int)nonColoredHeight-1),
+ enabled?cg.highlight().light(100+_contrast*4)
+ :cg.background().dark(120-_contrast),
+ enabled?cg.highlight()
+ :cg.background().dark(120), false);
+
+ //empty part
+ renderContour(p, QRect(center-3, r.top(), 5, (int)nonColoredHeight),
+ cg.background(), cg.background().dark(enabled?150:130),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
+ renderGradient(p, QRect(center-2, r.y()+1, 3,
+ (int)nonColoredHeight),
+ cg.background().dark(100+_contrast*4),
+ cg.background().light(100+_contrast), false);
+ }
+ break;
+ }
+
+ case KPE_SliderHandle: {
+ const QSlider* slider = (const QSlider*)widget;
+ bool horizontal = slider->orientation() == Horizontal;
+
+ const bool pressed = (flags&Style_Active);
+ const WidgetState s = enabled?(pressed?IsPressed:IsEnabled):IsDisabled;
+ const QColor contour = getColor(cg,DragButtonContour,s),
+ surface = getColor(cg,DragButtonSurface,s);
+
+ int xcenter = (r.left()+r.right()) / 2;
+ int ycenter = (r.top()+r.bottom()) / 2;
+
+ if (horizontal) {
+ renderContour(p, QRect(xcenter-5, ycenter-6, 11, 10),
+ cg.background(), contour,
+ Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight);
+
+ // manual contour: vertex
+ p->setPen(alphaBlendColors(cg.background(), contour, 50) );
+ p->drawPoint(xcenter-5+1, ycenter+4);
+ p->drawPoint(xcenter+5-1, ycenter+4);
+ p->drawPoint(xcenter-5+2, ycenter+5);
+ p->drawPoint(xcenter+5-2, ycenter+5);
+ p->drawPoint(xcenter-5+3, ycenter+6);
+ p->drawPoint(xcenter+5-3, ycenter+6);
+ p->drawPoint(xcenter-5+4, ycenter+7);
+ p->drawPoint(xcenter+5-4, ycenter+7);
+ // 3d effect of vertex
+ if( enabled && _coloredScrollBar )
+ {
+ if( _lightBorder )
+ p->setPen( cg.highlight().light(110+_contrast*2) );
+ else
+ p->setPen( cg.highlight().dark(110+_contrast*2) );
+ }
+ else
+ {
+ if( _lightBorder )
+ p->setPen( cg.background().light(110+_contrast*2) );
+ else
+ p->setPen( cg.background().dark(110+_contrast*2) );
+ }
+
+ p->drawPoint(xcenter-5+2, ycenter+4);
+ p->drawPoint(xcenter+5-2, ycenter+4);
+ p->drawPoint(xcenter-5+3, ycenter+5);
+ p->drawPoint(xcenter+5-3, ycenter+5);
+ p->drawPoint(xcenter-5+4, ycenter+6);
+ p->drawPoint(xcenter+5-4, ycenter+6);
+ p->drawPoint(xcenter, ycenter+7);
+ // anti-aliasing of the contour... sort of. :)
+ p->setPen(alphaBlendColors(cg.background(), contour, 80) );
+ p->drawPoint(xcenter, ycenter+8);
+ p->setPen(alphaBlendColors(cg.background(), contour, 150) );
+ p->drawPoint(xcenter-5, ycenter+4);
+ p->drawPoint(xcenter+5, ycenter+4);
+ p->drawPoint(xcenter-5+1, ycenter+5);
+ p->drawPoint(xcenter+5-1, ycenter+5);
+ p->drawPoint(xcenter-5+2, ycenter+6);
+ p->drawPoint(xcenter+5-2, ycenter+6);
+ p->drawPoint(xcenter-5+3, ycenter+7);
+ p->drawPoint(xcenter+5-3, ycenter+7);
+ p->setPen(alphaBlendColors(cg.background(), contour, 190) );
+ p->drawPoint(xcenter-5+4, ycenter+8);
+ p->drawPoint(xcenter+5-4, ycenter+8);
+
+
+ QRegion mask(xcenter-4, ycenter-5, 9, 13);
+ mask -= QRegion(xcenter-4, ycenter+4, 2, 4);
+ mask -= QRegion(xcenter-3, ycenter+5, 2, 3);
+ mask -= QRegion(xcenter-2, ycenter+6, 2, 2);
+ mask -= QRegion(xcenter-1, ycenter+7, 2, 1);
+ mask -= QRegion(xcenter+1, ycenter+7, 1, 1);
+ mask -= QRegion(xcenter+1, ycenter+6, 2, 2);
+ mask -= QRegion(xcenter+2, ycenter+5, 2, 3);
+ mask -= QRegion(xcenter+3, ycenter+4, 2, 4);
+ p->setClipRegion(mask);
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Is_Horizontal;
+ if(!enabled)
+ surfaceFlags |= Is_Disabled;
+ renderSurface(p, QRect(xcenter-4, ycenter-5, 9, 13),
+ cg.background(), surface, getColor(cg,MouseOverHighlight),
+ _contrast+3, surfaceFlags);
+ renderDot(p, QPoint(xcenter-3, ycenter-3), surface, false, true );
+ renderDot(p, QPoint(xcenter+2, ycenter-3), surface, false, true );
+ p->setClipping(false);
+ } else {
+ renderContour(p, QRect(xcenter-6, ycenter-5, 10, 11),
+ cg.background(), contour,
+ Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft);
+
+ // manual contour: vertex
+ p->setPen(alphaBlendColors(cg.background(), contour, 50) );
+ p->drawPoint(xcenter+4, ycenter-5+1);
+ p->drawPoint(xcenter+4, ycenter+5-1);
+ p->drawPoint(xcenter+5, ycenter-5+2);
+ p->drawPoint(xcenter+5, ycenter+5-2);
+ p->drawPoint(xcenter+6, ycenter-5+3);
+ p->drawPoint(xcenter+6, ycenter+5-3);
+ p->drawPoint(xcenter+7, ycenter-5+4);
+ p->drawPoint(xcenter+7, ycenter+5-4);
+
+ // 3d effect of vertex
+ if( enabled && _coloredScrollBar )
+ {
+ if( _lightBorder )
+ p->setPen( cg.highlight().light(110+_contrast*2) );
+ else
+ p->setPen( cg.highlight().dark(110+_contrast*2) );
+ }
+ else
+ {
+ if( _lightBorder )
+ p->setPen( cg.background().light(110+_contrast*2) );
+ else
+ p->setPen( cg.background().dark(110+_contrast*2) );
+ }
+
+ p->drawPoint(xcenter+4, ycenter-5+2);
+ p->drawPoint(xcenter+4, ycenter+5-2);
+ p->drawPoint(xcenter+5, ycenter-5+3);
+ p->drawPoint(xcenter+5, ycenter+5-3);
+ p->drawPoint(xcenter+6, ycenter-5+4);
+ p->drawPoint(xcenter+6, ycenter+5-4);
+ p->drawPoint(xcenter+7, ycenter);
+
+ // anti-aliasing. ...sort of :)
+ p->setPen(alphaBlendColors(cg.background(), contour, 80) );
+ p->drawPoint(xcenter+8, ycenter);
+ p->setPen(alphaBlendColors(cg.background(), contour, 150) );
+ p->drawPoint(xcenter+4, ycenter-5);
+ p->drawPoint(xcenter+4, ycenter+5);
+ p->drawPoint(xcenter+5, ycenter-5+1);
+ p->drawPoint(xcenter+5, ycenter+5-1);
+ p->drawPoint(xcenter+6, ycenter-5+2);
+ p->drawPoint(xcenter+6, ycenter+5-2);
+ p->drawPoint(xcenter+7, ycenter-5+3);
+ p->drawPoint(xcenter+7, ycenter+5-3);
+ p->setPen(alphaBlendColors(cg.background(), contour, 190) );
+ p->drawPoint(xcenter+8, ycenter-5+4);
+ p->drawPoint(xcenter+8, ycenter+5-4);
+
+ QRegion mask(xcenter-5, ycenter-4, 13, 9);
+ mask -= QRegion(xcenter+4, ycenter-4, 4, 1);
+ mask -= QRegion(xcenter+4, ycenter-3, 4, 1);
+ mask -= QRegion(xcenter+5, ycenter-2, 3, 1);
+ mask -= QRegion(xcenter+6, ycenter-1, 2, 1);
+ mask -= QRegion(xcenter+7, ycenter, 2, 1);
+ mask -= QRegion(xcenter+6, ycenter+1, 2, 1);
+ mask -= QRegion(xcenter+5, ycenter+2, 3, 1);
+ mask -= QRegion(xcenter+4, ycenter+3, 4, 1);
+ mask -= QRegion(xcenter+4, ycenter+4, 4, 1);
+ p->setClipRegion(mask);
+ uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
+ Round_UpperRight|Is_Horizontal;
+ if(!enabled)
+ surfaceFlags |= Is_Disabled;
+ renderSurface(p, QRect(xcenter-5, ycenter-4, 13, 9),
+ cg.background(), surface, getColor(cg,MouseOverHighlight),
+ _contrast+3, surfaceFlags);
+ renderDot(p, QPoint(xcenter-3, ycenter-3), surface, false, true );
+ renderDot(p, QPoint(xcenter-3, ycenter+2), surface, false, true );
+ p->setClipping(false);
+ }
+
+ break;
+ }
+
+ case KPE_ListViewExpander: {
+ int radius = (r.width() - 4) / 2;
+ int centerx = r.x() + r.width()/2;
+ int centery = r.y() + r.height()/2;
+
+ renderContour(p, r, cg.base(), cg.dark(), Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight );
+
+ p->setPen( cg.text() );
+ if(!_drawTriangularExpander)
+ {
+ // plus or minus
+ p->drawLine( centerx - radius, centery, centerx + radius, centery );
+ if ( flags & Style_On ) // Collapsed = On
+ p->drawLine( centerx, centery - radius, centerx, centery + radius );
+ } else if(_drawTriangularExpander) {
+ if( flags & Style_On )
+ drawPrimitive(PE_ArrowRight, p, QRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
+ if( flags & Style_Off )
+ drawPrimitive(PE_ArrowDown, p, QRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
+ }
+
+ break;
+ }
+
+ // copied and slightly modified from KStyle.
+ case KPE_ListViewBranch: {
+ // Typical Windows style listview branch element (dotted line).
+
+ // Create the dotline pixmaps if not already created
+ if ( !verticalLine )
+ {
+ // make 128*1 and 1*128 bitmaps that can be used for
+ // drawing the right sort of lines.
+ verticalLine = new QBitmap( 1, 129, true );
+ horizontalLine = new QBitmap( 128, 1, true );
+ QPointArray a( 64 );
+ QPainter p2;
+ p2.begin( verticalLine );
+
+ int i;
+ for( i=0; i < 64; i++ )
+ a.setPoint( i, 0, i*2+1 );
+ p2.setPen( color1 );
+ p2.drawPoints( a );
+ p2.end();
+ QApplication::flushX();
+ verticalLine->setMask( *verticalLine );
+
+ p2.begin( horizontalLine );
+ for( i=0; i < 64; i++ )
+ a.setPoint( i, i*2+1, 0 );
+ p2.setPen( color1 );
+ p2.drawPoints( a );
+ p2.end();
+ QApplication::flushX();
+ horizontalLine->setMask( *horizontalLine );
+ }
+
+ p->setPen( cg.mid() );
+
+ if (flags & Style_Horizontal)
+ {
+ int point = r.x();
+ int other = r.y();
+ int end = r.x()+r.width();
+ int thickness = r.height();
+
+ while( point < end )
+ {
+ int i = 128;
+ if ( i+point > end )
+ i = end-point;
+ p->drawPixmap( point, other, *horizontalLine, 0, 0, i, thickness );
+ point += i;
+ }
+
+ } else {
+ int point = r.y();
+ int other = r.x();
+ int end = r.y()+r.height();
+ int thickness = r.width();
+ int pixmapoffset = (flags & Style_NoChange) ? 0 : 1; // ### Hackish
+
+ while( point < end )
+ {
+ int i = 128;
+ if ( i+point > end )
+ i = end-point;
+ p->drawPixmap( other, point, *verticalLine, 0, pixmapoffset, thickness, i );
+ point += i;
+ }
+ }
+
+ break;
+ }
+
+ default:
+ KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt);
+ }
+}
+
+
+void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
+ QPainter *p,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ const QStyleOption &opt ) const
+{
+ bool down = flags & Style_Down;
+ bool on = flags & Style_On;
+ bool sunken = flags & Style_Sunken;
+ bool horiz = flags & Style_Horizontal;
+ const bool enabled = flags & Style_Enabled;
+ const bool mouseOver = flags & Style_MouseOver;
+ bool hasFocus = flags & Style_HasFocus;
+
+ int x = r.x();
+ int y = r.y();
+ int w = r.width();
+ int h = r.height();
+
+ int x2, y2;
+ r.coords(&x, &y, &x2, &y2);
+
+ switch(pe) {
+ // BUTTONS
+ // -------
+ case PE_FocusRect: {
+ if(_drawFocusRect) //FIXME: it's necessary to be configurable? naaah :)
+ {
+ //Figuring out in what beast we are painting...
+ QWidget *widget = dynamic_cast<QWidget*>( p->device() );
+
+ //rendercontour isn't able to draw with negative measures
+ //rounded border in a listview/listbox is ugly
+ //also if the background and the border color are equal the result is ugly
+ //also no rouded border when there is no parent widget
+ if( r.width() < 0 || r.height() < 0 || (widget && !widget->parentWidget()) ||
+ (widget &&
+ (dynamic_cast<QScrollView*>( widget->parent() ) ||
+ dynamic_cast<QListBox*>( widget->parent()))
+ ) ||
+ cg.background() == getColor(cg, ButtonContour)
+ )
+ {
+ p->setPen( getColor(cg, ButtonContour) );
+ p->drawRect( r );
+ break;
+ }
+
+ QColor backgroundColor;
+ if( widget )
+ backgroundColor = widget->paletteBackgroundColor();
+ else
+ backgroundColor = cg.background();
+
+ renderContour(p, r, backgroundColor, getColor(cg,ButtonContour),
+ Draw_Left| Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|
+ Round_BottomLeft|Round_BottomRight|Draw_AlphaBlend
+ );
+ }
+ break;
+ }
+
+ case PE_HeaderSection: {
+ // the taskbar buttons seems to be painted with PE_HeaderSection but I
+ // want them look like normal buttons (at least for now. :) )
+ if(!kickerMode) {
+ // detect if this is the first/last header item
+ bool isFirst = false;
+ bool isLast = false;
+ // header item id
+ int headerId = -1;
+ //is the section sorted?
+ bool sortedSection = false;
+ //orientation
+ Qt::Orientation orientation = Qt::Horizontal;
+
+ QHeader *header = dynamic_cast<QHeader*>(p->device() );
+ QListView *list = NULL;
+ if (header) {
+ list = dynamic_cast<QListView*>(header->parent());
+ int headerPos = (header->orientation()==Qt::Horizontal?r.x():r.y());
+ headerId = header->sectionAt( headerPos + header->offset());
+ isFirst = header->mapToIndex(header->sectionAt(headerPos ) +
+ header->offset()) == 0;
+ isLast = header->mapToIndex(header->sectionAt(headerPos ) +
+ header->offset()) == header->count()-1;
+ sortedSection = _colorizeSortedHeader&&(header->sortIndicatorSection() == headerId);
+ orientation = header->orientation();
+ }
+
+ //Passes always sharp, when Round is on sharp is ignored
+ //so this doesn't cause damage
+ uint contourFlags = Draw_Right|Draw_Bottom|
+ Sharp_BottomLeft|Sharp_BottomRight|
+ Sharp_UpperLeft|Sharp_UpperRight;
+
+ if(!enabled) contourFlags|=Is_Disabled;
+
+ //if horizontal draw always the top contour, else always the left one
+ if( orientation == Qt::Horizontal )
+ contourFlags |= Draw_Top;
+ else
+ contourFlags |= Draw_Left;
+
+
+ //round first header contour and draw the border that usually is not drawn
+ if( isFirst && orientation == Qt::Horizontal )
+ contourFlags |= Draw_Left|Round_UpperLeft;
+ if( isFirst && orientation == Qt::Vertical )
+ contourFlags |= Draw_Top|Round_UpperLeft;
+
+ //round last header contour
+ //if it's horizontal and we are in a QListView, round only if resizemode !=NoColumn
+ if( isLast && orientation == Qt::Horizontal /*&&
+ (( list && list->resizeMode() != QListView::NoColumn) || !list)*/ )
+ contourFlags |= Round_UpperRight;
+ if( isLast && orientation == Qt::Vertical )
+ contourFlags |= Round_BottomLeft;
+
+ /* The function
+ renderContour(p, r, cg.background(), getColor(cg,ButtonContour),
+ contourFlags);
+ is called after rendersurface */
+
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+
+ if(!enabled) surfaceFlags|=Is_Disabled;
+ else
+ {
+ if(isFirst)
+ surfaceFlags |= Round_UpperLeft;
+ if(isLast)
+ surfaceFlags |= Round_UpperRight;
+
+ if( !list || (list && list->sortColumn() != -1) )
+ {
+ if(on||down)
+ surfaceFlags|=Is_Sunken;
+ else
+ {
+ if( (hoverWidget == p->device()) && headerId == hoverHeaderId )
+ {
+ /*remedy to a Qt bug that triggers only on horizontal headers*/
+ if( (header && header->orientation()==Qt::Vertical) ||
+ (header && (header->sectionPos(headerId) +
+ header->sectionSize(headerId) -
+ header->offset() > r.x()))
+ )
+ surfaceFlags|=Is_Highlight|Highlight_Top;
+ }
+ }
+ }
+ }
+
+ renderSurface(p, QRect(isFirst?r.left()+1:r.left(), r.top()+1, isFirst?r.width()-2:r.width()-1, r.height()-2),
+ cg.background(),
+ sortedSection?alphaBlendColors(cg.highlight(), cg.button(), 70):cg.button(),
+ getColor(cg,MouseOverHighlight), _contrast,
+ surfaceFlags);
+ renderContour(p, r, cg.background(), getColor(cg,ButtonContour),
+ contourFlags);
+ break;
+ }
+ }
+
+ case PE_ButtonBevel:
+ case PE_ButtonTool:
+ case PE_ButtonDropDown:
+ case PE_ButtonCommand: {
+ bool khtmlMode = khtmlWidgets.contains(opt.widget());
+ int animFrame = 0;
+ if( _animateButton && animWidgets.contains(opt.widget()) )
+ animFrame = (int)animWidgets[opt.widget()].animFrame;
+ renderButton(p, r, cg, (on||down), mouseOver, true, enabled,
+ khtmlMode, animFrame, flags & Style_ButtonDefault );
+ break;
+ }
+
+ case PE_ButtonDefault: {
+ uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight;
+ if(!enabled) contourFlags|=Is_Disabled;
+ renderContour(p, r, cg.background(), cg.background().dark(120),
+ contourFlags);
+ break;
+ }
+
+ case PE_SpinWidgetPlus:
+ case PE_SpinWidgetMinus: {
+ p->setPen( cg.buttonText() );
+
+ int l = QMIN( w-2, h-2 );
+ // make the length even so that we get a nice symmetric plus...
+ if(l%2 != 0)
+ --l;
+ QPoint c = r.center();
+
+ p->drawLine( c.x()-l/2, c.y(), c.x()+l/2, c.y() );
+ if ( pe == PE_SpinWidgetPlus ) {
+ p->drawLine( c.x(), c.y()-l/2, c.x(), c.y()+l/2 );
+ }
+ break;
+ }
+
+ case PE_ScrollBarSlider: {
+ /*a little bit complicated: deciding if the scrollbar is enabled,
+ pressed, with mouse over or not.
+ Everything with the right dependencies*/
+ const WidgetState s = enabled?(down?IsPressed:
+ ((hoverWidget == p->device())?
+ IsHighlighted:IsEnabled)):IsDisabled;
+ const QColor surface = getColor(cg, DragButtonSurface, s);
+
+ uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Sharp_UpperLeft|Sharp_UpperRight|Sharp_BottomLeft|Sharp_BottomRight;
+ if(!enabled) contourFlags|=Is_Disabled;
+
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
+ if( !_coloredScrollBar && hoverWidget == p->device() )
+ {
+ if( !horiz )
+ surfaceFlags |= Highlight_Top|Highlight_Bottom;
+ else
+ surfaceFlags |= Highlight_Left|Highlight_Right;
+ }
+
+
+ renderContour(p, r, cg.background(), getColor(cg, DragButtonContour, s),
+ contourFlags);
+
+ if(horiz) surfaceFlags|=Is_Horizontal;
+ if(!enabled) surfaceFlags|=Is_Disabled;
+ if(down) surfaceFlags|= Is_Sunken;
+ if(r.height() >= 4)
+ {
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ cg.background(), surface, cg.highlight(),
+ _contrast+3, surfaceFlags);
+ }
+
+
+ const int xPos = r.center().x();
+ const int yPos = r.center().y();
+ const int displacement = 5;
+
+ if( !horiz && r.height() > 24)
+ {
+ for( int i = -displacement; i <= displacement; i+=displacement)
+ {
+ if(_scrollBarLines)
+ {
+ p->setPen(alphaBlendColors(cg.background(), surface.dark(enabled?140:120), 50) );
+ p->drawLine(r.x()+1, yPos+i, r.right()-1, yPos+i);
+ p->setPen(alphaBlendColors(cg.background(), surface.light(enabled?120:110), 50) );
+ p->drawLine(r.x()+1, yPos+i+1, r.right()-1, yPos+i+1);
+ }
+ else
+ {
+ renderDot(p, QPoint(xPos-3, yPos+i), surface, true, true );
+ renderDot(p, QPoint(xPos+2, yPos+i), surface, true, true );
+ }
+ }
+ }
+ else if( r.width() > 24 )
+ {
+ for( int i = -displacement; i <= displacement; i+=displacement)
+ {
+ if(_scrollBarLines)
+ {
+ p->setPen(alphaBlendColors(cg.background(), surface.dark(enabled?140:120), 50) );
+ p->drawLine(xPos+i, r.y()+1, xPos+i, r.bottom()-1);
+ p->setPen(alphaBlendColors(cg.background(), surface.light(enabled?120:110), 50) );
+ p->drawLine(xPos+i+1, r.y()+1, xPos+i+1, r.bottom()-1);
+ }
+ else
+ {
+ renderDot(p, QPoint(xPos+i, yPos-3), surface, true, true );
+ renderDot(p, QPoint(xPos+i, yPos+2), surface, true, true );
+ }
+ }
+ }
+
+ break;
+ }
+
+ case PE_ScrollBarAddPage:
+ case PE_ScrollBarSubPage: {
+
+ if (on || down) {
+ p->fillRect(r, QBrush(cg.mid().dark()));
+ } else {
+ if(flags & Style_Horizontal) {
+
+ uint contourFlags = Draw_Top|Draw_Bottom;
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Sunken|Is_Horizontal;
+
+ //coordinates for the surface
+ uint xs=x,ws=w;
+
+ if( pe == PE_ScrollBarSubPage && ( _scrollBarType == KStyle::PlatinumStyleScrollBar ) )
+ {
+ contourFlags |= Draw_Left|Round_UpperLeft|Round_BottomLeft;
+ surfaceFlags |= Round_UpperLeft|Round_BottomLeft;
+ xs++;
+ ws--;
+ }
+ else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == KStyle::NextStyleScrollBar ) )
+ {
+ contourFlags |= Draw_Right|Round_UpperRight|Round_BottomRight;
+ surfaceFlags |= Round_UpperRight|Round_BottomRight;
+ ws--;
+ }
+
+
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
+ contourFlags);
+ QRect gradientRect( xs,y+1,ws,h/2 );
+ renderGradient( p, gradientRect, cg.background().dark(100+_contrast),
+ cg.background().light(100+_contrast));
+ p->fillRect( QRect(xs,gradientRect.bottom()+1,ws,h-2-gradientRect.height()),
+ cg.background().light(100+_contrast) );
+
+ }
+ else
+ {
+
+ uint contourFlags = Draw_Left|Draw_Right;
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Sunken;
+
+ //coordinates for the surface
+ uint ys=y,hs=h;
+
+ if( pe == PE_ScrollBarSubPage && ( _scrollBarType == KStyle::PlatinumStyleScrollBar ) )
+ {
+ contourFlags |= Draw_Top|Round_UpperLeft|Round_UpperRight;
+ surfaceFlags |= Round_UpperLeft|Round_UpperRight;
+ ys++;
+ hs--;
+ }
+ else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == KStyle::NextStyleScrollBar ) )
+ {
+ contourFlags |= Draw_Bottom|Round_BottomLeft|Round_BottomRight;
+ surfaceFlags |= Round_BottomLeft|Round_BottomRight;
+ hs--;
+ }
+
+
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
+ contourFlags);
+
+ QRect gradientRect( x+1,ys,w/2,hs );
+ renderGradient( p, gradientRect, cg.background().dark(100+_contrast),
+ cg.background().light(100+_contrast), false);
+ p->fillRect( QRect(gradientRect.right()+1, ys, w-2-gradientRect.width(), hs),
+ cg.background().light(100+_contrast) );
+
+ }
+ }
+
+ break;
+ }
+
+ // SCROLLBAR BUTTONS
+ // -----------------
+ case PE_ScrollBarSubLine: {
+ uint contourFlags = Draw_Left|
+ (r.x()==0||down?Draw_Right:0)|
+ Draw_Top|
+ (r.y()==0||down?Draw_Bottom:0);
+ uint surfaceFlags = Draw_Left|Draw_Top|Draw_Right|Draw_Bottom;
+ if(down) surfaceFlags|=Is_Sunken;
+ if(!enabled) {
+ contourFlags|=Is_Disabled;
+ surfaceFlags|=Is_Disabled;
+ }
+ if(horiz) {
+ if(r.x()==0)
+ {
+ contourFlags |= Round_UpperLeft|Round_BottomLeft|Is_Horizontal;
+ surfaceFlags |= Round_UpperLeft|Round_BottomLeft|Is_Horizontal;
+ } else {
+ contourFlags |= Is_Horizontal;
+ surfaceFlags |= Is_Horizontal;
+ }
+ } else {
+ if(r.y()==0)
+ {
+ contourFlags |= Round_UpperLeft|Round_UpperRight;
+ surfaceFlags |= Round_UpperLeft|Round_UpperRight;
+ }
+ }
+
+ /* if(!down && !horiz && r.y() != 0)
+ {
+ p->setPen(cg.background().light(120));
+ p->drawLine(r.left(), r.bottom(), r.right(), r.bottom());
+ }*/
+
+ //render two dots at bottom/right corners
+ p->setPen(getColor(cg, ButtonContour).light(120));
+
+ if( horiz )
+ {
+ contourFlags |= Sharp_UpperRight|Sharp_BottomRight;
+ if( r.x() != 0 )
+ contourFlags |= Sharp_UpperLeft|Sharp_BottomRight;
+ }
+ else
+ {
+ contourFlags |= Sharp_BottomLeft|Sharp_BottomRight;
+ if( r.y() != 0 )
+ contourFlags |= Sharp_UpperLeft|Sharp_UpperRight;
+ }
+
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
+ contourFlags);
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-(r.x()==0?2:1), r.height()-(r.y()==0?2:1)),
+ cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast+3,
+ surfaceFlags);
+
+ p->setPen(cg.foreground());
+ drawPrimitive((horiz ? PE_ArrowLeft : PE_ArrowUp), p, r, cg, flags);
+ break;
+ }
+
+ case PE_ScrollBarAddLine: {
+ uint isNext = _scrollBarType == KStyle::NextStyleScrollBar;
+ uint contourFlags = (!isNext||!horiz||down?Draw_Left:0)|
+ Draw_Right|
+ (!isNext||horiz||down?Draw_Top:0)|
+ Draw_Bottom;
+ uint surfaceFlags = contourFlags;
+ if(down) surfaceFlags|=Is_Sunken;
+ if(!enabled) {
+ contourFlags|=Is_Disabled;
+ surfaceFlags|=Is_Disabled;
+ }
+ if( horiz && !isNext) {
+ contourFlags |= Round_UpperRight|Round_BottomRight|Is_Horizontal;
+ surfaceFlags |= Round_UpperRight|Round_BottomRight|Is_Horizontal;
+ } else if( !isNext ){
+ contourFlags |= Round_BottomLeft|Round_BottomRight;
+ surfaceFlags |= Round_BottomLeft|Round_BottomRight;
+ } else if( horiz && isNext){
+ contourFlags |= Is_Horizontal;
+ surfaceFlags |= Is_Horizontal;
+ }
+
+
+ //render two dots at top/left corners
+ p->setPen(getColor(cg, ButtonContour).light(120));
+
+ if( horiz )
+ {
+ contourFlags |= Sharp_UpperLeft|Sharp_BottomLeft;
+ if( _scrollBarType == KStyle::NextStyleScrollBar )
+ contourFlags |= Sharp_UpperRight|Sharp_BottomRight;
+ }
+ else
+ {
+ contourFlags |= Sharp_UpperLeft|Sharp_UpperRight;
+ if( _scrollBarType == KStyle::NextStyleScrollBar )
+ contourFlags |= Sharp_BottomLeft|Sharp_BottomRight;
+ }
+
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
+ contourFlags);
+ renderSurface(p, QRect(r.left()+(!isNext||!horiz?1:0), r.top()+(!isNext||horiz?1:0), r.width()-(isNext&&horiz?1:2), r.height()-(isNext&&!horiz?1:2)),
+ cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast+3,
+ surfaceFlags);
+
+ p->setPen(cg.foreground());
+ drawPrimitive((horiz ? PE_ArrowRight : PE_ArrowDown), p, r, cg, flags);
+
+ break;
+ }
+
+ // CHECKBOXES
+ // ----------
+ case PE_Indicator: {
+ QColor contentColor = enabled?cg.base():cg.background();
+
+ uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
+ if(!enabled) {
+ contourFlags |= Is_Disabled;
+ }
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
+ contourFlags);
+
+ // surface
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+ if(!enabled) {
+ surfaceFlags |= Is_Disabled;
+ } else if(mouseOver) {
+ contentColor = alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 240);
+ surfaceFlags |= Is_Highlight;
+ surfaceFlags |= Highlight_Left|Highlight_Right|
+ Highlight_Top|Highlight_Bottom;
+ }
+ renderSurface(p, QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
+ cg.background(), contentColor, getColor(cg,MouseOverHighlight), enabled?_contrast+3:(_contrast/2), surfaceFlags);
+
+ drawPrimitive(PE_CheckMark, p, r, cg, flags);
+
+ break;
+ }
+
+ case PE_IndicatorMask: {
+ p->fillRect (r, color1);
+ break;
+ }
+
+ // RADIOBUTTONS
+ // ------------
+ case PE_ExclusiveIndicator: {
+ const QColor contourColor = getColor(cg, ButtonContour, enabled);
+ QColor contentColor = enabled?cg.base():cg.background();
+
+ QBitmap bmp;
+ bmp = QBitmap(13, 13, radiobutton_mask_bits, true);
+ // first the surface...
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+ if(!enabled) {
+ surfaceFlags |= Is_Disabled;
+ } else if (mouseOver) {
+ contentColor = alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 240);
+ }
+ p->setClipRegion(bmp);
+ renderSurface(p, r,
+ cg.background(), contentColor, getColor(cg,MouseOverHighlight), enabled?_contrast+3:(_contrast/2), surfaceFlags);
+ p->setClipping(false);
+
+ // ...then contour, anti-alias, mouseOver...
+ // contour
+ bmp = QBitmap(13, 13, radiobutton_contour_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(cg.background(), contourColor, 50) );
+ p->drawPixmap(x, y, bmp);
+ // anti-alias outside
+ bmp = QBitmap(13, 13, radiobutton_aa_outside_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(cg.background(), contourColor, 150) );
+ p->drawPixmap(x, y, bmp);
+ // highlighting...
+ if(mouseOver) {
+ bmp = QBitmap(13, 13, radiobutton_highlight1_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 80) );
+ p->drawPixmap(x, y, bmp);
+ bmp = QBitmap(13, 13, radiobutton_highlight2_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 150) );
+ p->drawPixmap(x, y, bmp);
+ }
+ // anti-alias inside, "above" the higlighting!
+ bmp = QBitmap(13, 13, radiobutton_aa_inside_bits, true);
+ bmp.setMask(bmp);
+ if(mouseOver) {
+ p->setPen(alphaBlendColors(getColor(cg,MouseOverHighlight), contourColor, 180) );
+ } else {
+ p->setPen(alphaBlendColors(contentColor, contourColor, 180) );
+ }
+ p->drawPixmap(x, y, bmp);
+
+ break;
+ }
+
+ case PE_ExclusiveIndicatorMask: {
+ p->fillRect(r, color0);
+
+ QBitmap bmp;
+ bmp = QBitmap(13, 13, radiobutton_mask_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(color1);
+ p->drawPixmap(x, y, bmp);
+
+ break;
+ }
+
+ // GENERAL PANELS
+ // --------------
+ case PE_Splitter: {
+ // highlight on mouse over
+ QColor color = (hoverWidget == p->device())?cg.background().light(100+_contrast):cg.background();
+ p->fillRect(r, color);
+ if (w > h) {
+ if (h > 4) {
+ int ycenter = r.height()/2;
+ for(int k = r.width()/2-12; k <= r.width()/2+12; k+=6) {
+ renderDot(p, QPoint(k, ycenter-1), color, true, true);
+ }
+ }
+ } else {
+ if (w > 4) {
+ int xcenter = r.width()/2;
+ for(int k = r.height()/2-12; k <= r.height()/2+12; k+=6){
+ renderDot(p, QPoint(xcenter-1, k), color, true, true);
+ }
+ }
+ }
+
+ break;
+ }
+
+ case PE_PanelGroupBox:
+ case PE_GroupBoxFrame: {
+ if ( opt.isDefault() || opt.lineWidth() <= 0 )
+ break;
+ renderPanel(p, r, cg, false);
+
+ break;
+ }
+
+ case PE_WindowFrame:
+ case PE_Panel: {
+ if ( opt.isDefault() || opt.lineWidth() <= 0 )
+ break;
+ renderPanel(p, r, cg, true, sunken);
+ break;
+ }
+
+ case PE_PanelLineEdit: {
+ bool isReadOnly = false;
+ bool isEnabled = true;
+ // panel is highlighted by default if it has focus, but if we have access to the
+ // widget itself we can try to avoid highlighting in case it's readOnly or disabled.
+ if (p->device() && dynamic_cast<QLineEdit*>(p->device()))
+ {
+ QLineEdit* lineEdit = dynamic_cast<QLineEdit*>(p->device());
+ isReadOnly = lineEdit->isReadOnly();
+ isEnabled = lineEdit->isEnabled();
+ }
+
+ uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight;
+
+ // HACK!!
+ //
+ // In order to draw nice edges in khtml, we need to paint alpha-blended.
+ // On the other hand, we can't paint alpha-blended in normal widgets.
+ //
+ // In this place there is no reliable way to detect if we are in khtml; the
+ // only thing we know is that khtml buffers its widgets into a pixmap. So
+ // when the paint device is a QPixmap, chances are high that we are in khtml.
+ // It's possible that this breaks other things, so let's see how it works...
+ if (p->device() && dynamic_cast<QPixmap*>(p->device() ) ) {
+ contourFlags += Draw_AlphaBlend;
+ }
+
+ if ( _inputFocusHighlight && hasFocus && !isReadOnly && isEnabled)
+ {
+ renderContour(p, r, cg.background(),
+ getColor(cg,FocusHighlight,enabled), contourFlags );
+ }
+ else
+ {
+ renderContour(p, r, cg.background(),
+ getColor(cg, ButtonContour, enabled), contourFlags );
+ }
+ const QColor contentColor = enabled?cg.base():cg.background();
+ if (_inputFocusHighlight && hasFocus && !isReadOnly && isEnabled)
+ {
+ p->setPen( getColor(cg,FocusHighlight).dark(130) );
+ }
+ else
+ { // deciding if the 3d effect should be done or not
+ p->setPen(contentColor.dark(100+(_lightBorder?-30:30)) );
+ }
+ p->drawLine(r.left()+1, r.top()+2, r.left()+1, r.bottom()-2 );
+ p->drawLine(r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
+ if (_inputFocusHighlight && hasFocus && !isReadOnly && isEnabled)
+ {
+ p->setPen( getColor(cg,FocusHighlight).light(130) );
+ }
+ else
+ {
+ p->setPen(contentColor.light(130) );
+ }
+ p->drawLine(r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
+ p->drawLine(r.right()-1, r.top()+2, r.right()-1, r.bottom()-2 );
+ break;
+ }
+
+ case PE_StatusBarSection: {
+ if(_statusBarFrame)
+ {
+ renderContour(p, r, cg.background(), cg.background().dark(160),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
+ }
+ break;
+ }
+
+ //case PE_TabBarBase: // Still not sure what this one does
+ case PE_PanelTabWidget: {
+ renderPanel(p, r, cg, true, sunken);
+ break;
+ }
+
+ case PE_PanelPopup: {
+ /*TODO: is there a way tho check if we are a menubar popup or a normal popup?
+ so in the menubar popup
+ (QApplication::reverseLayout()?Sharp_UpperRight:Sharp_UpperLeft)|
+ could be added
+ */
+ renderContour(p, r, cg.background(), cg.background().dark(200),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Draw_AlphaBlend);
+ break;
+ }
+
+ // MENU / TOOLBAR PANEL
+ // --------------------
+ case PE_PanelMenuBar:
+ case PE_PanelDockWindow: {
+ // fix for toolbar lag (from Mosfet Liquid)
+ QWidget* w = dynamic_cast<QWidget*>(p->device());
+ if(w && w->backgroundMode() == PaletteButton)
+ w->setBackgroundMode(PaletteBackground);
+ p->fillRect(r, cg.brush(QColorGroup::Background));
+
+ if ( _drawToolBarSeparator &&
+ //don't draw the separator under the menubars if the emphasys with border is on
+ !( pe==PE_PanelMenuBar && _menuBarEmphasis && _menuBarEmphasisBorder )
+ ) {
+ if ( r.width() > r.height() ) {
+ // avoid drawing a double light line
+ if(!_lightBorder)
+ {
+ p->setPen( getColor(cg, PanelLight) );
+ p->drawLine( r.left(), r.top(), r.right(), r.top() );
+ p->setPen( getColor(cg, PanelDark) );
+ p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+ }
+ else
+ {
+ p->setPen( cg.background().dark(100+_contrast*4) );
+ p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+ }
+ }
+ else {
+ if(!_lightBorder)
+ {
+ p->setPen( getColor(cg, PanelLight) );
+ p->drawLine( r.left(), r.top(), r.left(), r.bottom() );
+ p->setPen( getColor(cg, PanelDark) );
+ p->drawLine( r.right(), r.top(), r.right(), r.bottom() );
+ }
+ else
+ {
+ p->setPen( cg.background().dark(100+_contrast*4) );
+ p->drawLine( r.left(), r.top(), r.left(), r.bottom() );
+ }
+ }
+ }
+
+ break;
+ }
+
+ // TOOLBAR/DOCK WINDOW HANDLE
+ // --------------------------
+ case PE_DockWindowResizeHandle: {
+ renderButton(p, r, cg);
+ break;
+ }
+
+ case PE_DockWindowHandle: {
+
+ int counter = 1;
+
+ int hCenter = r.left()+r.width()/2;
+ int vCenter = r.top()+r.bottom()/2;
+ /*handles littler, nicer*/
+ if(horiz) {
+ for(int j = vCenter-6; j <= vCenter+6; j+=6) {
+ renderDot(p, QPoint(hCenter, j), cg.background(), true, true);
+ counter++;
+ }
+ } else {
+ for(int j = hCenter-12; j <= hCenter+12; j+=6) {
+ renderDot(p, QPoint(j, vCenter), cg.background(), true, true);
+ counter++;
+ }
+ }
+
+ break;
+ }
+
+ // TOOLBAR SEPARATOR
+ // -----------------
+ case PE_DockWindowSeparator: {
+ p->fillRect(r, cg.background());
+
+ if(_drawToolBarItemSeparator) {
+ if(horiz) {
+ int center = r.left()+r.width()/2;
+ if(!_lightBorder)
+ {
+ p->setPen( getColor(cg, PanelDark) );
+ p->drawLine( center-1, r.top()+3, center-1, r.bottom()-3 );
+ p->setPen( getColor(cg, PanelLight) );
+ p->drawLine( center, r.top()+3, center, r.bottom()-3 );
+ }
+ else
+ {
+ p->setPen( cg.background().dark(100+_contrast*4) );
+ p->drawLine( center, r.top()+3, center, r.bottom()-3 );
+ }
+ } else {
+ int center = r.top()+r.height()/2;
+ if(!_lightBorder)
+ {
+ p->setPen( getColor(cg, PanelDark) );
+ p->drawLine( r.x()+3, center-1, r.right()-3, center-1 );
+ p->setPen( getColor(cg, PanelLight) );
+ p->drawLine( r.x()+3, center, r.right()-3, center );
+ }
+ else
+ {
+ p->setPen( cg.background().dark(100+_contrast*4) );
+ p->drawLine( r.x()+3, center, r.right()-3, center );
+ }
+ }
+ }
+ break;
+ }
+
+ case PE_CheckMark: {
+ const QColor contentColor = enabled?cg.base():cg.background();
+ QColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
+ if(flags & Style_Down) {
+ checkmarkColor = alphaBlendColors(contentColor, checkmarkColor, 150);
+ }
+
+ int x = r.center().x() - 4, y = r.center().y() - 4;
+ QBitmap bmp;
+ if( flags & Style_On ) {
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_dark_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
+ p->drawPixmap(x, y, bmp);
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_light_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(125), 50) );
+ p->drawPixmap(x, y, bmp);
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_aa_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 150) );
+ p->drawPixmap(x, y, bmp);
+ } else if ( flags & Style_Off ) {
+ // empty
+ } else { // tristate
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_tristate_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
+ p->drawPixmap(x, y, bmp);
+ }
+
+ break;
+ }
+
+ case PE_SpinWidgetUp:
+ case PE_SpinWidgetDown:
+ case PE_HeaderArrow:
+ case PE_ArrowUp:
+ case PE_ArrowDown:
+ case PE_ArrowLeft:
+ case PE_ArrowRight: {
+ QPointArray a;
+
+ switch (pe) {
+ case PE_SpinWidgetUp:
+ case PE_ArrowUp: {
+ a.setPoints(7, u_arrow);
+ break;
+ }
+ case PE_SpinWidgetDown:
+ case PE_ArrowDown: {
+ a.setPoints(7, d_arrow);
+ break;
+ }
+ case PE_ArrowLeft: {
+ a.setPoints(7, l_arrow);
+ break;
+ }
+ case PE_ArrowRight: {
+ a.setPoints(7, r_arrow);
+ break;
+ }
+ default: {
+ if (flags & Style_Up) {
+ a.setPoints(7, u_arrow);
+ } else {
+ a.setPoints(7, d_arrow);
+ }
+ }
+ }
+
+ const QWMatrix oldMatrix( p->worldMatrix() );
+
+ if (flags & Style_Down) {
+ p->translate(pixelMetric(PM_ButtonShiftHorizontal),
+ pixelMetric(PM_ButtonShiftVertical));
+ }
+ int x = r.x();
+
+ //move PE_HeaderArrow toghether the headerlabel
+ /*HACK: brutally move the header arrow; maybe in the future
+ a more clean solution will be possible*/
+ if( pe == PE_HeaderArrow && !QApplication::reverseLayout())
+ {
+ QHeader *header = dynamic_cast<QHeader*>(p->device() );
+ if (header && header->orientation()==Qt::Horizontal)
+ {
+ int section = header->sectionAt(x + header->offset());
+ x = header->sectionSize(section) +
+ header->sectionPos(section) -
+ header->offset() - 16;
+ }
+ }
+
+ a.translate((x+r.width()/2), (r.y()+r.height()/2));
+ // extra-pixel-shift, correcting some visual tics...
+ switch(pe) {
+ case PE_ArrowLeft:
+ case PE_ArrowRight:
+ a.translate(0, -1);
+ break;
+ case PE_SpinWidgetUp:
+ case PE_SpinWidgetDown:
+ a.translate(+1, 0);
+ break;
+ default:
+ a.translate(0, 0);
+ }
+
+ if (p->pen() == QPen::NoPen) {
+ if (flags & Style_Enabled) {
+ p->setPen(cg.buttonText());
+ } else {
+ p->setPen(cg.highlightedText());
+ }
+ }
+ p->drawLineSegments(a, 0, 3);
+ p->drawPoint(a[6]);
+
+ p->setWorldMatrix( oldMatrix );
+
+ break;
+ }
+
+ default: {
+ return KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
+ }
+ }
+}
+
+
+void PolyesterStyle::drawControl(ControlElement element,
+ QPainter *p,
+ const QWidget *widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ const QStyleOption& opt) const
+{
+ const bool reverseLayout = QApplication::reverseLayout();
+
+ const bool enabled = (flags & Style_Enabled);
+
+ switch (element) {
+
+ // PROGRESSBAR
+ // -----------
+ case CE_ProgressBarGroove: {
+ const QColor content = enabled?cg.base():cg.background();
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour, enabled) );
+ p->setPen(content.dark(105) );
+ p->drawLine(r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
+ p->drawLine(r.left()+1, r.top()+2, r.left()+1, r.bottom()-2);
+ p->setPen(content.light(105) );
+ p->drawLine(r.left()+2, r.bottom()-1, r.right()-2, r.bottom()-1 );
+ p->drawLine(r.right()-1, r.top()+2, r.right()-1, r.bottom()-2);
+ break;
+ }
+
+ case CE_ProgressBarContents: {
+ const QProgressBar *pb = dynamic_cast<const QProgressBar*>(widget);
+ int steps = pb->totalSteps();
+
+ const QColor bg = enabled?cg.base():cg.background(); // background
+ const QColor fg = enabled?cg.highlight():cg.background().dark(110); // foreground
+
+ if( steps == 0 )
+ { // Busy indicator
+ static const int barWidth = 10;
+ int progress = pb->progress() % (2*(r.width()-barWidth));
+ if( progress < 0)
+ progress = 0;
+ if( progress > r.width()-barWidth )
+ progress = (r.width()-barWidth)-(progress-(r.width()-barWidth));
+
+ renderGradient( p, QRect( r.x(), r.y(), r.width(), r.height()/2 ),
+ bg.dark(100+_contrast), bg );
+ p->fillRect( QRect( r.x(), (r.height()/2)+1,
+ r.width(), r.height()-(r.height()/2)+1 ),
+ bg );
+
+ renderContour( p, QRect( r.x()+progress, r.y(), barWidth, r.height() ),
+ bg, fg.dark(160),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|
+ Round_BottomRight|Round_UpperLeft|Round_BottomLeft );
+ renderSurface(p, QRect( r.x()+progress+1, r.y()+1, barWidth-2, r.height()-2 ),
+ bg, fg, cg.highlight(),
+ 2*(_contrast/3),
+ Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperRight|Round_BottomRight|
+ Round_UpperLeft|Round_BottomLeft|Is_Horizontal);
+ }
+ else
+ {
+ double percent = static_cast<double>(pb->progress()) / static_cast<double>(steps);
+
+ int w = static_cast<int>(r.width() * percent);
+ // renderContour/renderSurface handle small sizes not very well, so set a minimal
+ // progressbar width...
+ if(w<4) w = 4;
+ int w2 = r.width()-(r.width()-w);
+
+ QRect RemptyGradient(reverseLayout?r.left():r.left()+w-1, r.top(),
+ r.width()-w+1, r.height()/2 );
+ QRect Rempty( RemptyGradient.x(), RemptyGradient.bottom()+1,
+ RemptyGradient.width(), r.height()-RemptyGradient.height());
+ QRect Rcontour(reverseLayout?r.right()-w2+1:r.left(), r.top(), w2, r.height() );
+ QRect Rsurface(Rcontour.left()+1, Rcontour.top()+1, w2-2, Rcontour.height()-2);
+
+ p->fillRect(Rempty, bg);
+ renderGradient( p, RemptyGradient, bg.dark(100+_contrast), bg );
+ //moved after the surface in order to not get it overwritten
+ //by the ugly left sharp borders of the surface
+ renderContour(p, Rcontour,
+ bg, fg.dark(160),
+ Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperRight|Round_BottomRight|Round_UpperLeft|Round_BottomLeft);
+
+ QRegion mask(Rsurface);
+
+ mask -= QRegion(Rsurface.left(), Rsurface.top(), 1, 1);
+ mask -= QRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
+ mask -= QRegion(Rsurface.right(), Rsurface.top(), 1, 1);
+ mask -= QRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
+
+ p->setClipRegion(mask);
+ int counter = 0;
+ QPixmap surfaceTile(21, r.height()-2);
+ QPainter surfacePainter(&surfaceTile);
+ // - 21 pixel -
+ // __________
+ // | ` `| <- 3
+ // | 1 | 2 |
+ // |____,____,| <- 3
+ // 1 = light, 11 pixel, 1 pixel overlapping with 2
+ // 2 = dark, 11 pixel, 1 pixel overlapping with 3
+ // 3 = light edges
+ const int tileHeight = surfaceTile.height();
+ // 3
+ renderSurface(&surfacePainter,
+ QRect(20, 0, 11, tileHeight),
+ fg.light(105), fg, cg.highlight(), 2*(_contrast/3),
+ reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_BottomLeft|Is_Horizontal
+ : Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperRight|Round_BottomRight|
+ Is_Horizontal);
+ // 2
+ renderSurface(&surfacePainter,
+ QRect(10, 0, 11, tileHeight),
+ fg, fg.light(105), cg.highlight(), 2*(_contrast/3),
+ reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_BottomLeft|Is_Horizontal
+ : Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperRight|Round_BottomRight|Is_Horizontal);
+ // 1
+ renderSurface(&surfacePainter,
+ QRect(0, 0, 11, tileHeight),
+ fg.light(105), fg, cg.highlight(), 2*(_contrast/3),
+ reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_BottomLeft|Is_Horizontal
+ : Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
+ Round_UpperRight|Round_BottomRight|Is_Horizontal);
+
+ surfacePainter.end();
+ int staticShift = 0;
+ int animShift = 0;
+ if (!_animateProgressBar) {
+ staticShift = (reverseLayout ? Rsurface.left() : Rsurface.right()) % 40 - 40;
+ } else {
+ // find the animation Offset for the current Widget
+ QWidget* nonConstWidget = const_cast<QWidget*>(widget);
+ QMapConstIterator<QWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
+ if (iter != progAnimWidgets.end())
+ animShift = iter.data();
+ }
+ while( (counter*10) < (Rsurface.width()+20) )
+ {
+ counter++;
+ if (reverseLayout)
+ {
+ // from right to left, overlap 1 pixel with the previously drawn tile
+ p->drawPixmap(Rsurface.right()-counter*20-animShift+40+staticShift, r.top()+1,
+ surfaceTile);
+ }
+ else
+ {
+ // from left to right, overlap 1 pixel with the previously drawn tile
+ p->drawPixmap(Rsurface.left()+counter*20+animShift-40+staticShift, r.top()+1,
+ surfaceTile);
+ }
+ }
+
+ p->setClipping(false);
+ }
+
+ break;
+ }
+
+ //TABBAR TEXT (code from Qt libraries Copyright Trolltech 2006)
+ //--------------
+ case CE_TabBarLabel:{
+ if ( opt.isDefault() )
+ break;
+
+ const uint text_flags = AlignVCenter | AlignHCenter | ShowPrefix |
+ DontClip | SingleLine;
+
+ QTab *t = opt.tab();
+ const QTabBar * tb = ( const QTabBar * ) widget;
+
+ QRect tr = r;
+ if ( t->identifier() == tb->currentTab())
+ {
+ tr.moveTop( tr.top() -
+ pixelMetric( QStyle::PM_TabBarTabShiftVertical, tb ) );
+ tr.moveLeft( tr.left() -
+ pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, tb ) );
+ }
+
+ if(_shadowedButtonsText)
+ {
+ p->setPen( cg.button().dark(120+_contrast));
+ p->drawText(QRect(tr.x()+1, tr.y()+1, tr.width(), tr.height()),
+ text_flags, opt.tab()->text());
+ }
+
+ drawItem( p, tr, AlignCenter | ShowPrefix, cg,
+ flags & Style_Enabled, 0, t->text() );
+
+ if ( (flags & Style_HasFocus) && !t->text().isEmpty() )
+ drawPrimitive( PE_FocusRect, p, r, cg, Style_Default, opt );
+
+ break;
+ }
+
+ // RADIOBUTTONS
+ // ------------
+ case CE_RadioButton: {
+ drawPrimitive(PE_ExclusiveIndicator, p, r, cg, flags);
+
+ const QColor contentColor = enabled?cg.base():cg.background();
+ QColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
+ if(flags & Style_Down) {
+ checkmarkColor = alphaBlendColors(contentColor, checkmarkColor, 150);
+ }
+
+ if (flags & Style_On || flags & Style_Down) {
+ int x = r.center().x() - 4, y = r.center().y() - 4;
+ QBitmap bmp;
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_dark_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
+ p->drawPixmap(x, y, bmp);
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_light_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(125), 50) );
+ p->drawPixmap(x, y, bmp);
+ bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_aa_bits, true);
+ bmp.setMask(bmp);
+ p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 150) );
+ p->drawPixmap(x, y, bmp);
+ }
+
+ break;
+ }
+
+ // TABS
+ // ----
+ case CE_TabBarTab: {
+ const QTabBar * tb = (const QTabBar *) widget;
+ bool cornerWidget = false;
+ if( ::qt_cast<QTabWidget*>(tb->parent()) ) {
+ const QTabWidget *tw = (const QTabWidget*)tb->parent();
+ // is there a corner widget in the (top) left edge?
+ QWidget *cw = tw->cornerWidget(Qt::TopLeft);
+ if(cw)
+ cornerWidget = true;
+ }
+ QTabBar::Shape tbs = tb->shape();
+ SelectedTab selected = OtherTab;
+ if( flags & Style_Selected )
+ selected = ThisTab;
+ else if( tb->indexOf(tb->currentTab()) - (tb->indexOf(opt.tab()->identifier())) == -1)
+ selected = PrevTab;
+ else if( tb->indexOf(tb->currentTab()) - (tb->indexOf(opt.tab()->identifier())) == 1)
+ selected = NextTab;
+
+ TabPosition pos;
+ if (tb->count() == 1) {
+ pos = Single;
+ } else if ((tb->indexOf(opt.tab()->identifier()) == 0)) {
+ pos = First;
+ } else if (tb->indexOf(opt.tab()->identifier()) == tb->count() - 1) {
+ pos = Last;
+ } else {
+ pos = Middle;
+ }
+
+ bool mouseOver = false;
+ if (opt.tab() == hoverTab) {
+ mouseOver = true;
+ flags |= Style_MouseOver;
+ }
+
+ switch (tbs) {
+ case QTabBar::TriangularAbove:
+// renderTriangularTab(p, r, cg, (flags & Style_MouseOver), selected, false, pos);
+ renderTab(p, r, cg, mouseOver, selected, false, pos, true, cornerWidget);
+ break;
+ case QTabBar::RoundedAbove:
+ renderTab(p, r, cg, mouseOver, selected, false, pos, false, cornerWidget);
+ break;
+ case QTabBar::TriangularBelow:
+// renderTriangularTab(p, r, cg, (flags & Style_MouseOver), selected, true, pos);
+ renderTab(p, r, cg, mouseOver, selected, true, pos, true, cornerWidget);
+ break;
+ case QTabBar::RoundedBelow:
+ renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
+ break;
+ default:
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ }
+
+ break;
+ }
+
+ case CE_PushButton: {
+ QPushButton *button = (QPushButton *)widget;
+
+ const bool isDefault = enabled && button->isDefault();
+
+ if (button->isFlat() )
+ flatMode = true;
+
+ if (widget == hoverWidget)
+ flags |= Style_MouseOver;
+
+ QColorGroup g2 = cg;
+ if (isDefault)
+ g2.setColor(QColorGroup::Background, cg.background().dark(120) );
+
+ int animFrame = 0;
+ if( _animateButton && animWidgets.contains( button )){
+ animFrame = animWidgets[button].animFrame;
+ g2.setColor( QColorGroup::Button, cg.button().light(100+animFrame) );
+ }
+
+ drawPrimitive(PE_ButtonBevel, p,
+ isDefault?QRect(r.x()+1,r.y()+1,r.width()-2,r.height()-2):r,
+ g2, flags, QStyleOption(button) );
+
+ if (isDefault ) {
+ drawPrimitive(PE_ButtonDefault, p, r, cg, flags);
+ }
+
+ break;
+ }
+
+ case CE_PushButtonLabel:
+ {
+ int x, y, w, h;
+ r.rect( &x, &y, &w, &h );
+
+ QPushButton* button = (QPushButton *)( widget );
+ bool active = button->isOn() || button->isDown();
+ bool cornArrow = false;
+
+ // Shift button contents if pushed.
+ if ( active )
+ {
+ x += pixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += pixelMetric(PM_ButtonShiftVertical, widget);
+ flags |= Style_Sunken;
+ }
+
+ // Does the button have a popup menu?
+ if ( button->isMenuButton() )
+ {
+ int dx = pixelMetric( PM_MenuButtonIndicator, widget );
+ if ( button->iconSet() && !button->iconSet()->isNull() &&
+ (dx + button->iconSet()->pixmap (QIconSet::Small, QIconSet::Normal, QIconSet::Off ).width()) >= w )
+ {
+ cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget
+ }
+ else
+ {
+ drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ cg, flags, opt );
+ w -= dx;
+ }
+ }
+
+ // Draw the icon if there is one
+ if ( button->iconSet() && !button->iconSet()->isNull() )
+ {
+ QIconSet::Mode mode = QIconSet::Disabled;
+ QIconSet::State state = QIconSet::Off;
+
+ if (button->isEnabled())
+ mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ if (button->isToggleButton() && button->isOn())
+ state = QIconSet::On;
+
+ QPixmap pixmap = button->iconSet()->pixmap( QIconSet::Small, mode, state );
+
+ if (button->text().isEmpty() && !button->pixmap())
+ p->drawPixmap( x + w/2 - pixmap.width()/2, y + h / 2 - pixmap.height() / 2,
+ pixmap );
+ else
+ p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
+
+ if (cornArrow) //Draw over the icon
+ drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - 6, x + h - 6, 7, 7), r ),
+ cg, flags, opt );
+
+
+ int pw = pixmap.width();
+ x += pw + 4;
+ w -= pw + 4;
+ }
+
+ //making the text of the default button always readable with a cute animation
+ int animFrame = 0;
+ if( _animateButton && button->isDefault() && animWidgets.contains( button ))
+ animFrame = animWidgets[button].animFrame;
+
+ //12.8 is the maximum amount of blending (256) / ANIMATIONSTEPS (20)
+ QColor textColor = alphaBlendColors( cg.highlightedText(),
+ button->colorGroup().buttonText(),
+ (int)(12.8*animFrame)
+ );
+
+ // shadow on button text
+
+ if( _shadowedButtonsText && button->isEnabled() && button->text() )
+ {
+ QColor shadowColor = alphaBlendColors( cg.highlight(),
+ cg.button(),
+ (int)(12.8*animFrame)
+ ).dark(120+_contrast);
+
+ drawItem( p, QRect(x+1, y+1, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
+ button->isEnabled(), button->pixmap(),
+ _useLowerCaseText?button->text().lower():button->text(),
+ -1, &shadowColor );
+ }
+
+ drawItem( p, QRect(x, y, w, h), AlignCenter|ShowPrefix,
+ button->colorGroup(), button->isEnabled(), button->pixmap(),
+ _useLowerCaseText?button->text().lower():button->text(),
+ -1, &textColor );
+
+ if ( flags & Style_HasFocus )
+ {
+ QColorGroup g2 = cg;
+
+ drawPrimitive( PE_FocusRect, p,
+ visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ g2, flags, opt );
+ }
+ break;
+ }
+
+ // MENUBAR ITEM (sunken panel on mouse over)
+ // -----------------------------------------
+ case CE_MenuBarItem: {
+
+ QMenuItem *mi = opt.menuItem();
+ bool active = flags & Style_Active;
+ bool focused = flags & Style_HasFocus;
+ bool down = flags & Style_Down;
+ const int text_flags =
+ AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine;
+
+ if( _menuBarEmphasis )
+ {
+ QMenuBar *mb = (QMenuBar*)widget;
+ renderSurface(p, mb->rect(), cg.background(),
+ getColor(cg, MenuBarEmphasis),
+ cg.background(),
+ _contrast+3, Is_Horizontal);
+ }
+ else
+ {
+ p->fillRect(r, cg.background());
+ }
+
+ if (active && focused) {
+ if (down) {
+ //drawPrimitive(PE_ButtonTool, p, r, cg, flags|Style_Down, opt);
+ //code to draw the menubar item as a tab (ugly?)
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()),
+ cg.highlight(), cg.highlight(), cg.highlight(),
+ _contrast, Is_Horizontal|Draw_Right|Draw_Top|Draw_Left);
+ renderContour(p, r, getColor(cg, MenuBarEmphasis), cg.highlight().dark(100+_contrast*8), Draw_Right|Draw_Top|Draw_Left|Round_UpperRight|Round_UpperLeft);
+ //renderTab( p, QRect(r.left(), r.top(), r.width(), r.height()+2), cg, false, true, false, Single, false, false);
+ } else {
+ renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ cg.background(), getColor(cg, MenuBarEmphasis), cg.background(),
+ _contrast, Is_Horizontal|Draw_Right|Draw_Top|Draw_Left|Draw_Bottom);
+ renderContour(p, r, getColor(cg, MenuBarEmphasis), getColor(cg, MenuBarEmphasis).dark(120+_contrast*8), Draw_Right|Draw_Top|Draw_Left|Round_UpperRight|Round_UpperLeft|Draw_Bottom|Round_BottomRight|Round_BottomLeft);
+ //not used this because of the possible custom menubar color
+ //drawPrimitive(PE_ButtonTool, p, r, cg, flags, opt);
+ }
+ }
+
+ if ( _shadowedMenuBarText ){
+ if (active && focused && down)
+ p->setPen(cg.highlight().dark(100+_contrast*2) );
+ else
+ p->setPen(getColor(cg, MenuBarEmphasis).dark(100+_contrast*2) );
+ p->drawText(r.x()+1, r.y()+1, r.width(), r.height(), text_flags, mi->text());
+ }
+ if (active && focused && down)
+ p->setPen(cg.highlightedText() );
+ else
+ if( _customMenuBarEmphasisColor )
+ p->setPen( (qGray(_menuBarEmphasisColor.rgb())>150?cg.foreground():white) );
+ else
+ p->setPen( cg.foreground() );
+ p->drawText(r, text_flags, mi->text());
+
+ break;
+ }
+
+ // POPUPMENU ITEM (highlighted on mouseover)
+ // ------------------------------------------
+ case CE_PopupMenuItem: {
+ const QPopupMenu *popupmenu = static_cast< const QPopupMenu * >( widget );
+ QMenuItem *mi = opt.menuItem();
+
+ if ( !mi )
+ {
+ // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // This only happens when the popupMenu spans more than one column.
+ if (! ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) )
+ p->fillRect( r, cg.background().light( 105 ) );
+
+ break;
+ }
+ int tab = opt.tabWidth();
+ int checkcol = opt.maxIconWidth();
+ int stripeWidth = max(checkcol+(int)(checkcol/8),22);
+ bool enabled = mi->isEnabled();
+ bool checkable = popupmenu->isCheckable();
+ bool active = flags & Style_Active;
+ bool etchtext = styleHint( SH_EtchDisabledText );
+ bool reverse = QApplication::reverseLayout();
+ if ( checkable )
+ checkcol = QMAX( checkcol, 20 );
+
+ //draw a solid background...
+ if (! ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) )
+ {
+ p->fillRect( r, cg.background().light( 105 ) );
+ if( _menuStripe )
+ {
+ if( !QApplication::reverseLayout() )
+ p->fillRect( QRect(r.left(), r.top(), stripeWidth, r.height()),
+ cg.background().dark( 100+_contrast ) );
+ else
+ p->fillRect( QRect(r.right()-23, r.top(), stripeWidth, r.height()),
+ cg.background().dark( 100+_contrast ) );
+ }
+ }
+ //...or draw the transparency pixmap
+ else
+ {
+ p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
+ if( _menuStripe )
+ {
+ //do this loop only ONE time :)
+ //this could give problems to apps which have popup menus with different icon sizes...
+ if( alphaStripe->isNull() )
+ {
+ alphaStripe->create(stripeWidth, r.height(), stripeWidth);
+ alphaStripe->setAlphaBuffer(true);
+ for( int i = 0; i < stripeWidth; i++)
+ for( int j = 0; j < r.height(); j++)
+ alphaStripe->setPixel(i,j, qRgba(0, 0 , 0, 20));
+ }
+
+ if( !QApplication::reverseLayout() )
+ p->drawPixmap( r.topLeft(), *alphaStripe );
+ else
+ p->drawPixmap( r.topRight(), *alphaStripe );
+ }
+ }
+
+ // is this menu item highlighted?
+ if (active)
+ {
+ QRect r2 = QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2);
+ QRect r3 = QRect(r.left()+2, r.top()+2, r.width()-4, r.height()-4);
+
+ if (enabled)
+ {
+ if (_buttonMenuItem )
+ {
+ renderSurface(p, r3, cg.background(), cg.highlight(), cg.highlight(),
+ _contrast+3, Is_Horizontal|Draw_Right|Draw_Top|Draw_Bottom|Draw_Left);
+ renderContour(p, r2, cg.background(), cg.highlight().dark(100+_contrast*8), Draw_Right|Draw_Top|Draw_Bottom|Draw_Left|Round_UpperRight|Round_UpperLeft|Round_BottomRight|Round_BottomLeft|Draw_AlphaBlend);
+ }
+ else
+ renderSurface(p, r, cg.background(), cg.highlight(), cg.highlight(),
+ _contrast+3, Is_Horizontal|Draw_Top|Draw_Bottom);
+ }
+ //disabled
+ else {
+
+ if (_buttonMenuItem )
+ {
+ renderSurface(p, r3, cg.background(), cg.background().light(120), cg.highlight(),
+ _contrast+3, Is_Horizontal|Round_UpperLeft|Round_BottomRight|Round_BottomLeft);
+ renderContour(p, r2, cg.background(), cg.background().dark(100+_contrast*5), Draw_Right|Draw_Top|Draw_Bottom|Draw_Left|Round_UpperRight|Round_UpperLeft|Round_BottomRight|Round_BottomLeft|Draw_AlphaBlend);
+ }
+ else
+ renderSurface(p, r, cg.background(), cg.background().light(120), cg.highlight(),
+ _contrast+3, Is_Horizontal|Draw_Top|Draw_Bottom|Draw_Left|Draw_Right);
+ }
+ }
+
+ // Are we a menu item separator?
+ if ( mi->isSeparator() )
+ {
+ p->setPen( cg.mid() );
+ if( !QApplication::reverseLayout() )
+ {
+ p->drawLine( r.x()+stripeWidth, r.y() + 1, r.right()-5, r.y() + 1 );
+ if( !_lightBorder)
+ {
+ p->setPen( cg.light() );
+ p->drawLine( r.x()+stripeWidth, r.y() + 2, r.right()-5 , r.y() + 2 );
+ }
+ }
+ else
+ {
+ p->drawLine( r.x()+5, r.y() + 1, r.right()-24, r.y() + 1 );
+ if( !_lightBorder)
+ {
+ p->setPen( cg.light() );
+ p->drawLine( r.x()+5, r.y() + 2, r.right()-24 , r.y() + 2 );
+ }
+ }
+ break;
+ }
+
+ QRect cr = visualRect( QRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
+ // Do we have an icon?
+ if ( mi->iconSet() )
+ {
+ QIconSet::Mode mode;
+
+ // Select the correct icon from the iconset
+ if (active)
+ mode = enabled?QIconSet::Active:QIconSet::Disabled;
+ else
+ mode = enabled?QIconSet::Normal:QIconSet::Disabled;
+
+ // Do we have an icon and are checked at the same time?
+ // Then draw a "pressed" background behind the icon
+ if ( checkable && /*!active &&*/ mi->isChecked() )
+ drawPrimitive(QStyle::PE_Indicator, p, cr, cg,
+ QStyle::Style_Enabled | QStyle::Style_Active | QStyle::Style_Off );
+ /*qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
+ cg, true, 1, &cg.brush(QColorGroup::Midlight) );*/
+ // Draw the icon
+ QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode);
+ QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ pmr.moveCenter( cr.center() );
+ p->drawPixmap( pmr.topLeft(), pixmap );
+ }
+
+ // Are we checked? (This time without an icon)
+ else if ( checkable && mi->isChecked() )
+ {
+ int style = QStyle::Style_Enabled | QStyle::Style_Active | QStyle::Style_On ;
+ drawPrimitive(QStyle::PE_Indicator, p, cr, cg, style);
+ }
+
+ // Time to draw the menu item label...
+ int xm = 2 + checkcol + 2; // X position margin
+
+ int xp = reverse ? // X position
+ r.x() + tab + rightBorder + itemHMargin + itemFrame - 1 :
+ r.x() + xm;
+
+ int offset = reverse ? -1 : 1; // Shadow offset for etched text
+
+ // Label width (minus the width of the accelerator portion)
+ int tw = r.width() - xm - tab - arrowHMargin - itemHMargin * 3 - itemFrame + 1;
+
+ // Set the color for enabled and disabled text
+ // (used for both active and inactive menu items)
+ p->setPen( enabled ? cg.buttonText() : cg.mid() );
+
+ // This color will be used instead of the above if the menu item
+ // is active and disabled at the same time. (etched text)
+ QColor discol = cg.mid();
+
+ if ( mi->custom() ) {
+ int m = 2;
+ // Save the painter state in case the custom
+ // paint method changes it in some way
+ p->save();
+
+ // Draw etched text if we're inactive and the menu item is disabled
+ if ( etchtext && !enabled && !active ) {
+ p->setPen( cg.foreground() );
+ mi->custom()->paint( p, cg, active, enabled, xp+offset, r.y()+m+1, tw, r.height()-2*m );
+ p->setPen( discol );
+ }
+ mi->custom()->paint( p, cg, active, enabled, xp, r.y()+m, tw, r.height()-2*m );
+ p->restore();
+ }
+
+ // The menu item doesn't draw it's own label
+ QString s = mi->text();
+ // Does the menu item have a text label?
+ if ( !s.isNull() ) {
+ int t = s.find( '\t' );
+ int m = 2;
+ int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
+ text_flags |= reverse ? AlignRight : AlignLeft;
+
+ //QColor draw = cg.text();
+ QColor draw = (active && enabled) ? cg.highlightedText () : cg.foreground();
+ p->setPen(draw);
+
+
+ // Does the menu item have a tabstop? (for the accelerator text)
+ if ( t >= 0 ) {
+ int tabx = reverse ? r.x() + rightBorder + itemHMargin + itemFrame :
+ r.x() + r.width() - tab - rightBorder - itemHMargin - itemFrame;
+
+ // Draw the right part of the label (accelerator text)
+ if ( etchtext && !enabled ) {
+ // Draw etched text if we're inactive and the menu item is disabled
+ p->setPen( cg.light() );
+ p->drawText( tabx+offset, r.y()+m+1, tab, r.height()-2*m, text_flags, s.mid( t+1 ) );
+ p->setPen( discol );
+ }
+ p->drawText( tabx, r.y()+m, tab, r.height()-2*m, text_flags, s.mid( t+1 ) );
+ s = s.left( t );
+ }
+
+ // Draw the left part of the label (or the whole label
+ // if there's no accelerator)
+ if ( !mi->custom() && etchtext && !enabled ) {
+ // Etched text again for inactive disabled menu items...
+ p->setPen( cg.light() );
+ p->drawText( xp+offset, r.y()+m+1, tw, r.height()-2*m, text_flags, s, t );
+ p->setPen( discol );
+ }
+
+
+ p->drawText( xp, r.y()+m, tw, r.height()-2*m, text_flags, s, t );
+
+ p->setPen(cg.text());
+
+ }
+
+ // The menu item doesn't have a text label
+ // Check if it has a pixmap instead
+ else if ( mi->pixmap() ) {
+ QPixmap *pixmap = mi->pixmap();
+
+ // Draw the pixmap
+ if ( pixmap->depth() == 1 )
+ p->setBackgroundMode( OpaqueMode );
+
+ int diffw = ( ( r.width() - pixmap->width() ) / 2 )
+ + ( ( r.width() - pixmap->width() ) % 2 );
+ p->drawPixmap( r.x()+diffw, r.y()+1, *pixmap );
+
+ if ( pixmap->depth() == 1 )
+ p->setBackgroundMode( TransparentMode );
+ }
+
+
+ // Does the menu item have a submenu?
+ if ( mi->popup() ) {
+ PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
+ int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
+ QRect vr = visualRect( QRect( r.x() + r.width() - 5 - 1 - dim,
+ r.y() + r.height() / 2 - dim / 2, dim, dim), r );
+
+ // Draw an arrow at the far end of the menu item
+ if ( active ) {
+ if ( enabled )
+ discol = cg.buttonText();
+
+ QColorGroup g2( discol, cg.highlight(), white, white,
+ enabled ? white : discol, discol, white );
+
+ drawPrimitive( arrow, p, vr, g2, Style_Enabled );
+ } else
+ drawPrimitive( arrow, p, vr, cg,
+ enabled ? Style_Enabled : Style_Default );
+ }
+ break;
+ }
+
+ // Menu and dockwindow empty space
+ //
+ case CE_DockWindowEmptyArea:
+ p->fillRect(r, cg.background());
+ break;
+
+ case CE_MenuBarEmptyArea:
+ if( _menuBarEmphasis )
+ {
+ renderSurface(p, r, cg.background(),
+ getColor(cg, MenuBarEmphasis),
+ cg.background(),
+ _contrast+3, Is_Horizontal);
+
+ if( _menuBarEmphasisBorder )
+ renderContour(p, r, cg.background(), getColor(cg, MenuBarEmphasis).dark(115),
+ Draw_Left|Draw_Top|Draw_Bottom|Draw_Right|
+ Round_UpperLeft|Round_UpperRight|
+ Round_BottomRight|Round_BottomLeft);
+ }
+ else
+ p->fillRect(r, cg.background());
+// if ( _drawToolBarSeparator ) {
+// p->setPen( getColor(cg, PanelDark) );
+// p->drawLine( r.left(), r.bottom(), r.right(), r.bottom() );
+// }
+
+ break;
+
+ case CE_HeaderLabel:
+ {
+ const QHeader *header = static_cast< const QHeader * >( widget );
+ if( !header )
+ break;
+
+ int headerId = header->sectionAt(
+ (header->orientation()==Qt::Horizontal?r.x():r.y()) +
+ header->offset());
+
+ QString s = header->label(headerId);
+ // Does the header have a text label?
+ if( !s.isNull() )
+ {
+ int t = s.find( '\t' );
+ bool reverse = QApplication::reverseLayout();
+ int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
+ text_flags |= reverse ? AlignRight : AlignLeft;
+ p->setPen(cg.text());
+
+ /*draw the text label always attempting to display the entire label,
+ except when reverse layout the text label is already shown entirely*/
+ p->drawText( r.x()<=2&&!reverse?2:r.x(),
+ r.y(), r.width(), r.height(),
+ text_flags, s, t );
+ }
+ QIconSet *iS = header->iconSet(headerId);
+ if( iS )
+ {
+ QIconSet::Mode mode = QIconSet::Normal;
+ QIconSet::State state = QIconSet::On;
+
+ QPixmap pixmap = iS->pixmap( QIconSet::Small, mode, state );
+ p->drawPixmap(r.x(), r.y()+r.height()/2-pixmap.height()/2, pixmap);
+ }
+ break;
+ }
+
+ default:
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ }
+}
+
+void PolyesterStyle::drawControlMask(ControlElement element,
+ QPainter *p,
+ const QWidget *w,
+ const QRect &r,
+ const QStyleOption &opt) const
+{
+ switch (element) {
+ case CE_PushButton: {
+ p->fillRect (r, color0);
+ renderMask(p, r, color1,
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight);
+ break;
+ }
+
+ default: {
+ KStyle::drawControlMask (element, p, w, r, opt);
+ }
+ }
+}
+
+void PolyesterStyle::drawComplexControlMask(ComplexControl c,
+ QPainter *p,
+ const QWidget *w,
+ const QRect &r,
+ const QStyleOption &o) const
+{
+ switch (c) {
+ case CC_SpinWidget:
+ case CC_ListView:
+ case CC_ComboBox: {
+ p->fillRect (r, color0);
+ renderMask(p, r, color1,
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight);
+ break;
+ }
+ default: {
+ KStyle::drawComplexControlMask (c, p, w, r, o);
+ }
+ }
+}
+
+void PolyesterStyle::drawComplexControl(ComplexControl control,
+ QPainter *p,
+ const QWidget *widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ SCFlags controls,
+ SCFlags active,
+ const QStyleOption& opt) const
+{
+ const bool reverseLayout = QApplication::reverseLayout();
+
+ const bool enabled = (flags & Style_Enabled);
+
+ switch(control) {
+ // COMBOBOX
+ // --------
+ case CC_ComboBox: {
+ static const unsigned int handleWidth = 15;
+
+ //const QComboBox *cb = dynamic_cast<const QComboBox *>(widget);
+ QComboBox *cb = (QComboBox *)(widget); // **hack**: cast away const-ness for animation support!
+ // at the moment cb is only needed to check if the combo box is editable or not.
+ // if cb doesn't exist, just assume false and the app (gideon! ;) ) at least doesn't crash.
+ bool editable = false;
+ bool hasFocus = false;
+ if (cb) {
+ editable = cb->editable();
+ hasFocus = cb->hasFocus();
+ }
+
+ int animFrame = 0;
+ if( _animateButton && animWidgets.contains( cb ))
+ animFrame = animWidgets[cb].animFrame;
+
+ const QColor buttonColor = enabled?cg.button().light(100+animFrame):cg.background();
+ const QColor highlightColor = (_animateButton?alphaBlendColors( getColor(cg,MouseOverHighlight),cg.button(), 20*animFrame ):getColor(cg,MouseOverHighlight));
+ const QColor inputColor = enabled?(editable?cg.base():cg.button())
+ :cg.background();
+
+ uint contourFlags = 0;
+ if( khtmlWidgets.contains(cb) )
+ contourFlags |= Draw_AlphaBlend;
+
+ if (_inputFocusHighlight && hasFocus && editable && enabled)
+ {
+ QRect editField = querySubControlMetrics(control, widget, SC_ComboBoxEditField);
+ QRect editFrame = r;
+ QRect buttonFrame = r;
+
+ uint editFlags = contourFlags;
+ uint buttonFlags = contourFlags;
+
+ // Hightlight only the part of the contour next to the control button
+ if (reverseLayout)
+ {
+ // querySubControlMetrics doesn't work right for reverse Layout
+ int dx = r.right() - editField.right();
+ editFrame.setLeft(editFrame.left() + dx);
+ buttonFrame.setRight(editFrame.left() - 1);
+ editFlags |= Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight;
+ buttonFlags |= Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft;
+ }
+ else
+ {
+ editFrame.setRight(editField.right());
+ buttonFrame.setLeft(editField.right() + 1);
+
+ editFlags |= Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft;
+ buttonFlags |= Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight;
+ }
+ renderContour(p, editFrame, cg.background(), getColor(cg,FocusHighlight,enabled), editFlags);
+ renderContour(p, buttonFrame, cg.background(),
+ getColor(cg, ButtonContour, enabled), buttonFlags);
+ }
+ else
+ {
+ contourFlags |= Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight;
+ renderContour(p, r, cg.background(), getColor(cg, ButtonContour, enabled), contourFlags);
+ }
+ //extend the contour: between input and handler...
+ p->setPen(alphaBlendColors(cg.background(), getColor(cg, ButtonContour, enabled), 50) );
+ if(reverseLayout) {
+ p->drawLine(r.left()+1+handleWidth, r.top()+1, r.left()+1+handleWidth, r.bottom()-1);
+ } else {
+ p->drawLine(r.right()-handleWidth-1, r.top()+1, r.right()-handleWidth-1, r.bottom()-1);
+ }
+
+ const QRect RbuttonSurface(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
+ handleWidth, r.height()-2);
+ const QRect RcontentSurface(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
+ r.width()-handleWidth-3, r.height()-2);
+
+ // handler
+
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+ if(reverseLayout) {
+ surfaceFlags |= Round_UpperLeft|Round_BottomLeft;
+ } else {
+ surfaceFlags |= Round_UpperRight|Round_BottomRight;
+ }
+
+ if ( (animFrame != 0) || (widget == hoverWidget) || (flags & Style_MouseOver)) {
+ surfaceFlags |= Is_Highlight;
+ if(editable) surfaceFlags |= Highlight_Left|Highlight_Right;
+ surfaceFlags |= Highlight_Top|Highlight_Bottom;
+ }
+ renderSurface(p, RbuttonSurface,
+ cg.background(), buttonColor, highlightColor, enabled?_contrast+3:(_contrast/2),
+ surfaceFlags);
+
+ if(!editable) {
+ surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+ if(reverseLayout) {
+ surfaceFlags |= Round_UpperRight|Round_BottomRight;
+ } else {
+ surfaceFlags |= Round_UpperLeft|Round_BottomLeft;
+ }
+
+ if ( (animFrame != 0) || (widget == hoverWidget) || (flags & Style_MouseOver)) {
+ surfaceFlags |= Is_Highlight;
+ surfaceFlags |= Highlight_Top|Highlight_Bottom;
+ }
+ renderSurface(p, RcontentSurface,
+ cg.background(), buttonColor, highlightColor, enabled?_contrast+3:(_contrast/2),
+ surfaceFlags);
+ if (hasFocus) {
+ drawPrimitive(PE_FocusRect, p,
+ QRect(RcontentSurface.x() + 2,
+ RcontentSurface.y() + 2,
+ RcontentSurface.width() - 4,
+ RcontentSurface.height() - 4), cg, Style_Default, opt);
+ }
+ } else {
+ // thin frame around the input area
+ if (_inputFocusHighlight && hasFocus && editable && enabled)
+ {
+ p->setPen( getColor(cg,FocusHighlight).dark(130) );
+ }
+ else
+ {
+ p->setPen(inputColor.dark(100+(_lightBorder?-30:30)) );
+ }
+ p->drawLine(RcontentSurface.x(), reverseLayout?RcontentSurface.y():RcontentSurface.y()+1,
+ RcontentSurface.x(), reverseLayout?RcontentSurface.bottom():RcontentSurface.bottom()-1);
+ p->drawLine(RcontentSurface.x()+1, RcontentSurface.y(),
+ reverseLayout?RcontentSurface.right()-1:RcontentSurface.right(), RcontentSurface.y() );
+ if (_inputFocusHighlight && hasFocus && editable && enabled)
+ {
+ p->setPen( getColor(cg,FocusHighlight).light(130) );
+ }
+ else
+ {
+ p->setPen(inputColor.light(130) );
+ }
+ p->drawLine(reverseLayout?RcontentSurface.x():RcontentSurface.x()+1, RcontentSurface.bottom(),
+ reverseLayout?RcontentSurface.right()-1:RcontentSurface.right(), RcontentSurface.bottom() );
+ p->drawLine(RcontentSurface.right(), RcontentSurface.top()+1,
+ RcontentSurface.right(), RcontentSurface.bottom()-1 );
+
+ // input area
+ p->fillRect(RcontentSurface.x()+1, RcontentSurface.y()+1,
+ RcontentSurface.width()-2, RcontentSurface.height()-2, inputColor );
+ }
+
+ p->setPen(cg.foreground());
+ drawPrimitive(PE_SpinWidgetDown, p, RbuttonSurface, cg, Style_Default|Style_Enabled|Style_Raised);
+
+ // QComboBox draws the text using cg.text(), we can override this
+ // from here TODO: shadow here?
+ p->setPen( cg.buttonText() );
+ p->setBackgroundColor( cg.button() );
+ break;
+ }
+
+ // TOOLBUTTON
+ // ----------
+ case CC_ToolButton: {
+ QToolButton *tb = (QToolButton *) widget;// **hack**: cast away const-ness for animation support!
+
+ QColorGroup g2 = cg;
+ int animFrame = 0;
+ if( _animateButton && animWidgets.contains( tb )){
+ animFrame = animWidgets[tb].animFrame;
+ g2.setColor( QColorGroup::Button, cg.button().light(100+animFrame) );
+ }
+
+ QRect button, menuarea;
+ button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
+ menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
+
+ SFlags bflags = flags,
+ mflags = flags;
+ SFlags borderFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight;
+
+ if (kornMode) {
+ drawPrimitive(PE_ButtonTool, p, button, g2, bflags, opt);
+ break;
+ } else {
+
+ // don't want to have the buttoncolor as the background...
+ p->fillRect(r, cg.background().light(100+animFrame));
+ renderContour(p, r, cg.background(), cg.background().dark(100+(abs(animFrame)*_contrast)),
+ borderFlags);
+ bflags &= ~Style_MouseOver;
+ }
+
+ if (active & SC_ToolButton)
+ bflags |= Style_Down;
+
+ if (active & SC_ToolButtonMenu)
+ mflags |= Style_Down;
+
+ if (controls & SC_ToolButton) {
+ // If we're pressed, on, or raised...
+ if (bflags & (Style_Down | Style_On | Style_Raised) || widget==hoverWidget ) {
+ drawPrimitive(PE_ButtonTool, p, button, g2, bflags, opt);
+ if( _animateButton && tb->autoRaise() && !(bflags & Style_On) && !active )
+ renderContour(p, r, cg.background(), cg.background().dark(100+(abs(animFrame)*_contrast)),
+ borderFlags);
+ } else if (tb->parentWidget() &&
+ tb->parentWidget()->backgroundPixmap() &&
+ !tb->parentWidget()->backgroundPixmap()->isNull()) {
+ QPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
+ p->drawTiledPixmap( r, pixmap, tb->pos() );
+ }
+ }
+
+ // Draw a toolbutton menu indicator if required
+ if (controls & SC_ToolButtonMenu) {
+ if (mflags & (Style_Down | Style_On | Style_Raised)) {
+ drawPrimitive(PE_ButtonDropDown, p, menuarea, g2, mflags, opt);
+ }
+ drawPrimitive(PE_ArrowDown, p, menuarea, g2, mflags, opt);
+ }
+
+ if (tb->hasFocus() && !tb->focusProxy()) {
+ QRect fr = tb->rect();
+ fr.addCoords(2, 2, -2, -2);
+ drawPrimitive(PE_FocusRect, p, fr, g2, Style_Default, opt);
+ }
+
+ // Set the color for the ToolButton menu indicator
+ p->setPen(cg.buttonText() );
+
+ break;
+ }
+
+ // SPINWIDGETS
+ // -----------
+ case CC_SpinWidget: {
+ static const unsigned int handleWidth = 15;
+
+ QSpinWidget *sw = (QSpinWidget *)(widget);// **hack**: cast away const-ness for animation support!
+ SFlags sflags = flags;
+ PrimitiveElement pe;
+
+ bool hasFocus = false;
+ if (sw)
+ hasFocus = sw->hasFocus();
+
+ int animFrame = 0;
+ if( _animateButton && animWidgets.contains( sw )){
+ animFrame = animWidgets[sw].animFrame;
+ }
+
+ const QColor buttonColor = enabled?cg.button().light(100+animFrame):cg.background();
+ const QColor highlightColor = (_animateButton?alphaBlendColors( getColor(cg,MouseOverHighlight),cg.button(), 20*animFrame ):getColor(cg,MouseOverHighlight));
+ const QColor inputColor = enabled?cg.base():cg.background();
+
+ // contour
+ const bool heightDividable = ((r.height()%2) == 0);
+ if (_inputFocusHighlight && hasFocus && enabled)
+ {
+ QRect editField = querySubControlMetrics(control, widget, SC_SpinWidgetEditField);
+ QRect editFrame = r;
+ QRect buttonFrame = r;
+
+ uint editFlags = 0;
+ uint buttonFlags = 0;
+
+ // Hightlight only the part of the contour next to the control buttons
+ if (reverseLayout)
+ {
+ // querySubControlMetrics doesn't work right for reverse Layout
+ int dx = r.right() - editField.right();
+ editFrame.setLeft(editFrame.left() + dx);
+ buttonFrame.setRight(editFrame.left() - 1);
+ editFlags |= Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight;
+ buttonFlags |= Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft;
+ }
+ else
+ {
+ editFrame.setRight(editField.right());
+ buttonFrame.setLeft(editField.right() + 1);
+
+ editFlags |= Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft;
+ buttonFlags |= Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight;
+ }
+ renderContour(p, editFrame, cg.background(), cg.highlight(), editFlags);
+ renderContour(p, buttonFrame, cg.background(),
+ getColor(cg, ButtonContour, enabled), buttonFlags);
+ }
+ else
+ {
+ renderContour(p, querySubControlMetrics(control, widget, SC_SpinWidgetFrame),
+ cg.background(), getColor(cg, ButtonContour, enabled) );
+ }
+ p->setPen(alphaBlendColors(cg.background(), getColor(cg, ButtonContour, enabled), 50) );
+ p->drawLine(reverseLayout?r.left()+1+handleWidth:r.right()-handleWidth-1, r.top()+1,
+ reverseLayout?r.left()+1+handleWidth:r.right()-handleWidth-1, r.bottom()-1);
+ p->drawLine(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1+(r.height()-2)/2,
+ reverseLayout?r.left()+handleWidth:r.right()-1, r.top()+1+(r.height()-2)/2);
+
+ //commented out because I always prefer that only one line is drawn
+ /*if(heightDividable)
+ p->drawLine(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1+(r.height()-2)/2-1,
+ reverseLayout?r.left()+handleWidth:r.right()-1, r.top()+1+(r.height()-2)/2-1);*/
+
+ // surface
+
+ QRect upRect = QRect(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
+ handleWidth, (r.height()-2)/2);
+ QRect downRect = QRect(reverseLayout?r.left()+1:r.right()-handleWidth,
+ heightDividable?r.top()+1+((r.height()-2)/2):r.top()+1+((r.height()-2)/2)+1,
+ handleWidth, ((r.height()-2)/2) );
+ if(heightDividable) {
+ //upRect = QRect(upRect.left(), upRect.top(), upRect.width(), upRect.height()-1 );
+ downRect = QRect(downRect.left(), downRect.top()+1, downRect.width(), downRect.height()-1 );
+ }
+
+ uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+ if(reverseLayout) {
+ surfaceFlags |= Round_UpperLeft;
+ } else {
+ surfaceFlags |= Round_UpperRight;
+ }
+ if ( (animFrame != 0) || (widget == hoverWidget) || (sflags & Style_MouseOver)) {
+ surfaceFlags |= Is_Highlight;
+ surfaceFlags |= Highlight_Top|Highlight_Left|Highlight_Right;
+ }
+ if (active==SC_SpinWidgetUp) surfaceFlags|=Is_Sunken;
+ if(!enabled) surfaceFlags|=Is_Disabled;
+ renderSurface(p, upRect, cg.background(), buttonColor, highlightColor,
+ _contrast, surfaceFlags);
+ surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
+ if(reverseLayout) {
+ surfaceFlags |= Round_BottomLeft;
+ } else {
+ surfaceFlags |= Round_BottomRight;
+ }
+ if ( (animFrame != 0) || (widget == hoverWidget) || (sflags & Style_MouseOver)) {
+ surfaceFlags |= Is_Highlight;
+ surfaceFlags |= Highlight_Bottom|Highlight_Left|Highlight_Right;
+ }
+ if (active==SC_SpinWidgetDown) surfaceFlags|=Is_Sunken;
+ if(!enabled) surfaceFlags|=Is_Disabled;
+ renderSurface(p, downRect, cg.background(), buttonColor, highlightColor,
+ _contrast, surfaceFlags);
+
+ // icons...
+ sflags = Style_Default | Style_Enabled;
+ if (active == SC_SpinWidgetUp) {
+ sflags |= Style_On;
+ sflags |= Style_Sunken;
+ } else
+ sflags |= Style_Raised;
+ if (sw->buttonSymbols() == QSpinWidget::PlusMinus)
+ pe = PE_SpinWidgetPlus;
+ else
+ pe = PE_SpinWidgetUp;
+ p->setPen(cg.foreground());
+ drawPrimitive(pe, p, upRect, cg, sflags);
+
+ sflags = Style_Default | Style_Enabled;
+ if (active == SC_SpinWidgetDown) {
+ sflags |= Style_On;
+ sflags |= Style_Sunken;
+ } else
+ sflags |= Style_Raised;
+ if (sw->buttonSymbols() == QSpinWidget::PlusMinus)
+ pe = PE_SpinWidgetMinus;
+ else
+ pe = PE_SpinWidgetDown;
+ p->setPen(cg.foreground());
+ drawPrimitive(pe, p, downRect, cg, sflags);
+
+ // thin frame around the input area
+ const QRect Rcontent = QRect(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
+ r.width()-1-2-handleWidth, r.height()-2);
+ if (_inputFocusHighlight && hasFocus && enabled)
+ {
+ p->setPen( getColor(cg,FocusHighlight).dark(100+(_lightBorder?-30:30)) );
+ }
+ else
+ {
+ p->setPen(inputColor.dark(100+(_lightBorder?-30:30)) );
+ }
+ p->drawLine(Rcontent.left(), reverseLayout?Rcontent.top():Rcontent.top()+1,
+ Rcontent.left(), reverseLayout?Rcontent.bottom():Rcontent.bottom()-1 );
+ p->drawLine(Rcontent.left()+1, Rcontent.top(),
+ reverseLayout?Rcontent.right()-1:Rcontent.right(), Rcontent.top() );
+ if (_inputFocusHighlight && hasFocus && enabled)
+ {
+ p->setPen( getColor(cg,FocusHighlight).light(130) );
+ }
+ else
+ {
+ p->setPen(inputColor.light(130) );
+ }
+ p->drawLine(Rcontent.left()+1, Rcontent.bottom(), Rcontent.right()-1, Rcontent.bottom() );
+ p->drawLine(Rcontent.right(), Rcontent.top()+1,
+ Rcontent.right(), reverseLayout?Rcontent.bottom()-1:Rcontent.bottom() );
+
+ break;
+ }
+
+ default:
+ KStyle::drawComplexControl(control, p, widget,
+ r, cg, flags, controls,
+ active, opt);
+ break;
+ }
+}
+
+
+QRect PolyesterStyle::subRect(SubRect r, const QWidget *widget) const
+{
+ switch (r) {
+ case SR_ComboBoxFocusRect: {
+ return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField );
+ }
+
+ // Don't use KStyles progressbar subrect
+ // TODO:
+ case SR_ProgressBarGroove: {
+ return QRect(widget->rect());
+ }
+ case SR_ProgressBarContents:
+ case SR_ProgressBarLabel: {
+ QRect rw = widget->rect();
+ return QRect(rw.left()+2, rw.top()+2, rw.width()-4, rw.height()-4 );
+ }
+
+ default: {
+ return KStyle::subRect(r, widget);
+ }
+ }
+}
+
+QRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
+ const QWidget *widget,
+ SubControl subcontrol,
+ const QStyleOption &opt) const
+{
+ if (!widget) {
+ return QRect();
+ }
+
+ QRect r(widget->rect());
+ switch (control) {
+ case CC_ComboBox: {
+ switch (subcontrol) {
+ case SC_ComboBoxEditField: {
+ // TODO: is the handler width in pixelmetric?
+ return QRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
+ }
+ default: {
+ return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
+ }
+ }
+ break;
+ }
+ case CC_SpinWidget: {
+ const int fw = 2; // Frame width...
+
+ const bool heightDividable = ((r.height()%2) == 0);
+
+ QSize bs;
+ if(heightDividable) {
+ bs.setHeight(QMAX(8, (r.height()-2)/2));
+ } else {
+ bs.setHeight(QMAX(8, (r.height()-2-1)/2));
+ }
+ bs.setWidth(15);
+
+ const int buttonsLeft = /*reverseLayout?r.left()+1:*/r.right()-bs.width();
+
+ switch (subcontrol) {
+ case SC_SpinWidgetUp: {
+ return QRect(buttonsLeft, r.top()+1, bs.width(), bs.height() );
+ }
+ case SC_SpinWidgetDown: {
+ if(heightDividable) {
+ return QRect(buttonsLeft, r.top()+1+bs.height(),
+ bs.width(), r.height()-(bs.height()+2) );
+ } else {
+ return QRect(buttonsLeft, r.top()+1+bs.height()+1,
+ bs.width(), r.height()-(bs.height()+2+1) );
+ }
+ }
+ case SC_SpinWidgetFrame: {
+ return QRect(r.left(), r.top(), r.width(), r.height() );
+ }
+ case SC_SpinWidgetEditField: {
+ return QRect(r.left()+fw, r.top()+fw,
+ r.width()-(bs.width()+1+2*fw), r.height()-2*fw);
+ }
+ case SC_SpinWidgetButtonField: {
+ return QRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
+ }
+ default: {
+ return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
+ }
+ }
+ break;
+ }
+ default: {
+ return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
+ }
+ }
+}
+
+int PolyesterStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+{
+ switch(m) {
+ // TABS
+ // ----
+ case PM_TabBarTabVSpace: {
+ const QTabBar * tb = (const QTabBar *) widget;
+ if (tb->shape() == QTabBar::RoundedAbove ||
+ tb->shape() == QTabBar::RoundedBelow)
+ return 12;
+ else
+ return 4;
+ }
+ case PM_TabBarTabOverlap: {
+ return 1;
+ }
+
+#if (QT_VERSION >= 0x030300) // requires Qt 3.3
+ // extra space between menubar items
+ case PM_MenuBarItemSpacing: {
+ return 5;
+ }
+#endif
+
+
+// #if (QT_VERSION >= 0x030300) // requires Qt 3.3
+// // extra space between toolbar items
+// case PM_ToolBarItemSpacing: {
+// return 4;
+// }
+// #endif
+
+ // SCROLL BAR
+ case PM_ScrollBarSliderMin: {
+ return 21;
+ }
+ case PM_ScrollBarExtent: {
+ return _scrollBarExtent;
+ }
+
+ case PM_DockWindowSeparatorExtent:
+ return 6;
+
+ // SPLITTERS
+ // ---------
+ case PM_SplitterWidth: {
+ return 6;
+ }
+
+ // PROGRESSBARS
+ // ------------
+ case PM_ProgressBarChunkWidth:
+ return 10;
+
+ // SLIDER
+ // ------
+ case PM_SliderLength:
+ return 11;
+
+ // MENU INDICATOR
+ // --------------
+ case PM_MenuButtonIndicator:
+ return 8;
+
+ // CHECKBOXES / RADIO BUTTONS
+ // --------------------------
+ case PM_ExclusiveIndicatorWidth: // Radiobutton size
+ case PM_ExclusiveIndicatorHeight: // 13x13
+ case PM_IndicatorWidth: // Checkbox size
+ case PM_IndicatorHeight: // 13x13
+ return 13;
+
+ // FRAMES
+ // ------
+ case PM_SpinBoxFrameWidth:
+ return 1;
+
+ case PM_MenuBarFrameWidth:
+ return 1; //FIXME: change menubar height
+
+ case PM_DefaultFrameWidth: {
+ if(widget && ::qt_cast<QPopupMenu*>(widget))
+ return 1;
+ else
+ return 2;
+ }
+
+ case PM_ButtonDefaultIndicator: {
+ return 0;
+ }
+
+ case PM_ButtonMargin: {
+ return 2;
+ }
+
+ case PM_ButtonShiftVertical:
+ case PM_ButtonShiftHorizontal: {
+ return 1;
+ }
+
+ default:
+ return KStyle::pixelMetric(m, widget);
+ }
+}
+
+
+int PolyesterStyle::kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) const
+{
+ switch(kpm)
+ {
+ case KPM_MenuItemSeparatorHeight:
+ return 2;
+ default:
+ return KStyle::kPixelMetric(kpm, widget);
+ }
+}
+
+QSize PolyesterStyle::sizeFromContents(ContentsType t,
+ const QWidget *widget,
+ const QSize &s,
+ const QStyleOption &opt) const
+{
+ switch (t) {
+ case CT_PopupMenuItem: {
+ if (!widget || opt.isDefault())
+ return s;
+
+ const QPopupMenu *popup = dynamic_cast<const QPopupMenu *>(widget);
+ QMenuItem *mi = opt.menuItem();
+ int maxpmw = opt.maxIconWidth();
+ int w = s.width(), h = s.height();
+ bool checkable = popup->isCheckable();
+
+ if (mi->custom()) {
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
+ if (!mi->custom()->fullSpan() )
+ h += 4;
+ } else if (mi->widget()) {
+ // don't change the size in this case.
+ } else if (mi->isSeparator()) {
+ w = 20;
+ h = 3;
+ } else {
+ if (mi->pixmap()) {
+ h = QMAX(h, mi->pixmap()->height() + 2);
+ } else {
+ h = QMAX(h, 16 + 2 );
+ h = QMAX(h, popup->fontMetrics().height() + _menuItemSpacing );
+ }
+
+ if (mi->iconSet()) {
+ h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal).height() + 2);
+ }
+ }
+
+ if (!mi->text().isNull() && (mi->text().find('\t') >= 0)) {
+ w += itemHMargin + itemFrame*2 + 7;
+ } else if (mi->popup()) {
+ w += 2 * arrowHMargin;
+ }
+
+ if (maxpmw) {
+ w += maxpmw + 6;
+ }
+ if (checkable && maxpmw < 20) {
+ w += 20 - maxpmw;
+ }
+ if (checkable || maxpmw > 0) {
+ w += 12;
+ }
+
+ w += rightBorder;
+
+ return QSize(w, h);
+ }
+
+ case CT_PushButton:
+ {
+ const QPushButton* btn = static_cast<const QPushButton*>(widget);
+
+ int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
+ int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
+ if ( btn->text().isEmpty() && s.width() < 32 ) return QSize(w, h);
+
+ return QSize( w+25, h+5 );
+ }
+
+ case CT_ToolButton:
+ {
+ if(widget->parent() && ::qt_cast<QToolBar*>(widget->parent()) )
+ return QSize( s.width()+2*4, s.height()+2*4 );
+ else
+ return KStyle::sizeFromContents (t, widget, s, opt);
+ }
+
+ default:
+ return KStyle::sizeFromContents (t, widget, s, opt);
+ }
+
+ return KStyle::sizeFromContents (t, widget, s, opt);
+}
+
+int PolyesterStyle::styleHint( StyleHint stylehint,
+ const QWidget *widget,
+ const QStyleOption &option,
+ QStyleHintReturn* returnData ) const
+{
+ switch (stylehint) {
+ case SH_PopupMenu_SubMenuPopupDelay:
+ return 96; // Motif-like delay...
+ case QStyle::SH_TabBar_Alignment:
+ /*if reverseLayout is enabled, the centering of tabs
+ is disabled, due to a bug in rendering*/
+ if (_centeredTabBar && !QApplication::reverseLayout())
+ return Qt::AlignHCenter;
+
+ //Suggestion by Daniel Molkentin,
+ //algorithm from QT4 QWindowsXPStyle Copyright 2006 Trolltech
+//this exists since Qt3.2
+#if (QT_VERSION >= 0x030200)
+ case SH_LineEdit_PasswordCharacter:
+ {
+ if (widget)
+ {
+ const QFontMetrics &fm = widget->fontMetrics();
+ if (fm.inFont(QChar(0x25CF)))
+ {
+ return 0x25CF;
+ }
+ else if (fm.inFont(QChar(0x2022)))
+ {
+ return 0x2022;
+ }
+ }
+ else
+ {
+ return '*';
+ }
+ }
+#endif
+ default:
+ return KStyle::styleHint(stylehint, widget, option, returnData);
+ }
+}
+
+bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
+{
+
+ if (KStyle::eventFilter(obj, ev) )
+ return true;
+
+ if (!obj->isWidgetType() ) return false;
+
+ //header mouse over
+ if ( ::qt_cast<QHeader*>(obj) ) {
+ QWidget* widget = static_cast<QWidget*>(obj);
+ if ((ev->type() == QEvent::Leave) && static_cast<QWidget*>(obj)->isEnabled())
+ {
+ hoverWidget = 0;
+ hoverHeaderId = -1;
+ widget->repaint(false);
+ }
+ else if ((ev->type() == QEvent::MouseMove) && static_cast<QWidget*>(obj)->isEnabled())
+ {
+ QMouseEvent * mEvent = ( QMouseEvent * ) ev;
+ QHeader* header = static_cast<QHeader*>(widget);
+
+ hoverWidget = widget;
+ int tempHover = hoverHeaderId;
+
+ if( header->orientation()==Qt::Horizontal )
+ hoverHeaderId = header->sectionAt( mEvent->x()+header->offset() );
+ else
+ hoverHeaderId = header->sectionAt( mEvent->y()+header->offset() );
+
+ if( tempHover != hoverHeaderId )
+ widget->update();
+ }
+ }
+ /*Scrollbar Mouse over*/
+ if ( ::qt_cast<QScrollBar*>(obj) ) {
+ QWidget* widget = static_cast<QWidget*>(obj);
+
+ if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ {
+ hoverWidget = widget;
+ widget->repaint(false);
+ }
+ else if ((ev->type() == QEvent::Leave) && static_cast<QWidget*>(obj)->isEnabled())
+ {
+ hoverWidget = 0;
+ widget->repaint(false);
+ }
+ }
+ // focus highlight
+ if ( ::qt_cast<QLineEdit*>(obj) ) {
+ QWidget* widget = static_cast<QWidget*>(obj);
+
+ if ( ::qt_cast<QSpinWidget*>(widget->parentWidget()) )
+ {
+ QWidget* spinbox = widget->parentWidget();
+ if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut))
+ {
+ spinbox->repaint(false);
+ }
+ return false;
+ }
+
+ if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut))
+ {
+ widget->repaint(false);
+ }
+ return false;
+ }
+
+ //Hover highlight... use qt_cast to check if the widget inheits one of the classes.
+ if ( ::qt_cast<QPushButton*>(obj) || ::qt_cast<QComboBox*>(obj) ||
+ ::qt_cast<QSpinWidget*>(obj) || ::qt_cast<QCheckBox*>(obj) ||
+ ::qt_cast<QRadioButton*>(obj) || ::qt_cast<QToolButton*>(obj) || obj->inherits("QSplitterHandle") )
+ {
+ if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ {
+ QWidget* button = static_cast<QWidget*>(obj);
+ hoverWidget = button;
+
+ //only animate widgets that support animation :-)
+ if(_animateButton && !::qt_cast<QRadioButton*>(obj)
+ && !::qt_cast<QCheckBox*>(obj)){
+ animWidgets[button].active = true;
+ // if timer isn't running, start it now for glow-in animation.
+ if( !btnAnimTimer->isActive() )
+ btnAnimTimer->start( TIMERINTERVAL, false );
+ }
+
+ button->repaint(false);
+ }
+ else if ((ev->type() == QEvent::Leave) && (obj == hoverWidget) )
+ {
+ QWidget* button = static_cast<QWidget*>(obj);
+ hoverWidget = 0;
+
+ //only animate widgets that support animation :-)
+ if(_animateButton && !::qt_cast<QRadioButton*>(obj)
+ && !::qt_cast<QCheckBox*>(obj)){
+ animWidgets[button].active = false;
+ // if timer isn't running, start it now for glow-out animation.
+ if( !btnAnimTimer->isActive() )
+ btnAnimTimer->start( TIMERINTERVAL, false );
+ }
+
+ button->repaint(false);
+ }
+ return false;
+ }
+ if ( ::qt_cast<QTabBar*>(obj) ) {
+ if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ {
+ QWidget* tabbar = static_cast<QWidget*>(obj);
+ hoverWidget = tabbar;
+ hoverTab = 0;
+ tabbar->repaint(false);
+ }
+ else if (ev->type() == QEvent::MouseMove)
+ {
+ QTabBar *tabbar = dynamic_cast<QTabBar*>(obj);
+ QMouseEvent *me = dynamic_cast<QMouseEvent*>(ev);
+
+ if (tabbar && me) {
+ // avoid unnecessary repaints (which otherwise would occour on every
+ // MouseMove event causing high cpu load).
+
+ bool repaint = true;
+
+ QTab *tab = tabbar->selectTab(me->pos() );
+ if (hoverTab == tab)
+ repaint = false;
+ hoverTab = tab;
+
+ if (repaint)
+ tabbar->repaint(false);
+ }
+ }
+ else if (ev->type() == QEvent::Leave)
+ {
+ QWidget* tabbar = static_cast<QWidget*>(obj);
+ hoverWidget = 0;
+ hoverTab = 0;
+ tabbar->repaint(false);
+ }
+ return false;
+ }
+ // Track show events for progress bars
+ if ( _animateProgressBar && ::qt_cast<QProgressBar*>(obj) )
+ {
+ if ((ev->type() == QEvent::Show) && !animationTimer->isActive())
+ {
+ animationTimer->start( 50, false );
+ }
+ }
+ if ( !qstrcmp(obj->name(), "kde toolbar widget") )
+ {
+ QWidget* lb = static_cast<QWidget*>(obj);
+ if (lb->backgroundMode() == Qt::PaletteButton)
+ lb->setBackgroundMode(Qt::PaletteBackground);
+ lb->removeEventFilter(this);
+ }
+
+ return false;
+}
+
+QColor PolyesterStyle::getColor(const QColorGroup &cg, const ColorType t, const bool enabled)const
+{
+ return getColor(cg, t, enabled?IsEnabled:IsDisabled);
+}
+
+QColor PolyesterStyle::getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const
+{
+ const bool enabled = (s != IsDisabled) &&
+ ((s == IsEnabled) || (s == IsPressed) || (s == IsHighlighted));
+ const bool pressed = (s == IsPressed);
+ const bool highlighted = (s == IsHighlighted);
+
+ switch(t) {
+ case ButtonContour:
+ return enabled ? cg.button().dark(130+_contrast*8)
+ : cg.background().dark(120+_contrast*8);
+ case DragButtonContour: {
+ if(enabled) {
+ if(pressed)
+ return _coloredScrollBar?cg.highlight().dark(130+_contrast*6)
+ :cg.background().dark(130+_contrast*6); // bright
+ else if(highlighted)
+ return _coloredScrollBar?cg.highlight().dark(130+_contrast*9)
+ :cg.background().dark(130+_contrast*9); // dark
+ else
+ return _coloredScrollBar?cg.highlight().dark(130+_contrast*8)
+ :cg.background().dark(130+_contrast*8); // normal
+ } else {
+ return cg.background().dark(120+_contrast*8);
+ }
+ }
+ case DragButtonSurface: {
+ if(enabled) {
+ if(pressed)
+ return _coloredScrollBar?cg.highlight().dark(100-_contrast):cg.button().dark(100-_contrast); // bright
+ else if(highlighted)
+ return _coloredScrollBar?cg.highlight().light(100+_contrast):cg.button().light(100+_contrast); // dark
+ else
+ return _coloredScrollBar?cg.highlight():cg.button(); // normal
+ } else {
+ return cg.background();
+ }
+ }
+ case PanelContour:
+ return cg.background().dark(160+_contrast*8);
+ case PanelDark:
+ if( !_lightBorder )
+ return alphaBlendColors(cg.background(), cg.background().dark(120+_contrast*5), 110);
+ else
+ return alphaBlendColors(cg.background(), cg.background().light(120+_contrast*5), 110);
+ case PanelDark2:
+ if( !_lightBorder )
+ return alphaBlendColors(cg.background(), cg.background().dark(110+_contrast*5), 110);
+ else
+ return alphaBlendColors(cg.background(), cg.background().light(110+_contrast*5), 110);
+ case PanelLight:
+ return alphaBlendColors(cg.background(), cg.background().light(120+_contrast*5), 110);
+ case PanelLight2:
+ return alphaBlendColors(cg.background(), cg.background().light(110+_contrast*5), 110);
+ case MouseOverHighlight:
+ if( _customOverHighlightColor )
+ return _overHighlightColor;
+ else
+ return cg.highlight();
+ case FocusHighlight:
+ if( _customFocusHighlightColor )
+ return _focusHighlightColor;
+ else
+ return cg.highlight();
+ case CheckMark:
+ if( _customCheckMarkColor )
+ return _checkMarkColor;
+ else
+ return cg.foreground();
+ case MenuBarEmphasis:
+ if( _customMenuBarEmphasisColor )
+ return _menuBarEmphasisColor;
+ else
+ return cg.background();
+ default:
+ return cg.background();
+ }
+}
diff --git a/style/polyester.h b/style/polyester.h
new file mode 100755
index 0000000..26ad080
--- /dev/null
+++ b/style/polyester.h
@@ -0,0 +1,438 @@
+/* Polyester widget style for KDE 3
+ Copyright (C) 2005 Marco Martin <notmart@gmail.com>
+
+ based on Plastik widget style for KDE 3
+ Copyright (C) 2003 Sandro Giessl <ceebx@users.sourceforge.net>
+
+ based on the KDE style "dotNET":
+
+ Copyright (C) 2001-2002, Chris Lee <clee@kde.org>
+ Carsten Pfeiffer <pfeiffer@kde.org>
+ Karol Szwed <gallium@kde.org>
+ Drawing routines completely reimplemented from KDE3 HighColor, which was
+ originally based on some stuff from the KDE2 HighColor.
+
+ based on drawing routines of the style "Keramik":
+
+ Copyright (c) 2002 Malte Starostik <malte@kde.org>
+ (c) 2002,2003 Maksim Orlovich <mo002j@mail.rochester.edu>
+ based on the KDE3 HighColor Style
+ Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
+ (C) 2001-2002 Fredrik H�lund <fredrik@kde.org>
+ Drawing routines adapted from the KDE2 HCStyle,
+ Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
+ (C) 2000 Dirk Mueller <mueller@kde.org>
+ (C) 2001 Martijn Klingens <klingens@kde.org>
+ Progressbar code based on KStyle,
+ Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __POLYESTER_H
+#define __POLYESTER_H
+
+#include <kstyle.h>
+#include <qbitmap.h>
+#include <qintcache.h>
+
+#define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2
+#define d_arrow -4,-2, 2,-2, -3,-1, 1,-1, -2,0, 0,0, -1,1
+#define l_arrow 0,-3, 0,3,-1,-2,-1,2,-2,-1,-2,1,-3,0
+#define r_arrow -2,-3,-2,3,-1,-2, -1,2,0,-1,0,1,1,0
+
+#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+
+class QSettings;
+class QTab;
+class QTimer;
+
+//a tiny reimplementation of max...
+int max(int a, int b){return (a>b?a:b);}
+
+class PolyesterStyle : public KStyle
+{
+ Q_OBJECT
+
+public:
+ PolyesterStyle();
+ virtual ~PolyesterStyle();
+
+ void polish(QApplication* app );
+ void polish(QWidget* widget );
+ void unPolish(QWidget* widget );
+
+ void drawKStylePrimitive(KStylePrimitive kpe,
+ QPainter* p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ void drawPrimitive(PrimitiveElement pe,
+ QPainter *p,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ const QStyleOption &opt = QStyleOption::Default ) const;
+
+ void drawControl(ControlElement element,
+ QPainter *p,
+ const QWidget *widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const;
+
+ void drawComplexControl(ComplexControl control,
+ QPainter *p,
+ const QWidget *widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ SCFlags controls = SC_All,
+ SCFlags active = SC_None,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ int pixelMetric(PixelMetric m,
+ const QWidget *widget = 0 ) const;
+
+ int kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) const;
+
+ QRect subRect(SubRect r,
+ const QWidget *widget ) const;
+
+ QRect querySubControlMetrics(ComplexControl control,
+ const QWidget *widget,
+ SubControl subcontrol,
+ const QStyleOption &opt = QStyleOption::Default ) const;
+
+ void drawComplexControlMask(QStyle::ComplexControl c,
+ QPainter *p,
+ const QWidget *w,
+ const QRect &r,
+ const QStyleOption &o=QStyleOption::Default) const;
+
+ QSize sizeFromContents(QStyle::ContentsType t,
+ const QWidget *w,
+ const QSize &s,
+ const QStyleOption &o) const;
+
+ int styleHint(StyleHint, const QWidget * = 0,
+ const QStyleOption & = QStyleOption::Default,
+ QStyleHintReturn * = 0 ) const;
+
+protected:
+ enum TabPosition
+ {
+ First = 0,
+ Middle,
+ Last,
+ Single // only one tab!
+ };
+
+ enum SelectedTab
+ {
+ ThisTab,
+ NextTab,
+ PrevTab,
+ OtherTab
+ };
+
+ enum ColorType
+ {
+ ButtonContour,
+ DragButtonContour,
+ DragButtonSurface,
+ PanelContour,
+ PanelLight,
+ PanelLight2,
+ PanelDark,
+ PanelDark2,
+ MouseOverHighlight,
+ FocusHighlight,
+ CheckMark,
+ MenuBarEmphasis
+ };
+
+ enum WidgetState
+ {
+ IsEnabled,
+ IsPressed, // implies IsEnabled
+ IsHighlighted, // implies IsEnabled
+ IsDisabled
+ };
+
+ // the only way i see to provide all these options
+ // to renderContour/renderSurface...
+ enum SurfaceFlags {
+ Draw_Left = 0x00000001,
+ Draw_Right = 0x00000002,
+ Draw_Top = 0x00000004,
+ Draw_Bottom = 0x00000008,
+ Highlight_Left = 0x00000010, // surface
+ Highlight_Right = 0x00000020, // surface
+ Highlight_Top = 0x00000040, // surface
+ Highlight_Bottom = 0x00000080, // surface
+ Is_Sunken = 0x00000100, // surface
+ Is_Horizontal = 0x00000200, // surface
+ Is_Highlight = 0x00000400, // surface
+ Is_Default = 0x00000800, // surface
+ Is_Disabled = 0x00001000,
+ Round_UpperLeft = 0x00002000,
+ Round_UpperRight = 0x00004000,
+ Round_BottomLeft = 0x00008000,
+ Round_BottomRight = 0x00010000,
+ Draw_AlphaBlend = 0x00020000,
+ Sharp_UpperLeft = 0x00040000,
+ Sharp_UpperRight = 0x00080000,
+ Sharp_BottomLeft = 0x00100000,
+ Sharp_BottomRight = 0x00200000
+ };
+
+ void renderContour(QPainter *p,
+ const QRect &r,
+ const QColor &backgroundColor,
+ const QColor &contourColor,
+ const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
+
+ void renderMask(QPainter *p,
+ const QRect &r,
+ const QColor &color,
+ const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
+
+ void renderSurface(QPainter *p,
+ const QRect &r,
+ const QColor &backgroundColor,
+ const QColor &buttonColor,
+ const QColor &highlightColor,
+ int intensity = 5,
+ const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
+ Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight|
+ Is_Horizontal) const;
+
+ inline void renderPixel(QPainter *p,
+ const QPoint &pos,
+ const int alpha,
+ const QColor &color,
+ const QColor &background = QColor(),
+ bool fullAlphaBlend = true) const;
+
+ void renderButton(QPainter *p,
+ const QRect &r,
+ const QColorGroup &g,
+ bool sunken = false,
+ bool mouseOver = false,
+ bool horizontal = true,
+ bool enabled = true,
+ bool khtmlMode = false,
+ int animFrame = 0,
+ bool isDefault = false) const;
+
+ void renderPanel(QPainter *p,
+ const QRect &r,
+ const QColorGroup &g,
+ const bool pseudo3d = true,
+ const bool sunken = true) const;
+
+ void renderDot(QPainter *p,
+ const QPoint &point,
+ const QColor &baseColor,
+ const bool thick = false,
+ const bool sunken = false) const;
+
+ void renderGradient(QPainter *p,
+ const QRect &r,
+ const QColor &c1,
+ const QColor &c2,
+ bool horizontal = true) const;
+
+ void renderTab(QPainter *p,
+ const QRect &r,
+ const QColorGroup &g,
+ bool mouseOver = false,
+ const SelectedTab selected = OtherTab,
+ const bool bottom = false,
+ const TabPosition pos = Middle,
+ const bool triangular = false,
+ bool cornerWidget = false) const;
+
+ virtual void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup& cg,
+ const QPopupMenu* popup ) const;
+
+ bool eventFilter(QObject *, QEvent *);
+
+ // what widget has mouse over him?
+ QWidget* hoverWidget;
+ // mouse over for listview headers
+ int hoverHeaderId;
+
+protected slots:
+ void khtmlWidgetDestroyed(QObject* w);
+
+ void sliderThumbMoved(int val);
+
+ //Animation slots.
+ void updateProgressPos();
+ void progressBarDestroyed(QObject* bar);
+ void animWidgetDestroyed(QObject* w);
+ void animate();
+
+ inline QColor getColor(const QColorGroup &cg, const ColorType t, const bool enabled = true)const;
+ inline QColor getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const;
+private:
+// Disable copy constructor and = operator
+ PolyesterStyle( const PolyesterStyle & );
+ PolyesterStyle& operator=( const PolyesterStyle & );
+
+
+
+ bool kickerMode, kornMode;
+ mutable bool flatMode;
+
+ int _contrast;
+ bool _scrollBarLines;
+ QString _scrollBarStyle;
+ int _scrollBarExtent;
+ KStyle::KStyleScrollBarType _scrollBarType;
+ bool _useLowerCaseText;
+ bool _animateProgressBar;
+ bool _animateButton;
+ bool _animateButtonToDark;
+ bool _lightBorder;
+ bool _coloredScrollBar;
+ bool _centeredTabBar;
+ bool _highLightTab;
+ bool _statusBarFrame;
+ bool _colorizeSortedHeader;
+ int _menuItemSpacing;
+ bool _buttonMenuItem;
+ bool _menuBarEmphasis;
+ bool _menuBarEmphasisBorder;
+ bool _customMenuBarEmphasisColor;
+ bool _menuStripe;
+ QColor _menuBarEmphasisColor;
+ bool _shadowedMenuBarText;
+ bool _shadowedButtonsText;
+ bool _drawToolBarSeparator;
+ bool _drawToolBarItemSeparator;
+ bool _drawFocusRect;
+ bool _drawTriangularExpander;
+ bool _inputFocusHighlight;
+ bool _customOverHighlightColor;
+ bool _customFocusHighlightColor;
+ bool _customCheckMarkColor;
+ QColor _overHighlightColor;
+ QColor _focusHighlightColor;
+ QColor _checkMarkColor;
+ QString _buttonStyle;
+
+ QTab *hoverTab;
+
+ // track khtml widgets.
+ QMap<const QWidget*,bool> khtmlWidgets;
+
+ //Animation support.
+ QMap<QWidget*, int> progAnimWidgets;
+
+ // pixmap cache.
+ enum CacheEntryType {
+ cSurface,
+ cGradientTile,
+ cAlphaDot
+ };
+ struct CacheEntry
+ {
+ CacheEntryType type;
+ int width;
+ int height;
+ QRgb c1Rgb;
+ QRgb c2Rgb;
+ bool horizontal;
+
+ QPixmap* pixmap;
+
+ CacheEntry(CacheEntryType t, int w, int h, QRgb c1, QRgb c2 = 0,
+ bool hor = false, QPixmap* p = 0 ):
+ type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p)
+ {}
+
+ ~CacheEntry()
+ {
+ delete pixmap;
+ }
+
+ int key()
+ {
+ // create an int key from the properties which is used to refer to entries in the QIntCache.
+ // the result may not be 100% correct as we don't have so much space in one integer -- use
+ // == operator after find to make sure we got the right one. :)
+ return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
+ }
+
+ bool operator == (const CacheEntry& other)
+ {
+ bool match = (type == other.type) &&
+ (width == other.width) &&
+ (height == other.height) &&
+ (c1Rgb == other.c1Rgb) &&
+ (c1Rgb == other.c1Rgb) &&
+ (horizontal = other.horizontal);
+// if(!match) {
+// qDebug("operator ==: CacheEntries don't match!");
+// qDebug("width: %d\t\tother width: %d", width, other.width);
+// qDebug("height: %d\t\tother height: %d", height, other.height);
+// qDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb);
+// qDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb);
+// qDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags);
+// }
+ return match;
+ }
+ };
+ QIntCache<CacheEntry> *pixmapCache;
+
+ // For renderFocusRect
+ mutable QBitmap *verticalDots;
+ mutable QBitmap *horizontalDots;
+
+ // For KPE_ListViewBranch
+ mutable QBitmap *verticalLine;
+ mutable QBitmap *horizontalLine;
+
+ // For buttons animation
+ struct AnimInfo {
+ bool active;
+ uint animFrame;
+ };
+ typedef QMap<QWidget*, AnimInfo>AnimWidgetMap;
+ AnimWidgetMap animWidgets;
+ QTimer *btnAnimTimer;
+
+ typedef QMap<const QWidget*, int>SliderValuesMap;
+ SliderValuesMap sliderValues;
+
+ // For progress bar animation
+ QTimer *animationTimer;
+
+ //for the semi transparent menu stripe
+ QImage *alphaStripe;
+};
+
+#endif // __POLYESTER_H
diff --git a/style/polyester.themerc b/style/polyester.themerc
new file mode 100755
index 0000000..c388946
--- /dev/null
+++ b/style/polyester.themerc
@@ -0,0 +1,7 @@
+[Misc]
+Name=Polyester
+ConfigPage=kstyle_polyester_config
+Comment=An almost simple and clean style
+
+[KDE]
+WidgetStyle=Polyester