diff options
Diffstat (limited to 'bibletime/util')
-rw-r--r-- | bibletime/util/Makefile.am | 16 | ||||
-rw-r--r-- | bibletime/util/Makefile.in | 720 | ||||
-rw-r--r-- | bibletime/util/autoptrvector.h | 176 | ||||
-rw-r--r-- | bibletime/util/cpointers.cpp | 58 | ||||
-rw-r--r-- | bibletime/util/cpointers.h | 120 | ||||
-rw-r--r-- | bibletime/util/cresmgr.cpp | 1198 | ||||
-rw-r--r-- | bibletime/util/cresmgr.h | 733 | ||||
-rw-r--r-- | bibletime/util/ctoolclass.cpp | 239 | ||||
-rw-r--r-- | bibletime/util/ctoolclass.h | 80 | ||||
-rw-r--r-- | bibletime/util/directoryutil.cpp | 111 | ||||
-rw-r--r-- | bibletime/util/directoryutil.h | 55 | ||||
-rw-r--r-- | bibletime/util/scoped_resource.h | 181 |
12 files changed, 0 insertions, 3687 deletions
diff --git a/bibletime/util/Makefile.am b/bibletime/util/Makefile.am deleted file mode 100644 index 7a4ba4e..0000000 --- a/bibletime/util/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -INCLUDES = $(all_includes) -libutil_a_METASOURCES = AUTO -noinst_LIBRARIES = libutil.a - -libutil_a_SOURCES = cpointers.cpp cresmgr.cpp ctoolclass.cpp directoryutil.cpp - -all_headers = \ -scoped_resource.h \ -cpointers.h \ -cresmgr.h \ -ctoolclass.h \ -autoptrvector.h - -EXTRA_DIST = $(libutil_a_SOURCES) $(all_headers) - -noinst_HEADERS = directoryutil.h diff --git a/bibletime/util/Makefile.in b/bibletime/util/Makefile.in deleted file mode 100644 index e1bed5e..0000000 --- a/bibletime/util/Makefile.in +++ /dev/null @@ -1,720 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# KDE tags expanded automatically by am_edit - $Revision: 1.31 $ -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 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 = bibletime/util -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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libutil_a_AR = $(AR) $(ARFLAGS) -libutil_a_LIBADD = -am_libutil_a_OBJECTS = cpointers.$(OBJEXT) cresmgr.$(OBJEXT) \ - ctoolclass.$(OBJEXT) directoryutil.$(OBJEXT) -#>- libutil_a_OBJECTS = $(am_libutil_a_OBJECTS) -#>+ 5 -libutil_a_final_OBJECTS = libutil_a.all_cpp.o -libutil_a_nofinal_OBJECTS = cpointers.$(OBJEXT) cresmgr.$(OBJEXT) \ - ctoolclass.$(OBJEXT) directoryutil.$(OBJEXT) -@KDE_USE_FINAL_FALSE@libutil_a_OBJECTS = $(libutil_a_nofinal_OBJECTS) -@KDE_USE_FINAL_TRUE@libutil_a_OBJECTS = $(libutil_a_final_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -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 = $(libutil_a_SOURCES) -DIST_SOURCES = $(libutil_a_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@ -BT_LDFLAGS = @BT_LDFLAGS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CLUCENE_INCLUDES = @CLUCENE_INCLUDES@ -CLUCENE_LIBRARY_PATH = @CLUCENE_LIBRARY_PATH@ -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@ -DISTRIBUTION = @DISTRIBUTION@ -DISTRIBUTION_VERSION = @DISTRIBUTION_VERSION@ -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@ -HOWTODIR = @HOWTODIR@ -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_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_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@ -KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@ -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_CLUCENE = @LIB_CLUCENE@ -LIB_KAB = @LIB_KAB@ -LIB_KABC = @LIB_KABC@ -LIB_KDECORE = @LIB_KDECORE@ -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_KUTILS = @LIB_KUTILS@ -LIB_POLL = @LIB_POLL@ -LIB_QPE = @LIB_QPE@ -LIB_QT = @LIB_QT@ -LIB_SMB = @LIB_SMB@ -LIB_SWORD = @LIB_SWORD@ -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@ -RPM_GROUP = @RPM_GROUP@ -RPM_PREFIX = @RPM_PREFIX@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWORD_INCLUDES = @SWORD_INCLUDES@ -SWORD_LIBRARY_PATH = @SWORD_LIBRARY_PATH@ -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) -#>- libutil_a_METASOURCES = AUTO -noinst_LIBRARIES = libutil.a -libutil_a_SOURCES = cpointers.cpp cresmgr.cpp ctoolclass.cpp directoryutil.cpp -all_headers = \ -scoped_resource.h \ -cpointers.h \ -cresmgr.h \ -ctoolclass.h \ -autoptrvector.h - -EXTRA_DIST = $(libutil_a_SOURCES) $(all_headers) -noinst_HEADERS = directoryutil.h -#>- 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 bibletime/util/Makefile'; \ -#>- cd $(top_srcdir) && \ -#>- $(AUTOMAKE) --gnu bibletime/util/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 bibletime/util/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu bibletime/util/Makefile - cd $(top_srcdir) && perl admin/am_edit bibletime/util/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 - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libutil.a: $(libutil_a_OBJECTS) $(libutil_a_DEPENDENCIES) - -rm -f libutil.a - $(libutil_a_AR) libutil.a $(libutil_a_OBJECTS) $(libutil_a_LIBADD) - $(RANLIB) libutil.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpointers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cresmgr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctoolclass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/directoryutil.Po@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; nonemtpy = 1; } \ - END { if (nonempty) { 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; nonempty = 1; } \ - END { if (nonempty) { 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=; \ - 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; nonempty = 1; } \ - END { if (nonempty) { 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 $(LIBRARIES) $(HEADERS) -installdirs: -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-libtool clean-noinstLIBRARIES \ -#>- mostlyclean-am -#>+ 2 -clean-am: clean-bcheck clean-final clean-generic clean-libtool clean-noinstLIBRARIES \ - 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-dvi: install-dvi-am - -install-exec-am: - -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: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES 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-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 - -# 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: - -#>+ 2 -KDE_DIST=cpointers.h scoped_resource.h ctoolclass.h autoptrvector.h Makefile.in cresmgr.h 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) --gnu bibletime/util/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu bibletime/util/Makefile - cd $(top_srcdir) && perl admin/am_edit bibletime/util/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 -libutil_a.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/cpointers.cpp $(srcdir)/cresmgr.cpp $(srcdir)/ctoolclass.cpp $(srcdir)/directoryutil.cpp - @echo 'creating libutil_a.all_cpp.cpp ...'; \ - rm -f libutil_a.all_cpp.files libutil_a.all_cpp.final; \ - echo "#define KDE_USE_FINAL 1" >> libutil_a.all_cpp.final; \ - for file in cpointers.cpp cresmgr.cpp ctoolclass.cpp directoryutil.cpp ; do \ - echo "#include \"$$file\"" >> libutil_a.all_cpp.files; \ - test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> libutil_a.all_cpp.final; \ - done; \ - cat libutil_a.all_cpp.final libutil_a.all_cpp.files > libutil_a.all_cpp.cpp; \ - rm -f libutil_a.all_cpp.final libutil_a.all_cpp.files - -#>+ 3 -clean-final: - -rm -f libutil_a.all_cpp.cpp - -#>+ 3 -final: - $(MAKE) libutil_a_OBJECTS="$(libutil_a_final_OBJECTS)" all-am - -#>+ 3 -final-install: - $(MAKE) libutil_a_OBJECTS="$(libutil_a_final_OBJECTS)" install-am - -#>+ 3 -no-final: - $(MAKE) libutil_a_OBJECTS="$(libutil_a_nofinal_OBJECTS)" all-am - -#>+ 3 -no-final-install: - $(MAKE) libutil_a_OBJECTS="$(libutil_a_nofinal_OBJECTS)" install-am - -#>+ 3 -cvs-clean: - $(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean - -#>+ 3 -kde-rpo-clean: - -rm -f *.rpo - -#>+ 3 -nmcheck: -nmcheck-am: nmcheck diff --git a/bibletime/util/autoptrvector.h b/bibletime/util/autoptrvector.h deleted file mode 100644 index 4e8f82b..0000000 --- a/bibletime/util/autoptrvector.h +++ /dev/null @@ -1,176 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -#ifndef UTILAUTOPTRVECTOR_H -#define UTILAUTOPTRVECTOR_H - -namespace util { - - /** - * This class provides a simple vector which works on pointers. - * All pointer are deeted at destruction time of an AutoPtrVector object. - * This vector uses a single linked list to store the pointers. - * This class provides the methods first(), current() and next() for navigation. - * - * @author Joachim Ansorg - */ - template<class T> - class AutoPtrVector { -public: - /** Default constructor. - * The default constructor. This creates an empty vector. - */ -explicit AutoPtrVector() : m_first(0), m_current(0), m_end(0) {} - ; - - /** Copy constructor using deep copy. - * This does a deep copy of the passed AutoPtrVector. - * @param old The vector to be copied. - */ -AutoPtrVector(AutoPtrVector& old) : m_first(0), m_current(0), m_end(0) { - this->operator=(old); //share the code with the copy operator - /* if (this != &old) { - Item* last = m_first; - Item* prev = 0; - - for (T* c = old.first(); c; c = old.next()) { - last = new Item( new T(*c) ); - - if (prev) { - prev->next = last; - } - - prev = last; - } - }*/ - }; - - AutoPtrVector& operator=(AutoPtrVector& old) { - //at first delete all items, then copy old into new items - clear(); - - if (this != &old) { //only copy if the two pointers are different - Item* last = m_first; - Item* prev = 0; - - for (T* c = old.first(); c; c = old.next()) { - last = new Item( new T(*c) ); - - if (prev) { - prev->next = last; - } - - prev = last; - } - } - - return *this; - }; - - /** Destructor. - * Deletes all the objects which belong to the stored pointers - * @see clear() - */ - virtual ~AutoPtrVector() { - clear(); - }; - - - /** Append an item - * - * Append a new item to this vector. - */ - inline void append(T* type) { - if (!m_first) { //handle the first item special - m_first = new Item( type ); - m_end = m_first; - } - else { - m_end->next = new Item( type ); - m_end = m_end->next; - } - }; - - /** The first item of this vector. - * - * @return The first item of this vector. Null of there are no items. - */ - inline T* const first() const { - m_current = m_first; - return m_current ? m_current->value : 0; - }; - - /** The current item. - * - * @return The current item reached by first() and next() calls - */ - inline T* const current() const { - return m_current->value; - }; - - /** Moves to the next item. - * - * @return Moves to the next item - */ - inline T* const next() const { - if (m_current && m_current->next) { - m_current = m_current->next; - return m_current->value; - } - - return 0; - }; - - /** Returns if this conainer is empty. - * - * @return If this vector has items or not. True if there are no items, false if there are any - */ - inline const bool isEmpty() const { - return bool(m_first == 0); - }; - - /** Clear this vector. - * This deletes all objects which belong to the stored pointers. - */ - inline void clear() { - Item* i = m_first; - Item* current = 0; - - while (i) { - delete i->value; //delete the object which belongs to the stored pointer - - current = i; - i = current->next; - delete current; //delete the current item after we got the next list item - } - }; - -private: - /** - * Our internal helper class to store the pointers in a linked list. - */ - struct Item { -Item(T* t = 0) : value(t), next(0) {} - ; - - T* value; - Item* next; - }; - - mutable Item* m_first; - mutable Item* m_current; - mutable Item* m_end; - }; - -} //end of namespace - - -#endif diff --git a/bibletime/util/cpointers.cpp b/bibletime/util/cpointers.cpp deleted file mode 100644 index f795bba..0000000 --- a/bibletime/util/cpointers.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -#include "cpointers.h" - -//BibleTime's backend -#include "backend/cswordbackend.h" -#include "backend/cdisplaytemplatemgr.h" - -//BibleTime's frontend -#include "frontend/cprinter.h" - - -CPointers::PointerCache m_pointerCache; - -void CPointers::setBackend(CSwordBackend* const backend) { - Q_ASSERT( m_pointerCache.backend == 0); - CPointers::deleteBackend(); - m_pointerCache.backend = backend; -} - -void CPointers::setInfoDisplay(InfoDisplay::CInfoDisplay* const infoDisplay) { - Q_ASSERT( m_pointerCache.infoDisplay == 0); - m_pointerCache.infoDisplay = infoDisplay; -} - -void CPointers::deleteBackend() { - delete m_pointerCache.backend; - m_pointerCache.backend = 0; -} - -void CPointers::deleteLanguageMgr() { - delete m_pointerCache.langMgr; - m_pointerCache.langMgr = 0; -} - -void CPointers::deleteDisplayTemplateMgr() { - delete m_pointerCache.displayTemplateMgr; - m_pointerCache.displayTemplateMgr = 0; -} - -/** Returns a pointer to the printer object. */ -CDisplayTemplateMgr* const CPointers::displayTemplateManager() { - if (!m_pointerCache.displayTemplateMgr) { - m_pointerCache.displayTemplateMgr = new CDisplayTemplateMgr(); - } - - return m_pointerCache.displayTemplateMgr; -} - diff --git a/bibletime/util/cpointers.h b/bibletime/util/cpointers.h deleted file mode 100644 index 822002f..0000000 --- a/bibletime/util/cpointers.h +++ /dev/null @@ -1,120 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -#ifndef CPOINTERS_H -#define CPOINTERS_H - -//BibleTime includes -#include "backend/clanguagemgr.h" - -#include "frontend/cinfodisplay.h" - -class CSwordBackend; -class CLanguageMgr; -class CDisplayTemplateMgr; - -namespace InfoDisplay { - class CInfoDisplay; -} - -/** Holds the pointers to important classes like modules, backend etc. - * @author The BibleTime team - */ -class CPointers { -protected: - friend class BibleTime; //BibleTime may initialize this object - friend class BibleTimeApp; //BibleTimeApp may initialize this object - friend int main(int argc, char* argv[]); //main may set the printer - - //Empty virtuaual destructor - virtual ~CPointers() {} - - /** Set the backend. - * @param backend Pointer to the new application-wide Sword backend - */ - static void setBackend(CSwordBackend* const backend); - /** Set the info display. - * @param iDisplay The pointer to the new info display. - */ - static void setInfoDisplay(InfoDisplay::CInfoDisplay* const iDisplay); - - /** Delete the backend. Should be called by BibleTimeApp, - * because the backend should be deleted as late as possible. - */ - static void deleteBackend(); - /** Delete the printer. Should be called by BibleTimeApp, - * because the printer should be deleted as late as possible. - */ - static void deletePrinter(); - /** Delete the language manager. Should be called by BibleTimeApp, - * because the language manager should be deleted as late as possible. - */ - static void deleteLanguageMgr(); - /** Delete the display template manager. Should be called by BibleTimeApp, - * because the template manager should be deleted as late as possible. - */ - static void deleteDisplayTemplateMgr(); - -public: // Public methods - /** Returns a pointer to the backend - * @return The backend pointer. - */ - inline static CSwordBackend* const backend(); - /** Returns a pointer to the language manager - * @return The language manager - */ - inline static CLanguageMgr* const languageMgr(); - /** Returns a pointer to the info display. - * @return The backend pointer. - */ - inline static InfoDisplay::CInfoDisplay* const infoDisplay(); - /** Returns a pointer to the application's display template manager - * @return The backend pointer. - */ - static CDisplayTemplateMgr* const displayTemplateManager(); - - struct PointerCache { - PointerCache() { - backend = 0; - langMgr = 0; - infoDisplay = 0; - displayTemplateMgr = 0; - }; - - CSwordBackend* backend; - CLanguageMgr* langMgr; - InfoDisplay::CInfoDisplay* infoDisplay; - CDisplayTemplateMgr* displayTemplateMgr; - }; -}; - -extern CPointers::PointerCache m_pointerCache; - -/** Returns a pointer to the backend ... */ -inline CSwordBackend* const CPointers::backend() { - return m_pointerCache.backend; -} - -/** Returns a pointer to the backend ... */ -inline CLanguageMgr* const CPointers::languageMgr() { - if (!m_pointerCache.langMgr) { - m_pointerCache.langMgr = new CLanguageMgr(); - } - return m_pointerCache.langMgr; -} - -/** Returns a pointer to the printer object. */ -inline InfoDisplay::CInfoDisplay* const CPointers::infoDisplay() { - return m_pointerCache.infoDisplay; -} - - -#endif diff --git a/bibletime/util/cresmgr.cpp b/bibletime/util/cresmgr.cpp deleted file mode 100644 index 8defb77..0000000 --- a/bibletime/util/cresmgr.cpp +++ /dev/null @@ -1,1198 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -//own includes -#include "cresmgr.h" - -#include "backend/cswordbackend.h" - -//KDE includes -#include <kglobal.h> -#include <klocale.h> - -namespace CResMgr { - namespace modules { - namespace bible { - const QString icon_unlocked = "bt_bible"; - const QString icon_locked = "bt_bible_locked"; - const QString icon_add = "bt_bible_add"; - } - namespace commentary { - const QString icon_unlocked = "bt_commentary"; - const QString icon_locked = "bt_commentary_locked"; - const QString icon_add = "bt_commentary_add"; - } - namespace lexicon { - const QString icon_unlocked = "bt_lexicon"; - const QString icon_locked = "bt_lexicon_locked"; - const QString icon_add = "bt_lexicon_add"; - } - namespace book { - const QString icon_unlocked = "bt_book"; - const QString icon_locked = "bt_book_locked"; - const QString icon_add = "bt_book_add"; - } - } - - namespace mainMenu { //Main menu - namespace file { //Main menu->File - namespace print { //a standard action - QString tooltip; - - } - namespace quit { //a standard action - QString tooltip; - - } - } - - namespace view { //Main menu->View - namespace showMainIndex { - QString tooltip; - - const QString icon = "view_sidetree"; - const KShortcut accel = Qt::Key_F9; - const char* actionName = "viewMainIndex_action"; - } - namespace showInfoDisplay { - QString tooltip; - - const QString icon = "view_sidetree"; - const KShortcut accel = Qt::Key_F8; - const char* actionName = "viewInfoDisplay_action"; - } - namespace showToolBar { //a standard action - QString tooltip; - - } - } - - namespace mainIndex { //Main menu->Settings - namespace search { - QString tooltip; - - const QString icon = "find"; - const KShortcut accel = Qt::CTRL + Qt::Key_O; - const char* actionName = "mainindex_search_action"; - } - namespace searchdefaultbible { - QString tooltip; - - const QString icon = "find"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_F; - const char* actionName = "mainindex_searchdefaultbible_action"; - } - } - - namespace window { //Main menu->Window - namespace loadProfile { - QString tooltip; - - const QString icon = "view_sidetree"; - const char* actionName = "windowLoadProfile_action"; - } - namespace saveProfile { - QString tooltip; - - const QString icon = "view_sidetree"; - const char* actionName = "windowSaveProfile_action"; - } - namespace saveToNewProfile { - QString tooltip; - - const QString icon = "view_sidetree"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_S; - const char* actionName = "windowSaveToNewProfile_action"; - } - namespace deleteProfile { - QString tooltip; - - const QString icon = "view_sidetree"; - const char* actionName = "windowDeleteProfile_action"; - } - namespace showFullscreen { - QString tooltip; - - const QString icon = "window_fullscreen"; - const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_F; - const char* actionName = "windowFullscreen_action"; - } - namespace arrangementMode { - QString tooltip; - - const QString icon = "bt_cascade_auto"; - const KShortcut accel = KKeySequence(); - const char* actionName = "windowArrangementMode_action"; - - namespace manual { - QString tooltip; - - const QString icon = "bt_tile"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_M; - const char* actionName = "windowArrangementManual_action"; - } - namespace autoTileHorizontal { - QString tooltip; - - const QString icon = "bt_tile_auto"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_H; - const char* actionName = "windowAutoTileHorizontal_action"; - } - namespace autoTileVertical { - QString tooltip; - - const QString icon = "bt_tile_auto"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_G; - const char* actionName = "windowAutoTileVertical_action"; - } - namespace autoCascade { - QString tooltip; - - const QString icon = "bt_cascade_auto"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_J; - const char* actionName = "windowAutoCascade_action"; - } - } - namespace tileHorizontal { - QString tooltip; - - const QString icon = "bt_tile"; - const KShortcut accel = Qt::CTRL + Qt::Key_H; - const char* actionName = "windowTileHorizontal_action"; - } - namespace tileVertical { - QString tooltip; - - const QString icon = "bt_tile"; - const KShortcut accel = Qt::CTRL + Qt::Key_G; - const char* actionName = "windowTileVertical_action"; - } - namespace cascade { - QString tooltip; - - const QString icon = "bt_cascade"; - const KShortcut accel = Qt::CTRL + Qt::Key_J; - const char* actionName = "windowCascade_action"; - } - namespace closeAll { - QString tooltip; - - const QString icon = "fileclose"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_W; - const char* actionName = "windowCloseAll_action"; - } - } - - namespace settings { //Main menu->Settings - namespace editToolBar { // available as KStdAction - QString tooltip; - - } - namespace optionsDialog { // available as KStdAction - QString tooltip; - - } - namespace swordSetupDialog { - QString tooltip; - - const QString icon = "bt_swordconfig"; - const KShortcut accel = Qt::Key_F4; - const char* actionName = "options_sword_setup"; - } - - } - - namespace help { //Main menu->Help - namespace handbook { - QString tooltip; - - const QString icon = "contents"; - const KShortcut accel = Qt::Key_F1; - const char* actionName = "helpHandbook_action"; - } - namespace bibleStudyHowTo { - QString tooltip; - - const QString icon = "contents"; - const KShortcut accel = Qt::Key_F2; - const char* actionName = "helpHowTo_action"; - } - namespace bugreport { // available as KStdAction - QString tooltip; - - } - namespace dailyTip { - QString tooltip; - - const QString icon = "idea"; - const KShortcut accel = Qt::Key_F3; - const char* actionName = "helpDailyTip_action"; - } - namespace aboutBibleTime { // available as KStdAction - QString tooltip; - - } - namespace aboutKDE { // available as KStdAction - QString tooltip; - - } - } - } //end of main menu - - namespace searchdialog { - const QString icon = "find"; - - namespace searchButton { - QString tooltip; - - } - namespace cancelSearchButton { - QString tooltip; - - } - - namespace options { - namespace moduleChooserButton { - QString tooltip; - - } - namespace searchedText { - QString tooltip; - - } - namespace searchType { - namespace multipleWords_and { - QString tooltip; - - } - namespace multipleWords_or { - QString tooltip; - - } - namespace exactMatch { - QString tooltip; - - } - namespace regExp { - QString tooltip; - - } - } - - namespace searchOptions { - namespace caseSensitive { - QString tooltip; - - } - } - namespace chooseScope { - QString tooltip; - - } - namespace scopeEditor { - namespace rangeList { - QString tooltip; - - } - namespace nameEdit { - QString tooltip; - - } - namespace editRange { - QString tooltip; - - } - namespace parsedResult { - QString tooltip; - - } - namespace addNewRange { - QString tooltip; - - } - namespace deleteCurrentRange { - QString tooltip; - - } - - } - } - namespace result { - namespace moduleList { - QString tooltip; - - - namespace copyMenu { - const QString icon = "editcopy"; - } - namespace saveMenu { - const QString icon = "filesave"; - } - namespace printMenu { - const QString icon = "fileprint"; - } - } - namespace foundItems { - QString tooltip; - - - namespace copyMenu { - const QString icon = "editcopy"; - } - namespace saveMenu { - const QString icon = "filesave"; - } - namespace printMenu { - const QString icon = "fileprint"; - } - } - namespace textPreview { - QString tooltip; - - } - } - } - - namespace workspace {} - - namespace displaywindows { -/* namespace transliteration { - const QString icon = "bt_displaytranslit"; - }*/ - namespace displaySettings { - const QString icon = "bt_displayconfig"; - } - - namespace general { - namespace scrollButton { - QString tooltip; - } - - namespace search { - QString tooltip; - - const QString icon = "find"; - const KShortcut accel = Qt::CTRL + Qt::Key_L; - const char* actionName = "window_search_action"; - } - - namespace backInHistory { - QString tooltip; - - const QString icon = "previous"; - const KShortcut accel = Qt::ALT + Qt::Key_Left; - const char* actionName = "window_history_back_action"; - } - namespace forwardInHistory { - QString tooltip; - - const QString icon = "next"; - const KShortcut accel = Qt::ALT + Qt::Key_Right; - const char* actionName = "window_history_forward_action"; - } - namespace findStrongs { - QString tooltip; - - const QString icon = "bt_findstrongs"; - const KShortcut accel = KShortcut(0); - const char* actionName = "window_find_strongs_action"; - } - - } - namespace bibleWindow { - namespace bookList { - QString tooltip; - - } - namespace nextBook { - QString tooltip; - - const KShortcut accel = Qt::CTRL + Qt::Key_Y; - } - namespace previousBook { - QString tooltip; - - const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_Y; - } - - namespace chapterList { - QString tooltip; - } - namespace nextChapter { - QString tooltip; - const KShortcut accel = Qt::CTRL + Qt::Key_X; - } - namespace previousChapter { - QString tooltip; - const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_X; - } - namespace verseList { - QString tooltip; - } - namespace nextVerse { - QString tooltip; - const KShortcut accel = Qt::CTRL + Qt::Key_V; - } - namespace previousVerse { - QString tooltip; - const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_V; - } - - namespace copyMenu { - const QString icon = "editcopy"; - } - namespace saveMenu { - const QString icon = "filesave"; - } - namespace printMenu { - const QString icon = "fileprint"; - } - } - namespace commentaryWindow { - namespace syncWindow { - QString tooltip; - const QString icon = "bt_sync"; - const KShortcut accel = KKeySequence(); - const char* actionName = "commentary_syncWindow"; - } - } - namespace lexiconWindow { - namespace entryList { - QString tooltip; - } - namespace nextEntry { - QString tooltip; - const KShortcut accel = Qt::CTRL + Qt::Key_V; - } - namespace previousEntry { - QString tooltip; - const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_V; - } - - namespace copyMenu { - const QString icon = "editcopy"; - } - namespace saveMenu { - const QString icon = "filesave"; - } - namespace printMenu { - const QString icon = "fileprint"; - } - } - namespace bookWindow { - namespace toggleTree { - const QString icon = "view_sidetree"; - const KShortcut accel = KKeySequence(); - } - } - - namespace writeWindow { - namespace saveText { - QString tooltip; - - const QString icon = "filesave"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_saveText"; - } - namespace restoreText { - QString tooltip; - - const QString icon = "undo"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_restoreText"; - } - namespace deleteEntry { - QString tooltip; - - const QString icon = "editdelete"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_deleteEntry"; - } - - //formatting buttons - namespace boldText { - QString tooltip; - - const QString icon = "text_bold"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_boldText"; - } - namespace italicText { - QString tooltip; - - const QString icon = "text_italic"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_italicText"; - } - namespace underlinedText { - QString tooltip; - - const QString icon = "text_under"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_underlineText"; - } - - namespace alignLeft { - QString tooltip; - - const QString icon = "text_left"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_alignLeft"; - } - namespace alignCenter { - QString tooltip; - - const QString icon = "text_center"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_alignCenter"; - } - namespace alignRight { - QString tooltip; - - const QString icon = "rightjust"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_alignRight"; - } - namespace alignJustify { - QString tooltip; - - const QString icon = "text_block"; - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_alignJustify"; - } - - namespace fontFamily { - QString tooltip; - - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_fontFamily"; - } - namespace fontSize { - QString tooltip; - - const KShortcut accel = KKeySequence(); - const char* actionName = "writeWindow_fontSize"; - } - namespace fontColor { - QString tooltip; - } - } - } - - namespace settings { - namespace startup { - const QString icon = "bt_startconfig"; - namespace dailyTip { - QString tooltip; - } - namespace showLogo { - QString tooltip; - } - namespace restoreWorkingArea { - QString tooltip; - } - } - namespace fonts { - const QString icon = "fonts"; - - namespace typeChooser { - QString tooltip; - } - } - namespace profiles { - const QString icon = "view_sidetree"; - - namespace list { - QString tooltip; - } - namespace createNew { - QString tooltip; - } - namespace deleteCurrent { - QString tooltip; - } - namespace renameCurrent { - QString tooltip; - } - } - namespace sword { - const QString icon = "bt_swordconfig"; - - namespace general { - namespace language { - QString tooltip; - } - } - namespace modules { - namespace bible { - QString tooltip; - } - namespace commentary { - QString tooltip; - } - namespace lexicon { - QString tooltip; - - } - namespace dailyDevotional { - QString tooltip; - } - namespace hebrewStrongs { - QString tooltip; - } - namespace greekStrongs { - QString tooltip; - } - namespace hebrewMorph { - QString tooltip; - } - namespace greekMorph { - QString tooltip; - } - } - } - namespace keys { - const QString icon = "key_bindings"; - } - } - - namespace mainIndex { //Main menu->Settings - namespace search { - QString tooltip; - - const QString icon = "find"; - const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_M; - const char* actionName = "GMsearch_action"; - } - namespace newFolder { - const QString icon = "folder_new"; - } - namespace changeFolder { - const QString icon = "folder"; - } - namespace openedFolder { - const QString icon = "folder_open"; - } - namespace closedFolder { - const QString icon = "folder"; - } - - namespace bookmark { - const QString icon = "bookmark"; - } - namespace changeBookmark { - const QString icon = "bookmark"; - } - namespace importBookmarks { - const QString icon = "bookmark"; - } - namespace exportBookmarks { - const QString icon = "bookmark"; - } - namespace printBookmarks { - const QString icon = "fileprint"; - } - namespace deleteItems { - const QString icon = "filedelete"; - } - - namespace editModuleMenu { - const QString icon = "pencil"; - } - namespace editModulePlain { - const QString icon = "pencil"; - } - namespace editModuleHTML { - const QString icon = "pencil"; - } - - namespace unlockModule { - const QString icon = "unlock"; - } - namespace aboutModule { - const QString icon = "info"; - } - } -} - - - -namespace CResMgr { - void init_i18n() { - using namespace CResMgr; - { - using namespace mainMenu; - { - using namespace file; - { - using namespace print; - tooltip = i18n ("Open the printer dialog of BibleTime, where you can edit the print queue, assign styles to the items and print them.") ; - } - { - using namespace quit; - tooltip = i18n ("Close BibleTime and save the settings.") ; - } - - { - using namespace view; - { - using namespace showMainIndex; - tooltip = i18n ("Show or hide the bookshelf.") ; - } - { - using namespace showToolBar; - tooltip = i18n ("Toggle the main toolbar view.") ; - } - } - - { - using namespace mainMenu::mainIndex; - { - using namespace search; - tooltip = i18n ("Open the search dialog to search in all works that are currently open.") ; - } - { - using namespace searchdefaultbible; - tooltip = i18n ("Open the search dialog to search in the standard Bible.") ; - } - }; - - { - using namespace window; - { - using namespace loadProfile; - tooltip = i18n ("Restore a saved BibleTime session.") ; - } - { - using namespace saveProfile; - tooltip = i18n ("Save current BibleTime session so that it can be reused later.") ; - } - { - using namespace saveToNewProfile; - tooltip = i18n ("Create and save a new session.") ; - } - { - using namespace deleteProfile; - tooltip = i18n ("Delete a BibleTime session.") ; - } - { - using namespace showFullscreen; - tooltip = i18n ("Toggle fullscreen mode of the main window.") ; - } - { - using namespace tileVertical; - tooltip = i18n ("Vertically tile the open windows.") ; - } - { - using namespace tileHorizontal; - tooltip = i18n ("Horizontally tile the open windows.") ; - } - { - using namespace cascade; - tooltip = i18n ("Cascade the open windows.") ; - } - { - { - using namespace arrangementMode; - tooltip = i18n ("Choose the way that is used to arrange the windows.") ; - } - { - using namespace arrangementMode::autoTileVertical; - tooltip = i18n ("Automatically tile the open windows vertically.") ; - } - { - using namespace arrangementMode::autoTileHorizontal; - tooltip = i18n ("Automatically tile the open windows horizontally.") ; - } - { - using namespace arrangementMode::autoCascade; - tooltip = i18n ("Automatically cascade the open windows.") ; - } - } - { - using namespace closeAll; - tooltip = i18n ("Close all open windows.") ; - } - } - - { - using namespace mainMenu::settings; - { - using namespace editToolBar; - tooltip = i18n ("Open BibleTime's toolbar editor.") ; - } - { - using namespace optionsDialog; - tooltip = i18n ("Open the dialog to set most of BibleTime's preferences.") ; - }; - { - using namespace swordSetupDialog; - tooltip = i18n ("Open the dialog to configure your bookshelf and install/update/remove works.") ; - } - - } - - { - using namespace help; - { - using namespace handbook; - tooltip = i18n ("Open BibleTime's handbook in the KDE helpbrowser.") ; - } - { - using namespace bibleStudyHowTo; - tooltip = i18n ("Open the Bible study HowTo included with BibleTime in the KDE helpbrowser. <BR>This HowTo is an introduction on how to study the Bible in an efficient way.") ; - } - { - using namespace bugreport; - tooltip = i18n ("Send a bugreport to the developers of BibleTime.") ; - } - { - using namespace dailyTip; - tooltip = i18n ("Show a daily tip each time BibleTime starts. <BR>The tips contain important Bible quotations and helpful tips for using BibleTime.") ; - } - { - using namespace aboutBibleTime; - tooltip = i18n ("Show detailed information about BibleTime.") ; - } - { - using namespace aboutKDE; - tooltip = i18n ("Show detailed information about the KDE project.") ; - } - } - } - } - - { - using namespace searchdialog; - { - using namespace searchButton; - tooltip = i18n ("Start to search the text in each of the chosen work(s).") ; - } - { - using namespace cancelSearchButton; - tooltip = i18n ("Stop the active search.") ; - } - - { - using namespace options; - { - using namespace moduleChooserButton; - tooltip = i18n ("Open a dialog to choose work(s) for the search.") ; - } - { - using namespace searchedText; - tooltip = i18n ("Enter the text you want to search in the chosen work(s) here.") ; - } - { - using namespace searchType; - { - using namespace multipleWords_and; - tooltip = i18n ("Treat the search text as multiple words. A text must contain all of the words to match. The order of the words is unimportant.") ; - } - { - using namespace multipleWords_or; - tooltip = i18n ("Treat the search text as multiple words. A text must contain one or more words of to match. The order is unimportant.") ; - } - { - using namespace exactMatch; - tooltip = i18n ("The search text will be used exactly as entered.") ; - } - { - using namespace regExp; - tooltip = i18n ("Treat the search string as a GNU regular expression. The BibleTime handbook contains an introduction to regular expressions.") ; - } - } - - { - using namespace searchOptions; - { - using namespace caseSensitive; - tooltip = i18n ("If you choose this option the search will distinguish between upper and lowercase characters.") ; - } - } - { - using namespace chooseScope; - tooltip = i18n ("Choose a scope from the list. \ -Select the first item to use no scope, the second one is to use each work's last search result as search scope. \ -The others are user defined search scopes."); - } - { - using namespace scopeEditor; - { - using namespace rangeList; - tooltip = i18n ("Select an item from the list to edit the search scope.") ; - } - { - using namespace nameEdit; - tooltip = i18n ("Change the name of the selected search scope.") ; - } - { - using namespace editRange; - tooltip = i18n ("Change the search ranges of the selected search scope item. Have a look at the predefined search scopes to see how search ranges are constructed.") ; - } - { - using namespace parsedResult; - tooltip = i18n ("Contains the search ranges which will be used for the search.") ; - } - { - using namespace addNewRange; - tooltip = i18n ("Add a new search scope. First enter an appropriate name, then edit the search ranges.") ; - } - { - using namespace deleteCurrentRange; - tooltip = i18n ("Deletes the selected search scope. If you close the dialog using Cancel the settings won't be saved.") ; - } - } - } - { - using namespace result; - { - using namespace moduleList; - tooltip = i18n ("The list of works chosen for the search.") ; - } - { - using namespace foundItems; - tooltip = i18n ("This list contains the search result of the selected work.") ; - } - { - using namespace textPreview; - tooltip = i18n ("The text preview of the selected search result item.") ; - } - } - } - - { - using namespace displaywindows; - { - using namespace general; - { - { - using namespace scrollButton; - tooltip = i18n ("This button is useful to scroll through the entries of the list. Press the button and move the mouse to increase or decrease the item.") ; - } - { - using namespace search; - tooltip = i18n ("This button opens the search dialog with the work(s) of this window.") ; - - } - { - using namespace backInHistory; - tooltip = i18n ("Go back one item in the display history.") ; - } - { - using namespace forwardInHistory; - tooltip = i18n ("Go forward one item in the display history.") ; - - } - { - using namespace findStrongs; - tooltip = i18n ("Show all occurences of the Strong number currently under the mouse cursor.") ; - } - } - using namespace bibleWindow; - { - using namespace bookList; - tooltip = i18n ("This list contains the books which are available in this work.") ; - } - { - using namespace nextBook; - tooltip = i18n ("Show the next book of this work.") ; - } - { - using namespace previousBook; - tooltip = i18n ("Show the previous book of this work.") ; - } - { - using namespace chapterList; - tooltip = i18n ("This list contains the chapters which are available in the current book.") ; - } - { - using namespace nextChapter; - tooltip = i18n ("Show the next chapter of the work.") ; - } - { - using namespace previousChapter; - tooltip = i18n ("Show the previous chapter of the work.") ; - } - { - using namespace verseList; - tooltip = i18n ("This list contains the verses which are available in the current chapter.") ; - } - { - using namespace nextVerse; - tooltip = i18n ("In Bible texts, the next verse will be highlighted. In commentaries, the next entry will be shown.") ; - - } - { - using namespace previousVerse; - tooltip = i18n ("In Bible texts, the previous verse will be highlighted. In commentaries, the previous entry will be shown.") ; - } - } - { - using namespace commentaryWindow; - { - using namespace syncWindow; - tooltip = i18n ("Synchronize the displayed entry of this work with the active Bible window.") ; - } - } - { - using namespace lexiconWindow; - { - using namespace entryList; - tooltip = i18n ("This list contains the entries of the current work.") ; - } - { - using namespace nextEntry; - tooltip = i18n ("The next entry of the work will be shown.") ; - } - { - using namespace previousEntry; - tooltip = i18n ("The previous entry of the work will be shown.") ; - } - } - - { - using namespace writeWindow; - { - using namespace saveText; - tooltip = i18n ("Save the curent text into the work. The old text will be overwritten.") ; - } - { - using namespace restoreText; - tooltip = i18n ("Loads the old text from the work and loads it into the edit area. The unsaved text will be lost.") ; - } - { - using namespace deleteEntry; - tooltip = i18n ("Deletes the current entry out of the work. The text will be lost.") ; - } - - //formatting buttons - { - using namespace boldText; - tooltip = i18n ("Toggle bold formatting of the selected text.") ; - } - { - using namespace italicText; - tooltip = i18n ("Toggle italic formatting of the selected text.") ; - } - { - using namespace underlinedText; - tooltip = i18n ("Toggle underlined formatting of the selected text.") ; - } - - { - using namespace alignLeft; - tooltip = i18n ("The text will be aligned on the left side of the page.") ; - } - { - using namespace alignCenter; - tooltip = i18n ("Centers the text horizontally.") ; - } - { - using namespace alignRight; - tooltip = i18n ("Aligns the text on the right side of the page.") ; - } - { - using namespace alignJustify; - tooltip = i18n ("Justifies the text on the page.") ; - } - - { - using namespace fontFamily; - tooltip = i18n ("Choose a new font for the selected text.") ; - } - { using namespace fontSize; - tooltip = i18n ("Choose a new font size for the selected text.") ; - } - { using namespace fontColor; - tooltip = i18n ("Choose a new color for the selected text.") ; - } - } - } - { - using namespace settings; - { - using namespace startup; - { - using namespace dailyTip; - tooltip = i18n ("Activate this box to see a daily tip on startup.") ; - } - { - using namespace showLogo; - tooltip = i18n ("Activate this to see the BibleTime logo on startup.") ; - } - { - using namespace restoreWorkingArea; - tooltip = i18n ("Save the user's session when BibleTime is closed and restore it on the next startup.") ; - } - } - { - using namespace fonts; - { - using namespace typeChooser; - tooltip = i18n ("The font selection below will apply to all texts in this language.") ; - } - } - { - using namespace settings::sword; - { - using namespace general; - { - using namespace language; - tooltip = i18n ("Contains the languages which can be used for the biblical booknames.") ; - } - } - { - using namespace settings::sword::modules; - { - using namespace bible; - tooltip = i18n ("The standard Bible is used when a hyperlink into a Bible is clicked.") ; - } - { - using namespace commentary; - tooltip = i18n ("The standard commentary is used when a hyperlink into a commentary is clicked.") ; - } - { - using namespace lexicon; - tooltip = i18n ("The standard lexicon is used when a hyperlink into a lexicon is clicked.") ; - } - { - using namespace dailyDevotional; - tooltip = i18n ("The standard devotional will be used to display a short start up devotional.") ; - } - { - using namespace hebrewStrongs; - tooltip = i18n ("The standard Hebrew lexicon is used when a hyperlink into a Hebrew lexicon is clicked.") ; - } - { - using namespace greekStrongs; - tooltip = i18n ("The standard Greek lexicon is used when a hyperlink into a Greek lexicon is clicked.") ; - } - { - using namespace hebrewMorph; - tooltip = i18n ("The standard morphological lexicon for Hebrew texts is used when a hyperlink of a morphological tag in a Hebrew text is clicked.") ; - } - { - using namespace greekMorph; - tooltip = i18n ("The standard morphological lexicon for Greek texts is used when a hyperlink of a morphological tag in a Greek text is clicked.") ; - } - } - } - } - { - using namespace mainIndex; - { - using namespace search; - tooltip = i18n ("Opens the search dialog to search in the work(s) that are currently open.") ; - } - } - } -} diff --git a/bibletime/util/cresmgr.h b/bibletime/util/cresmgr.h deleted file mode 100644 index a5e16ab..0000000 --- a/bibletime/util/cresmgr.h +++ /dev/null @@ -1,733 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -#ifndef CRESMGR_H -#define CRESMGR_H - -//Qt includes -#include <qstring.h> -#include <qkeysequence.h> - -//KDE includes -#include <kshortcut.h> - -/** Provides static functions to easily access the Tooltip texts for all the frontend parts. - * @author The BibleTime team - */ -namespace CResMgr { - void init_i18n(); - - namespace modules { - namespace bible { - extern const QString icon_unlocked; - extern const QString icon_locked; - extern const QString icon_add; - } - namespace commentary { - extern const QString icon_unlocked; - extern const QString icon_locked; - extern const QString icon_add; - }; - namespace lexicon { - extern const QString icon_unlocked; - extern const QString icon_locked; - extern const QString icon_add; - }; - namespace book { - extern const QString icon_unlocked; - extern const QString icon_locked; - extern const QString icon_add; - }; - }; - - namespace mainMenu { //Main menu - namespace file { //Main menu->File - namespace print { //a standard action - extern QString tooltip; - - } - namespace quit { //a standard action - extern QString tooltip; - } - } - - namespace view { //Main menu->View - namespace showMainIndex { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace showInfoDisplay { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace showToolBar { //a standard action - extern QString tooltip; - } - } - - namespace mainIndex { //configuration for the main index and the view->search menu - namespace search { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace searchdefaultbible { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - } - - namespace window { //Main menu->Window - namespace loadProfile { - extern QString tooltip; - - extern const QString icon; - extern const char* actionName; - } - namespace saveProfile { - extern QString tooltip; - - extern const QString icon; - extern const char* actionName; - } - namespace saveToNewProfile { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace deleteProfile { - extern QString tooltip; - - extern const QString icon; - extern const char* actionName; - } - namespace showFullscreen { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace arrangementMode { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - - namespace manual { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace autoTileVertical { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace autoTileHorizontal { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace autoCascade { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - } - namespace tileVertical { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace tileHorizontal { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace cascade { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace closeAll { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - } - - namespace settings { //Main menu->Settings - namespace editToolBar { // available as KStdAction - extern QString tooltip; - - } - namespace optionsDialog { // available as KStdAction - extern QString tooltip; - - } - namespace swordSetupDialog { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - } - - namespace help { //Main menu->Help - namespace handbook { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace bibleStudyHowTo { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace bugreport { // available as KStdAction - extern QString tooltip; - } - namespace dailyTip { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace aboutBibleTime { // available as KStdAction - extern QString tooltip; - } - namespace aboutKDE { // available as KStdAction - extern QString tooltip; - } - } - } //end of main menu - - namespace searchdialog { - extern const QString icon; - - namespace searchButton { - extern QString tooltip; - } - namespace cancelSearchButton { - extern QString tooltip; - } - - namespace options { - namespace moduleChooserButton { - extern QString tooltip; - } - namespace searchedText { - extern QString tooltip; - } - namespace searchType { - namespace multipleWords_and { - extern QString tooltip; - } - namespace multipleWords_or { - extern QString tooltip; - } - namespace exactMatch { - extern QString tooltip; - } - namespace regExp { - extern QString tooltip; - } - } - - namespace searchOptions { - namespace caseSensitive { - extern QString tooltip; - } - } - namespace chooseScope { - extern QString tooltip; - } - namespace scopeEditor { - namespace rangeList { - extern QString tooltip; - } - namespace nameEdit { - extern QString tooltip; - } - namespace editRange { - extern QString tooltip; - } - namespace parsedResult { - extern QString tooltip; - } - namespace addNewRange { - extern QString tooltip; - } - namespace deleteCurrentRange { - extern QString tooltip; - } - - } - } - namespace result { - namespace moduleList { - extern QString tooltip; - - namespace copyMenu { - extern const QString icon; - } - namespace saveMenu { - extern const QString icon; - } - namespace printMenu { - extern const QString icon; - } - } - namespace foundItems { - extern QString tooltip; - - namespace copyMenu { - extern const QString icon; - } - namespace saveMenu { - extern const QString icon; - } - namespace printMenu { - extern const QString icon; - } - - } - namespace textPreview { - extern QString tooltip; - } - } - } - -namespace workspace {} - - namespace displaywindows { - namespace transliteration { - extern const QString icon; - } - namespace displaySettings { - extern const QString icon; - } - - namespace general { - namespace scrollButton { - extern QString tooltip; - } - namespace search { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - - namespace backInHistory { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace forwardInHistory { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - - namespace findStrongs { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - } - - namespace bibleWindow { - namespace bookList { - extern QString tooltip; - - } - namespace nextBook { - extern QString tooltip; - - extern const KShortcut accel; - } - namespace previousBook { - extern QString tooltip; - - extern const KShortcut accel; - } - - namespace chapterList { - extern QString tooltip; - - } - namespace nextChapter { - extern QString tooltip; - - extern const KShortcut accel; - } - namespace previousChapter { - extern QString tooltip; - - extern const KShortcut accel; - } - - namespace verseList { - extern QString tooltip; - - } - namespace nextVerse { - extern QString tooltip; - - extern const KShortcut accel; - } - namespace previousVerse { - extern QString tooltip; - - extern const KShortcut accel; - } - - namespace copyMenu { - extern const QString icon; - } - namespace saveMenu { - extern const QString icon; - } - namespace printMenu { - extern const QString icon; - } - } - namespace commentaryWindow { - namespace syncWindow { - extern const QString icon; - extern QString tooltip; - - extern const KShortcut accel; - extern const char* actionName; - } - - } - - namespace lexiconWindow { - namespace entryList { - extern QString tooltip; - - } - namespace nextEntry { - extern QString tooltip; - - extern const KShortcut accel; - } - namespace previousEntry { - extern QString tooltip; - - extern const KShortcut accel; - } - - namespace copyMenu { - extern const QString icon; - } - namespace saveMenu { - extern const QString icon; - } - namespace printMenu { - extern const QString icon; - } - } - namespace bookWindow { - namespace toggleTree { - extern const QString icon; - extern const KShortcut accel; - } - } - - - namespace writeWindow { - namespace saveText { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace restoreText { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace deleteEntry { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - - //formatting buttons - namespace boldText { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace italicText { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace underlinedText { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - - namespace alignLeft { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace alignCenter { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace alignRight { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace alignJustify { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - - namespace fontFamily { - extern QString tooltip; - - extern const KShortcut accel; - extern const char* actionName; - } - namespace fontSize { - extern QString tooltip; - - extern const KShortcut accel; - extern const char* actionName; - } - namespace fontColor { - extern QString tooltip; - - } - - } - } - - namespace settings { - namespace startup { - extern const QString icon; - - namespace dailyTip { - extern QString tooltip; - - } - namespace showLogo { - extern QString tooltip; - - } - namespace restoreWorkingArea { - extern QString tooltip; - - } - } - namespace fonts { - extern const QString icon; - - namespace typeChooser { - extern QString tooltip; - - } - } - namespace profiles { - extern const QString icon; - - namespace list { - extern QString tooltip; - - } - namespace createNew { - extern QString tooltip; - - } - namespace deleteCurrent { - extern QString tooltip; - - } - namespace renameCurrent { - extern QString tooltip; - - } - } - namespace sword { - extern const QString icon; - - namespace general { - - namespace language { - extern QString tooltip; - } - } - namespace modules { - namespace bible { - extern QString tooltip; - } - namespace commentary { - extern QString tooltip; - } - namespace lexicon { - extern QString tooltip; - } - namespace dailyDevotional { - extern QString tooltip; - } - namespace hebrewStrongs { - extern QString tooltip; - } - namespace greekStrongs { - extern QString tooltip; - } - namespace hebrewMorph { - extern QString tooltip; - } - namespace greekMorph { - extern QString tooltip; - } - } - } - namespace keys { - extern const QString icon; - } - } - - namespace mainIndex { //configuration for the main index and the view->search menu - namespace search { - extern QString tooltip; - - extern const QString icon; - extern const KShortcut accel; - extern const char* actionName; - } - namespace newFolder { - extern const QString icon; - } - namespace changeFolder { - extern const QString icon; - } - namespace openedFolder { - extern const QString icon; - } - namespace closedFolder { - extern const QString icon; - } - - namespace bookmark { - extern const QString icon; - } - namespace changeBookmark { - extern const QString icon; - } - namespace importBookmarks { - extern const QString icon; - } - namespace exportBookmarks { - extern const QString icon; - } - namespace printBookmarks { - extern const QString icon; - } - namespace deleteItems { - extern const QString icon; - } - - namespace editModuleMenu { - extern const QString icon; - } - namespace editModulePlain { - extern const QString icon; - } - namespace editModuleHTML { - extern const QString icon; - } - - namespace unlockModule { - extern const QString icon; - } - namespace aboutModule { - extern const QString icon; - } - } -} - -#endif diff --git a/bibletime/util/ctoolclass.cpp b/bibletime/util/ctoolclass.cpp deleted file mode 100644 index d00f335..0000000 --- a/bibletime/util/ctoolclass.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -//own includes -#include "ctoolclass.h" - -#include "util/cresmgr.h" -#include "backend/cswordbackend.h" -#include "backend/cswordmoduleinfo.h" - -//QT includes -#include <qlabel.h> -#include <qfile.h> -#include <qfiledialog.h> -#include <qtextstream.h> -#include <qregexp.h> - -//KDE includes -#include <klocale.h> -#include <kglobal.h> -#include <kiconloader.h> -#include <kstandarddirs.h> -#include <kmessagebox.h> -#include <kurl.h> -#include <kfiledialog.h> -#include <kapplication.h> - - -QString CToolClass::locatehtml(const QString &filename) { - QString path = locate("html", KGlobal::locale()->language() + '/' + filename); - if (path.isNull()) - path = locate("html", "default/" + filename); - if (path.isNull()) - path = locate("html", "en/" + filename); - return path; -} - -/** Converts HTML text to plain text */ -QString CToolClass::htmlToText(const QString& html) { - QString newText = html; - // convert some tags we need in code - newText.replace( QRegExp(" "),"#SPACE#" ); - newText.replace( QRegExp("<br/?>\\s*"), "<br/>\n" ); - newText.replace( QRegExp("#SPACE#")," " ); - - QRegExp re("<.+>"); - re.setMinimal(true); - newText.replace( re,"" ); - return newText; -} - -/** Converts text to HTML (\n to <BR>) */ -QString CToolClass::textToHTML(const QString& text) { - QString newText = text; - newText.replace( QRegExp("<BR>\n"),"#NEWLINE#" ); - newText.replace( QRegExp("\n"),"<BR>\n" ); - newText.replace( QRegExp("#NEWLINE#"),"<BR>\n"); - return newText; -} - -/** Creates the file filename and put text into the file. - */ -bool CToolClass::savePlainFile( const QString& filename, const QString& text, const bool& forceOverwrite, const QTextStream::Encoding& fileEncoding) { - QFile saveFile(filename); - bool ret; - - if (saveFile.exists()) { - if (!forceOverwrite && KMessageBox::warningYesNo(0, - QString::fromLatin1("<qt><B>%1</B><BR>%2</qt>") - .arg( i18n("The file already exists.") ) - .arg( i18n("Do you want to overwrite it?") - ) - ) == KMessageBox::No - ) { - return false; - } - else { //either the user chose yes or forceOverwrite is set - saveFile.remove(); - } - }; - - if ( saveFile.open(IO_ReadWrite) ) { - QTextStream textstream( &saveFile ); - textstream.setEncoding(fileEncoding); - textstream << text; - saveFile.close(); - ret = true; - } - else { - KMessageBox::error(0, QString::fromLatin1("<qt>%1<BR><B>%2</B></qt>") - .arg( i18n("The file couldn't be saved.") ) - .arg( i18n("Please check permissions etc."))); - saveFile.close(); - ret = false; - } - return ret; -} - - -/** Returns the icon used for the module given as aparameter. */ -QPixmap CToolClass::getIconForModule( CSwordModuleInfo* module_info ) { - if (!module_info) - return SmallIcon(CResMgr::modules::book::icon_locked, 16); - - if (module_info->category() == CSwordModuleInfo::Cult) { - return SmallIcon("stop.png", 16); - }; - - - QPixmap img; - - switch (module_info->type()) { - case CSwordModuleInfo::Bible: - if (module_info->isLocked()) - img = SmallIcon(CResMgr::modules::bible::icon_locked, 16); - else - img = SmallIcon(CResMgr::modules::bible::icon_unlocked, 16); - break; - - case CSwordModuleInfo::Lexicon: - if (module_info->isLocked()) - img = SmallIcon(CResMgr::modules::lexicon::icon_locked, 16); - else - img = SmallIcon(CResMgr::modules::lexicon::icon_unlocked, 16); - break; - - case CSwordModuleInfo::Commentary: - if (module_info->isLocked()) - img = SmallIcon(CResMgr::modules::commentary::icon_locked, 16); - else - img = SmallIcon(CResMgr::modules::commentary::icon_unlocked, 16); - break; - - case CSwordModuleInfo::GenericBook: - if (module_info->isLocked()) - img = SmallIcon(CResMgr::modules::book::icon_locked, 16); - else - img = SmallIcon(CResMgr::modules::book::icon_unlocked, 16); - break; - - case CSwordModuleInfo::Unknown: //fall though to default - default: - if (module_info->isLocked()) - img = SmallIcon(CResMgr::modules::book::icon_locked, 16); - else - img = SmallIcon(CResMgr::modules::book::icon_unlocked, 16); - break; - } - - - return img; -} - -QLabel* CToolClass::explanationLabel(QWidget* parent, const QString& heading, const QString& text ) { - QLabel* label = new QLabel( QString::fromLatin1("<B>%1</B><BR>%2").arg(heading).arg(text),parent ); - label->setAutoResize(true); - label->setMargin(1); - label->setFrameStyle(QFrame::Box | QFrame::Plain); - return label; -} - -/** No descriptions */ -bool CToolClass::inHTMLTag(int pos, QString & text) { - int i1=text.findRev("<",pos); - int i2=text.findRev(">",pos); - int i3=text.find(">",pos); - int i4=text.find("<",pos); - - - // if ((i1>0) && (i2==-1)) //we're in th first html tag - // i2=i1; // not ncessary, just for explanation - - if ((i3>0) && (i4==-1)) //we're in the last html tag - i4=i3+1; - - // qWarning("%d > %d && %d < %d",i1,i2,i3,i4); - - if ( (i1>i2) && (i3<i4) ) - return true; //yes, we're in a tag - - return false; -} - -QString CToolClass::moduleToolTip(CSwordModuleInfo* module) { - Q_ASSERT(module); - if (!module) { - return QString::null; - } - - QString text; - - text = QString("<b>%1</b> ").arg( module->name() ) - + ((module->category() == CSwordModuleInfo::Cult) ? QString::fromLatin1("<small><b>%1</b></small><br>").arg(i18n("Take care, this work contains cult / questionable material!")) : QString::null); - - text += QString("<small>(") + module->config(CSwordModuleInfo::Description) + QString(")</small><hr>"); - - text += i18n("Language") + QString(": %1<br>").arg( module->language()->translatedName() ); - - if (module->isEncrypted()) { - text += i18n("Unlock key") + QString(": %1<br>") - .arg(!module->config(CSwordModuleInfo::CipherKey).isEmpty() ? module->config(CSwordModuleInfo::CipherKey) : QString("<font COLOR=\"red\">%1</font>").arg(i18n("not set"))); - } - - if (module->hasVersion()) { - text += i18n("Version") + QString(": %1<br>").arg( module->config(CSwordModuleInfo::ModuleVersion) ); - } - - QString options; - unsigned int opts; - for (opts = CSwordModuleInfo::filterTypesMIN; opts <= CSwordModuleInfo::filterTypesMAX; ++opts) { - if (module->has( static_cast<CSwordModuleInfo::FilterTypes>(opts) )) { - if (!options.isEmpty()) { - options += QString::fromLatin1(", "); - } - - options += CSwordBackend::translatedOptionName( - static_cast<CSwordModuleInfo::FilterTypes>(opts) - ); - } - } - - if (!options.isEmpty()) { - text += i18n("Options") + QString::fromLatin1(": <small>") + options + QString("</small>"); - } - - if (text.right(4) == QString::fromLatin1("<br>")) { - text = text.left(text.length()-4); - } - - return text; -} diff --git a/bibletime/util/ctoolclass.h b/bibletime/util/ctoolclass.h deleted file mode 100644 index 80d0ae8..0000000 --- a/bibletime/util/ctoolclass.h +++ /dev/null @@ -1,80 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -//Qt includes -#include <qstring.h> -#include <qpixmap.h> -#include <qtextstream.h> - - -#ifndef CTOOLCLASS_H -#define CTOOLCLASS_H - - -class CSwordModuleInfo; -class QLabel; - -/** - * Provides some useful functions which would be normally global. - * - * Some methods,that would be normaly global, but I hate global functions :-) - * (the function locateHTML is from Sandy Meier (KDevelop)) - * - * @short A class which contains static members to do small things. - * @author Joachim Ansorg <info@bibletime.info> - */ -class CToolClass { -public: - /** - * @return The path of the HTML file "filename". This function searches only in $KDEDIR. - * @author Sandy Meier of the KDevelop team. - */ - static QString locatehtml(const QString &filename); - /** - * Converts HTML text to plain text. - * This function converts some HTML tags in text (e.g. <BR> to \n) - * @return The text withput HTML tags and with converted <BR> to \n - * @author Joachim Ansorg - */ - static QString htmlToText(const QString&); - /** - * Converts text to HTML converting some text commands into HTML tags (e.g. \n to <BR>) - * @return The HTML formatted text we got after changing \n to <BR> - * @author Joachim Ansorg - */ - static QString textToHTML(const QString&); - /** - * Creates the file filename and put the text of parameter "text" into the file. - * @return True if saving was sucessful, otherwise false - * @author Joachim Ansorg - */ - static bool savePlainFile( const QString& filename, const QString& text, const bool& forceOverwrite = false, const QTextStream::Encoding& fileEncoding = QTextStream::Locale); - /** - * Returns the icon used for the module given as aparameter. - */ - static QPixmap getIconForModule( CSwordModuleInfo* ); - /** Returns a label to explain difficult things of dialogs. - * This function returns a label with heading "heading" and explanation "text". This label should be used to - * explain difficult things of the GUI, e.g. in the optionsdialog. - */ - static QLabel* explanationLabel(QWidget* parent, const QString& heading, const QString& text ); - /** - * Returns true if the character at position "pos" of text is inside an HTML tag. Returns false if it's not inside an HTML tag. - */ - static bool inHTMLTag(int pos, QString & text); - /** Return the module's tooltip text - * @param module The module required for the toolip - * @return The tooltip text for the passed module - */ - static QString moduleToolTip(CSwordModuleInfo* module); -}; - -#endif diff --git a/bibletime/util/directoryutil.cpp b/bibletime/util/directoryutil.cpp deleted file mode 100644 index c55ca96..0000000 --- a/bibletime/util/directoryutil.cpp +++ /dev/null @@ -1,111 +0,0 @@ -// -// C++ Implementation: directoryutil -// -// Description: -// -// -// Author: The BibleTime team <info@bibletime.info>, (C) 2006 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#include "directoryutil.h" - -//Qt includes -#include <qdir.h> - -namespace util { - -namespace filesystem { - -void DirectoryUtil::removeRecursive(const QString& dir) { - qWarning("removeRecursive(%s)", dir.latin1()); - if (dir == QString::null) { - return; - } - - QDir d(dir); - if (!d.exists()) { - return; - } - - QFileInfo *fi = 0; - - //remove all files in this dir - d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); - - const QFileInfoList *fileList = d.entryInfoList(); - QFileInfoListIterator it_file( *fileList ); - while ( (fi = it_file.current()) != 0 ) { - ++it_file; - - qDebug("Removing %s", fi->absFilePath().latin1() ); - d.remove( fi->fileName() ) ; - } - - //remove all subdirs recursively - d.setFilter( QDir::Dirs | QDir::NoSymLinks ); - const QFileInfoList *dirList = d.entryInfoList(); - QFileInfoListIterator it_dir( *dirList ); - - while ( (fi = it_dir.current()) != 0 ) { - ++it_dir; - - if ( !fi->isDir() || fi->fileName() == "." || fi->fileName() == ".." ) { - continue; - } - - qDebug("Removing dir %s", fi->absFilePath().latin1() ); - //d.remove( fi->fileName() ) ; - - removeRecursive( fi->absFilePath() ); - } - - d.rmdir(dir); -} - -/** Returns the size of the directory including the size of all it's files and it's subdirs. - */ -unsigned long DirectoryUtil::getDirSizeRecursive(const QString& dir) { - qWarning("Getting size for %s", dir.latin1()); - - QDir d(dir); - if (!d.exists()) { - return 0; - } - - d.setFilter(QDir::Files); - - unsigned long size = 0; - - const QFileInfoList* infoList = d.entryInfoList(); - QFileInfoListIterator it(*infoList); - QFileInfo* info = 0; - while ((info = it.current()) != 0) { - ++it; - - size += info->size(); - } - - d.setFilter(QDir::Dirs); - const QFileInfoList* dirInfoList = d.entryInfoList(); - QFileInfoListIterator it_dir(*dirInfoList); - while ((info = it_dir.current()) != 0) { - ++it_dir; - - if ( !info->isDir() || info->fileName() == "." || info->fileName() == ".." ) { - continue; - } - - size += getDirSizeRecursive( info->absFilePath() ); - } - - return size; -} - - -} //end of namespace util::filesystem - -} //end of namespace util - diff --git a/bibletime/util/directoryutil.h b/bibletime/util/directoryutil.h deleted file mode 100644 index 68a6e88..0000000 --- a/bibletime/util/directoryutil.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// C++ Interface: directoryutil -// -// Description: -// -// -// Author: The BibleTime team <info@bibletime.info>, (C) 2006 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#ifndef UTIL_FILESDIRECTORYUTIL_H -#define UTIL_FILESDIRECTORYUTIL_H - -#include <qstring.h> - -namespace util { - -namespace filesystem { - -/** - * Tools for working with directories. - * @author The BibleTime team <info@bibletime.info> -*/ -class DirectoryUtil { -private: - DirectoryUtil() {}; - ~DirectoryUtil() {}; - -public: - /** Removes the given dir with all it's files and subdirs. - * - * TODO: Check if it's suitable for huge dir trees, as it holds a QDir object - * for each of it at the same time in the deepest recursion. - * For really deep dir tree this may lead to a stack overflow. - */ - static void removeRecursive(const QString& dir); - - /** Returns the size of the directory including the size of all it's files - * and it's subdirs. - * - * TODO: Check if it's suitable for huge dir trees, as it holds a QDir object - * for each of it at the same time in the deepest recursion. - * For really deep dir tree this may lead to a stack overflow. - * - * @return The size of the dir in bytes - */ - static unsigned long getDirSizeRecursive(const QString& dir); -}; - -} - -} - -#endif diff --git a/bibletime/util/scoped_resource.h b/bibletime/util/scoped_resource.h deleted file mode 100644 index 2032038..0000000 --- a/bibletime/util/scoped_resource.h +++ /dev/null @@ -1,181 +0,0 @@ -/********* -* -* This file is part of BibleTime's source code, http://www.bibletime.info/. -* -* Copyright 1999-2006 by the BibleTime developers. -* The BibleTime source code is licensed under the GNU General Public License version 2.0. -* -**********/ - - - -#ifndef SCOPED_RESOURCE_H_INCLUDED -#define SCOPED_RESOURCE_H_INCLUDED - -/** -* The util namespace should take all classes which are of a generic type, -* used to perform common tasks which are not BibleTime-specific. See -* @ref scoped_resource for an example. -*/ -namespace util { - /** - * A class template, scoped_resource, designed to - * implement the Resource Acquisition Is Initialization (RAII) approach - * to resource management. scoped_resource is designed to be used when - * a resource is initialized at the beginning or middle of a scope, - * and released at the end of the scope. The template argument - * ReleasePolicy is a functor which takes an argument of the - * type of the resource, and releases it. - * - * Usage example, for working with files: - * - * @code - * struct close_file { void operator(int fd) const {close(fd);} }; - * ... - * { - * const scoped_resource<int,close_file> file(open("file.txt",O_RDONLY)); - * read(file, buf, 1000); - * } // file is automatically closed here - * @endcode - * - * Note that scoped_resource has an explicit constructor, and prohibits - * copy-construction, and thus the initialization syntax, rather than - * the assignment syntax must be used when initializing. - * - * i.e. using scoped_resource<int,close_file> file = open("file.txt",O_RDONLY); - * in the above example is illegal. - * - */ - template<typename T,typename ReleasePolicy> - class scoped_resource { - T resource; - ReleasePolicy release; - - //prohibited operations - scoped_resource(const scoped_resource&); - scoped_resource& operator=(const scoped_resource&); -public: - typedef T resource_type; - typedef ReleasePolicy release_type; - - /** - * Constructor - * - * @ param res This is the resource to be managed - * @ param rel This is the functor to release the object - */ - explicit scoped_resource(resource_type res,release_type rel=release_type()) -: resource(res), release(rel) {} - - /** - * The destructor is the main point in this class. It takes care of proper - * deletion of the resource, using the provided release policy. - */ - ~scoped_resource() { - release(resource); - } - - /** - * This operator makes sure you can access and use the scoped_resource - * just like you were using the resource itself. - * - * @ret the underlying resource - */ - operator resource_type() const { - return resource; - } - - /** - * This function provides explicit access to the resource. Its behaviour - * is identical to operator resource_type() - * - * @ret the underlying resource - */ - resource_type get - () const { - return resource; - } - - /** - * This function provides convenient direct access to the -> operator - * if the underlying resource is a pointer. Only call this function - * if resource_type is a pointer type. - */ - resource_type operator->() const { - return resource; - } - - }; - - /** - * A helper policy for scoped_ptr. - * It will call the delete operator on a pointer, and assign the pointer to 0 - */ - struct delete_item { - template<typename T> - void operator()(T*& p) const { - delete p; - p = 0; - } - }; - /** - * A helper policy for scoped_array. - * It will call the delete[] operator on a pointer, and assign the pointer to 0 - */ - struct delete_array { - template<typename T> - void operator()(T*& p) const { - delete [] p; - p = 0; - } - }; - - /** - * A class which implements an approximation of - * template<typename T> - * typedef scoped_resource<T*,delete_item> scoped_ptr<T>; - * - * It is a convenient synonym for a common usage of @ref scoped_resource. - * See scoped_resource for more details on how this class behaves. - * - * Usage example: - * @code - * { - * const scoped_ptr<Object> ptr(new Object); - * ...use ptr as you would a normal Object*... - * } // ptr is automatically deleted here - * @endcode - * - * NOTE: use this class only to manage a single object, *never* an array. - * Use scoped_array to manage arrays. This distinction is because you - * may call delete only on objects allocated with new, delete[] only - * on objects allocated with new[]. - */ - template<typename T> -struct scoped_ptr : public scoped_resource<T*,delete_item> { -explicit scoped_ptr(T* p) : scoped_resource<T*,delete_item>(p) {} - } - ; - - /** - * This class has identical behaviour to @ref scoped_ptr, except it manages - * heap-allocated arrays instead of heap-allocated single objects - * - * Usage example: - * @code - * { - * const scoped_array<char> ptr(new char[n]); - * ...use ptr as you would a normal char*... - * } // ptr is automatically deleted here - * @endcode - * - */ - template<typename T> -struct scoped_array : public scoped_resource<T*,delete_array> { -explicit scoped_array(T* p) : scoped_resource<T*,delete_array>(p) {} - } - ; - -} - -#endif |