diff options
Diffstat (limited to 'libkipi')
45 files changed, 7846 insertions, 0 deletions
diff --git a/libkipi/Makefile.am b/libkipi/Makefile.am new file mode 100644 index 0000000..5cb836b --- /dev/null +++ b/libkipi/Makefile.am @@ -0,0 +1,16 @@ +SUBDIRS = libkipi + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libkipi.pc +EXTRA_DIST = libkipi.pc.in + +# i18n translation messages +messages: + LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \ + if test -n "$$LIST"; then \ + $(XGETTEXT) $$LIST -o $(podir)/libkipi.pot; \ + fi + + +include $(top_srcdir)/admin/Doxyfile.am + diff --git a/libkipi/configure.in.in b/libkipi/configure.in.in new file mode 100644 index 0000000..eb32828 --- /dev/null +++ b/libkipi/configure.in.in @@ -0,0 +1,26 @@ +AC_OUTPUT([ libkipi/libkipi.pc ]) +KDE_ENABLE_HIDDEN_VISIBILITY + + +AC_LANG_PUSH(C++) +libkipi_kdemacros_cppflags=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $all_includes" +AC_MSG_CHECKING([if kdemacros.h is usable]) +AC_COMPILE_IFELSE( + [ + #include <kdemacros.h> + #include <string> + int other_func( void ) KDE_EXPORT; + int other_func( void ) + { + std::string s("KDE_EXPORT"); + return 0; + } + ], + [ AC_MSG_RESULT([yes]) + AC_DEFINE(KDEMACROS_USABLE, 1, [kdemacros.h usable]) ], + [ AC_MSG_RESULT([no]) ] +) +CPPFLAGS=$libkipi_kdemacros_cppflags +AC_LANG_POP(C++) +AM_CONFIG_HEADER([ libkipi/libkipi/libkipi_export.h ]) diff --git a/libkipi/libkipi.pc.in b/libkipi/libkipi.pc.in new file mode 100644 index 0000000..a60d613 --- /dev/null +++ b/libkipi/libkipi.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libkipi +Description: KDE library for shared plugins between graphical applications +Requires: +Version: 0.1.5 +Libs: -L${libdir} -lkipi +Cflags: -I${includedir} diff --git a/libkipi/libkipi/Doxyfile b/libkipi/libkipi/Doxyfile new file mode 100644 index 0000000..f9e258e --- /dev/null +++ b/libkipi/libkipi/Doxyfile @@ -0,0 +1,1099 @@ +# Doxyfile 1.3.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = libKipi + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is used +# as the annotated text. Otherwise, the brief description is used as-is. If left +# blank, the following values are used ("$name" is automatically replaced with the +# name of the entity): "The $name class" "The $name widget" "The $name file" +# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. It is allowed to use relative paths in the argument list. + +STRIP_FROM_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ./ + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc + +FILE_PATTERNS = *.cpp \ + *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superseded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 800 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 600 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes that +# lay further from the root node will be omitted. Note that setting this option to +# 1 or 2 may greatly reduce the computation time needed for large code bases. Also +# note that a graph may be further truncated if the graph's image dimensions are +# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). +# If 0 is used for the depth value (the default), the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/libkipi/libkipi/KDStream.cpp b/libkipi/libkipi/KDStream.cpp new file mode 100644 index 0000000..aef327f --- /dev/null +++ b/libkipi/libkipi/KDStream.cpp @@ -0,0 +1,1086 @@ +/* -*- Mode: C++ -*- + KD Tools - a set of useful widgets for Qt + $Id: KDStream.cpp 445690 2005-08-11 17:01:49Z toma $ +*/ + +/**************************************************************************** +** Copyright (C) 2001-2005 Klarälvdalens Datakonsult AB. All rights reserved. +** +** This file is part of the KD Tools library. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid commercial KD Tools licenses may use this file in +** accordance with the KD Tools Commercial License Agreement provided with +** the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** Contact info@klaralvdalens-datakonsult.se if any conditions of this +** licensing are not clear to you. +** +**********************************************************************/ + +#if defined KDAB_EVAL +#include "../evaldialog/evaldialog.h" +#endif + +#include "KDStream.h" +#include <qcolor.h> +#include <qpalette.h> +#include <qcursor.h> +#include <qdatetime.h> +#include <qfont.h> +#include <qpen.h> +#include <qpoint.h> +#include <qsize.h> +#include <qrect.h> +#include <qregion.h> +#include <qobject.h> +#include <qstringlist.h> +#include <qmetaobject.h> +#include <qvariant.h> +#include <qpointarray.h> +#include <qsizepolicy.h> +#include <qbitarray.h> +#include <qstrlist.h> + +#if (QT_VERSION >= 300 ) +#include <qkeysequence.h> +#include <qpixmap.h> +#include <qimage.h> +#endif + +/** + \file KDStream.cpp + \class KDStream KDStream.h + \brief Streaming operators for Qt classes. + + When debugging Qt programs the streaming operators in this class offers + facilities for printing out values of a number of Qt classes. + + Example: + \code + QPoint point(10,20); + QString string("A test"); + QFont font = qApp->font(); + KDStream() << "the point is " << point << ", the string is " << string << ", the font is " << font << endl; + \endcode +*/ + + +/*! + Creates a KDStream object. +*/ +KDStream::KDStream( QString* outputString ) :_out(outputString) +{ +#if defined KDAB_EVAL + EvalDialog::checkEvalLicense( "KD Tools" ); +#endif + +} + + +/*! + Flushes the data to the stream and destroys the KDStream object. +*/ +KDStream::~KDStream() +{ + flush(); +} + + +/*! + Flushes buffered data to the stream. +*/ +void KDStream::flush() +{ + if ( _output.isEmpty() ) + return; + + if ( _out ) + *_out += _output; + else + qDebug( "%s", _output.local8Bit().data() ); + _output = QString(); +} + + +/*! + Writes a boolean value to the stream. The value will be represented + as either "true" or "false". +*/ +KDStream& KDStream::operator<<( bool b ) +{ + _output += ( b ? QString::fromLatin1("true") : QString::fromLatin1("false") ); + return *this; +} + +/*! + Writes a character value to the stream. +*/ +KDStream& KDStream::operator<<( char ch ) +{ + _output += QString::fromLatin1("%1").arg( ch ); + return *this; +} + + +/*! + Writes a floating point value to the stream. +*/ +KDStream& KDStream::operator<<( float num ) +{ + _output += QString::number( num ); + return *this; +} + + +/*! + Writes a double-precision floating point value to the stream. +*/ +KDStream& KDStream::operator<<( double num ) +{ + _output += QString::number( num ); + return *this; +} + + +/*! + Writes a short value to the stream. +*/ +KDStream& KDStream::operator<<( short num ) +{ + _output += QString::number( num ); + return *this; +} + +/*! + Writes an unsigned short value to the stream. +*/ +KDStream& KDStream::operator<<( unsigned short num ) +{ + _output += QString::number( num ); + return *this; +} + +/*! + Writes an int value to the stream. +*/ +KDStream& KDStream::operator<<( int num ) +{ + _output += QString::number( num ); + return *this; +} + +/*! + Writes an unsigned int value to the stream. +*/ +KDStream& KDStream::operator<<( unsigned int num ) +{ + _output += QString::number( num ); + return *this; +} + +/*! + Writes a long value to the stream. +*/ +KDStream& KDStream::operator<<( long num ) +{ + _output += QString::number( num ); + return *this; +} + +/*! + Writes an unsigned long value to the stream. +*/ +KDStream& KDStream::operator<<( unsigned long num ) +{ + _output += QString::number( num ); + return *this; +} + +/*! + Writes a C-style string to the stream. +*/ +KDStream& KDStream::operator<<( const char* ch ) +{ + *this << QString::fromLocal8Bit( ch ); + return *this; +} + +/*! + Writes a pointer to the stream. The format is platform-dependent and + defined by fprintf( ..., "%p" ). +*/ +KDStream& KDStream::operator<<( const void* p) +{ + _output += QString().sprintf("%p",p); + return *this; +} + + +/*! + Writes a QString value to the stream. +*/ +KDStream& KDStream::operator<<( const QString& str ) +{ + int index = str.findRev( '\n' ); + if ( index == -1 ) + _output += str; + else { + _output += str.left( index ) + '\n'; + flush(); + _output += str.mid( index+1 ); + } + return *this; +} + +/*! + Writes a QCString value to the stream. +*/ +KDStream& KDStream::operator<<( const QCString& str ) +{ + *this << QString( str ); + return *this; +} + + +/*! + Runs a stream-processing function on the stream. +*/ +KDStream& KDStream::operator<<( KDSTREAMFUNC func ) +{ + return (*func)(*this); +} + +/*! + Writes a line terminator to the stream. +*/ +KDStream& endl( KDStream& stream) +{ + stream << QString::fromLatin1("\n"); + stream.flush(); + return stream; +} + +/*! + Flushes the output buffers. +*/ +KDStream& flush( KDStream& stream) +{ + stream.flush(); + return stream; +} + +/*! + Writes a QChar value to the stream. +*/ +KDStream& KDStream::operator<<( const QChar& ch ) +{ + _output += QString( ch ); + return *this; +} + + +/*! + Writes a QColor value to the stream. See \ref QColor2Str for a + description of the output format. +*/ +KDStream& KDStream::operator<<( const QColor& col ) +{ + _output += QColor2Str( col ); + return *this; +} + +/*! + Writes a QColorGroup value to the stream. Each color role output + with its name and the corresponding color value. +*/ +KDStream& KDStream::operator<<( const QColorGroup& colgrp ) +{ + _output += + QString::fromLatin1("foreground: ") + QColor2Str(colgrp.foreground()) + QString::fromLatin1(", ") + + QString::fromLatin1("button: ") + QColor2Str(colgrp.button()) + QString::fromLatin1(", ") + + QString::fromLatin1("light: ") + QColor2Str(colgrp.light()) + QString::fromLatin1(", ") + + QString::fromLatin1("dark: ") + QColor2Str(colgrp.dark()) + QString::fromLatin1(", ") + + QString::fromLatin1("mid: ") + QColor2Str(colgrp.mid()) + QString::fromLatin1(", ") + + QString::fromLatin1("text: ") + QColor2Str(colgrp.text()) + QString::fromLatin1(", ") + + QString::fromLatin1("base: ") + QColor2Str(colgrp.base()) + QString::fromLatin1(", ") + + QString::fromLatin1("background: ") + QColor2Str(colgrp.background()) + QString::fromLatin1(", ") + + QString::fromLatin1("midlight: ") + QColor2Str(colgrp.midlight()) + QString::fromLatin1(", ") + + QString::fromLatin1("brightText: ") + QColor2Str(colgrp.brightText()) + QString::fromLatin1(", ") + + QString::fromLatin1("buttonText: ") + QColor2Str(colgrp.buttonText()) + QString::fromLatin1(", ") + + QString::fromLatin1("shadow: ") + QColor2Str(colgrp.shadow()) + QString::fromLatin1(", ") + + QString::fromLatin1("highlight: ") + QColor2Str(colgrp.highlight()) + QString::fromLatin1(", ") + + QString::fromLatin1("highlightedText: ") + QColor2Str(colgrp.highlightedText()); + return *this; +} + +/*! + Writes a QPalette value to the stream. Each color group is output + with its role and the corresponding QColorGroup value. +*/ +KDStream& KDStream::operator<<( const QPalette& palette ) +{ + *this << QString::fromLatin1("active: ") << palette.active() << endl + << QString::fromLatin1("inactive: ") << palette.inactive() << endl + << QString::fromLatin1("diabled: ") << palette.disabled(); + + return *this; +} + +/*! + Writes a QCursor value to the stream. Each cursor is output with its + name as listed in the \a QCursor reference documentation. +*/ +KDStream& KDStream::operator<<( const QCursor& cursor ) +{ + + QString type; + switch ( cursor.shape() ) { +#if ( QT_VERSION < 300 ) + case ArrowCursor: type = QString::fromLatin1("ArrowCursor"); break; + case UpArrowCursor: type = QString::fromLatin1("UpArrowCursor"); break; + case CrossCursor: type = QString::fromLatin1("CrossCursor"); break; + case WaitCursor: type = QString::fromLatin1("WaitCursor"); break; + case IbeamCursor: type = QString::fromLatin1("IbeamCursor"); break; + case SizeVerCursor: type = QString::fromLatin1("SizeVerCursor"); break; + case SizeHorCursor: type = QString::fromLatin1("SizeHorCursor"); break; + case SizeBDiagCursor: type = QString::fromLatin1("SizeBDiagCursor"); break; + case SizeFDiagCursor: type = QString::fromLatin1("SizeFDiagCursor"); break; + case SizeAllCursor: type = QString::fromLatin1("SizeAllCursor"); break; + case BlankCursor: type = QString::fromLatin1("BlankCursor"); break; + case SplitVCursor: type = QString::fromLatin1("SplitVCursor"); break; + case SplitHCursor: type = QString::fromLatin1("SplitHCursor"); break; + case PointingHandCursor: type = QString::fromLatin1("PointingHandCursor"); break; + case ForbiddenCursor: type = QString::fromLatin1("ForbiddenCursor"); break; + case BitmapCursor: type = QString::fromLatin1("BitmapCursor"); break; +#else + case Qt::ArrowCursor: type = QString::fromLatin1("ArrowCursor"); break; + case Qt::UpArrowCursor: type = QString::fromLatin1("UpArrowCursor"); break; + case Qt::CrossCursor: type = QString::fromLatin1("CrossCursor"); break; + case Qt::WaitCursor: type = QString::fromLatin1("WaitCursor"); break; + case Qt::IbeamCursor: type = QString::fromLatin1("IbeamCursor"); break; + case Qt::SizeVerCursor: type = QString::fromLatin1("SizeVerCursor"); break; + case Qt::SizeHorCursor: type = QString::fromLatin1("SizeHorCursor"); break; + case Qt::SizeBDiagCursor: type = QString::fromLatin1("SizeBDiagCursor"); break; + case Qt::SizeFDiagCursor: type = QString::fromLatin1("SizeFDiagCursor"); break; + case Qt::SizeAllCursor: type = QString::fromLatin1("SizeAllCursor"); break; + case Qt::BlankCursor: type = QString::fromLatin1("BlankCursor"); break; + case Qt::SplitVCursor: type = QString::fromLatin1("SplitVCursor"); break; + case Qt::SplitHCursor: type = QString::fromLatin1("SplitHCursor"); break; + case Qt::PointingHandCursor: type = QString::fromLatin1("PointingHandCursor"); break; + case Qt::ForbiddenCursor: type = QString::fromLatin1("ForbiddenCursor"); break; + case Qt::BitmapCursor: type = QString::fromLatin1("BitmapCursor"); break; +#endif + } + + _output += type; + + return *this; +} + +/*! + Writes a QDate value to the stream. The format is the one defined by + QDate::toString() and may be system-dependent. +*/ +KDStream& KDStream::operator<<( const QDate& date ) +{ + _output += date.toString(); + return *this; +} + +/*! + Writes a QDateTime value to the stream. The format is the one + defined by QDateTime::toString() and may be system-dependent. +*/ +KDStream& KDStream::operator<<( const QDateTime& datetime ) +{ + _output += datetime.toString(); + return *this; +} + +/*! + Writes a QTime value to the stream. The format is the one defined by + QTime::toString() and may be system-dependent. +*/ +KDStream& KDStream::operator<<( const QTime& time ) +{ + _output += time.toString(); + return *this; +} + +/*! + Writes a the raw name of a QFont value to the stream. +*/ +KDStream& KDStream::operator<<( const QFont& font ) +{ + _output += font.rawName(); + return *this; +} + +/*! + Writes a QPen value to the stream. The format is "QPen" plus the + width, the color, and the style as defined in the \a QPen reference + documentation. +*/ +KDStream& KDStream::operator<<( const QPen& pen ) +{ + QString style; + switch ( pen.style() ) { + case Qt::NoPen: style = QString::fromLatin1("NoPen"); break; + case Qt::SolidLine: style = QString::fromLatin1("SolidLine"); break; + case Qt::DashLine: style = QString::fromLatin1("DashLine"); break; + case Qt::DotLine: style = QString::fromLatin1("DotLine"); break; + case Qt::DashDotLine: style = QString::fromLatin1("DashDotLine"); break; + case Qt::DashDotDotLine : style = QString::fromLatin1("DashDotDotLine "); break; + case Qt::MPenStyle : break; // ignore + } + + _output += QString::fromLatin1("QPen(%1,%2,%3)") + .arg( pen.width() ) + .arg( QColor2Str( pen.color() ) ) + .arg( style ); + return *this; +} + +/*! + Writes a QPoint value to the stream. The format is "(x,y)". +*/ +KDStream& KDStream::operator<<( const QPoint& point ) +{ + _output += QString::fromLatin1("(%1,%2)").arg(point.x()).arg(point.y() ); + return *this; +} + +/*! + Writes a QSize value to the stream. The format is "(w x h)". +*/ +KDStream& KDStream::operator<<( const QSize& size ) +{ + _output += QString::fromLatin1("%1x%2").arg(size.width()).arg(size.height()); + return *this; +} + +/*! + Writes a QRect value to the stream. The format is "(width x height + xoffset xpos yoffset ypos)". +*/ +KDStream& KDStream::operator<<( const QRect& rect ) +{ + QString xplus = (rect.x() >= 0) ? QString::fromLatin1("+") : QString::fromLatin1(""); + QString yplus = (rect.y() >= 0) ? QString::fromLatin1("+") : QString::fromLatin1(""); + _output += QString::fromLatin1("%1x%2%3%4%5%6") + .arg( rect.width() ) + .arg( rect.height() ) + .arg( xplus ) + .arg( rect.x() ) + .arg( yplus ) + .arg( rect.y() ); + + return *this; +} + +/*! + This is a helper method that converts a QColor object into a + string. For the predefined Qt colors, their name is output, for all + other colors, the output is in the form #RRGGBB (as defined by + QColor::name()). +*/ +QString KDStream::QColor2Str( const QColor& col ) +{ + if ( col == Qt::black ) + return QString::fromLatin1("black"); + else if ( col == Qt::white ) + return QString::fromLatin1("white"); + else if ( col == Qt::darkGray ) + return QString::fromLatin1("darkGray"); + else if ( col == Qt::gray ) + return QString::fromLatin1("gray"); + else if ( col == Qt::lightGray ) + return QString::fromLatin1("lightGray"); + else if ( col == Qt::red ) + return QString::fromLatin1("red"); + else if ( col == Qt::green ) + return QString::fromLatin1("green"); + else if ( col == Qt::blue ) + return QString::fromLatin1("blue"); + else if ( col == Qt::cyan ) + return QString::fromLatin1("cyan"); + else if ( col == Qt::magenta ) + return QString::fromLatin1("magenta"); + else if ( col == Qt::yellow ) + return QString::fromLatin1("yellow"); + else if ( col == Qt::darkRed ) + return QString::fromLatin1("darkRed"); + else if ( col == Qt::darkGreen ) + return QString::fromLatin1("darkGreen"); + else if ( col == Qt::darkBlue ) + return QString::fromLatin1("darkBlue"); + else if ( col == Qt::darkCyan ) + return QString::fromLatin1("darkCyan"); + else if ( col == Qt::darkMagenta ) + return QString::fromLatin1("darkMagenta"); + else if ( col == Qt::darkYellow ) + return QString::fromLatin1("darkYellow"); + else if ( col == Qt::color0 ) + return QString::fromLatin1("color0"); + else if ( col == Qt::color1 ) + return QString::fromLatin1("color1"); + else + return col.name(); +} + +/*! + Writes a QObject value to the stream. Included information is the + class name, the object name, the properties and their types. +*/ +KDStream& KDStream::operator<<( const QObject& obj ) +{ + *this << QString::fromLatin1(obj.className()) + QString::fromLatin1("(") + QString::fromLatin1(obj.name()) << QString::fromLatin1("):")<< endl; + QMetaObject* meta = obj.metaObject(); + QStrList props = meta->propertyNames(true); + + unsigned int maxWidth = 0; + for ( QStrListIterator it(props) ; *it; ++it ) { + maxWidth = QMAX( maxWidth, QString::fromLatin1(*it).length() ); + } + + for ( QStrListIterator it2(props) ; *it2; ++it2 ) { + *this << QString::fromLatin1(" ") << QString::fromLatin1(*it2).leftJustify(maxWidth) << QString::fromLatin1(": [") << obj.property(*it2) << QString::fromLatin1("]") << endl; + } + return *this; +} + +/*! + Writes a QVariant value to the stream. The format is dependent on + the actual contents of the QVariant object. +*/ +KDStream& KDStream::operator<<( const QVariant& var) +{ + switch (var.type() ) + { + case QVariant::Invalid: *this << QString::fromLatin1("*INVALID*"); break; + case QVariant::Map: *this << var.toMap(); break; + case QVariant::List: *this << var.toList(); break; + case QVariant::String: *this << var.toString(); break; + case QVariant::StringList: *this << var.toStringList(); break; + case QVariant::Font: *this << var.toFont(); break; + case QVariant::Pixmap: *this << var.toPixmap();break; + + case QVariant::Brush: *this << var.toBrush(); break; + case QVariant::Rect: *this << var.toRect(); break; + case QVariant::Size: *this << var.toSize(); break; + case QVariant::Color: *this << var.toColor(); break; + case QVariant::Palette: *this << var.toPalette(); break; + case QVariant::ColorGroup: *this << var.toColorGroup(); break; + case QVariant::IconSet: *this << QString::fromLatin1("-"); break; + case QVariant::Point: *this << var.toPoint(); break; + case QVariant::Image: *this << var.toImage(); break; + case QVariant::Int: *this << var.toInt(); break; + case QVariant::UInt: *this << var.toUInt(); break; + case QVariant::Bool: *this << var.toBool(); break; + case QVariant::Double: *this << var.toDouble(); break; + case QVariant::CString: *this << var.toCString(); break; + case QVariant::PointArray: *this << var.toPointArray(); break; + case QVariant::Region: *this << QString::fromLatin1("-"); break; + case QVariant::Bitmap: *this << QString::fromLatin1("-"); break; + case QVariant::Cursor: *this << var.toCursor(); break; + case QVariant::SizePolicy: *this << var.toSizePolicy(); break; +#if ( QT_VERSION >= 300 ) + case QVariant::Date: *this << var.toDate(); break; + case QVariant::Time: *this << var.toTime(); break; + case QVariant::DateTime: *this << var.toDateTime(); break; + case QVariant::ByteArray: *this << var.toByteArray(); break; + case QVariant::BitArray: *this << var.toBitArray(); break; + case QVariant::KeySequence: *this << var.toKeySequence(); break; +#if ( QT_VERSION >= 0x030100 ) + case QVariant::Pen: *this << var.toPen(); break; +#endif +#endif + } + return *this; +} + +/*! + Writes a QBrush value to the stream. The format is "QBrush" plus the + brush style as listed in the \a QBrush reference documentation and + the brush color. +*/ +KDStream& KDStream::operator<<( const QBrush& brush) +{ + QString style; + switch ( brush.style() ) + { + case Qt::NoBrush: style = QString::fromLatin1("NoBrush"); break; + case Qt::SolidPattern: style = QString::fromLatin1("SolidPattern"); break; + case Qt::Dense1Pattern: style = QString::fromLatin1("Dense1Pattern"); break; + case Qt::Dense2Pattern: style = QString::fromLatin1("Dense2Pattern"); break; + case Qt::Dense3Pattern: style = QString::fromLatin1("Dense3Pattern"); break; + case Qt::Dense4Pattern: style = QString::fromLatin1("Dense4Pattern"); break; + case Qt::Dense5Pattern: style = QString::fromLatin1("Dense5Pattern"); break; + case Qt::Dense6Pattern: style = QString::fromLatin1("Dense6Pattern"); break; + case Qt::Dense7Pattern: style = QString::fromLatin1("Dense7Pattern"); break; + case Qt::HorPattern: style = QString::fromLatin1("HorPattern"); break; + case Qt::VerPattern: style = QString::fromLatin1("VerPattern"); break; + case Qt::CrossPattern: style = QString::fromLatin1("CrossPattern"); break; + case Qt::BDiagPattern: style = QString::fromLatin1("BDiagPattern"); break; + case Qt::FDiagPattern: style = QString::fromLatin1("FDiagPattern"); break; + case Qt::DiagCrossPattern: style = QString::fromLatin1("DiagCrossPattern"); break; + case Qt::CustomPattern: style = QString::fromLatin1("CustomPattern"); break; + } + _output += QString::fromLatin1("QBrush(%1,%2)").arg(style).arg(QColor2Str(brush.color())); + return *this; +} + +/*! + Writes a QSizePolicy value to the stream. The output contains the + horizontal and vertical size policy and whether the policy has a + "height for width" setting. +*/ +KDStream& KDStream::operator<<( const QSizePolicy& policy) +{ + QString hor, ver; + + switch ( policy.horData() ) + { + case QSizePolicy::Fixed: hor=QString::fromLatin1("Fixed"); break; + case QSizePolicy::Minimum : hor=QString::fromLatin1("Minimum "); break; + case QSizePolicy::Maximum: hor=QString::fromLatin1("Maximum"); break; + case QSizePolicy::Preferred: hor=QString::fromLatin1("Preferred"); break; + case QSizePolicy::MinimumExpanding: hor=QString::fromLatin1("MinimumExpanding"); break; + case QSizePolicy::Expanding: hor=QString::fromLatin1("Expanding"); break; +#if ( QT_VERSION >= 300 ) + case QSizePolicy::Ignored: hor=QString::fromLatin1("Ignored"); break; +#endif + } + switch ( policy.verData() ) + { + case QSizePolicy::Fixed: ver=QString::fromLatin1("Fixed"); break; + case QSizePolicy::Minimum : ver=QString::fromLatin1("Minimum "); break; + case QSizePolicy::Maximum: ver=QString::fromLatin1("Maximum"); break; + case QSizePolicy::Preferred: ver=QString::fromLatin1("Preferred"); break; + case QSizePolicy::MinimumExpanding: ver=QString::fromLatin1("MinimumExpanding"); break; + case QSizePolicy::Expanding: ver=QString::fromLatin1("Expanding"); break; +#if ( QT_VERSION >= 300 ) + case QSizePolicy::Ignored: ver=QString::fromLatin1("Ignored"); break; +#endif + } + QString hforw = policy.hasHeightForWidth() ? QString::fromLatin1("true") : QString::fromLatin1("false"); + _output += QString::fromLatin1("QSizePolicy(hor=%1,ver=%2, hasHeightForWidth=%3)") + .arg(hor).arg(ver).arg(hforw); + return *this; +} + +#if ( QT_VERSION >= 300 ) +/*! + Writes a QKeySequence value to the stream. The output format is the + string value of the key sequence. +*/ +KDStream& KDStream::operator<<( const QKeySequence& keySeq) +{ + _output += QString(keySeq); + return *this; +} +#endif + +/*! + Writes a QStrList value to the stream. The output is the individual + strings. +*/ +KDStream& KDStream::operator<<( const QStrList& list ) +{ + KDStream_ptrListStream( *this, QStrListIterator( list ), false ); + return *this; +} + + +KDStream& KDStream::operator<<( const QPixmap& pixmap ) +{ + _output += QString("QPixmap[null=%1,width=%2,heigth=%3,depth=%4,hasMask=%5,hasAlpha=%6]") + .arg(pixmap.isNull()).arg(pixmap.width()).arg(pixmap.height()) + .arg(pixmap.depth()).arg(pixmap.mask() != 0).arg(pixmap.hasAlpha() ); + return *this; +} + + +KDStream& KDStream::operator<<( const QImage& pixmap ) +{ + _output += QString("QImage[null=%1,width=%2,heigth=%3,depth=%4,hasAlpha=%5]") + .arg(pixmap.isNull()).arg(pixmap.width()).arg(pixmap.height()) + .arg(pixmap.depth()).arg(pixmap.hasAlphaBuffer() ); + return *this; +} + +/* Classes that do not need to be supported: + +QCollection - abstract class // Qt 2 +QBitArray - QArray implemented. +QByteArray - QAray implemented. +QPointArray - QAray implemented. +QGArray - internal class // Qt 2 +QStringList - It's just a QValueList. + +QGCache // Qt 2 +QGDict // Qt 2 +QGList // Qt 2 +QGVector // Qt 2 +QGCacheIterator // Qt 2 +QAsciiCacheIterator +QCacheIterator +QIntCacheIterator +QGDictIterator // Qt 2 +QAsciiDictIterator +QDictIterator +QIntDictIterator +QPtrDictIterator +QListIterator // Qt 2 +QStrListIterator +QGListIterator // Qt 2 +QMapConstIterator +QMapIterator +QBitVal +QValueListConstIterator +QValueListIterator +QPtrListIterator// Qt 3 +QPtrCollection// Qt 3 +QSortedList - Depricated // Qt 2 + +*/ + +/* Qt classes not yet supported: +QRegion +QAccel +QAccessible // Qt 3 +QAccessibleInterface// Qt 3 +QAccessibleObject// Qt 3 +QAction +QActionGroup +QApplication +QAsyncIO // Qt 2 +QBitmap +QBoxLayout +QBuffer +QButton +QButtonGroup +QCDEStyle +QCanvas +QCanvasEllipse +QCanvasItem +QCanvasItemList// Qt 3 +QCanvasLine +QCanvasPixmap +QCanvasPixmapArray +QCanvasPolygon +QCanvasPolygonalItem +QCanvasRectangle +QCanvasSpline// Qt 3 +QCanvasSprite +QCanvasText +QCanvasView +QCheckBox +QCheckListItem +QCheckTableItem// Qt 3 +QChildEvent +QClipboard +QCloseEvent +QColorDialog +QColorDrag +QComboBox +QComboTableItem// Qt 3 +QCommonStyle +QComponentFactory// Qt 3 +QComponentFactoryInterface// Qt 3 +QComponentInterface// Qt 3 +QComponentServerInterface// Qt 3 +QContextMenuEvent// Qt 3 +QCopChannel +QCustomEvent +QCustomMenuItem +QDataBrowser// Qt 3 +QDataPump // Qt 2 +QDataSink // Qt 2 +QDataSource // Qt 2 +QDataStream +QDataTable// Qt 3 +QDataView// Qt 3 +QDateEdit// Qt 3 +QDateTimeEdit// Qt 3 +QDesktopWidget// Qt 3 +QDial +QDialog +QDir +QDns +QDockArea// Qt 3 +QDockWindow// Qt 3 +QDomAttr +QDomCDATASection +QDomCharacterData +QDomComment +QDomDocument +QDomDocumentFragment +QDomDocumentType +QDomElement +QDomEntity +QDomEntityReference +QDomImplementation +QDomNamedNodeMap +QDomNode +QDomNodeList +QDomNotation +QDomProcessingInstruction +QDomText +QDoubleValidator +QDragEnterEvent +QDragLeaveEvent +QDragMoveEvent +QDragObject +QDropEvent +QDropSite // Qt 2 +QEditorFactory// Qt 3 +QErrorMessage// Qt 3 +QEucJpCodec // Qt 2 +QEucKrCodec // Qt 2 +QEvent +QFeatureListInterface// Qt 3 +QFile +QFileDialog +QFileIconProvider +QFileInfo +QFilePreview +QFocusData +QFocusEvent +QFontDatabase +QFontDialog +QFontInfo +QFontManager// Qt 3 +QFontMetrics +QFrame +QFtp +QGL +QGLColormap// Qt 3 +QGLContext +QGLFormat +QGLWidget +QGLayoutIterator +QGbkCodec // Qt 2 +QGrid +QGridLayout +QGridView// Qt 3 +QGroupBox +QGuardedPtr +QHBox +QHBoxLayout +QHButtonGroup +QHGroupBox +QHeader +QHideEvent +QHostAddress +QHttp// Qt 3 +QIMEvent// Qt 3 +QIODevice +QIODeviceSource // Qt 2 +QIconDrag +QIconDragItem +QIconSet +QIconView +QIconViewItem +QImageConsumer +QImageDecoder +QImageDrag +QImageFormat +QImageFormatType +QImageIO +QInputDialog +QIntValidator +QInterlaceStyle +QJisCodec // Qt 2 +QJpUnicodeConv // Qt 2 +QKeyEvent +QLCDNumber +QLNode // Qt 2 +QLabel +QLayout +QLayoutItem +QLayoutIterator +QLibrary// Qt 3 +QLibraryInterface// Qt 3 +QLineEdit +QListBox +QListBoxItem +QListBoxPixmap +QListBoxText +QListView +QListViewItem +QListViewItemIterator +QLocalFs +QLock// Qt 3 +QMainWindow +QMap +QMemArray// Qt 3 +QMenuBar +QMenuData +QMessageBox +QMetaObject +QMetaProperty +QMimeSource +QMimeSourceFactory +QMotifPlusStyle +QMotifStyle +QMouseEvent +QMoveEvent +QMovie +QMultiLineEdit // Qt 2 +QMutex +QNPInstance +QNPStream +QNPWidget +QNPlugin +QNetworkOperation +QNetworkProtocol +QObject +QPNGImagePacker +QPaintDevice +QPaintDeviceMetrics +QPaintEvent +QPainter +QPicture +QPixmapCache +QPlatinumStyle +QPluginManager// Qt 3 +QPopupMenu +QPrinter +QProcess// Qt 3 +QProgressBar +QProgressDialog +QPushButton +QRadioButton +QRangeControl +QRegExp +QRegExpValidator// Qt 3 +QResizeEvent +QSGIStyle +QScreen// Qt 3 +QScreenCursor // Qt 2 +QScrollBar +QScrollView +QSemaphore +QSemiModal // Qt 2 +QServerSocket +QSessionManager +QSettings// Qt 3 +QShared // Qt 2 +QShowEvent +QSignal +QSignalMapper +QSimpleRichText +QSizeGrip +QSjisCodec // Qt 2 +QSlider +QSocket +QSocketDevice +QSocketNotifier +QSound +QSpacerItem +QSpinBox +QSplitter +QSql// Qt 3 +QSqlCursor// Qt 3 +QSqlDatabase// Qt 3 +QSqlDriver// Qt 3 +QSqlEditorFactory// Qt 3 +QSqlError// Qt 3 +QSqlField// Qt 3 +QSqlForm// Qt 3 +QSqlIndex// Qt 3 +QSqlPropertyMap// Qt 3 +QSqlQuery// Qt 3 +QSqlRecord// Qt 3 +QSqlResult// Qt 3 +QStatusBar +QStoredDrag +QStyle +QStyleSheet +QStyleSheetItem +QTab +QTabBar +QTabDialog +QTabWidget +QTable +QTableItem +QTableSelection +QTableView // Qt 2 +QTabletEvent// Qt 3 +QTextBrowser +QTextCodec +QTextDecoder +QTextDrag +QTextEdit// Qt 3 +QTextEncoder +QTextIStream +QTextOStream +QTextStream +QTextView // Qt 2 +QThread +QTimeEdit// Qt 3 +QTimer +QTimerEvent +QToolBar +QToolButton +QToolTip +QToolTipGroup +QTranslator +QTranslatorMessage +QTsciiCodec // Qt 2 +QUnknownInterface// Qt 3 +QUriDrag +QUrl +QUrlInfo// Qt 3 +QUrlOperator +QUuid// Qt 3 +QVBox +QVBoxLayout +QVButtonGroup +QVGroupBox +QValidator +QVariant +QWMatrix +QWSDecoration +QWSKeyboardHandler +QWSMouseHandler +QWSServer +QWSWindow +QWaitCondition +QWhatsThis +QWheelEvent +QWidget +QWidgetFactory// Qt 3 +QWidgetItem +QWidgetStack +QWindowsMime// Qt 3 +QWindowsStyle +QWizard +QWorkspace +QXmlAttributes +QXmlContentHandler +QXmlDTDHandler +QXmlDeclHandler +QXmlDefaultHandler +QXmlEntityResolver +QXmlErrorHandler +QXmlInputSource +QXmlLexicalHandler +QXmlLocator +QXmlNamespaceSupport +QXmlParseException +QXmlReader +QXmlSimpleReader +QXtApplication +QXtWidget +Qt +*/ diff --git a/libkipi/libkipi/KDStream.h b/libkipi/libkipi/KDStream.h new file mode 100644 index 0000000..9685645 --- /dev/null +++ b/libkipi/libkipi/KDStream.h @@ -0,0 +1,375 @@ +/* -*- Mode: C++ -*- + KD Tools - a set of useful widgets for Qt + $Id: KDStream.h 387954 2005-02-10 07:49:40Z blackie $ +*/ + +/**************************************************************************** +** Copyright (C) 2001-2005 Klarälvdalens Datakonsult AB. All rights reserved. +** +** This file is part of the KD Tools library. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid commercial KD Tools licenses may use this file in +** accordance with the KD Tools Commercial License Agreement provided with +** the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** Contact info@klaralvdalens-datakonsult.se if any conditions of this +** licensing are not clear to you. +** +**********************************************************************/ + +#ifndef KIPI_KDSTREAM +#define KIPI_KDSTREAM + +// Forward declarations. +class QImage; +class QPixmap; +class QColor; +class QColorGroup; +class QPalette; +class QCursor; +class QDate; +class QDateTime; +class QTime; +class QFont; +class QPen; +class QPoint; +class QSize; +class QRect; +class QObject; +class QVariant; +class QBrush; +class QSizePolicy; +class QKeySequence; + +#include <qstring.h> +#include <qvaluelist.h> +#include <qstrlist.h> +#include <qasciidict.h> +#include <qintdict.h> +#include <qptrdict.h> +#include <qdict.h> +#include <qvaluestack.h> +#include <qasciicache.h> +#include <qintcache.h> +#include <qcache.h> + +#if ( QT_VERSION < 300 ) +#include <qlist.h> +#include <qstack.h> +#include <qqueue.h> +#include <qvector.h> +#endif + +#if ( QT_VERSION >= 300 ) +#include <qptrlist.h> +#include <qptrstack.h> +#include <qptrqueue.h> +#include <qpair.h> +#include <qptrvector.h> +#include <qvaluevector.h> +#endif + +// utility functions. +class KDStream; +typedef KDStream & (*KDSTREAMFUNC)(KDStream &); +KDStream& endl( KDStream& stream); +KDStream& flush( KDStream& stream); + +class KDStream +{ +public: + KDStream( QString* outputString = 0); + ~KDStream(); + void flush(); + + // Standard C++ types + KDStream& operator<<( bool ); + KDStream& operator<<( char ); + KDStream& operator<<( float ); + KDStream& operator<<( double ); + KDStream& operator<<( short ); + KDStream& operator<<( unsigned short ); + KDStream& operator<<( int ); + KDStream& operator<<( unsigned int ); + KDStream& operator<<( long ); + KDStream& operator<<( unsigned long ); + KDStream& operator<<( const char* ); + KDStream& operator<<( const void* ); + + // Data holding classes. + KDStream& operator<<( const QString& ); + KDStream& operator<<( const QCString& ); + KDStream& operator<<( const QChar& ); + + KDStream& operator<<( const QColor& ); + KDStream& operator<<( const QColorGroup& ); + KDStream& operator<<( const QPalette& ); + KDStream& operator<<( const QCursor& ); + + KDStream& operator<<( const QDate& ); + KDStream& operator<<( const QDateTime& ); + KDStream& operator<<( const QTime& ); + + KDStream& operator<<( const QFont& ); + KDStream& operator<<( const QPen& ); + KDStream& operator<<( const QPoint& ); + KDStream& operator<<( const QSize& ); + KDStream& operator<<( const QRect& ); + KDStream& operator<<( const QBrush& ); + KDStream& operator<<( const QSizePolicy& ); + KDStream& operator<<( const QKeySequence& ); + KDStream& operator<<( const QPixmap& ); + KDStream& operator<<( const QImage& ); + + // misc + KDStream& operator<<( KDSTREAMFUNC ); + KDStream& operator<<( const QVariant& ); + KDStream& operator<<( const QObject& ); + KDStream& operator<<( const QStrList& list ); + +protected: + QString QColor2Str( const QColor& col ); + +private: + QString _output; + QString* _out; +}; + + +// Helper functions for KDStream. +// Defined as global functions to support +// compilers without support for member templates +// You should not need to call those yourself +template <class Iterator> void KDStream_valueListStream( KDStream& st, Iterator begin, Iterator end ) +{ + st << "["; + bool first = true; + for ( Iterator it = begin; it != end; ++it ){ + if ( first ) + first = false; + else + st << ", "; + st << *it; + } + st << "]"; +} + +template<class Iterator> void KDStream_ptrListStream( KDStream& st, Iterator it, bool doubleDeref ) +{ + st << "["; + bool first = true; + for ( ; *it; ++ it) { + if ( first ) + first = false; + else + st << ", "; + + if ( doubleDeref ) + st << *(*it); + else { + // QStrList ought to be a value list rather than a ptr list, one less dereference is + // necesary here, otherwise we will only stream out a char, rather than a char * + st << *it; + } + } + st << "]"; +} + +template<class Iterator> void KDStream_ptrDictStream( KDStream& st, Iterator it ) +{ + st << "{"; + bool first = true; + for ( ; it; ++ it) { + if ( first ) + first = false; + else + st << ", "; + + st << (it.currentKey()) << ": " << *(it.current()) ; + } + st << "}"; +} + +// Stream operators for containers +// Defined as global functions to support +// compilers without member templates + +template<class T> KDStream& operator<<( KDStream& st, const QValueList<T>& list ) +{ + KDStream_valueListStream( st, list.begin(), list.end() ); + return st; +} + +#if ( QT_VERSION < 300 ) +template<class T> KDStream& operator<<( KDStream& st, const QList<T>& list ) +{ + KDStream_ptrListStream ( st, QListIterator<T>( list ) , true ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QArray<T>& array ) +{ + KDStream_valueListStream( st, array.begin(), array.end() ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QVector<T>& vector ) +{ + QList<T> list; + vector.toList( &list ); + + KDStream_ptrListStream ( st, QListIterator<T>( list ), true ); + return st; +} +#endif +#if ( QT_VERSION >= 300 ) +template<class T> KDStream& operator<<( KDStream& st, const QMemArray<T>& array ) +{ + KDStream_valueListStream( st, array.begin(), array.end() ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QPtrList<T>& list ) +{ + KDStream_ptrListStream ( st, QPtrListIterator<T>( list ), true ); + return st; +} + +template<class T1, class T2> KDStream& operator<<( KDStream& st, const QPair<T1,T2>& pair ) +{ + st << "(" << pair.first << "," << pair.second << ")"; + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QPtrVector<T>& vector ) +{ + QPtrList<T> list; + vector.toList( &list ); + + KDStream_ptrListStream( st, QPtrListIterator<T>( list ), true ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QValueVector<T>& vector ) +{ + KDStream_valueListStream( st, vector.begin(), vector.end() ); + return st; +} +#endif + +#if ( QT_VERSION < 300 ) +template<class T> KDStream& operator<<( KDStream& st, const QStack<T>& stack ) +{ + // I need a copy to look at the individual elements. + QStack<T> copy(stack); +#else +template<class T> KDStream& operator<<( KDStream& st, const QPtrStack<T>& stack ) +{ + + // I need a copy to look at the individual elements. + QPtrStack<T> copy(stack); + /*}*/ +#endif + st << "["; + if ( stack.count() > 1 ) + st << "top| "; + st << " "; + + bool first = true; + while ( !copy.isEmpty() ) { + if (first) + first = false; + else + st << ", "; + st << *(copy.pop()); + } + + st << " "; + if ( stack.count() > 1 ) + st << " |bottom"; + st << "]"; + return st; +} + +// This function can unfortunately not be merged with the function for +// Q(Ptr)Stack, as the Q(Ptr)Stack dereferences what it pops of the stack, +// before streaming it: +// Q(Ptr)Stack: *this << *(copy.pop()); +// QValueStack: *this << copy.pop() ; +template<class T> KDStream& operator<<( KDStream& st, const QValueStack<T>& stack ) +{ + // I need a copy to look at the individual elements. + QValueStack<T> copy(stack); + st << "["; + if ( stack.count() > 1 ) + st << "top| "; + st << " "; + + bool first = true; + while ( !copy.isEmpty() ) { + if (first) + first = false; + else + st << ", "; + st << copy.pop(); + } + + st << " "; + if ( stack.count() > 1 ) + st << " |bottom"; + st << "]"; + return st; +} + + +template<class T> KDStream& operator<<( KDStream& st, const QAsciiDict<T>& dict ) +{ + KDStream_ptrDictStream( st, QAsciiDictIterator<T>( dict ) ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QIntDict<T>& dict ) +{ + KDStream_ptrDictStream( st, QIntDictIterator<T>( dict ) ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QPtrDict<T>& dict ) +{ + KDStream_ptrDictStream( st, QPtrDictIterator<T>( dict ) ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QDict<T>& dict ) +{ + KDStream_ptrDictStream( st, QDictIterator<T>( dict ) ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QAsciiCache<T>& cache ) +{ + KDStream_ptrDictStream( st, QAsciiCacheIterator<T>( cache ) ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QIntCache<T>& cache ) +{ + KDStream_ptrDictStream( st, QIntCacheIterator<T>( cache ) ); + return st; +} + +template<class T> KDStream& operator<<( KDStream& st, const QCache<T>& cache ) +{ + KDStream_ptrDictStream( st, QCacheIterator<T>( cache ) ); + return st; +} + +#endif /* KDStream */ diff --git a/libkipi/libkipi/KDTools-License-US b/libkipi/libkipi/KDTools-License-US new file mode 100644 index 0000000..887af55 --- /dev/null +++ b/libkipi/libkipi/KDTools-License-US @@ -0,0 +1,138 @@ +KD Tools COMMERCIAL LICENSE AGREEMENT +FOR COMMERCIAL VERSIONS +March 27, 2002 + + +IMPORTANT-READ CAREFULLY: This Klarälvdalens Datakonsult AB End-User +License Agreement ("EULA") is a legal agreement between you (either an +individual or a legal entity) and Klarälvdalens Datakonsult AB +("KDAB") for the Klarälvdalens Datakonsult AB software product(s) +accompanying this EULA, which include(s) computer software and may +include "online" or electronic documentation, associated media, and +printed materials ("Licensed Product"). + +The Licensed Product is protected by copyright laws and international +copyright treaties, as well as other intellectual property laws and +treaties. The Licensed Product is licensed, not sold. + +By installing, copying, or otherwise using the Licensed Product, you +agree to be bound by the terms of this EULA. If you do not agree to +the terms of this EULA, do not install, copy, or otherwise use the +Licensed Product; you may, however, return it to your place of +purchase for a full refund. In addition, by installing, copying, or +otherwise using any updates or other components of the Licensed +Product that you receive separately as part of the Licensed Product +("Updates"), you agree to be bound by any additional license terms +that accompany such Updates. If you do not agree to the additional +license terms that accompany such Updates, you may not install, copy, +or otherwise use such Updates. + +Upon your acceptance of the terms and conditions of this EULA, KDAB +grants you the right to use the Licensed Product in the manner +provided below. + +KDAB grants to you as an individual a personal, nonexclusive, +nontransferable license to make and use copies of the Licensed Product +for the sole purposes of designing, developing, and testing your +software product(s) ("Applications"). You may install copies of the +Licensed Product on an unlimited number of computers provided that you +are the only individual using the Licensed Product. If you are an +entity, KDAB grants you the right to designate one, and only one, +individual within your organization who shall have the sole right to +use the Licensed Product in the manner provided above. You may at any +time, but not more frequently that once every six (6) months, +designate another individual to replace the current designated user by +notifying KDAB, so long as there is no more than one designated user +at any given time. + + +GENERAL TERMS THAT APPLY TO APPLICATIONS AND REDISTRIBUTABLES +KDAB grants you a nonexclusive, royalty-free right to reproduce and +distribute the object code form of any portion of the Licensed Product +("Redistributables") for execution on any operating system of a type +listed in the License Certificate ("Platforms"). Copies of +Redistributables may only be distributed with and for the sole purpose +of executing Applications permitted under this License Agreement that +you have created using the Licensed Product. Under no circumstances +may any copies of Redistributables be distributed separately. + +The license granted in this EULA for you to create your own +Applications and distribute them and the Redistributables (if any) to +your customers is subject to all of the following conditions: (i) all +copies of the Applications you create must bear a valid copyright +notice, either your own or the copyright notice that appears on the +Licensed Product; (ii) you may not remove or alter any copyright, +trademark or other proprietary rights notice contained in any portion +of the Licensed Product; (iii) Redistributables, if any, shall be +licensed to your customer "as is" (KDAB MAKES NO WARRANTIES OR +REPRESENTATIONS VIS-A-VIS YOUR CUSTOMER WITH RESPECT TO +REDISTRIBUTABLES, AND KDAB EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES +VIS-A-VIS YOUR CUSTOMER, WHETHER EXPRESS OR IMPLIED, ORAL OR WRITTEN, +INCLUDING, BUT NOT LIMITED TO ANY IMPLIED WARRANTY OF MERCHANTABILITY +OR FITNESS FOR ANY PARTICULAR PURPOSE, WHETHER OR NOT KDAB KNOWS, HAS +REASON TO KNOW, HAS BEEN ADVISED OR IS OTHERWISE AWARE OF SUCH +PURPOSE); (iv) you will indemnify and hold KDAB, its related companies +and its suppliers, harmless from and against any claims or liabilities +arising out of the use, reproduction or distribution of your +Applications; (v) your Applications must be written using a licensed, +registered copy of the Licensed Product; (vi) your Applications must +add primary and substantial functionality to the Licensed Product; +(vii) your Applications may not pass on functionality which in any way +makes it possible for others to create Applications with the Software; +(viii) your Applications may not compete with the Licensed Product; +(ix)) you may not use KDAB's or any of its suppliers' names, logos, or +trademarks to market your programs, except to state that your program +was written using the Licensed Product. + + +WARRANTY DISCLAIMER +THE LICENSED PRODUCT IS LICENSED TO YOU "AS IS". TO THE MAXIMUM +EXTENT PERMITTED BY APPLICABLE LAW, KDAB ON BEHALF OF ITSELF AND ITS +SUPPLIERS, DISCLAIMS ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR +IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND +NON-INFRINGEMENT WITH REGARD TO THE LICENSED PRODUCT. THIS WARRANTY +DISCLAIMER NOTWITHSTANDING, YOU MAY HAVE SPECIFIC LEGAL RIGHTS WHICH +MAY VARY FROM STATE/JURISDICTION TO STATE/JURISDICTION. + + +LIMITATION OF LIABILITY +IF, KDAB'S WARRANTY DISCLAIMER NOTWITHSTANDING, KDAB IS HELD LIABLE TO +YOU, WHETHER IN CONTRACT, TORT OR ANY OTHER LEGAL THEORY, BASED ON THE +LICENSED PRODUCT, KDAB'S ENTIRE LIABILITY TO YOU AND YOUR EXCLUSIVE +REMEDY SHALL BE, AT KDAB'S OPTION, EITHER (A) RETURN OF THE PRICE YOU +PAID FOR THE LICENSED PRODUCT, OR (B) REPAIR OR REPLACEMENT OF THE +LICENSED PRODUCT, PROVIDED YOU RETURN TO KDAB ALL COPIES OF THE +LICENSED PRODUCT AS ORIGINALLY DELIVERED TO YOU. KDAB SHALL NOT UNDER +ANY CIRCUMSTANCES BE LIABLE TO YOU BASED ON FAILURE OF THE LICENSED +PRODUCT IF THE FAILURE RESULTED FROM ACCIDENT, ABUSE OR +MISAPPLICATION, NOR SHALL KDAB UNDER ANY CIRCUMSTANCES BE LIABLE FOR +SPECIAL DAMAGES, PUNITIVE OR EXEMPLARY DAMAGES, DAMAGES FOR LOSS OF +PROFITS OR INTERRUPTION OF BUSINESS OR FOR LOSS OR CORRUPTION OF DATA. +ANY AWARD OF DAMAGES FROM KDAB TO YOU SHALL NOT EXCEED THE TOTAL AMOUNT +YOU HAVE PAID TO KDAB IN CONNECTION WITH THIS EULA. + + +SUPPORT AND UPDATES +You will receive email based, software developer support and access to +Updates to the Licensed Product for one year from the date of initial +delivery, in accordance with KDAB support policies and procedures. +Such policies and procedures may be changed from time to time. + + +GENERAL PROVISIONS +This EULA may only be modified in writing signed by you and an +authorized officer of KDAB. All terms of any purchase order or other +ordering document shall be superseded by this EULA. If any provision +of the EULA is found void or unenforceable, the remainder will remain +valid and enforceable according to its terms. If any remedy provided +is determined to have failed for its essential purpose, all +limitations of liability and exclusions of damages set forth in this +EULA shall remain in effect. + +This EULA shall be construed, interpreted and governed by the laws of +Sweden, the venue to be Sunne Tingsrätt. The EULA gives you specific +legal rights; you may have others, which vary from state to state and +from country to country. KDAB reserves all rights not specifically +granted in this EULA. + diff --git a/libkipi/libkipi/KDTools-License-non-US b/libkipi/libkipi/KDTools-License-non-US new file mode 100644 index 0000000..fce2ae4 --- /dev/null +++ b/libkipi/libkipi/KDTools-License-non-US @@ -0,0 +1,93 @@ +KD Tools COMMERCIAL LICENSE AGREEMENT +FOR COMMERCIAL VERSIONS +Version 1.0 + +Copyright of this license text (C) 2001 Trolltech AS and (C) 2002 +Klarälvdalens Datakonsult AB. All rights reserved. License text used +with kind permission of Trolltech AS. The software and accompanying +material is Copyright (C) 2002 Klarälvdalens Datakonsult AB. + +This non-exclusive non-transferable License Agreement ("Agreement") is +between you ("Licensee") and Klarälvdalens Datakonsult AB (KDAB), and +pertains to the Klarälvdalens Datakonsult AB software product(s) +accompanying this Agreement, which include(s) computer software and +may include "online" or electronic documentation, associated media, +and printed materials, including the source code, example programs and +the documentation ("Software"). + + + COPYRIGHT AND RESTRICTIONS + +1. All intellectual property rights in the Software are owned by KDAB +and are protected by Swedish copyright laws, other applicable +copyright laws, and international treaty provisions. KDAB retains all +rights not expressly granted. No title, property rights or copyright +in the Software or in any modifications to the Software shall pass to +the Licensee under any circumstances. The Software is licensed, not +sold. + +2. By installing, copying, or otherwise using the Software, you agree +to be bound by the terms of this agreement. If you do not agree to the +terms of this Agreement, do not install, copy, or otherwise use the +Software. + +3. Upon your acceptance of the terms and conditions of this Agreement, +KDAB grants you the right to use the Software in the manner provided +below. + +4. KDAB grants to you as an individual a personal, nonexclusive, +non-transferable license to make and use copies of the Software for +the sole purposes of designing, developing, testing and distributing +your software product(s) ("Applications"). You may install copies of +the Software on an unlimited number of computers provided that you are +the only individual using the Software. If you are an entity, KDAB +grants you the right to designate one, and only one, individual within +your organization who shall have the sole right to use the Software in +the manner provided above. + +5. The license granted in this Agreement for you to create and +distribute your own Applications is subject to all of the following +conditions: (i) all copies of the Applications you create must bear a +valid copyright notice, either your own or the copyright notice that +appears on the Software; (ii) you may not remove or alter any +copyright, trademark or other proprietary rights notice contained in +any portion of the Software; (iii) you will indemnify and hold KDAB, its +related companies and its suppliers, harmless from and against any +claims or liabilities arising out of the use and/or reproduction of +your Applications; (iv) your Applications must be written using a +licensed, registered copy of the Software; (v) your Applications must +add primary and substantial functionality to the Software; (vi) your +Applications may not pass on functionality which in any way makes it +possible for others to create Applications with the Software; (vii) +your Applications may not compete with the Software; (viii) you may +not use KDAB's or any of its suppliers' names, logos, or trademarks to +market your programs, except to state that your program was written +using the Software. + +6. WARRANTY DISCLAIMER +THE SOFTWARE IS LICENSED TO YOU "AS IS". TO THE MAXIMUM EXTENT +PERMITTED BY APPLICABLE LAW, KDAB ON BEHALF OF ITSELF AND ITS SUPPLIERS, +DISCLAIMS ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT WITH +REGARD TO THE SOFTWARE. + +7. LIMITATION OF LIABILITY +IF, KDAB'S WARRANTY DISCLAIMER NOTWITHSTANDING, KDAB IS HELD LIABLE TO +YOU BASED ON THE SOFTWARE, KDAB'S ENTIRE LIABILITY TO YOU AND YOUR +EXCLUSIVE REMEDY SHALL BE, AT REPAIR OR REPLACEMENT OF THE SOFTWARE, +PROVIDED YOU RETURN TO KDAB ALL COPIES OF THE SOFTWARE AS ORIGINALLY +DELIVERED TO YOU. KDAB SHALL NOT UNDER ANY CIRCUMSTANCES BE LIABLE TO +YOU BASED ON FAILURE OF THE SOFTWARE IF THE FAILURE RESULTED FROM +ACCIDENT, ABUSE OR MISAPPLICATION, NOR SHALL KDAB UNDER ANY +CIRCUMSTANCES BE LIABLE FOR SPECIAL DAMAGES, PUNITIVE OR EXEMPLARY +DAMAGES, DAMAGES FOR LOSS OF PROFITS OR INTERRUPTION OF BUSINESS OR +FOR LOSS OR CORRUPTION OF DATA. + +9. This Agreement may only be modified in writing signed by you and an +authorized officer of KDAB. All terms of any purchase order or other +ordering document shall be superseded by this Agreement. + +10. This Agreement shall be construed, interpreted and governed by the +laws of Sweden, the venue to be Sunne Tingsrätt. + diff --git a/libkipi/libkipi/LICENSE.GPL b/libkipi/libkipi/LICENSE.GPL new file mode 100644 index 0000000..f5bad8b --- /dev/null +++ b/libkipi/libkipi/LICENSE.GPL @@ -0,0 +1,349 @@ + + The Qt GUI Toolkit is Copyright (C) 1994-2004 Trolltech AS. + + You may use, distribute and copy the Qt GUI Toolkit under the terms of + GNU General Public License version 2, which is displayed below. + +------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + +------------------------------------------------------------------------- diff --git a/libkipi/libkipi/Makefile.am b/libkipi/libkipi/Makefile.am new file mode 100644 index 0000000..8fb5206 --- /dev/null +++ b/libkipi/libkipi/Makefile.am @@ -0,0 +1,33 @@ +METASOURCES = AUTO +INCLUDES = -I.. -I$(srcdir)/.. $(LIBKIPI_CFLAGS) $(all_includes) + +KDE_ICON = kipi + +lib_LTLIBRARIES = libkipi.la + +libkipi_la_SOURCES = interface.cpp plugin.cpp pluginloader.cpp KDStream.cpp imageinfo.cpp imagecollection.cpp \ + imageinfoshared.cpp imagecollectionshared.cpp imagedialog.cpp uploadwidget.cpp \ + batchprogressdialog.cpp imagecollectionselector.cpp + +noinst_HEADERS = KDStream.h + +libkipiinclude_HEADERS = interface.h plugin.h pluginloader.h imageinfo.h imagecollection.h imageinfoshared.h \ + imagecollectionshared.h imagedialog.h uploadwidget.h batchprogressdialog.h \ + imagecollectionselector.h version.h libkipi_export.h + +libkipi_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) \ + -version-info 1:1:1 -no-undefined + +libkipi_la_LIBADD = $(LIB_KIO) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) + +libkipiincludedir = $(includedir)/libkipi + +kde_servicetypes_DATA = kipiplugin.desktop + + +picsdir = $(kde_datadir)/kipi/data +pics_DATA = kipi-plugins_logo.png banner_left.png + +EXTRA_DIST = $(pics_DATA) + + diff --git a/libkipi/libkipi/banner_left.png b/libkipi/libkipi/banner_left.png Binary files differnew file mode 100644 index 0000000..40a42f0 --- /dev/null +++ b/libkipi/libkipi/banner_left.png diff --git a/libkipi/libkipi/batchprogressdialog.cpp b/libkipi/libkipi/batchprogressdialog.cpp new file mode 100644 index 0000000..f516059 --- /dev/null +++ b/libkipi/libkipi/batchprogressdialog.cpp @@ -0,0 +1,224 @@ +////////////////////////////////////////////////////////////////////////////// +// +// BATCHPROGRESSDIALOG.CPP +// +// Copyright (C) 2004 Gilles Caulier <caulier dot gilles at free.fr> +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. +// +////////////////////////////////////////////////////////////////////////////// + + +// Include files for Qt + +#include <qvbox.h> +#include <qlayout.h> +#include <qdir.h> +#include <qwidget.h> +#include <qgroupbox.h> +#include <qwhatsthis.h> +#include <qcolor.h> +#include <qhgroupbox.h> +#include <qvgroupbox.h> +#include <qheader.h> +#include <qlistview.h> +#include <qframe.h> +#include <qlabel.h> +#include <qcolor.h> +#include <qpixmap.h> +#include <qpushbutton.h> + +// Include files for KDE + +#include <klocale.h> +#include <kprogress.h> +#include <kinstance.h> +#include <kconfig.h> +#include <kapplication.h> +#include <kdebug.h> +#include <kdialogbase.h> +#include <kiconloader.h> +#include <klistview.h> +#include <kstandarddirs.h> +#include <kapplication.h> +#include <kaboutdata.h> +#include <khelpmenu.h> +#include <kiconloader.h> +#include <kpopupmenu.h> + +// Include files for libKipi. + +#include "libkipi/version.h" + +// Local includes + +#include "batchprogressdialog.h" + +namespace KIPI +{ + +class BatchProgressItem : public KListViewItem +{ +public: + BatchProgressItem(KListView * parent, QListViewItem *after, const QString &message, int messageType) + : KListViewItem( parent, after), m_messagetype(messageType) + { + // Set the icon. + + switch( m_messagetype ) + { + case KIPI::StartingMessage: + setPixmap( 0, SmallIcon( "run" ) ); + break; + case KIPI::SuccessMessage: + setPixmap( 0, SmallIcon( "ok" ) ); + break; + case KIPI::WarningMessage: + setPixmap( 0, SmallIcon( "flag" ) ); + break; + case KIPI::ErrorMessage: + setPixmap( 0, SmallIcon( "stop" ) ); + break; + case KIPI::ProgressMessage: + setPixmap( 0, SmallIcon( "info" ) ); + break; + default: + setPixmap( 0, SmallIcon( "info" ) ); + } + + // Set the message text. + + setText(1, message); + } + +private: + int m_messagetype; + + void paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment) + { + QColorGroup _cg( cg ); + + if ( m_messagetype == KIPI::ErrorMessage ) + { + _cg.setColor( QColorGroup::Text, Qt::red ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); + return; + } + + if ( m_messagetype == KIPI::WarningMessage ) + { + _cg.setColor( QColorGroup::Text, Qt::darkYellow ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); + return; + } + + KListViewItem::paintCell( p, cg, column, width, alignment ); + } +}; + + +struct BatchProgressDialog::Private { +}; + + +/////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////// + +BatchProgressDialog::BatchProgressDialog( QWidget *parent, const QString &caption ) + : KDialogBase( parent, "KIPIBatchProgressDialog", true /* modal */, + caption, Cancel) +{ + d = new Private; + QWidget* box = makeVBoxMainWidget(); + + //--------------------------------------------- + + QFrame *headerFrame = new QFrame( box ); + headerFrame->setFrameStyle(QFrame::Panel|QFrame::Sunken); + QHBoxLayout* layout = new QHBoxLayout( headerFrame ); + layout->setMargin( 2 ); // to make sure the frame gets displayed + layout->setSpacing( 0 ); + QLabel *pixmapLabelLeft = new QLabel( headerFrame, "pixmapLabelLeft" ); + pixmapLabelLeft->setScaledContents( false ); + layout->addWidget( pixmapLabelLeft ); + QLabel *labelTitle = new QLabel( caption, headerFrame, "labelTitle" ); + layout->addWidget( labelTitle ); + layout->setStretchFactor( labelTitle, 1 ); + + QString dir; + KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); + dir = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png"); + + pixmapLabelLeft->setPaletteBackgroundColor( QColor(201, 208, 255) ); + pixmapLabelLeft->setPixmap( QPixmap( dir + "banner_left.png" ) ); + labelTitle->setPaletteBackgroundColor( QColor(201, 208, 255) ); + + //--------------------------------------------- + + + m_actionsList = new KListView( box ); + m_actionsList->addColumn(i18n( "Status" )); + m_actionsList->addColumn(i18n( "Current Actions" )); + m_actionsList->setSorting(-1); + m_actionsList->setItemMargin(1); + m_actionsList->header()->hide(); + m_actionsList->setResizeMode(QListView::LastColumn); + QWhatsThis::add( m_actionsList, i18n("<p>This is the current tasks list released.") ); + + //--------------------------------------------- + + m_progress = new KProgress( box, "Progress" ); + m_progress->setTotalSteps(100); + m_progress->setValue(0); + QWhatsThis::add( m_progress, i18n("<p>This is the list current percent task released.") ); + resize( 600, 400 ); +} + + +//////////////////////////////////// DESTRUCTOR ///////////////////////////////////////////// + +BatchProgressDialog::~BatchProgressDialog() +{ + delete d; +} + + +///////////////////////////////////// FONCTIONS ///////////////////////////////////////////// + +void BatchProgressDialog::addedAction(const QString &text, int type) +{ + m_item = new KIPI::BatchProgressItem(m_actionsList, + m_actionsList->lastItem(), + text, type); + + m_actionsList->ensureItemVisible(m_item); +} + + +void BatchProgressDialog::reset() +{ + m_actionsList->clear(); + m_progress->setValue(0); +} + + +void BatchProgressDialog::setProgress(int current, int total) +{ + m_progress->setTotalSteps(total); + m_progress->setValue(current); +} + +} // NameSpace KIPI + +#include "batchprogressdialog.moc" diff --git a/libkipi/libkipi/batchprogressdialog.h b/libkipi/libkipi/batchprogressdialog.h new file mode 100644 index 0000000..6ec06fb --- /dev/null +++ b/libkipi/libkipi/batchprogressdialog.h @@ -0,0 +1,80 @@ +////////////////////////////////////////////////////////////////////////////// +// +// BATCHPROGRESSDIALOG.H +// +// Copyright (C) 2004 Gilles Caulier <caulier dot gilles at free.fr> +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. +// +////////////////////////////////////////////////////////////////////////////// + +/** @file batchprogressdialog.h */ + +#ifndef BATCHPROGRESSDIALOG_H +#define BATCHPROGRESSDIALOG_H + +// Include files for KDE + +#include <kdialogbase.h> +#include "libkipi/libkipi_export.h" +class KListView; +class KProgress; + +/** + @namespace KIPI + This is the namespace +*/ +namespace KIPI +{ + +class BatchProgressItem; + +enum ActionMessageType +{ + StartingMessage = 0, + SuccessMessage, + WarningMessage, + ErrorMessage, + ProgressMessage +}; + +class LIBKIPI_EXPORT BatchProgressDialog : public KDialogBase +{ +Q_OBJECT + + public: + + BatchProgressDialog( QWidget *parent=0, const QString &caption=QString::null ); + ~BatchProgressDialog(); + + void addedAction(const QString &text, int type); + void reset(); + void setProgress(int current, int total); + + protected: + + KIPI::BatchProgressItem *m_item; + KListView *m_actionsList; + KProgress *m_progress; + + private: + + struct Private; + Private* d; +}; + +} // NameSpace KIPI + +#endif // BATCHPROGRESSDIALOG_H diff --git a/libkipi/libkipi/design b/libkipi/libkipi/design new file mode 100644 index 0000000..350b735 --- /dev/null +++ b/libkipi/libkipi/design @@ -0,0 +1,96 @@ +Suggested redesign of currentAlbum() / currentSelection() / allAlbums() +======================================================================= + +Problem 1 +========= +Plugins should be as similar as possible when it comes to user +interaction. The topic for discussion here are what set of images does the +plugin work on. + +Currently most KIPI plugins have been changed so that they use +Interface::currentScope() which uses the selection if one exist, otherwise +they use the currentAlbum if that exists. + +However, some plugins do not work like this, examples of alternative ways +are: + - always use selection (set wall paper) + - ask what to use using a set of radio buttons ( can't remember which + does this) + - ask the user to select albums using check boxes. + +Problem 2 +========= +Asking the user for an image set by the last method above only work well +when the host application uses the concept of an Album - which KimDaBa +doesn't. + +Solution - step 1 +================= + +Aurelien suggested the following solution, which works well when an +application uses the concept of Albums: + +Replaces all the different ways above with a QListView showing the albums as +returned by allAlbums(). The album returned by currentAlbum() would be +selected by default. + +In the case of Gwenview, allAlbums() would return three virtual albums: +- Selected images +- All images in the current dir +- All images in the current dir and subdirs + +In the case of KimDaBa, allAlbums() would return the list of keywords and a +special "Any" keyword which would be contains the union of all the other +keywords. + +Solution - step 2 +================= +The above will seriously break with how KimDaBa approaches albums. A +solution to this would be to make it up to the individual host applications +to offer a browser for selecting images. + +The implementation would looks something like this: + + class Interface { + ... + virtual Browser browser() = 0; + } + + class Browser { + public: + Browser( BrowserShared* ); + virtual QWidget* widget( QWidget* parent ); + KURL::List images(); + + // all the other stuff to make a shared class. + + signals: + void descriptionChanged( const QString& ); + void previewChanged( const QPixmap& ); + } + + class BrowserShared { + public: + virtual QWidget* widget( QWidget* parent ) = 0; + KURL::List images() = 0; + signals: + ... + } + +The widget method should return the configuration widget, this might +e.g. be the listview suggested by aurelien, or something else +If the widget returned are 0, then the application do not want to offer any +configuration, and the images must somehow be chosen before the plugin +appears (This will be the case in KimDaBa). + +The images() method must return the selected images to operated on. + +The signals are for host application which offers dir==album, and have a +description and preview for the dir (as is the case for digikam). + +The above replaces the currentAlbum(), currentSelection(), currentScope() and +allAlbums() from KIPI::Interface. +[Question: Should we remove these methods?] + +Also the ImageCollection class goes away. +[Question: What do we do about uploadPath() and uploadURL().] diff --git a/libkipi/libkipi/hi16-app-kipi.png b/libkipi/libkipi/hi16-app-kipi.png Binary files differnew file mode 100644 index 0000000..a8e37b4 --- /dev/null +++ b/libkipi/libkipi/hi16-app-kipi.png diff --git a/libkipi/libkipi/hi22-app-kipi.png b/libkipi/libkipi/hi22-app-kipi.png Binary files differnew file mode 100644 index 0000000..00d0553 --- /dev/null +++ b/libkipi/libkipi/hi22-app-kipi.png diff --git a/libkipi/libkipi/hi32-app-kipi.png b/libkipi/libkipi/hi32-app-kipi.png Binary files differnew file mode 100644 index 0000000..05ce405 --- /dev/null +++ b/libkipi/libkipi/hi32-app-kipi.png diff --git a/libkipi/libkipi/hi48-app-kipi.png b/libkipi/libkipi/hi48-app-kipi.png Binary files differnew file mode 100644 index 0000000..655ea4d --- /dev/null +++ b/libkipi/libkipi/hi48-app-kipi.png diff --git a/libkipi/libkipi/imagecollection.cpp b/libkipi/libkipi/imagecollection.cpp new file mode 100644 index 0000000..a499322 --- /dev/null +++ b/libkipi/libkipi/imagecollection.cpp @@ -0,0 +1,262 @@ +/* ============================================================ + * File : imagecollection.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// KDE includes. + +#include <kdebug.h> +#include <klocale.h> + +// Local includes. + +#include "imagecollection.h" +#include "imagecollectionshared.h" + +/** + @file imagecollection.cpp + returns the comment for the collection of images or QString::null if that doesn't make any sense. + A comment makes sense for an album, but not for a KIPI::Interface::currentSelection(). +*/ +QString KIPI::ImageCollection::comment() const +{ + if ( _data ) + return _data->comment(); + else { + printNullError(); + return QString::null; + } +} + +/** + PENDING(blackie) document +*/ +QString KIPI::ImageCollection::name() const +{ + if ( _data ) + return _data->name(); + else { + printNullError(); + return QString::null; + } +} + +/** + Return the category of the image collection. For example in Digikam, + a category is a sorting class like 'travels', 'friends', 'monuments', etc. +*/ +QString KIPI::ImageCollection::category() const +{ + if ( _data ) + return _data->category(); + else { + printNullError(); + return QString::null; + } +} + +/** + Return the Creation date of the image collection. The default implementation + return a null date. +*/ +QDate KIPI::ImageCollection::date() const +{ + if ( _data ) + return _data->date(); + else { + printNullError(); + return QDate(); + } +} + +/** + PENDING(blackie) document +*/ +KURL::List KIPI::ImageCollection::images() const +{ + if ( _data ) + return _data->images(); + else { + printNullError(); + return KURL::List(); + } +} + +KIPI::ImageCollection::ImageCollection( ImageCollectionShared* data ) + : _data( data ) +{ +} + +KIPI::ImageCollection::~ImageCollection() +{ + if ( _data ) + _data->removeRef(); +} + +KIPI::ImageCollection::ImageCollection( const ImageCollection& rhs ) +{ + if ( rhs._data ) { + _data = rhs._data; + _data->addRef(); + } + else + _data = 0; +} + +KIPI::ImageCollection::ImageCollection() +{ + _data = 0; +} + +KIPI::ImageCollection& KIPI::ImageCollection::operator=( const KIPI::ImageCollection& rhs ) +{ + if ( rhs._data == _data ) + return *this; + + if ( _data ) + _data->removeRef(); + if ( !rhs._data ) { + printNullError(); + _data = 0; + } + else { + _data = rhs._data; + _data->addRef(); + } + return *this; +} + +/*! + Returns the directory for the image collection. + The host application may, however, return anything in case this + imagecollection is not a directory (check isDirectory()), or may + return the directory of the first image in the collection, the root + of the image collection (in case all images has a common root), or + even an empty URL. +*/ +KURL KIPI::ImageCollection::path() const +{ + if ( _data ) + return _data->path(); + else { + printNullError(); + return KURL(); + } +} + +/*! + Returns the directory to place images into. + This function should only be called if KIPI::Features AcceptNewImages + is available. + + The function may choose to return the directory for the image collection + or if images from the collection are not available in a common directory, + then instead a common upload directory. + In contrast to \ref path, this function must return a valid url. + + <b>IMPORTANT:</b> uploadRoot() must be a subpath of uploadPath() +*/ +KURL KIPI::ImageCollection::uploadPath() const +{ + if ( _data ) + return _data->uploadPath(); + else { + printNullError(); + return KURL(); + } +} + +/*! + When a plugin wants to upload images, it may choose to display an upload widget, + which gives the user the possible to show a directory from a tree view. + + This tree view widget needs to starts at some URL. This function specifies that location. + Here are a couble of possible return value different host applications may choose. + <ul> + <li> If all images are stored rooted at some tree (which is the case for + KimDaBa), then this function may return this directory unconditionally. + <li> The root directory returned by uploadPath() (which is the default implementation for this method) + <li> The directory returned by uploadPath(). + </ul> + + <b>IMPORTANT:</b> uploadRoot() must be a subpath of uploadPath() +*/ +KURL KIPI::ImageCollection::uploadRoot() const +{ + if ( _data ) + return _data->uploadRoot(); + else { + printNullError(); + return KURL(); + } +} + +/*! + This fonction return the name of the upload root path used by the + the KIPI::UploadWidget. This name can be different for each host + app (like "Images" for Kimdaba or "My Albums" for Digikam). +*/ +QString KIPI::ImageCollection::uploadRootName() const +{ + if ( _data ) + return _data->uploadRootName(); + else { + printNullError(); + return QString::null; + } +} + +/* + Returns whether an imagecollection is a physical folder on the filesystem + or not. Its important to check this, if your plugin needs to do folder + based operations for an imagecollection +*/ +bool KIPI::ImageCollection::isDirectory() const +{ + if ( _data ) + return _data->isDirectory(); + else { + printNullError(); + return false; + } +} + +bool KIPI::ImageCollection::isValid() const +{ + return (_data != 0); +} + +void KIPI::ImageCollection::printNullError() const +{ + kdWarning( 51000 ) << "Image collection is invalid - this might be the case if you asked for an album, " << endl + << "and not album existed. You should check using .isValid() first." << endl + << "Notice: Plugins should never create an instance of ImageCollection, only the host application " + << "should do that." << endl; +} + + +bool KIPI::ImageCollection::operator==(const KIPI::ImageCollection& ic) const { + if (!_data || !(ic._data)) + { + printNullError(); + return false; + } + return *_data == *(ic._data); +} diff --git a/libkipi/libkipi/imagecollection.h b/libkipi/libkipi/imagecollection.h new file mode 100644 index 0000000..b30f9f3 --- /dev/null +++ b/libkipi/libkipi/imagecollection.h @@ -0,0 +1,76 @@ +/* ============================================================ + * File : imagecollection.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +/** @file imagecollection.h */ + +#ifndef KIPI_IMAGECOLLECTION_H +#define KIPI_IMAGECOLLECTION_H + +// Qt includes + +#include <qstring.h> +#include <qdatetime.h> + +// KDE includes. + +#include <kurl.h> +#include "libkipi/libkipi_export.h" + +/** @namespace KIPI */ +namespace KIPI +{ + class ImageCollectionShared; + + /** @class ImageCollection + Holds info about the collection + */ + class LIBKIPI_EXPORT ImageCollection + { + public: + QString name() const; + QString comment() const; + QString category() const; + QDate date() const; + KURL::List images() const; + KURL path() const; + KURL uploadPath() const; + KURL uploadRoot() const; + QString uploadRootName() const; + bool isDirectory() const; + bool isValid() const; + + // Interface for host application + general stuff + ImageCollection( ImageCollectionShared* ); + ImageCollection( const ImageCollection& other ); + ~ImageCollection(); + ImageCollection(); + ImageCollection& operator=( const ImageCollection& ); + + bool operator==(const ImageCollection&) const; + private: + mutable KIPI::ImageCollectionShared* _data; + void printNullError() const; + }; +} + +#endif /* IMAGECOLLECTION_H */ + diff --git a/libkipi/libkipi/imagecollectionselector.cpp b/libkipi/libkipi/imagecollectionselector.cpp new file mode 100644 index 0000000..c8a8625 --- /dev/null +++ b/libkipi/libkipi/imagecollectionselector.cpp @@ -0,0 +1,348 @@ +/* ============================================================ + * File : imagecollectionselector.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-07 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// Qt includes. + +#include <qheader.h> +#include <qlayout.h> +#include <qpushbutton.h> +#include <qlabel.h> +#include <qvgroupbox.h> +#include <qtimer.h> + +// KDE includes. + +#include <kbuttonbox.h> +#include <kdialog.h> +#include <klistview.h> +#include <klocale.h> +#include <kglobal.h> +#include <kio/previewjob.h> + +// KIPI includes. + +#include "libkipi/interface.h" + +// Local includes. + +#include "imagecollectionselector.h" + +namespace KIPI +{ + +class ImageCollectionItem : public QCheckListItem +{ +public: + ImageCollectionItem(ImageCollectionSelector* selector, + QListView * parent, ImageCollection collection) + : QCheckListItem( parent, collection.name(), QCheckListItem::CheckBox), + _imageCollection(collection), _selector(selector) + {} + + ImageCollection imageCollection() const { return _imageCollection; } + +protected: + + virtual void stateChange(bool val) + { + QCheckListItem::stateChange(val); + _selector->emitSelectionChanged(); + } + +private: + + ImageCollection _imageCollection; + ImageCollectionSelector* _selector; +}; + +struct ImageCollectionSelector::Private { + Interface* _interface; + KListView* _list; + QLabel* _thumbLabel; + QLabel* _textLabel; + QListViewItem* _itemToSelect; +}; + + +ImageCollectionSelector::ImageCollectionSelector(QWidget* parent, Interface* interface, const char* name) + : QWidget(parent, name) +{ + d=new Private; + d->_interface=interface; + d->_itemToSelect = 0; + + d->_list=new KListView(this); + d->_list->setResizeMode( QListView::LastColumn ); + d->_list->addColumn(""); + d->_list->header()->hide(); + + connect(d->_list, SIGNAL(selectionChanged(QListViewItem*)), + SLOT(slotSelectionChanged(QListViewItem*))); + + QHBoxLayout* mainLayout=new QHBoxLayout(this, 0, KDialog::spacingHint()); + mainLayout->addWidget(d->_list); + + QVBoxLayout* rightLayout = new QVBoxLayout(mainLayout, 0); + + KButtonBox* box=new KButtonBox(this, Vertical); + rightLayout->addWidget(box); + QPushButton* selectAll=box->addButton(i18n("Select All")); + QPushButton* invertSelection=box->addButton(i18n("Invert Selection")); + QPushButton* selectNone=box->addButton(i18n("Select None")); + box->layout(); + + connect(selectAll, SIGNAL(clicked()), + this, SLOT(slotSelectAll()) ); + connect(invertSelection, SIGNAL(clicked()), + this, SLOT(slotInvertSelection()) ); + connect(selectNone, SIGNAL(clicked()), + this, SLOT(slotSelectNone()) ); + + rightLayout->addItem(new QSpacerItem(10,20,QSizePolicy::Fixed, + QSizePolicy::Expanding)); + + QVGroupBox* rightBox = new QVGroupBox(this); + rightBox->setInsideMargin(KDialog::marginHint()); + rightBox->setInsideSpacing(KDialog::spacingHint()); + rightLayout->addWidget(rightBox); + + if (interface->hasFeature(AlbumsUseFirstImagePreview)) + { + d->_thumbLabel = new QLabel(rightBox); + d->_thumbLabel->setFixedSize(QSize(128,128)); + d->_thumbLabel->setAlignment(AlignHCenter | AlignVCenter); + } + else + { + d->_thumbLabel = 0; + } + d->_textLabel = new QLabel(rightBox); + + fillList(); + QTimer::singleShot(0, this, SLOT(slotInitialShow())); +} + + +ImageCollectionSelector::~ImageCollectionSelector() { + delete d; +} + + +void ImageCollectionSelector::fillList() { + QValueList<ImageCollection> collections = d->_interface->allAlbums(); + d->_list->clear(); + ImageCollection current = d->_interface->currentAlbum(); + bool currentWasInList = false; + + /* note: the extensive use of blocksignals is to prevent bombarding + the plugin with too many selection changed signals. do not remove + them */ + + blockSignals(true); + for( QValueList<ImageCollection>::Iterator it = collections.begin() ; + it != collections.end() ; ++it ) + { + ImageCollectionItem* item = new ImageCollectionItem( this, d->_list, *it); + if (!currentWasInList && *it == current) { + item->setOn(true); + currentWasInList = true; + if (!d->_itemToSelect) + d->_itemToSelect = item; + } + } + + if (!currentWasInList) { + slotSelectAll(); + d->_itemToSelect = d->_list->firstChild(); + } + blockSignals(false); +} + +void ImageCollectionSelector::emitSelectionChanged() +{ + emit selectionChanged(); +} + +QValueList<ImageCollection> ImageCollectionSelector::selectedImageCollections() const { + QValueList<ImageCollection> list; + + QListViewItemIterator it( d->_list ); + + for (; it.current(); ++it) { + ImageCollectionItem *item = static_cast<ImageCollectionItem*>( it.current() ); + + if (item->isOn()) { + list << item->imageCollection(); + } + } + + return list; +} + +void ImageCollectionSelector::slotSelectAll() { + QListViewItemIterator it( d->_list ); + + /* note: the extensive use of blocksignals is to prevent bombarding + the plugin with too many selection changed signals. do not remove + them */ + blockSignals(true); + for (; it.current(); ++it) { + ImageCollectionItem *item = static_cast<ImageCollectionItem*>( it.current() ); + item->setOn(true); + } + blockSignals(false); + + emit selectionChanged(); +} + + +void ImageCollectionSelector::slotInvertSelection() { + QListViewItemIterator it( d->_list ); + + /* note: the extensive use of blocksignals is to prevent bombarding + the plugin with too many selection changed signals. do not remove + them */ + blockSignals(true); + for (; it.current(); ++it) { + ImageCollectionItem *item = static_cast<ImageCollectionItem*>( it.current() ); + item->setOn(!item->isOn()); + } + blockSignals(false); + + emit selectionChanged(); +} + + +void ImageCollectionSelector::slotSelectNone() { + QListViewItemIterator it( d->_list ); + + /* note: the extensive use of blocksignals is to prevent bombarding + the plugin with too many selection changed signals. do not remove + them */ + blockSignals(true); + for (; it.current(); ++it) { + ImageCollectionItem *item = static_cast<ImageCollectionItem*>( it.current() ); + item->setOn(false); + } + blockSignals(false); + + emit selectionChanged(); +} + +void ImageCollectionSelector::slotSelectionChanged(QListViewItem* listItem) +{ + if (d->_thumbLabel) + d->_thumbLabel->clear(); + d->_textLabel->clear(); + + if (!listItem) + return; + + ImageCollectionItem* imcollItem = + static_cast<ImageCollectionItem*>(listItem); + + if (d->_thumbLabel) + { + KURL::List images(imcollItem->imageCollection().images()); + if (!images.isEmpty()) + { + KIO::PreviewJob* thumbJob = KIO::filePreview(images.first(), 128); + connect( thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), + SLOT(slotGotPreview(const KFileItem* , const QPixmap&))); + } + } + + // Layout the ImageCollection information nicely + + QString cellBeg("<tr><td><nobr><font size=-1><i>"); + QString cellMid("</i></font></nobr></td><td><font size=-1>"); + QString cellEnd("</font></td></tr>"); + + QString text("<table cellspacing=0 cellpadding=0>"); + + // number of images + text += cellBeg + i18n("Images:") + + cellMid + QString::number(imcollItem->imageCollection().images().count()) + + cellEnd; + + // Optional features ------------------------------------------------------- + + // Album Comments + if (d->_interface->hasFeature(AlbumsHaveComments)) + { + // Limit the comments string to 20 char... + QString comments = imcollItem->imageCollection().comment(); + if (!comments.isEmpty()) + { + comments.truncate(20); + comments.append("..."); + } + + text += cellBeg + i18n("Comments:") + + cellMid + comments + + cellEnd; + } + + // Album Category + if (d->_interface->hasFeature(AlbumsHaveCategory)) + { + text += cellBeg + i18n("Category:") + + cellMid + imcollItem->imageCollection().category() + + cellEnd; + } + + // Album Creation Date + if (d->_interface->hasFeature(AlbumsHaveCreationDate)) + { + QDate date(imcollItem->imageCollection().date()); + text += cellBeg + i18n("Date:") + + cellMid + KGlobal::locale()->formatDate(date) + + cellEnd; + } + + + text += "</table>"; + + d->_textLabel->setText(text); + + emit selectionChanged(); +} + +void ImageCollectionSelector::slotGotPreview(const KFileItem*, const QPixmap& pix) +{ + d->_thumbLabel->setPixmap(pix); +} + +void ImageCollectionSelector::slotInitialShow() +{ + if (d->_itemToSelect) + { + d->_list->setSelected(d->_itemToSelect, true); + d->_list->ensureItemVisible(d->_itemToSelect); + d->_itemToSelect = 0; + } + emit selectionChanged(); +} + +} // KIPI + +#include "imagecollectionselector.moc" diff --git a/libkipi/libkipi/imagecollectionselector.h b/libkipi/libkipi/imagecollectionselector.h new file mode 100644 index 0000000..fd7a6ae --- /dev/null +++ b/libkipi/libkipi/imagecollectionselector.h @@ -0,0 +1,81 @@ +/* ============================================================ + * File : imagecollectionselector.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-07 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#ifndef IMAGECOLLECTIONSELECTOR_H +#define IMAGECOLLECTIONSELECTOR_H + +// Qt includes. + +#include <qwidget.h> +#include <qvaluelist.h> +#include <qpixmap.h> + +// KIPI includes. + +#include "libkipi/imagecollection.h" +#include "libkipi/libkipi_export.h" + +class QListViewItem; +class KFileItem; + +namespace KIPI +{ + +class Interface; + +class LIBKIPI_EXPORT ImageCollectionSelector : public QWidget +{ +Q_OBJECT + class Private; + +public: + + ImageCollectionSelector(QWidget* parent, Interface*, const char* name=0); + ~ImageCollectionSelector(); + + QValueList<ImageCollection> selectedImageCollections() const; + +signals: + + void selectionChanged(void); + +private: + + Private* d; + void fillList(); + void emitSelectionChanged(); + friend class ImageCollectionItem; + +private slots: + + void slotSelectAll(); + void slotInvertSelection(); + void slotSelectNone(); + void slotSelectionChanged(QListViewItem* listItem); + void slotGotPreview(const KFileItem*, const QPixmap&); + void slotInitialShow(); +}; + +} // KIPI + + +#endif /* IMAGECOLLECTIONSELECTOR_H */ diff --git a/libkipi/libkipi/imagecollectionshared.cpp b/libkipi/libkipi/imagecollectionshared.cpp new file mode 100644 index 0000000..c8ebd37 --- /dev/null +++ b/libkipi/libkipi/imagecollectionshared.cpp @@ -0,0 +1,116 @@ +/* ============================================================ + * File : imagecollectionshared.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// KDE Includes. + +#include <klocale.h> +#include <kdebug.h> + +// Local Includes. + +#include "imagecollectionshared.h" + + +KIPI::ImageCollectionShared::ImageCollectionShared() + : _count(1) +{ +} + +void KIPI::ImageCollectionShared::addRef() +{ + _count++; +} + +void KIPI::ImageCollectionShared::removeRef() +{ + _count--; + if ( _count == 0 ) { + // qDebug("Deleting!"); + delete this; + } +} + +KURL KIPI::ImageCollectionShared::path() +{ + kdWarning(51000) << "This method should only be invoked if this imagecollection is a directory.\n" + << "See KIPI::ImageCollectionShared::isDirectory()" + << endl; + return KURL(); +} + +KURL KIPI::ImageCollectionShared::uploadPath() +{ + kdWarning(51000) << "This method should only be invoked if the host application supports the KIPI::Features\n" + "AcceptNewImages - if the host application do support that, then this function should\n" + "have been overriden in the host application.\n"; + return KURL(); +} + +KURL KIPI::ImageCollectionShared::uploadRoot() +{ + KURL path = uploadPath(); + if ( path.isValid() ) { + path.setPath("/"); + return path; + } + else + return KURL( "file:/" ); +} + +QString KIPI::ImageCollectionShared::uploadRootName() +{ + return (i18n("Images")); +} + +bool KIPI::ImageCollectionShared::isDirectory() +{ + return false; +} + +QString KIPI::ImageCollectionShared::comment() +{ + kdWarning(51000) << "KIPI::ImageCollectionShared::comment should only be invoked if the host application supports\n" + "the KIPI::Features AlbumsHaveComments - if the host application do support that, then this function should\n" + "have been overriden in the host application.\n"; + return QString::null; +} + +QString KIPI::ImageCollectionShared::category() +{ + kdWarning(51000) << "KIPI::ImageCollectionShared::category should only be invoked if the host application supports\n" + "the KIPI::Features AlbumsHaveCategory - if the host application do support that, then this function should\n" + "have been overriden in the host application.\n"; + return QString::null; +} + +QDate KIPI::ImageCollectionShared::date() +{ + kdWarning(51000) << "KIPI::ImageCollectionShared::date should only be invoked if the host application supports\n" + "the KIPI::Features AlbumsHaveCreationDate - if the host application do support that, then this function should\n" + "have been overriden in the host application.\n"; + return QDate(); +} + + +bool KIPI::ImageCollectionShared::operator==(ImageCollectionShared& ics) { + return images()==ics.images(); +} diff --git a/libkipi/libkipi/imagecollectionshared.h b/libkipi/libkipi/imagecollectionshared.h new file mode 100644 index 0000000..6a03d4e --- /dev/null +++ b/libkipi/libkipi/imagecollectionshared.h @@ -0,0 +1,68 @@ +/* ============================================================ + * File : imagecollectionshared.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#ifndef KIPI_IMAGECOLLECTIONSHARED_H +#define KIPI_IMAGECOLLECTIONSHARED_H + +// Qt Includes. + +#include <qstring.h> +#include <qdatetime.h> + +// KDE includes. + +#include <kurl.h> + +// Local includes. + +#include "imagecollection.h" +#include "libkipi/libkipi_export.h" + +namespace KIPI +{ + class LIBKIPI_EXPORT ImageCollectionShared + { + public: + ImageCollectionShared(); + virtual ~ImageCollectionShared() {} + virtual QString name() = 0; + virtual QString comment(); + virtual QString category(); + virtual QDate date(); + virtual KURL::List images() = 0; + virtual KURL path(); + virtual KURL uploadPath(); + virtual KURL uploadRoot(); + virtual QString uploadRootName(); + virtual bool isDirectory(); + virtual bool operator==(ImageCollectionShared&); + + private: + friend class ImageCollection; + void addRef(); + void removeRef(); + int _count; + }; +} + +#endif /* IMAGECOLLECTIONSHARED_H */ + diff --git a/libkipi/libkipi/imagedialog.cpp b/libkipi/libkipi/imagedialog.cpp new file mode 100644 index 0000000..da5344d --- /dev/null +++ b/libkipi/libkipi/imagedialog.cpp @@ -0,0 +1,327 @@ +/* ============================================================ + * File : imagedialog.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-05 + * Description : an image files selector dialog. + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// Qt includes. + +#include <qguardedptr.h> +#include <qlabel.h> +#include <qsplitter.h> +#include <qlayout.h> +#include <qframe.h> +#include <qpushbutton.h> +#include <qtimer.h> + +// KDE includes. + +#include <kdebug.h> +#include <klistview.h> +#include <klocale.h> +#include <kstandarddirs.h> +#include <kio/previewjob.h> +#include <kapplication.h> +#include <kaboutdata.h> +#include <khelpmenu.h> +#include <kiconloader.h> +#include <kpopupmenu.h> + +// Include files for libKipi. + +#include "libkipi/version.h" + +// Local includes. + +#include "imagedialog.h" + +const int PREVIEW_SIZE = 128; + +namespace KIPI +{ + +struct AlbumLVI : public KListViewItem { + AlbumLVI(KListView* parent, const KIPI::ImageCollection& album) + : KListViewItem(parent, album.name()) + , _album(album) {} + + const KIPI::ImageCollection& _album; +}; + + +struct ImageLVI : public KListViewItem { + ImageLVI(KListView* parent, const KURL& url) + : KListViewItem(parent, url.fileName()), _url(url) {} + + KURL _url; +}; + + +struct ImageDialog::Private { + KURL _url; + KURL::List _urls; + KIPI::Interface* _interface; + KListView* _albumList; + KListView* _imageList; + QLabel* _preview; + QValueList<ImageCollection> _albums; + bool _singleSelection; +}; + + +ImageDialog::ImageDialog(QWidget* parent, KIPI::Interface* interface, + bool singleSelection) + : KDialogBase(KDialogBase::Plain, i18n("Select Image From Album"), Help|Ok|Cancel, + Ok, parent, "album-dialog", true, true) +{ + d = new Private; + d->_interface=interface; + d->_singleSelection = singleSelection; + + QWidget* box = plainPage(); + QVBoxLayout *dvlay = new QVBoxLayout( box, 6 ); + + //--------------------------------------------- + + QFrame *headerFrame = new QFrame( box ); + headerFrame->setFrameStyle(QFrame::Panel|QFrame::Sunken); + QHBoxLayout* layout = new QHBoxLayout( headerFrame ); + layout->setMargin( 2 ); // to make sure the frame gets displayed + layout->setSpacing( 0 ); + QLabel *pixmapLabelLeft = new QLabel( headerFrame, "pixmapLabelLeft" ); + pixmapLabelLeft->setScaledContents( false ); + layout->addWidget( pixmapLabelLeft ); + QLabel *labelTitle = new QLabel( i18n("Select Image From Album"), headerFrame, "labelTitle" ); + layout->addWidget( labelTitle ); + layout->setStretchFactor( labelTitle, 1 ); + dvlay->addWidget( headerFrame ); + + QString directory; + KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); + directory = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png"); + + pixmapLabelLeft->setPaletteBackgroundColor( QColor(201, 208, 255) ); + pixmapLabelLeft->setPixmap( QPixmap( directory + "banner_left.png" ) ); + labelTitle->setPaletteBackgroundColor( QColor(201, 208, 255) ); + + //--------------------------------------------- + + // About data and help button. + + KAboutData* about = new KAboutData("kipiplugins", + I18N_NOOP("Image selector dialog"), + kipi_version, + I18N_NOOP("A Kipi dialog for image selection"), + KAboutData::License_GPL, + "(c) 2004,2005, Kipi development team", + 0, + "http://extragear.kde.org/apps/kipi"); + + QPushButton *helpButton = actionButton( Help ); + KHelpMenu* helpMenu = new KHelpMenu(this, about, false); + helpMenu->menu()->removeItemAt(0); + helpMenu->menu()->insertItem(i18n("Kipi Plugins Handbooks"), this, SLOT(slotHelp()), 0, -1, 0); + helpButton->setPopup( helpMenu->menu() ); + + //--------------------------------------------- + + QSplitter* splitter = new QSplitter(box); + + d->_albumList=new KListView(splitter); + d->_albumList->addColumn(i18n("Album Name")); + d->_albumList->setMinimumWidth(200); + d->_albumList->setResizeMode(QListView::LastColumn); + + d->_imageList=new KListView(splitter); + d->_imageList->addColumn(i18n("Image Name")); + d->_imageList->setMinimumWidth(200); + d->_imageList->setSelectionMode(singleSelection ? QListView::Single : + QListView::Extended); + d->_imageList->setResizeMode(QListView::LastColumn); + + d->_preview=new QLabel(splitter); + d->_preview->setAlignment(AlignHCenter | AlignVCenter | WordBreak); + d->_preview->setFixedWidth(PREVIEW_SIZE); + d->_preview->setText(i18n("No image selected")); + + dvlay->addWidget( splitter ); + + d->_albums=d->_interface->allAlbums(); + QValueList<ImageCollection>::ConstIterator it=d->_albums.begin(); + + for(; it!=d->_albums.end(); ++it) { + new AlbumLVI(d->_albumList, *it); + } + QTimer::singleShot(0, this, SLOT(slotInitialShow())); + + connect(d->_albumList, SIGNAL(selectionChanged(QListViewItem*)), + this, SLOT(fillImageList(QListViewItem*)) ); + + if (singleSelection) + connect(d->_imageList, SIGNAL(selectionChanged(QListViewItem*)), + this, SLOT(slotImageSelected(QListViewItem*)) ); + else + connect(d->_imageList, SIGNAL(selectionChanged()), + this, SLOT(slotImagesSelected())); + + enableButtonOK(false); +} + + +ImageDialog::~ImageDialog() { + delete d; +} + + +KURL ImageDialog::url() const { + return d->_url; +} + +KURL::List ImageDialog::urls() const +{ + return d->_urls; +} + +KURL ImageDialog::getImageURL(QWidget* parent, KIPI::Interface* interface) { + ImageDialog dlg(parent, interface, true); + if (dlg.exec() == QDialog::Accepted) { + return dlg.url(); + } else { + return KURL(); + } +} + +KURL::List ImageDialog::getImageURLs(QWidget* parent, Interface* interface) +{ + ImageDialog dlg(parent, interface, false); + if (dlg.exec() == QDialog::Accepted) + return dlg.urls(); + else + { + KURL::List urls; + return urls; + } +} + + +void ImageDialog::fillImageList(QListViewItem* item) { + d->_imageList->clear(); + if (!item) return; + + const KIPI::ImageCollection& album=static_cast<AlbumLVI*>(item)->_album; + KURL::List images=album.images(); + + KURL::List::ConstIterator it=images.begin(); + for (;it!=images.end(); ++it) { + new ImageLVI(d->_imageList, *it); + } +} + + +void ImageDialog::slotImageSelected(QListViewItem* item) { + if (!item) { + enableButtonOK(false); + d->_preview->setText(i18n("No image selected")); + d->_url=KURL(); + return; + } + enableButtonOK(true); + d->_url=static_cast<ImageLVI*>(item)->_url; + d->_preview->clear(); + + KIO::PreviewJob* thumbJob = KIO::filePreview(d->_url, PREVIEW_SIZE); + connect( thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), + SLOT(slotGotPreview(const KFileItem* , const QPixmap&))); +} + +void ImageDialog::slotImagesSelected() +{ + d->_url = KURL(); + d->_urls.clear(); + d->_preview->clear(); + + QListViewItem* selectedItem = 0; + QListViewItem* listItem = d->_imageList->firstChild(); + while (listItem) + { + if (listItem->isSelected()) + { + selectedItem = listItem; + d->_urls.append(static_cast<ImageLVI*>(listItem)->_url); + } + listItem = listItem->nextSibling(); + } + + if (!selectedItem) + { + enableButtonOK(false); + d->_preview->setText(i18n("No images selected")); + d->_url=KURL(); + d->_urls.clear(); + return; + } + + enableButtonOK(true); + + if (d->_urls.count() == 1) + { + d->_url = d->_urls.first(); + + KIO::PreviewJob* thumbJob = KIO::filePreview(d->_url, PREVIEW_SIZE); + connect( thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), + SLOT(slotGotPreview(const KFileItem* , const QPixmap&))); + } + else + { + d->_url = d->_urls.first(); + d->_preview->setText(i18n("1 image selected", "%n images selected", d->_urls.count())); + } +} + +void ImageDialog::slotGotPreview(const KFileItem*, const QPixmap& pix) { + + d->_preview->setPixmap(pix); +} + +void ImageDialog::slotHelp( void ) +{ + KApplication::kApplication()->invokeHelp("", "kipi-plugins"); +} + +void ImageDialog::slotInitialShow() +{ + ImageCollection current = d->_interface->currentAlbum(); + + QListViewItemIterator it( d->_albumList ); + while ( it.current() ) + { + AlbumLVI* lvi = static_cast<AlbumLVI*>( it.current() ); + if ( lvi->_album == current ) + { + d->_albumList->ensureItemVisible( lvi ); + d->_albumList->setSelected( lvi, true ); + break; + } + ++it; + } +} + +} // namespace KIPI + +#include "imagedialog.moc" diff --git a/libkipi/libkipi/imagedialog.h b/libkipi/libkipi/imagedialog.h new file mode 100644 index 0000000..d23419c --- /dev/null +++ b/libkipi/libkipi/imagedialog.h @@ -0,0 +1,83 @@ +/* ============================================================ + * File : imagedialog.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-05 + * Description : an image files selector dialog. + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#ifndef IMAGEDIALOG_H +#define IMAGEDIALOG_H + +// Qt includes. + +#include <qvaluelist.h> +#include <qwidget.h> + +// KDE includes. + +#include <kurl.h> +#include <kdialogbase.h> + +// LibKipi includes. + +#include "libkipi/interface.h" +#include "libkipi/imagecollection.h" +#include "libkipi/libkipi_export.h" + +class QListViewItem; + +class KFileItem; +class KListView; + +namespace KIPI +{ + + +class LIBKIPI_EXPORT ImageDialog : public KDialogBase +{ +Q_OBJECT + + class Private; + +public: + + ImageDialog(QWidget*, Interface*, bool singleSelection=false); + ~ImageDialog(); + + KURL url() const; + KURL::List urls() const; + + static KURL getImageURL(QWidget*, Interface*); + static KURL::List getImageURLs(QWidget*, Interface*); + +private slots: + + void fillImageList(QListViewItem*); + void slotImageSelected(QListViewItem*); + void slotImagesSelected(); + void slotGotPreview(const KFileItem* , const QPixmap&); + void slotHelp( void ); + void slotInitialShow(); + +private: + Private* d; +}; + +} // namespace KIPI + +#endif /* IMAGECOLLECTIONDIALOG_H */ diff --git a/libkipi/libkipi/imageinfo.cpp b/libkipi/libkipi/imageinfo.cpp new file mode 100644 index 0000000..536dbf3 --- /dev/null +++ b/libkipi/libkipi/imageinfo.cpp @@ -0,0 +1,169 @@ +/* ============================================================ + * File : imageinfo.h + * Author: KIPI team developers (see AUTHORS files for details) + * Date : 2004-07-22 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#include "imageinfo.h" +#include "KDStream.h" +#include "imageinfoshared.h" + +/** @file imageinfo.cpp +*/ +QString KIPI::ImageInfo::toString( const QVariant& data ) const +{ + QString string; + KDStream stream( &string ); + stream << data + << flush ; + return string; +} + +/** + PENDING(blackie) document +*/ +QString KIPI::ImageInfo::title() const +{ + return _data->title(); +} + +/** + PENDING(blackie) document +*/ +KURL KIPI::ImageInfo::path() const +{ + return _data->path(); +} + +/** + PENDING(blackie) document +*/ +QString KIPI::ImageInfo::description() const +{ + return _data->description(); +} + +/** + Returns the time of the image. + In case the host application supports time range, the spec argument + specifies if it is the start or end time that should be returned. +*/ +QDateTime KIPI::ImageInfo::time( TimeSpec spec ) const +{ + return _data->time( spec ); +} + +/** + Returns a Map of attributes of the image + In case the host application supports some special attributes of the image + this function can be used to return them. + Tags are supported by this feature: "tags" key contains QStringList() + encapsulated in a QVariant + +*/ +QMap<QString,QVariant> KIPI::ImageInfo::attributes() const +{ + return _data->attributes(); +} + +/** + PENDING(blackie) document +*/ +int KIPI::ImageInfo::size() const +{ + return _data->size(); +} + +KIPI::ImageInfo::ImageInfo( ImageInfoShared* shared ) + : _data( shared ) +{ +} + +KIPI::ImageInfo::ImageInfo( const KIPI::ImageInfo& rhs ) +{ + _data = rhs._data; + _data->addRef(); +} + +KIPI::ImageInfo::~ImageInfo() +{ + _data->removeRef(); +} + +void KIPI::ImageInfo::setTitle( const QString& name ) +{ + _data->setTitle( name ); +} + +void KIPI::ImageInfo::setDescription( const QString& description ) +{ + _data->setDescription( description ); +} + +void KIPI::ImageInfo::clearAttributes() +{ + _data->clearAttributes(); +} + +void KIPI::ImageInfo::addAttributes( const QMap<QString,QVariant>& attributes ) +{ + _data->addAttributes( attributes ); +} + +/** + Returns the angle the application rotates the image with when displaying it. + Certain host applications may choose to rotate the image on disk, and will always return 0, + while other host application will rotate the image when displaying it, and will thus not rotate + the image on disk. +*/ +int KIPI::ImageInfo::angle() const +{ + return _data->angle(); +} + +/** + See \ref angle +*/ +void KIPI::ImageInfo::setAngle( int angle ) +{ + _data->setAngle( angle ); +} + +/** + In the case the application supports time ranges (like this image is + from 1998-2000), this method will return true if the time is an exact + specification, and thus not a range. +*/ +bool KIPI::ImageInfo::isTimeExact() const +{ + return _data->isTimeExact(); +} + +void KIPI::ImageInfo::setTime( const QDateTime& time, TimeSpec spec ) +{ + _data->setTime( time, spec ); +} + +/** + Copies all the attibutes, description etc from the other imageinfo +*/ +void KIPI::ImageInfo::cloneData( const ImageInfo& other ) +{ + _data->cloneData( other._data ); +} + diff --git a/libkipi/libkipi/imageinfo.h b/libkipi/libkipi/imageinfo.h new file mode 100644 index 0000000..f9b98f2 --- /dev/null +++ b/libkipi/libkipi/imageinfo.h @@ -0,0 +1,82 @@ +/* ============================================================ + * File : imageinfo.h + * Author: KIPI team developers (see AUTHORS files for details) + * Date : 2004-07-22 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +/** @file imageinfo.h */ + +#ifndef KIPI_IMAGEINFO_H +#define KIPI_IMAGEINFO_H +#include <kurl.h> +#include <qstring.h> +#include <qdatetime.h> +#include <qmap.h> +#include <qvariant.h> +#include "libkipi/libkipi_export.h" + +namespace KIPI +{ + class ImageInfoShared; + enum TimeSpec { FromInfo, ToInfo }; + + /** @class ImageInfo + Holds info about an image + */ + class LIBKIPI_EXPORT ImageInfo + { + public: + QString title() const; + void setTitle( const QString& name ); + + QString description() const; + void setDescription( const QString& description); + + QMap<QString,QVariant> attributes() const; + void clearAttributes(); + void addAttributes( const QMap<QString,QVariant>& ); + + KURL path() const; + QDateTime time( TimeSpec spec = FromInfo ) const; + void setTime( const QDateTime& time, TimeSpec spec = FromInfo ); + bool isTimeExact() const; + int size() const; + + int angle() const; + void setAngle( int ); + + QString toString( const QVariant& ) const; + + void cloneData( const ImageInfo& other ); + + /** constructor + Interface for host application + general stuff + */ + ImageInfo( ImageInfoShared* ); + ImageInfo( const ImageInfo& ); + ~ImageInfo(); + + private: + ImageInfo() {} // Disabled + ImageInfo& operator=( const ImageInfo& ) { return *this; } // Disabled + mutable KIPI::ImageInfoShared* _data; + }; +} + +#endif /* KIPI_IMAGEINFO_H */ + diff --git a/libkipi/libkipi/imageinfoshared.cpp b/libkipi/libkipi/imageinfoshared.cpp new file mode 100644 index 0000000..f206e3b --- /dev/null +++ b/libkipi/libkipi/imageinfoshared.cpp @@ -0,0 +1,120 @@ +/* ============================================================ + * File : imageinfoshared.cpp + * Authors: Jesper K. Pedersen <blackie@kde.org> + * + * Date : 2004-02-19 + * Description : + * + * Copyright 2004 by Jesper K. Pedersen + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// Qt includes. + +#include <qfileinfo.h> + +// KDE includes. + +#include <kdebug.h> + +// Local includes. + +#include "imageinfoshared.h" +#include "interface.h" + +KIPI::ImageInfoShared::ImageInfoShared( Interface* interface, const KURL& url ) + : _url( url ), _count(1), _interface( interface ) +{ +} + +KURL KIPI::ImageInfoShared::path() +{ + return _url; +} + +int KIPI::ImageInfoShared::size() +{ + if ( ! _url.isLocalFile() ) { + kdFatal() << "KIPI::ImageInfoShared::size does not yet support non local files, please fix\n"; + return 0; + } + else + return QFileInfo( _url.path() ).size(); +} + +QDateTime KIPI::ImageInfoShared::time( KIPI::TimeSpec ) +{ + if ( ! _url.isLocalFile() ) { + kdFatal() << "KIPI::ImageInfoShared::time does not yet support non local files, please fix\n"; + return QDateTime(); + } + else + return QFileInfo( _url.path() ).lastModified(); +} + +void KIPI::ImageInfoShared::addRef() +{ + _count++; +} + +void KIPI::ImageInfoShared::removeRef() +{ + _count--; + if ( _count == 0 ) { + delete this; + } +} + +int KIPI::ImageInfoShared::angle() +{ + return 0; +} + +void KIPI::ImageInfoShared::setAngle( int ) +{ +} + +bool KIPI::ImageInfoShared::isTimeExact() +{ + return true; +} + +void KIPI::ImageInfoShared::setTime( const QDateTime& /*time*/, TimeSpec /*spec*/ ) +{ +} + +void KIPI::ImageInfoShared::setTitle( const QString& ) +{ + kdWarning(51000) << "This method should only be invoked if the host application supports the KIPI::ImageTitlesWritable\n" + "If the host application do support that, then this function should\n" + "have been overriden in the host application.\n"; +} + +void KIPI::ImageInfoShared::cloneData( ImageInfoShared* other ) +{ + if ( _interface->hasFeature( ImageTitlesWritable ) ) + setTitle( other->title() ); + + if ( _interface->hasFeature( ImagesHasComments ) ) + setDescription( other->description() ); + + clearAttributes(); + addAttributes( other->attributes() ); + + setTime( other->time( FromInfo ), FromInfo ); + if ( _interface->hasFeature( SupportsDateRanges ) ) + setTime( other->time( ToInfo ), ToInfo ); + + setAngle( other->angle() ); +} diff --git a/libkipi/libkipi/imageinfoshared.h b/libkipi/libkipi/imageinfoshared.h new file mode 100644 index 0000000..afdbc1d --- /dev/null +++ b/libkipi/libkipi/imageinfoshared.h @@ -0,0 +1,91 @@ +/* ============================================================ + * File : imageinfoshared.h + * Authors: Jesper K. Pedersen <blackie@kde.org> + * + * Date : 2004-02-19 + * Description : + * + * Copyright 2004 by Jesper K. Pedersen + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#ifndef KIPI_IMAGEINFOSHARED_H +#define KIPI_IMAGEINFOSHARED_H + +// Qt includes. + +#include <qstring.h> +#include <qmap.h> +#include <qdatetime.h> +#include <qvariant.h> + +// KDE includes. + +#include <kurl.h> + +// LibKIPI includes. + +#include "libkipi/imageinfo.h" +#include "libkipi/libkipi_export.h" + +namespace KIPI +{ + class Interface; + + class LIBKIPI_EXPORT ImageInfoShared + { + public: + ImageInfoShared( KIPI::Interface* interface, const KURL& url ); + virtual ~ImageInfoShared() {} + virtual QString title() {return QString::null;} + virtual void setTitle( const QString& ); + + virtual QString description() = 0; + virtual void setDescription( const QString& ) = 0; + + virtual QMap<QString,QVariant> attributes() = 0; + virtual void clearAttributes() = 0; + virtual void addAttributes( const QMap<QString,QVariant>& ) = 0; + + virtual KURL path(); + virtual QDateTime time( KIPI::TimeSpec spec ); + virtual void setTime( const QDateTime& time, TimeSpec spec = FromInfo ); + + virtual bool isTimeExact(); + + virtual int size(); + + virtual int angle(); + virtual void setAngle( int ); + + QString toString( const QVariant& ); + + virtual void cloneData( ImageInfoShared* other ); + + protected: + KURL _url; + + private: + ImageInfoShared() {} // Disable + + friend class ImageInfo; + void addRef(); + void removeRef(); + int _count; + Interface* _interface; + }; +} + +#endif /* IMAGEINFOSHARED_H */ + diff --git a/libkipi/libkipi/interface.cpp b/libkipi/libkipi/interface.cpp new file mode 100644 index 0000000..8adc3b0 --- /dev/null +++ b/libkipi/libkipi/interface.cpp @@ -0,0 +1,221 @@ +/* ============================================================ + * File : interface.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +/** @file interface.cpp */ + +// KDE includes. + +#include <kdebug.h> +#include <kimageio.h> + +// Local includes. + +#include "pluginloader.h" +#include "interface.h" + +/*! + @enum KIPI::Features + Not all host applications support the full subset of features that KIPI + allows access to. As an example <a + href="http://ktown.kde.org/kimdaba/">KimDaBa</a> do not support comments + for albums. Thus before a plugin expect a decant value for the comment, + it should check whether KIPI::AlbumsHaveComments are set. It does so + using KIPI::Interface::hasFeature() + When adding new items, remember to update "hasFeature( const QString& feature )" + and the hello world plugin. + */ + +/*! + \enum KIPI::AlbumsHaveComments + This feature specify that albums have descriptions associated to them. + */ + +/*! + \enum KIPI::ImagesHasComments + This feature specifies that images in the host application has descriptions associated to them. + */ + +/*! + \enum KIPI::ImagesHasTime + This feature specifies that images has a date associated with it, which the host application can display and set +*/ + +/*! + \enum KIPI::SupportsDateRanges + This feature specify whether the host application supports that the user can specify a date range for images, + like 1998-2000. +*/ + +/*! + \enum KIPI::AcceptNewImages + This feature specifies that the host application do accept new images. + Use \ref ImageCollection::uploadPath to find the location to place the image, and + \ref KIPI::Interface::addImage() to tell the host application about the new image. +*/ + +/*! + \enum KIPI::ImageTitlesWritable + This features specifies whether the plugin can change the title for images +*/ + +/*! + \enum KIPI::AlbumsHaveCategory + This feature specify that albums are category associated to them ('travels', 'friends', 'monuments', etc.). +*/ + +/*! + \enum KIPI::AlbumsHaveCreationDate + This feature specify that albums are a creation date associated to them. +*/ + +/*! + \enum KIPI::AlbumsUseFirstImagePreview + This feature specify that albums use the first image of the collection like preview. + This flag is used in ImageGallery, CDArchiving, and FinDuplicateImages dialog for + to lauch a preview of the album. +*/ + + +KIPI::Interface::Interface(QObject *parent, const char *name ) + : QObject(parent, name) +{ +} + +KIPI::Interface::~Interface() +{ +} + +/** + Tells the host app that the following images has changed on disk +*/ +void KIPI::Interface::refreshImages( const KURL::List& ) +{ +} + +/** + Tells whether the host application under which the plugin currently executes a given feature. + See KIPI::Features for details on the individual features. +*/ +bool KIPI::Interface::hasFeature( KIPI::Features feature ) +{ + return ( features() & feature ) != 0; +} + +bool KIPI::Interface::hasFeature( const QString& feature ) +{ + if ( feature == "AlbumsHaveComments" ) + return hasFeature( KIPI::AlbumsHaveComments ); + else if ( feature == "ImagesHasComments" ) + return hasFeature( KIPI::ImagesHasComments ); + else if ( feature == "ImagesHasTime" ) + return hasFeature( KIPI::ImagesHasTime ); + else if ( feature == "SupportsDateRanges" ) + return hasFeature( KIPI::SupportsDateRanges ); + else if ( feature == "AcceptNewImages" ) + return hasFeature( KIPI::AcceptNewImages ); + else if ( feature == "ImageTitlesWritable" ) + return hasFeature( KIPI::ImageTitlesWritable ); + else if ( feature == "AlbumsHaveCategory" ) + return hasFeature( KIPI::AlbumsHaveCategory ); + else if ( feature == "AlbumsHaveCreationDate" ) + return hasFeature( KIPI::AlbumsHaveCreationDate ); + else if ( feature == "AlbumsUseFirstImagePreview" ) + return hasFeature( KIPI::AlbumsUseFirstImagePreview ); + else if ( feature == "HostSupportsTags" ) + return hasFeature( KIPI::HostSupportsTags ); + else { + kdWarning( 51000 ) << "Unknown feature asked for in KIPI::Interface::hasFeature: " << feature << endl; + return false; + } +} + +/*! + Tell the host application that a new image has been made available to it. + Returns true if the host application did accept the new image, otherwise err will be filled with + an error description. +*/ +bool KIPI::Interface::addImage( const KURL&, QString& /*err*/ ) +{ + kdWarning(51000) << "Interface::addImage should only be invoked if the host application supports the KIPI::Features\n" + "AcceptNewImages - if the host application do support that, then this function should\n" + "have been overriden in the host application.\n"; + return false; +} + +void KIPI::Interface::delImage( const KURL& ) +{ +} + +/** + Returns list of all images in current album. + If there are no current album, the returned + KIPI::ImageCollection::isValid() will return false. +*/ +KIPI::ImageCollection KIPI::Interface::currentAlbum() +{ + // This implementation is just to be able to write documentation above. + return KIPI::ImageCollection(); +} + +/** + Current selection in a thumbnail view for example. + If there are no current selection, the returned + KIPI::ImageCollection::isValid() will return false. +*/ +KIPI::ImageCollection KIPI::Interface::currentSelection() +{ + // This implementation is just to be able to write documentation above. + return KIPI::ImageCollection(); +} + +/** + Returns a list of albums. +*/ +QValueList<KIPI::ImageCollection> KIPI::Interface::allAlbums() +{ + // This implementation is just to be able to write documentation above. + return QValueList<KIPI::ImageCollection>(); +} + + +/** + Return a bitwise or of the KIPI::Features that thus application support. +*/ +int KIPI::Interface::features() const +{ + // This implementation is just to be able to write documentation above. + return 0; +} + +/** + Return a list of images file extention will be used in the plugins for + to sort the files list before a treatment. The default implementation return, + the supported images formats by KDE. +*/ +QString KIPI::Interface::fileExtensions() +{ + QStringList KDEImagetypes = KImageIO::mimeTypes( KImageIO::Reading ); + QString imagesFileFilter = KDEImagetypes.join(" "); + return ( imagesFileFilter.lower() + " " + imagesFileFilter.upper() ); +} + +#include "interface.moc" diff --git a/libkipi/libkipi/interface.h b/libkipi/libkipi/interface.h new file mode 100644 index 0000000..dfccf08 --- /dev/null +++ b/libkipi/libkipi/interface.h @@ -0,0 +1,94 @@ +/* ============================================================ + * File : interface.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +/** @file interface.h */ +#ifndef KIPI_INTERFACE_H +#define KIPI_INTERFACE_H + +// Qt includes. + +#include <qstring.h> +#include <qobject.h> + +// KDE includes. + +#include <kurl.h> + +// Local includes. + +#include "libkipi/imagecollection.h" +#include "libkipi/imageinfo.h" +#include "libkipi/libkipi_export.h" + +/** @namespace KIPI */ +namespace KIPI +{ + enum Features { + AlbumsHaveComments = 1 << 0, + ImagesHasComments = 1 << 1, + ImagesHasTime = 1 << 2, + SupportsDateRanges = 1 << 3, + AcceptNewImages = 1 << 4, + ImageTitlesWritable = 1 << 5, + AlbumsHaveCategory = 1 << 6, + AlbumsHaveCreationDate = 1 << 7, + AlbumsUseFirstImagePreview = 1 << 8, + HostSupportsTags = 1 << 9 + }; + + /** class Interface */ + class LIBKIPI_EXPORT Interface : public QObject + { + Q_OBJECT + + public: + Interface(QObject *parent, const char *name=0); + virtual ~Interface(); + + virtual ImageCollection currentAlbum() = 0; + virtual ImageCollection currentSelection() = 0; + virtual QValueList<ImageCollection> allAlbums() = 0; + + virtual ImageInfo info( const KURL& ) = 0; + virtual bool addImage( const KURL&, QString& err ); + virtual void delImage( const KURL& ); + + virtual void refreshImages( const KURL::List& ); + + virtual QString fileExtensions(); + + bool hasFeature( KIPI::Features feature ); + + protected: + virtual int features() const = 0; + + private: + friend class PluginLoader; + bool hasFeature( const QString& feature ); + + signals: + void selectionChanged( bool hasSelection ); + void currentAlbumChanged( bool anyAlbum ); + }; +} + +#endif /* KIPI_INTERFACE_H */ diff --git a/libkipi/libkipi/kipi-plugins_logo.png b/libkipi/libkipi/kipi-plugins_logo.png Binary files differnew file mode 100644 index 0000000..8847b30 --- /dev/null +++ b/libkipi/libkipi/kipi-plugins_logo.png diff --git a/libkipi/libkipi/kipiplugin.desktop b/libkipi/libkipi/kipiplugin.desktop new file mode 100644 index 0000000..b5be232 --- /dev/null +++ b/libkipi/libkipi/kipiplugin.desktop @@ -0,0 +1,67 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=ServiceType +X-KDE-ServiceType=KIPI/Plugin +X-KDE-DerivedName=KIPI Plugin +Name=KIPIPlugin +Name[br]=Lugent KIPIP +Name[cs]=KIPI modul +Name[da]=KIPI-plugin +Name[es]=Extensión de KIPI +Name[et]=KIPI plugin +Name[fi]=KIPILiitännäinen +Name[gl]=Plugin de KIPI +Name[it]=PluginDiKIPI +Name[nb]=KIPI programtillegg +Name[nl]=KIPI-plugin +Name[pl]=Wtyczka KIPI +Name[pt]='Plugin' do KIPI +Name[pt_BR]='Plugin' do KIPI +Name[sk]=KIPI modul +Name[sr]=KIPI прикључак +Name[sr@Latn]=KIPI prikljuÄak +Name[sv]=KIPI-insticksprogram +Name[tg]=МодулиKIPI +Name[tr]=KIPIEklentisi +Name[xx]=xxKIPIPluginxx +Name[zh_CN]=KIPI æ’件 +Comment=A KIPI Plugin +Comment[ar]=قابس KIPI +Comment[bg]=ПриÑтавка за KIPI +Comment[br]=Ul lugent KIPI +Comment[cs]=KIPI modul +Comment[da]=Et KIPI-plugin +Comment[de]=Ein KIPI-Plugin +Comment[el]=Ένα Ï€Ïόσθετο του KIPI +Comment[es]=Una extensión para KIPI +Comment[et]=KIPI plugin +Comment[fi]=Kipi-liitännäinen +Comment[fr]=Un module externe KIPI +Comment[ga]=Breiseán KIPI +Comment[gl]=Un plugin de KIPI +Comment[it]=Un plugin di KIPI +Comment[ja]=Kipi プラグイン +Comment[ka]=KIPI-ს მáƒáƒ“ული +Comment[lt]=KIPI priedas +Comment[nb]=Et KIPI programtillegg +Comment[nl]=Een KIPI-plugin +Comment[pa]=ਇੱਕ KIPI ਪਲੱਗਿੰਨ +Comment[pl]=Wtyczka KIPI +Comment[pt]=Um 'Plugin' do KIPI +Comment[pt_BR]=Um 'Plugin' do KIPI +Comment[sk]=KIPI modul +Comment[sr]=KIPI прикључак +Comment[sr@Latn]=KIPI prikljuÄak +Comment[sv]=Ett KIPI-insticksprogram +Comment[tg]=Модули KIPI +Comment[tr]=Bir KIPI Eklentisi +Comment[uk]=Втулок KIPI +Comment[xx]=xxA KIPI Pluginxx +Comment[zh_CN]=一个 KIPI æ’件 + +[PropertyDef::X-KIPI-Id] +Type=QString + +[PropertyDef::X-KIPI-ReqFeatures] +Type=QStringList + diff --git a/libkipi/libkipi/libkipi_export.h.in b/libkipi/libkipi/libkipi_export.h.in new file mode 100644 index 0000000..028e111 --- /dev/null +++ b/libkipi/libkipi/libkipi_export.h.in @@ -0,0 +1,37 @@ +/* + This file is part of libkipi project + Copyright (c) 2005 Laurent Montel <montel@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _LIBKIPI_EXPORT_H +#define _LIBKIPI_EXPORT_H + +#undef KDEMACROS_USABLE + +#ifdef KDEMACROS_USABLE +#include <kdemacros.h> +#endif + +#ifdef KDE_EXPORT +#define LIBKIPI_EXPORT KDE_EXPORT +#else +#define LIBKIPI_EXPORT +#endif + +#endif /* _LIBKIPI_EXPORT_H */ + diff --git a/libkipi/libkipi/mainpage.cpp b/libkipi/libkipi/mainpage.cpp new file mode 100644 index 0000000..0347fc7 --- /dev/null +++ b/libkipi/libkipi/mainpage.cpp @@ -0,0 +1,100 @@ +/** + \mainpage libkipi reference page. + + This page will tell you both how to develop a new + plugin for KIPI, and how to add KIPI support to a new + application (referred to as host application). + + You can find more information about KIPI at this <a + href="http://extragear.kde.org/apps/kipi">url</a>. + + This documentation has been writen by Renchi Raju, Gilles Caulier, + Jesper K. Pedersen, and Aurelien Gateau. + + <h1>Developing a new Plugin</h1> + The easiest way to start a new plugin, is to copy the hello world + plugin, which you may find in kdeextragear-libs-1/kipi-plugins. Please + also read <a + href="http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html"> + this tutorial</a> which tells in general about developing a plugin + structure for an application, but it also gives some background + information on how plugins are loaded, and especially on the macros + involved. The tutorial has been written by one of the KIPI authors, so + it matches fairly good the model of KIPI (except the part on merging + GUI's from plugins). + + + + + <h2>General things to do to implement a plugin</h2> + Here is a list of things to do. + <ul> + <li> Create a class that inherits KIPI::Plugin. In the constructor you + must create instances of KAction for your application. The topmost + actions should be given to the Plugin super class using + KIPI::Plugin::addAction(). + <li> As described in the tutorial <a href="http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html#understanding_loading">here</a>, you must call the macro + <tt>K_EXPORT_COMPONENT_FACTORY</tt>. + <li> You also need to create a desktop file, as described <a href="http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html#makefile_am_client">here</a> + </ul> + + + + + + <h2>Retrieving information from the host application</h2> + The above was the required step to build the plugin. The following will + tell you about the functions with which you communicate with the host + application. + + The origin of all your communication with the host application is + \ref KIPI::Interface. You obtain a pointer to this by casting the parent + pointer given to your plugin during construction. + + Selection of images can be obtained using + KIPI::Interface::currentSelection(), KIPI::Interface::currentAlbum() and + KIPI::Interface::allAlbums(). These methods uses KIPI::ImageCollection + to wrap a selection of images. + + Finally to obtain information about individual images, call + KIPI::Interface::info(), which returns a KIPI::ImageInfo, with the + information. + + When developing plugins, you should pay special attention to the fact the different + host applications may have different feature sets they + support. Information about what the host application support can be + obtained from KIPI::Interface::hasFeature(). + + + + + <h2>Utilities for Plugins</h2> + KIPI has a number of utilities useful when developing plugins: + <ul> + <li> use KIPI::ImageCollectionDialog to ask the user for an image. + <li> use KIPI::UploadWidget when the user should specify a directory to + write images into. + <li> KIPI::ThumbnailJob helps you load thumb nails of images. + </ul> + + + + + <h1>Adding KIPI support to a new host application.</h1> + To add KIPI support to your application you must inherit + KIPI::Interface, and give an instance of this class to + KIPI::PluginLoader. See \ref KIPI::PluginLoader for details on loading plugins. + + To be able to create an instance of your subclass of KIPI::Interface, + you must of course implement all the pure virtual method of the super + class, among others this requires you to create and return instances of + KIPI::ImageCollection and KIPI::ImageInfo. The only way you can do so + are by giving the classes a pointer to a subclass of + KIPI::ImageCollectionShared and KIPI::ImageInfoShared. These sub classes + are also your responsibility to implement. + + The reason why things are that complicated, are to solve the problem of + ownership of pointers to the classes in question. The + KIPI::ImageCollectionShared pointer you give to KIPI::ImageCollection + constructor will be the owned by the ImageCollection instance. +*/ diff --git a/libkipi/libkipi/plugin.cpp b/libkipi/libkipi/plugin.cpp new file mode 100644 index 0000000..920a31e --- /dev/null +++ b/libkipi/libkipi/plugin.cpp @@ -0,0 +1,91 @@ +/* ============================================================ + * File : plugin.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// Qt includes. + +#include <qwidget.h> + +// KDE includes. + +#include <kaction.h> +#include <kinstance.h> +#include <kdebug.h> + +// Local includes. + +#include "plugin.h" + + +struct KIPI::Plugin::Private { + QMap<QWidget*, KActionCollection*> m_actionCollection; + KInstance* m_instance; + QMap<QWidget*, KActionPtrList> m_actions; + QWidget* m_defaultWidget; +}; + + +KIPI::Plugin::Plugin( KInstance* instance, QObject *parent, const char* name) + : QObject( parent, name) +{ + d=new Private; + d->m_instance=instance; +} + +KIPI::Plugin::~Plugin() +{ + delete d; +} + +KActionCollection* KIPI::Plugin::actionCollection( QWidget* widget ) +{ + if ( widget == 0 ) + widget = d->m_defaultWidget; + + if (!d->m_actionCollection.contains( widget )) + kdWarning( 51000 ) << "Error in the plugin. The plugin needs to call Plugin::setup( QWidget* ) " + << "as the very first line when overriding the setup method." << endl; + return d->m_actionCollection[widget]; +} + +void KIPI::Plugin::addAction( KAction* action ) +{ + d->m_actions[d->m_defaultWidget].append( action ); +} + +KActionPtrList KIPI::Plugin::actions( QWidget* widget ) +{ + if ( widget == 0 ) + widget = d->m_defaultWidget; + + return d->m_actions[widget]; +} + +void KIPI::Plugin::setup( QWidget* widget ) +{ + d->m_defaultWidget = widget; + d->m_actions.insert( widget, KActionPtrList() ); + QString name = QString( "action collection for %1" ).arg( widget->name() ); + d->m_actionCollection.insert( widget, new KActionCollection( widget, widget, name.latin1(), d->m_instance ) ); +} + + + diff --git a/libkipi/libkipi/plugin.h b/libkipi/libkipi/plugin.h new file mode 100644 index 0000000..f55942c --- /dev/null +++ b/libkipi/libkipi/plugin.h @@ -0,0 +1,76 @@ +/* ============================================================ + * File : plugin.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#ifndef KIPI_PLUGIN_H +#define KIPI_PLUGIN_H + +// Qt includes. + +#include <qobject.h> + +// KDE includes. + +#include <kaction.h> + +// Lib KIPI includes. + +#include "libkipi/interface.h" + +#include "libkipi/libkipi_export.h" + +class KInstance; + +/** @namespace KIPI */ +namespace KIPI +{ + enum Category + { + IMAGESPLUGIN = 0, + EFFECTSPLUGIN, + TOOLSPLUGIN, + IMPORTPLUGIN, + EXPORTPLUGIN, + BATCHPLUGIN, + COLLECTIONSPLUGIN + }; + + class LIBKIPI_EXPORT Plugin : public QObject + { + public: + Plugin( KInstance* instance, QObject *parent, const char* name); + virtual ~Plugin(); + + virtual void setup( QWidget* widget ) = 0; + KActionPtrList actions( QWidget* parent = 0 ); + KActionCollection* actionCollection( QWidget* parent = 0 ); + virtual Category category( KAction* action ) const = 0; + + protected: + void addAction( KAction* action ); + + private: + struct Private; + Private* d; + }; +} + +#endif // KIPI_PLUGIN_H diff --git a/libkipi/libkipi/pluginloader.cpp b/libkipi/libkipi/pluginloader.cpp new file mode 100644 index 0000000..f7f8aa5 --- /dev/null +++ b/libkipi/libkipi/pluginloader.cpp @@ -0,0 +1,388 @@ +/* ============================================================ + * File : pluginloader.cpp + * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu> + * Date : 2004-02-19 + * Description : + * + * Copyright 2004 by Renchi Raju + + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +/** @file pluginloader.cpp */ + +#include <qstringlist.h> + +#include <ktrader.h> +#include <kparts/componentfactory.h> +#include <kdebug.h> +#include <kdialog.h> + +#include "plugin.h" +#include "pluginloader.h" +#include "interface.h" +#include <kconfig.h> +#include <qcheckbox.h> +#include <qlayout.h> + +/** + \author Renchi Raju + \class KIPI::PluginLoader + This is the class that will help host applications to load plugins. + + The host application must create an instance of the plugin loader, and + call the method loadPlugins() to get the plugins loaded. To ensure that + plugins are correctly removed from menus and toolbars when loaded and + unloaded after constructions, the application must connect to either the + signals plug() / unplug() or the signal replug(). These signals are + emitted when a plugin is to be inserted into the menus. + + If your application is using XMLGUI, the easiest way to get the plugins + inserted into the menus is by adding an item in the ui.rc file looking + list this: + <ActionList name="image_actions"/> + + Then plugin plugins into menus could be done with code similiar to this from KimDaBa: + \code + void slotReplug() { + unplugActionList( QString::fromLatin1("file_actions") ); + unplugActionList( QString::fromLatin1("image_actions") ); + unplugActionList( QString::fromLatin1("tool_actions") ); + + QPtrList<KAction> fileActions; + QPtrList<KAction> imageActions; + QPtrList<KAction> toolsActions; + + KIPI::PluginLoader::PluginList list = _pluginLoader->pluginList(); + for( KIPI::PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) { + KIPI::Plugin* plugin = (*it)->plugin; + if ( !plugin || !(*it)->shouldLoad ) + continue; + + plugin->setup( this ); + QPtrList<KAction>* popup = 0; + if ( plugin->category() == KIPI::IMAGESPLUGIN ) + popup = &imageActions; + + else if ( plugin->category() == KIPI::EXPORTPLUGIN || + plugin->category() == KIPI::IMPORTPLUGIN ) + popup = &fileActions; + + else if ( plugin->category() == KIPI::TOOLSPLUGIN ) + popup = &toolsActions; + + if ( popup ) { + KActionPtrList actions = plugin->actions(); + for( KActionPtrList::Iterator it = actions.begin(); it != actions.end(); ++it ) { + popup->append( *it ); + } + } + else { + kdDebug() << "No menu found\n"; + } + plugin->actionCollection()->readShortcutSettings(); + } + + // For this to work I need to pass false as second arg for createGUI + plugActionList( QString::fromLatin1("file_actions"), fileActions ); + plugActionList( QString::fromLatin1("image_actions"), imageActions ); + plugActionList( QString::fromLatin1("tool_actions"), toolsActions ); + } + \endcode + + To configure which plugins should be loaded, simply call + PluginLoader::configWidget(), and insert the widget into your normal + configuration dialog. +*/ +namespace KIPI { + +//--------------------------------------------------------------------- +// +// PluginLoader::Info +// +//--------------------------------------------------------------------- +struct PluginLoader::Info::Private { + QString m_name; + QString m_comment; + QString m_library; + Plugin* m_plugin; + bool m_shouldLoad; +}; + + +PluginLoader::Info::Info(const QString& name, const QString& comment, const QString& library, bool shouldLoad) +{ + d=new Private; + d->m_name=name; + d->m_comment=comment; + d->m_library=library; + d->m_plugin=0; + d->m_shouldLoad=shouldLoad; +} + + +PluginLoader::Info::~Info() +{ + delete d; +} + + +QString PluginLoader::Info::name() const +{ + return d->m_name; +} + + +QString PluginLoader::Info::comment() const +{ + return d->m_comment; +} + + +QString PluginLoader::Info::library() const +{ + return d->m_library; +} + + +Plugin* PluginLoader::Info::plugin() const +{ + return d->m_plugin; +} + + +void PluginLoader::Info::setPlugin(Plugin* plugin) +{ + d->m_plugin=plugin; +} + + +bool PluginLoader::Info::shouldLoad() const +{ + return d->m_shouldLoad; +} + + +void PluginLoader::Info::setShouldLoad(bool value) +{ + d->m_shouldLoad=value; +} + + +//--------------------------------------------------------------------- +// +// PluginLoader +// +//--------------------------------------------------------------------- +static PluginLoader* s_instance = 0; + + +struct PluginLoader::Private +{ + PluginList m_pluginList; + Interface* m_interface; + QStringList m_ignores; +}; + + +PluginLoader::PluginLoader( const QStringList& ignores, Interface* interface ) +{ + Q_ASSERT( s_instance == 0 ); + s_instance = this; + + d=new Private; + d->m_interface = interface; + d->m_ignores = ignores; + + KTrader::OfferList offers = KTrader::self()->query("KIPI/Plugin"); + KConfig* config = KGlobal::config(); + config->setGroup( QString::fromLatin1( "KIPI/EnabledPlugin" ) ); + + KTrader::OfferList::ConstIterator iter; + for(iter = offers.begin(); iter != offers.end(); ++iter) { + + KService::Ptr service = *iter; + QString name = service->name(); + QString comment = service->comment(); + QString library = service->library(); + QStringList reqFeatures = service->property( QString::fromLatin1( "X-KIPI-ReqFeatures" ) ).toStringList(); + + if (library.isEmpty() || name.isEmpty() ) { + kdWarning( 51001 ) << "KIPI::PluginLoader: Plugin had an empty name or library file - this should not happen." << endl; + continue; + } + + if ( d->m_ignores.contains( name ) ) { + kdDebug( 51001 ) << "KIPI::PluginLoader: plugin " << name << " is in the ignore list for host application" << endl; + continue; + } + + bool appHasAllReqFeatures=true; + for( QStringList::Iterator featureIt = reqFeatures.begin(); featureIt != reqFeatures.end(); ++featureIt ) { + if ( !d->m_interface->hasFeature( *featureIt ) ) { + kdDebug( 51001 ) << "Plugin " << name << " was not loaded because the host application is missing\n" + << "the feature " << *featureIt << endl; + appHasAllReqFeatures=false; + break; + } + } + + bool load = config->readBoolEntry( name, true ); + + if (!appHasAllReqFeatures) + continue; + + Info* info = new Info( name, comment, library, load ); + d->m_pluginList.append( info ); + } +} + +PluginLoader::~PluginLoader() +{ + delete d; +} + +void PluginLoader::loadPlugins() +{ + for( PluginList::Iterator it = d->m_pluginList.begin(); it != d->m_pluginList.end(); ++it ) { + loadPlugin( *it ); + } + emit replug(); +} + +void PluginLoader::loadPlugin( Info* info ) +{ + if ( info->plugin() == 0 && info->shouldLoad() ) { + Plugin *plugin = 0; + int error; + plugin = KParts::ComponentFactory + ::createInstanceFromLibrary<Plugin>(info->library().local8Bit().data(), + d->m_interface, 0, QStringList(), &error); + + if (plugin) + kdDebug( 51001 ) << "KIPI::PluginLoader: Loaded plugin " << plugin->name()<< endl; + else + { + kdWarning( 51001 ) << "KIPI::PluginLoader:: createInstanceFromLibrary returned 0 for " + << info->name() + << " (" << info->library() << ")" + << " with error number " + << error << endl; + if (error == KParts::ComponentFactory::ErrNoLibrary) + kdWarning( 51001 ) << "KLibLoader says: " + << KLibLoader::self()->lastErrorMessage() << endl; + } + info->setPlugin(plugin); + } + if ( info->plugin() ) // Do not emit if we had trouble loading the plugin. + emit PluginLoader::instance()->plug( info ); +} + + +const PluginLoader::PluginList& PluginLoader::pluginList() +{ + return d->m_pluginList; +} + +PluginLoader* PluginLoader::instance() +{ + Q_ASSERT( s_instance != 0); + return s_instance; +} + + +//--------------------------------------------------------------------- +// +// ConfigWidget +// +//--------------------------------------------------------------------- +ConfigWidget* PluginLoader::configWidget( QWidget* parent ) +{ + return new ConfigWidget( parent ); +} + + +class PluginCheckBox :public QCheckBox +{ +public: + PluginCheckBox( PluginLoader::Info* info, QWidget* parent ) + : QCheckBox( info->comment(), parent ), info( info ) + { + setChecked( info->shouldLoad() ); + } + PluginLoader::Info* info; +}; + + +struct ConfigWidget::Private +{ + QValueList< PluginCheckBox* > _boxes; +}; + + +ConfigWidget::ConfigWidget( QWidget* parent ) + :QScrollView( parent, "KIPI::PluginLoader::ConfigWidget" ) +{ + d=new Private; + QWidget* top = new QWidget( viewport() ); + addChild( top ); + setResizePolicy( AutoOneFit ); + + QVBoxLayout* lay = new QVBoxLayout( top, KDialog::marginHint(), KDialog::spacingHint() ); + + PluginLoader::PluginList list = PluginLoader::instance()->d->m_pluginList; + for( PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) { + PluginCheckBox* cb = new PluginCheckBox( *it, top ); + lay->addWidget( cb ); + d->_boxes.append( cb ); + } + + lay->addStretch(10); +} + + +ConfigWidget::~ConfigWidget() +{ + delete d; +} + + +void ConfigWidget::apply() +{ + KConfig* config = KGlobal::config(); + config->setGroup( QString::fromLatin1( "KIPI/EnabledPlugin" ) ); + bool changes = false; + + for( QValueList<PluginCheckBox*>::Iterator it = d->_boxes.begin(); it != d->_boxes.end(); ++it ) { + bool orig = (*it)->info->shouldLoad(); + bool load = (*it)->isChecked(); + if ( orig != load ) { + changes = true; + config->writeEntry( (*it)->info->name(), load ); + (*it)->info->setShouldLoad(load); + if ( load ) { + PluginLoader::instance()->loadPlugin( (*it)->info); + } + else { + if ( (*it)->info->plugin() ) // Do not emit if we had trouble loading plugin. + emit PluginLoader::instance()->unplug( (*it)->info); + } + } + } + emit PluginLoader::instance()->replug(); +} + + +} // namespace + +#include "pluginloader.moc" diff --git a/libkipi/libkipi/pluginloader.h b/libkipi/libkipi/pluginloader.h new file mode 100644 index 0000000..28455ca --- /dev/null +++ b/libkipi/libkipi/pluginloader.h @@ -0,0 +1,102 @@ +/* ============================================================ + * File : pluginloader.h + * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu> + * Date : 2004-02-19 + * Description : + * + * Copyright 2004 by Renchi Raju + + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +#ifndef KIPI_PLUGINLOADER_H +#define KIPI_PLUGINLOADER_H + +#include "libkipi/interface.h" +#include "libkipi/libkipi_export.h" +#include <qwidget.h> +#include <qscrollview.h> + + +namespace KIPI +{ + class Plugin; + class Interface; + class ConfigWidget; + + class LIBKIPI_EXPORT PluginLoader :public QObject + { + Q_OBJECT + public: + class LIBKIPI_EXPORT Info + { + public: + Info( const QString& name, const QString& comment, const QString& library, bool shouldLoad ); + ~Info(); + QString name() const; + + QString comment() const; + + QString library() const; + + Plugin* plugin() const; + void setPlugin(Plugin*); + + bool shouldLoad() const; + void setShouldLoad(bool); + + private: + struct Private; + Private* d; + }; + + PluginLoader( const QStringList& ignores, Interface* interface ); + virtual ~PluginLoader(); + void loadPlugins(); + static PluginLoader* instance(); + ConfigWidget* configWidget( QWidget* parent ); + + typedef QValueList<Info*> PluginList; + + const PluginList& pluginList(); + + void loadPlugin( Info* ); + + signals: + void plug( KIPI::PluginLoader::Info* ); + void unplug( KIPI::PluginLoader::Info* ); + void replug(); + + private: + friend class ConfigWidget; + friend class PluginCheckBox; + + struct Private; + Private* d; + }; + + class LIBKIPI_EXPORT ConfigWidget :public QScrollView + { + Q_OBJECT + public: + ConfigWidget( QWidget* parent ); + ~ConfigWidget(); + public slots: + void apply(); + private: + struct Private; + Private* d; + }; +} + +#endif /* PLUGINLOADER_H */ diff --git a/libkipi/libkipi/uploadwidget.cpp b/libkipi/libkipi/uploadwidget.cpp new file mode 100644 index 0000000..80e0a5c --- /dev/null +++ b/libkipi/libkipi/uploadwidget.cpp @@ -0,0 +1,209 @@ +/* ============================================================ + * File : uploadwidget.cpp + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + +// Qt includes. + +#include <qlayout.h> +#include <qheader.h> +#include <qlistview.h> +#include <qdir.h> + +// KDE includes + +#include <kdebug.h> +#include <klocale.h> +#include <kio/jobclasses.h> +#include <kmessagebox.h> + +#include <kdeversion.h> +#if KDE_VERSION >= 0x30200 +#include <kinputdialog.h> +#else +#include <klineeditdlg.h> +#define KInputDialog KLineEditDlg +#endif + +// Local includes. + +#include "uploadwidget.h" +#include "libkipi/imagecollection.h" + + +struct KIPI::UploadWidget::Private +{ + KFileTreeView* m_treeView; + KFileTreeBranch* m_branch; + QStringList m_pendingPath; +}; + + +/*! + \class KIPI::UploadWidget + This widget is used to specify an upload directory for new images. +*/ + +KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, const char* name ) + : QWidget( parent, name ) +{ + d = new Private; + + QVBoxLayout* layout = new QVBoxLayout( this, 0 ); + d->m_treeView = new KFileTreeView( this ); + d->m_treeView->setRootIsDecorated( true ); + layout->addWidget( d->m_treeView ); + + // Fetch the current album, so we can start out there. + KIPI::ImageCollection album = interface->currentAlbum(); + + // If no current album selected, get the first album in the list. + if ( !album.isValid() || !album.isDirectory() ) + album = interface->allAlbums().first(); + + d->m_branch = d->m_treeView->addBranch( QDir::cleanDirPath(album.uploadRoot().path()), + album.uploadRootName() ); + d->m_treeView->setDirOnlyMode( d->m_branch, true ); + + d->m_treeView->addColumn( i18n("Folder" ) ); + + d->m_treeView->header()->setStretchEnabled( true, 0 ); + d->m_treeView->header()->hide(); + + QString root = album.uploadRoot().path(); + QString uploadPath = album.isDirectory() ? album.uploadPath().path() : root; + + root = QDir::cleanDirPath(root); + uploadPath = QDir::cleanDirPath(uploadPath); + + if ( !uploadPath.startsWith( root ) ) + { + kdWarning(51000) << "Error in Host application: uploadPath() should start with uploadRoot()." << endl + << "uploadPath() = " << album.uploadPath().prettyURL() << endl + << "uploadRoot() = " << album.uploadRoot().prettyURL() << endl; + } + else + { + uploadPath = uploadPath.mid( root.length() ); + + d->m_pendingPath = QStringList::split( "/", uploadPath, false ); + + connect( d->m_branch, SIGNAL( populateFinished(KFileTreeViewItem *) ), + this, SLOT( slotPopulateFinished(KFileTreeViewItem *) ) ); + + d->m_branch->setOpen(true); + } + + connect( d->m_treeView, SIGNAL( executed(QListViewItem *) ), + this, SLOT( slotFolderSelected(QListViewItem *) ) ); +} + +KIPI::UploadWidget::~UploadWidget() +{ + delete d; +} + +KURL KIPI::UploadWidget::path() const +{ + return d->m_treeView->currentURL(); +} + +void KIPI::UploadWidget::load( ) +{ + kdWarning() << "KIPI::UploadWidget::load(): This method is obsolete\n"; +} + +void KIPI::UploadWidget::slotPopulateFinished( KFileTreeViewItem * parentItem ) +{ + if ( d->m_pendingPath.isEmpty() ) + { + disconnect( d->m_branch, SIGNAL( populateFinished(KFileTreeViewItem *) ), + this, SLOT( slotPopulateFinished(KFileTreeViewItem *) ) ); + return; + } + + QString itemName = d->m_pendingPath.front(); + + d->m_pendingPath.pop_front(); + + QListViewItem * item; + for ( item = parentItem->firstChild(); item; item = item->nextSibling() ) + { + if ( item->text(0) == itemName ) + { + break; + } + } + + if ( !item ) + { + kdDebug( 51000 ) << "Unable to open " << itemName << endl; + } + else + { + item->setOpen( true ); + d->m_treeView->setSelected( item, true ); + d->m_treeView->ensureItemVisible ( item ); + + KFileTreeViewItem * ftvItem = static_cast<KFileTreeViewItem *>( item ); + if ( ftvItem->alreadyListed() ) + slotPopulateFinished( ftvItem ); + } + +} + +void KIPI::UploadWidget::mkdir() +{ + if ( !path().isValid() ) + { + KMessageBox::error( this, i18n("Please select a directory first.") ); + return; + } + + bool ok; + QString dir = KInputDialog::getText( i18n("Create Directory"), + i18n("<qt>Enter new directory name (to be created as subdir of %1):</qt>") + .arg(path().prettyURL()), "", &ok, this); + + if (!ok) return; + + KURL url = path(); + url.addPath( dir ); + + KIO::SimpleJob* job = KIO::mkdir(url); + + connect(job, SIGNAL(result(KIO::Job*)), + this, SLOT(slotAlbumCreated(KIO::Job*))); +} + +void KIPI::UploadWidget::slotAlbumCreated(KIO::Job* job) +{ + int code = job->error(); + + if ( code ) + job->showErrorDialog( this ); +} + +void KIPI::UploadWidget::slotFolderSelected(QListViewItem *) +{ + emit folderItemSelected(d->m_treeView->currentURL()); +} + +#include "uploadwidget.moc" diff --git a/libkipi/libkipi/uploadwidget.h b/libkipi/libkipi/uploadwidget.h new file mode 100644 index 0000000..3c8dacc --- /dev/null +++ b/libkipi/libkipi/uploadwidget.h @@ -0,0 +1,75 @@ +/* ============================================================ + * File : uploadwidget.h + * Authors: KIPI team developers (see AUTHORS files for details) + * + * Date : 2004-02-19 + * Description : + * + * Copyright 2004 by the KIPI team + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU Library General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * ============================================================ */ + + +#ifndef KIPI_UPLOADWIDGET_H +#define KIPI_UPLOADWIDGET_H + +// Qt includes. + +#include <qwidget.h> + +// KDE includes. + +#include <kfiletreeview.h> +#include <kurl.h> + +// LibKIPI includes. + +#include "libkipi/interface.h" +#include "libkipi/libkipi_export.h" + +class QListViewItem; + +namespace KIPI +{ + class LIBKIPI_EXPORT UploadWidget :public QWidget + { + Q_OBJECT + + public: + UploadWidget( KIPI::Interface* interface, QWidget* parent, const char* name = 0 ); + ~UploadWidget(); + KURL path() const; + + public slots: + void mkdir(); + + signals : + void folderItemSelected(const KURL &url); + + protected slots: + void load(); + void slotAlbumCreated(KIO::Job* job); + void slotFolderSelected(QListViewItem *); + + private slots: + void slotPopulateFinished(KFileTreeViewItem *); + + private: + struct Private; + Private* d; + }; +} + +#endif /* KIPI_UPLOADWIDGET_H */ + diff --git a/libkipi/libkipi/version.h b/libkipi/libkipi/version.h new file mode 100644 index 0000000..0c23b5f --- /dev/null +++ b/libkipi/libkipi/version.h @@ -0,0 +1,31 @@ +/* ============================================================ + * File : version.h + * Authors: Gilles Caulier <caulier dot gilles at free.fr> + * Date : 2004-09-09 + * Description : KIPI release ID header. + * + * Copyright 2004 by Gilles Caulier + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ============================================================ */ + + +#ifndef KIPI_VERSION_H +#define KIPI_VERSION_H + +static const char kipi_version[] = "0.1.5"; + +#define KIPI_VERSION 0x000105 + +#endif // KIPI_VERSION_H + diff --git a/libkipi/pics/kipi-icon.svg b/libkipi/pics/kipi-icon.svg new file mode 100644 index 0000000..a70505a --- /dev/null +++ b/libkipi/pics/kipi-icon.svg @@ -0,0 +1,637 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="128" + id="svg20305" + inkscape:export-filename="/tmp/a/32x32.png" + inkscape:export-xdpi="22.5" + inkscape:export-ydpi="22.5" + inkscape:version="0.44.1" + sodipodi:docbase="/home/wally/KDE/src/libs/libkipi/pics" + sodipodi:docname="kipi-icon.svg" + sodipodi:version="0.32" + width="128" + version="1.0"> + <metadata + id="metadata1983"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:title>KIPI icon</dc:title> + <dc:description /> + <dc:subject> + <rdf:Bag /> + </dc:subject> + <dc:publisher> + <cc:Agent + rdf:about="http://www.openclipart.org/"> + <dc:title /> + </cc:Agent> + </dc:publisher> + <dc:creator> + <cc:Agent> + <dc:title>Valerio Fuoglio</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title></dc:title> + </cc:Agent> + </dc:rights> + <dc:date /> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.5/" /> + <dc:language /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/"> + <cc:permits + rdf:resource="http://web.resource.org/cc/Reproduction" /> + <cc:permits + rdf:resource="http://web.resource.org/cc/Distribution" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/Notice" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/Attribution" /> + <cc:prohibits + rdf:resource="http://web.resource.org/cc/CommercialUse" /> + <cc:permits + rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <defs + id="defs20307"> + <linearGradient + id="linearGradient610"> + <stop + style="stop-color:#a89f9f;stop-opacity:1;" + offset="0" + id="stop611" /> + <stop + style="stop-color:#696969;stop-opacity:1;" + offset="1" + id="stop612" /> + </linearGradient> + <linearGradient + id="linearGradient616"> + <stop + style="stop-color:#deff12;stop-opacity:1;" + offset="0" + id="stop617" /> + <stop + style="stop-color:#efaa00;stop-opacity:1;" + offset="1" + id="stop618" /> + </linearGradient> + <linearGradient + id="linearGradient3532"> + <stop + id="stop3533" + offset="0.0000000" + style="stop-color:#000000;stop-opacity:0.48677248;" /> + <stop + id="stop3534" + offset="0.50000000" + style="stop-color:#000000;stop-opacity:0.079096042;" /> + <stop + id="stop3535" + offset="1.0000000" + style="stop-color:#000000;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient21044"> + <stop + id="stop21045" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:0.0000000;" /> + <stop + id="stop21046" + offset="1.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient21036"> + <stop + id="stop21037" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:0.0000000;" /> + <stop + id="stop21038" + offset="1.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient21012"> + <stop + id="stop21013" + offset="0.0000000" + style="stop-color:#000000;stop-opacity:1.0000000;" /> + <stop + id="stop21014" + offset="1.0000000" + style="stop-color:#000000;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient20962"> + <stop + id="stop20963" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:0.0000000;" /> + <stop + id="stop20964" + offset="1.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient20965" + inkscape:collect="always" + x1="55.498672" + x2="31.814259" + xlink:href="#linearGradient21044" + y1="51.981258" + y2="24.857855" + gradientTransform="scale(0.989192,1.010926)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + id="radialGradient21017" + inkscape:collect="always" + xlink:href="#linearGradient21012" + gradientTransform="scale(1.115263,0.896649)" + cx="124.12419" + cy="198.78021" + fx="124.12419" + fy="198.78021" + r="67.5401" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient21035" + inkscape:collect="always" + x1="57.450615" + x2="51.829426" + xlink:href="#linearGradient21036" + y1="22.078526" + y2="17.653362" + gradientTransform="scale(0.948271,1.054551)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + cx="0.5" + cy="0.5" + fx="0.18039216" + fy="0.47916666" + id="radialGradient1502" + r="0.5" + xlink:href="#linearGradient1918" /> + <linearGradient + id="linearGradient1918"> + <stop + id="stop1919" + offset="0.0000000" + style="stop-color:#000000;stop-opacity:0.31638417;" /> + <stop + id="stop1920" + offset="0.50000000" + style="stop-color:#000000;stop-opacity:0.079096042;" /> + <stop + id="stop1921" + offset="1.0000000" + style="stop-color:#000000;stop-opacity:0.0000000;" /> + </linearGradient> + <radialGradient + cx="0.5" + cy="0.5" + fx="0.18039216" + fy="0.47916666" + id="radialGradient2541" + r="0.5" + xlink:href="#linearGradient3532" /> + <linearGradient + id="linearGradient2121" + x1="0.41568628" + x2="0.59607846" + xlink:href="#linearGradient1513" + y1="0.27687296" + y2="0.44299674" /> + <linearGradient + id="linearGradient1513"> + <stop + id="stop1514" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop1515" + offset="1.0000000" + style="stop-color:#ffffff;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient2316" + x1="0.47450981" + x2="0.80392158" + xlink:href="#linearGradient2317" + y1="0.21771218" + y2="0.5202952" /> + <linearGradient + id="linearGradient2317"> + <stop + id="stop2318" + offset="0.0000000" + style="stop-color:#d6d6d6;stop-opacity:1.0000000;" /> + <stop + id="stop2322" + offset="0.25769231" + style="stop-color:#eaeaea;stop-opacity:1.0000000;" /> + <stop + id="stop2320" + offset="0.70594490" + style="stop-color:#919191;stop-opacity:1.0000000;" /> + <stop + id="stop2321" + offset="0.73347497" + style="stop-color:#d2d2d2;stop-opacity:1.0000000;" /> + <stop + id="stop2319" + offset="1.0000000" + style="stop-color:#a6a6a6;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient2315" + x1="0.27843139" + x2="0.4509804" + xlink:href="#linearGradient1513" + y1="-0.063694268" + y2="0.61146498" /> + <linearGradient + id="linearGradient1512" + x1="0.99512196" + x2="0.32682925" + xlink:href="#linearGradient1918" + y1="0.64396286" + y2="0.3003096" /> + <linearGradient + id="linearGradient2224" + x1="-0.14213198" + x2="0.49753696" + xlink:href="#linearGradient1513" + y1="-0.28792569" + y2="0.35603714" /> + <linearGradient + id="linearGradient2138" + x1="1.3783784" + x2="0.58378381" + xlink:href="#linearGradient2122" + y1="0.25386998" + y2="0.13003096" /> + <linearGradient + id="linearGradient2122"> + <stop + id="stop2123" + offset="0.0000000" + style="stop-color:#000000;stop-opacity:0.40784314;" /> + <stop + id="stop2124" + offset="1.0000000" + style="stop-color:#000000;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient2223" + x1="-0.18232045" + x2="0.68508285" + xlink:href="#linearGradient1513" + y1="-0.43962848" + y2="0.42414862" /> + <linearGradient + id="linearGradient1516" + x1="0.45882353" + x2="0.6901961" + xlink:href="#linearGradient2122" + y1="1.2772278" + y2="-0.2970297" /> + <linearGradient + id="linearGradient2314" + x1="-0.4509804" + x2="0.47058824" + xlink:href="#linearGradient1513" + y1="-0.15053764" + y2="0.36559141" /> + <linearGradient + id="linearGradient2313" + x1="-0.0078431377" + x2="0.59607846" + xlink:href="#linearGradient1513" + y1="-1.244898" + y2="0.3605442" /> + <linearGradient + id="linearGradient2312" + x1="0.45882353" + x2="0.65490198" + xlink:href="#linearGradient1513" + y1="-0.58685446" + y2="0.45070422" /> + <linearGradient + id="linearGradient2222" + x1="-0.10588235" + x2="0.58431375" + xlink:href="#linearGradient1513" + y1="-0.10497238" + y2="0.55248618" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient21036" + id="linearGradient2072" + x1="31.343283" + y1="60.651524" + x2="25.262003" + y2="55.864162" + gradientTransform="scale(0.902087,1.108541)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient21036" + id="linearGradient2074" + x1="50.463959" + y1="59.3046" + x2="44.333637" + y2="54.478634" + gradientTransform="scale(0.926563,1.079257)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient21036" + id="linearGradient2076" + x1="57.88905" + y1="52.688183" + x2="51.929722" + y2="47.99683" + gradientTransform="scale(1.005313,0.994715)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient21036" + id="linearGradient2078" + x1="64.260979" + y1="37.175373" + x2="58.719795" + y2="32.81319" + gradientTransform="scale(0.975987,1.024604)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient616" + id="linearGradient3098" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.474979,0.677976)" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient616" + id="linearGradient3100" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.474979,0.677976)" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient610" + id="linearGradient3102" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.156977,0,0,0.151837,98.48398,-6.931272)" + x1="183.59398" + y1="246.02464" + x2="368.13855" + y2="435.15115" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient616" + id="linearGradient3136" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.474979,0.677976)" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient616" + id="linearGradient3138" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.474979,0.677976)" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient610" + id="linearGradient3140" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.156977,0,0,0.151837,98.48398,-6.931272)" + x1="183.59398" + y1="246.02464" + x2="368.13855" + y2="435.15115" /> + </defs> + <sodipodi:namedview + bordercolor="#666666" + borderopacity="1.0" + id="base" + inkscape:cx="69.507751" + inkscape:cy="72.501038" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:window-height="721" + inkscape:window-width="1264" + inkscape:window-x="8" + inkscape:window-y="24" + inkscape:zoom="4" + pagecolor="#ffffff" + width="128px" + height="128px" + inkscape:current-layer="layer2" /> + <g + id="g21200" + transform="matrix(1.720376,0,0,1.612464,-7.805174,-11.32108)"> + <path + d="M 80.038306,139.98171 A 75.326637,60.566689 0 1 1 79.600141,140.41828 L 138.43814,178.23611 z" + id="path21016" + sodipodi:cx="138.43814" + sodipodi:cy="178.23611" + sodipodi:end="10.099141" + sodipodi:rx="75.326637" + sodipodi:ry="60.566689" + sodipodi:start="3.8252181" + sodipodi:type="arc" + style="fill:url(#radialGradient21017);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.476914,0,0,0.267047,-23.63522,21.65749)" /> + <path + d="M 56.964452,9.6436025 C 52.703192,6.7734207 45.987673,6.4848753 43.087575,10.980078 C 39.455492,16.782437 39.651089,24.597615 34.788703,29.670482 C 28.819708,36.547896 19.661454,39.992573 14.662947,47.835307 C 11.22661,52.53752 8.856009,59.176396 11.790275,65.010658 C 15.024885,71.357938 21.806185,74.634411 28.0092,77.156007 C 37.565721,80.699173 48.649966,79.273378 56.243983,72.95514 C 66.568849,65.055233 73.162354,52.530821 74.222673,39.263848 C 74.440095,32.31612 72.524065,25.071249 68.406436,19.230786 C 65.15022,15.430234 61.352312,12.02286 56.964452,9.6436025 z " + id="path20328" + style="fill:#e6c5a2;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.08800097pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + d="M 61.390968,12.647344 C 59.908904,11.499452 58.344782,10.463499 56.699338,9.5712772 C 52.438078,6.7010954 45.723193,6.412567 42.823095,10.907764 C 39.191023,16.710123 39.388771,24.525891 34.52639,29.598759 C 28.557392,36.476174 19.397455,39.921037 14.398951,47.763772 C 10.962617,52.465984 8.589355,59.10399 11.523621,64.938254 C 14.758231,71.285532 21.541332,74.561547 27.744339,77.083142 C 37.30086,80.626308 48.385953,79.201451 55.979959,72.883212 C 66.304824,64.983311 72.898196,52.45949 73.958528,39.192517 C 74.17595,32.244788 72.258137,24.998486 68.140507,19.158018 C 66.105369,16.782675 63.861084,14.560501 61.390968,12.647344 z M 60.03341,13.531356 C 61.973797,15.025379 63.809914,16.658446 65.458714,18.482135 C 69.690122,23.472711 71.752137,30.029989 71.862694,36.377711 C 71.662426,48.405007 66.132505,59.797732 57.585212,67.662677 C 52.041002,73.407166 43.78389,76.344263 35.639863,75.417421 C 30.808905,74.790676 26.126266,72.910002 21.865631,70.415834 C 18.092196,68.213477 14.353363,64.900531 13.446526,60.43771 C 12.721209,55.81984 14.734521,51.396059 17.344008,47.882888 C 22.616578,40.840362 30.83202,36.958831 36.729091,30.548811 C 40.525823,26.511744 41.641072,20.815239 43.565314,15.723052 C 44.411499,13.276481 45.436005,10.41926 48.090865,9.526032 C 51.489628,8.360668 55.161953,10.092248 58.057796,12.081048 C 58.724784,12.549882 59.386616,13.033346 60.03341,13.531356 z " + id="path21001" + style="fill:#ae7172;fill-opacity:0.29375;fill-rule:evenodd;stroke:none;stroke-width:1.08800097pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + d="M 59.792029,13.407478 C 57.022986,11.126228 53.757988,9.1117056 50.1577,9.0660911 C 47.618511,8.9293384 45.100473,10.161181 43.93158,12.415163 C 41.607985,15.974614 40.809885,20.31841 38.901622,24.107275 C 36.926682,28.526629 33.671953,32.197742 29.909511,35.125255 C 24.775734,39.632281 19.193393,43.783926 15.163162,49.395895 C 12.902943,52.847696 11.759045,57.251243 12.635823,61.485157 C 13.435637,64.81753 15.877286,67.529146 18.559111,69.56834 C 20.762463,68.105464 22.293328,65.870397 24.194306,64.074004 C 30.780676,57.107752 38.139514,50.854043 46.348819,45.868036 C 54.235255,40.898272 62.790113,37.031037 71.552135,33.757244 C 70.745571,25.811718 66.404038,18.127162 59.792029,13.407478 z " + id="path20961" + style="fill:url(#linearGradient20965);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.08800097pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + d="M 52.219162,17.613379 C 62.648396,16.766988 63.187839,24.892353 57.074149,27.262252 C 44.666955,28.277926 45.026584,20.321837 52.219162,17.613379 z " + id="path21018" + sodipodi:nodetypes="ccc" + style="fill:#ffb300;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 52.276081,17.708296 C 45.083503,20.416759 44.731404,28.381166 57.138604,27.365493 C 63.252289,24.9956 62.705309,16.861899 52.276081,17.708296 z M 54.466071,18.20526 C 56.899161,18.000501 60.804697,20.004472 59.538937,23.107733 C 57.69706,27.441449 52.378385,26.184117 49.071512,24.907547 C 46.173802,22.482652 49.540608,18.685031 52.164722,18.272415 C 52.930762,18.273358 53.702372,18.132992 54.466071,18.20526 z " + id="path21019" + style="fill:black;fill-opacity:0.21874994;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 60.226117,32.125462 C 70.807408,31.314804 71.354717,39.097061 65.151892,41.36689 C 52.563811,42.339676 52.928681,34.719548 60.226117,32.125462 z " + id="path21026" + sodipodi:nodetypes="ccc" + style="fill:#ff8000;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 60.283867,32.216368 C 52.986424,34.810453 52.629199,42.438559 65.217281,41.465778 C 71.4201,39.195948 70.865151,31.405715 60.283867,32.216368 z M 62.505785,32.692342 C 64.974349,32.496231 68.93682,34.415581 67.652608,37.387799 C 65.783884,41.538518 60.387665,40.334284 57.032575,39.111612 C 54.09262,36.789117 57.50851,33.151858 60.170888,32.756662 C 60.948092,32.757571 61.730957,32.623132 62.505785,32.692342 z " + id="path21027" + style="fill:black;fill-opacity:0.21874994;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 55.349068,46.446177 C 67.070754,45.599786 67.677051,53.725145 60.805723,56.09505 C 46.860948,57.110718 47.265144,49.154635 55.349068,46.446177 z " + id="path21028" + sodipodi:nodetypes="ccc" + style="fill:#ff3a00;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 55.413039,46.541094 C 47.329109,49.249552 46.933384,57.213964 60.878159,56.198291 C 67.749487,53.828392 67.13473,45.694702 55.413039,46.541094 z M 57.874424,47.038058 C 60.609048,46.833293 64.998573,48.83727 63.575954,51.940525 C 61.505821,56.274241 55.528023,55.01691 51.811339,53.740339 C 48.554529,51.315445 52.338569,47.517829 55.287882,47.105214 C 56.148852,47.106163 57.016089,46.96579 57.874424,47.038058 z " + id="path21029" + style="fill:black;fill-opacity:0.21874994;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 43.927053,57.270954 C 55.040533,56.326271 55.615365,65.395184 49.100569,68.040287 C 35.879362,69.1739 36.26259,60.293923 43.927053,57.270954 z " + id="path21030" + sodipodi:nodetypes="ccc" + style="fill:#23b300;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 43.987697,57.376888 C 36.323233,60.399863 35.948037,69.28913 49.169251,68.155517 C 55.684047,65.510413 55.101177,56.43221 43.987697,57.376888 z M 46.321372,57.931564 C 48.914094,57.703026 53.075864,59.939706 51.727058,63.403325 C 49.764344,68.240285 44.096726,66.83695 40.572893,65.412144 C 37.485068,62.705659 41.072763,58.467046 43.86904,58.00652 C 44.685338,58.007577 45.507575,57.850909 46.321372,57.931564 z " + id="path21031" + style="fill:black;fill-opacity:0.21874994;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 25.812991,60.121426 C 36.546335,59.158872 37.101503,68.399334 30.809549,71.094478 C 18.040567,72.249535 18.410684,63.201577 25.812991,60.121426 z " + id="path21032" + sodipodi:nodetypes="ccc" + style="fill:#0002ff;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 25.871566,60.229365 C 18.469258,63.309523 18.106895,72.366941 30.875878,71.211883 C 37.167838,68.516751 36.604903,59.266812 25.871566,60.229365 z M 28.125416,60.794529 C 30.629453,60.561673 34.648869,62.840661 33.346201,66.3698 C 31.45062,71.298255 25.976857,69.86838 22.573555,68.416613 C 19.591354,65.658933 23.056329,61.340148 25.756962,60.870901 C 26.545337,60.87198 27.339452,60.712346 28.125416,60.794529 z " + id="path21033" + style="fill:black;fill-opacity:0.21874994;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 23.897359,62.344055 C 21.725291,63.62579 20.442819,67.828504 23.38916,69.024187 C 27.718971,70.147448 28.88379,66.207597 28.099692,61.123769 C 26.51485,60.7902 25.254904,61.410889 23.897359,62.344055 z " + id="path21034" + sodipodi:nodetypes="cccc" + style="fill:url(#linearGradient2072);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 42.226034,59.205072 C 39.977037,60.463018 38.649146,64.587701 41.699836,65.761191 C 46.182993,66.863593 47.389066,62.996886 46.577196,58.007441 C 44.936227,57.68007 43.63166,58.289236 42.226034,59.205072 z " + id="path21040" + sodipodi:nodetypes="cccc" + style="fill:url(#linearGradient2074);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 53.416597,48.109256 C 51.04452,49.236324 49.643951,52.931874 52.861596,53.983259 C 57.590108,54.970971 58.862187,51.506562 58.005889,47.036229 C 56.275109,46.742916 54.899146,47.2887 53.416597,48.109256 z " + id="path21041" + sodipodi:nodetypes="cccc" + style="fill:url(#linearGradient2076);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 58.4029,33.971158 C 56.261599,35.050628 54.997299,38.59013 57.9019,39.597128 C 62.170375,40.543129 63.318688,37.225007 62.545699,32.943444 C 60.983312,32.662519 59.741211,33.18525 58.4029,33.971158 z " + id="path21042" + sodipodi:nodetypes="cccc" + style="fill:url(#linearGradient2078);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + <path + d="M 50.225748,18.982481 C 48.115222,20.109543 46.86909,23.805093 49.731949,24.856489 C 53.939083,25.844196 55.070898,22.379786 54.309016,17.909454 C 52.769077,17.616141 51.544828,18.16193 50.225748,18.982481 z " + id="path21043" + sodipodi:nodetypes="cccc" + style="fill:url(#linearGradient21035);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.89375" /> + </g> + <g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="plug" /> + <g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="K"> + <g + id="g3122"> + <g + transform="matrix(-1.119977,0,0,1.119977,91.5323,-2.95296)" + id="g3089"> + <g + id="g654" + transform="matrix(-0.17971,0,0,0.11319,112.938,24.0727)"> + <path + style="font-size:12px;fill:url(#linearGradient3136);fill-rule:evenodd;stroke:#da6d00;stroke-width:8.94388962" + d="M 445.8627,250.6016 C 445.5426,249.6783 553.5527,247.8569 554.3144,250.4038 C 576.618,262.7523 575.1416,299.3077 556.3294,313.6764 C 547.1875,313.427 447.4558,315.5964 442.5106,314.1833 C 397.3899,299.9316 422.9359,254.3613 445.8627,250.6016 z " + id="path655" + sodipodi:nodetypes="ccccc" + sodipodi:stroke-cmyk="(0 0.5 1 0.1466)" /> + <path + style="font-size:12px;fill-opacity:0.45;fill-rule:evenodd" + d="M 457.1213,245.6608 L 457.1213,318.0827 L 488.5497,318.0827 C 483.0839,298.0414 481.7175,265.7021 488.5497,245.6608 L 457.1213,245.6608 z " + id="path656" + sodipodi:nodetypes="ccccc" /> + </g> + <g + id="g651" + transform="matrix(-0.17971,0,0,0.11319,112.938,6.172162)"> + <path + style="font-size:12px;fill:url(#linearGradient3138);fill-rule:evenodd;stroke:#da6d00;stroke-width:8.94388962" + d="M 445.8627,250.6016 C 445.5426,249.6783 553.5527,247.8569 554.3144,250.4038 C 576.618,262.7523 575.1416,299.3077 556.3294,313.6764 C 547.1875,313.427 447.4558,315.5964 442.5106,314.1833 C 397.3899,299.9316 422.9359,254.3613 445.8627,250.6016 z " + id="path607" + sodipodi:nodetypes="ccccc" + sodipodi:stroke-cmyk="(0 0.5 1 0.1466)" /> + <path + style="font-size:12px;fill-opacity:0.45;fill-rule:evenodd" + d="M 457.1213,245.6608 L 457.1213,318.0827 L 488.5497,318.0827 C 483.0839,298.0414 481.7175,265.7021 488.5497,245.6608 L 457.1213,245.6608 z " + id="path648" + sodipodi:nodetypes="ccccc" /> + </g> + <path + style="font-size:12px;fill:url(#linearGradient3140);fill-rule:evenodd;stroke:#545454;stroke-width:1.47967303;stroke-opacity:1" + d="M 30.323257,25.354528 L 61.406971,25.352537 C 71.639815,25.351873 74.306308,50.375323 74.068819,59.906907 C 73.950976,64.635913 68.267666,67.65884 63.190828,67.630976 L 30.657763,67.452425 L 30.323257,25.354528 z " + id="path606" + sodipodi:nodetypes="cssscc" /> + </g> + <g + transform="matrix(0.275912,0,0,0.275912,10.43846,22.91225)" + id="g3104" + style="fill:white;display:inline"> + <path + clip-rule="evenodd" + d="M 72.216369,26.435215 L 96.316461,24.681094 C 96.316461,39.171655 96.316461,53.58595 96.316461,68.000245 C 105.92599,53.509684 116.60325,39.095389 128.65223,25.138691 L 154.50645,31.697576 C 142.91506,44.586549 131.09275,58.924578 121.63681,73.262607 C 130.71248,88.515829 140.70334,102.47359 154.04991,118.33588 L 129.11195,125.73369 C 115.15525,110.09914 106.76598,95.074714 96.316461,78.906299 L 96.316461,121.84412 L 72.216369,124.89582 L 72.216369,26.435215 L 72.216369,26.435215 z " + id="path1084" + style="fill:white;fill-rule:evenodd" /> + <path + clip-rule="evenodd" + d="M 96.546321,145.56394 C 110.65555,142.58849 107.07104,138.31866 118.58617,145.03008 L 126.0613,150.29137 C 127.43515,150.97778 128.73062,152.19908 130.02714,150.90151 C 132.84899,148.23219 135.59457,145.48766 138.41641,142.81835 C 139.63667,141.52077 138.41641,140.07065 137.80629,139.08025 L 137.72896,139.08025 L 132.31513,131.37844 L 128.72956,132.67603 C 127.81543,133.28616 126.59411,132.98003 125.52744,131.53204 L 117.59577,121.15878 C 110.27422,131.30218 98.452971,137.86106 85.030135,137.86106 C 62.914022,137.86106 44.91522,119.86438 44.91522,97.746146 C 44.91522,82.035328 53.990888,68.383694 67.183865,61.824808 L 67.183865,52.596609 C 66.726269,52.825407 66.269731,52.97794 65.886282,53.130472 C 60.701246,55.265923 60.395122,56.257382 51.929584,51.376351 L 44.456565,46.037724 C 43.082715,45.427595 41.786191,44.131071 40.490727,45.427595 C 37.668881,48.173175 34.923301,50.918755 32.101455,53.664335 C 30.881197,54.884592 32.177721,56.409915 32.711584,57.401374 L 38.429423,65.485582 L 42.625119,71.434338 C 43.235247,72.273266 43.462987,72.349532 43.158981,72.959661 C 42.77871,73.569789 42.472586,74.103652 42.091256,74.713781 C 36.52383,84.323311 40.413401,85.085972 28.515888,88.212883 L 19.440221,89.738205 C 18.06849,90.195802 16.238104,90.195802 16.160778,92.102454 C 16.160778,95.992026 16.084512,99.881595 16.084512,103.77117 C 16.008246,105.5253 17.992224,105.67889 19.136216,105.98289 L 28.823071,107.73701 L 36.068352,109.03459 C 37.059811,109.18818 37.286491,109.03459 37.516348,109.79619 C 40.491786,122.68516 44.380298,119.63557 37.89662,130.8467 L 32.635317,138.39598 C 31.948922,139.69356 30.727605,140.99008 32.025189,142.28555 C 34.770768,145.10739 37.439023,147.8551 40.184603,150.67694 C 41.404861,151.89508 42.930183,150.60067 43.922702,150.06682 L 52.00585,144.34686 L 58.030873,140.22742 C 58.870859,139.54104 58.947125,139.31329 59.557254,139.69356 C 71.606241,147.24496 72.063837,141.82901 75.572078,154.56652 L 77.249933,163.64006 C 77.707529,165.01391 77.783795,166.76804 79.614182,166.84429 C 83.503754,166.84429 87.469592,166.84429 91.359161,166.84429 C 93.113281,166.84429 93.266871,164.86033 93.494611,163.71632 L 95.172471,153.95532 L 96.316461,146.78419 C 96.392731,146.09779 96.392731,145.79062 96.546321,145.56394 z M 111.11315,139.46265 C 111.03688,139.5368 110.95956,139.5368 110.88329,139.5368 C 110.95956,139.5368 110.95956,139.46265 111.03688,139.46265 L 111.11315,139.46265 z M 97.306861,145.25781 C 97.079121,145.33408 96.773001,145.41141 96.545261,145.56394 C 96.696731,145.41034 96.926591,145.33408 97.306861,145.25781 z " + id="path1086" + style="fill:white;fill-rule:evenodd" /> + <path + clip-rule="evenodd" + d="M 85.3352,134.96294 C 97.994321,134.96294 109.12917,128.55553 115.84059,118.79242 L 115.38299,118.03082 C 107.52758,126.72408 98.758041,132.36778 85.258934,132.6739 C 68.480389,132.97791 51.473047,117.95455 51.395721,98.276835 C 51.244248,85.616657 57.11568,77.074853 67.10654,70.973564 L 67.10654,65.634936 C 55.895422,71.965023 48.26987,84.091335 48.26987,97.89656 C 48.26987,118.25854 64.894823,134.96294 85.3352,134.96294 z " + id="path1088" + style="fill:white;fill-rule:evenodd" /> + </g> + </g> + </g> +</svg> diff --git a/libkipi/pics/kipi-logo.svg b/libkipi/pics/kipi-logo.svg new file mode 100644 index 0000000..714b5d0 --- /dev/null +++ b/libkipi/pics/kipi-logo.svg @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="310" + height="190" + id="svg2052" + sodipodi:version="0.32" + inkscape:version="0.44.1" + version="1.0" + sodipodi:docbase="/home/wally/KDE/src/libs/libkipi/pics" + sodipodi:docname="kipi-logo.svg" + inkscape:export-filename="/home/wally/Desktop/kipi-hybrid2.png" + inkscape:export-xdpi="89.419998" + inkscape:export-ydpi="89.419998"> + <defs + id="defs2054"> + <linearGradient + id="linearGradient610"> + <stop + style="stop-color:#a89f9f;stop-opacity:1;" + offset="0" + id="stop611" /> + <stop + style="stop-color:#525252;stop-opacity:1;" + offset="1" + id="stop612" /> + </linearGradient> + <linearGradient + xlink:href="#linearGradient610" + id="linearGradient613" + x1="183.59398" + y1="246.02464" + x2="368.13855" + y2="435.15115" + gradientTransform="scale(1.016784,0.983493)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient616"> + <stop + style="stop-color:#deff12;stop-opacity:1;" + offset="0" + id="stop617" /> + <stop + style="stop-color:#efaa00;stop-opacity:1;" + offset="1" + id="stop618" /> + </linearGradient> + <linearGradient + xlink:href="#linearGradient616" + id="linearGradient619" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" + gradientTransform="scale(1.474979,0.677976)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient610" + id="linearGradient2075" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.016784,0.983493)" + x1="183.59398" + y1="246.02464" + x2="368.13855" + y2="435.15115" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient616" + id="linearGradient2041" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.474979,0.677976)" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient616" + id="linearGradient2043" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.474979,0.677976)" + x1="292.90677" + y1="378.85536" + x2="351.51759" + y2="438.09572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient610" + id="linearGradient2045" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.28107,0,0,0.271867,135.2167,35.29152)" + x1="183.59398" + y1="246.02464" + x2="368.13855" + y2="435.15115" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="black" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="2.8" + inkscape:cx="148.77854" + inkscape:cy="72.624991" + inkscape:document-units="px" + inkscape:current-layer="layer2" + width="310px" + height="190px" + inkscape:window-width="1272" + inkscape:window-height="950" + inkscape:window-x="0" + inkscape:window-y="24" /> + <metadata + id="metadata2057"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>KIPI logo</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Valerio Fuoglio</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title></dc:title> + </cc:Agent> + </dc:rights> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.5/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/"> + <cc:permits + rdf:resource="http://web.resource.org/cc/Reproduction" /> + <cc:permits + rdf:resource="http://web.resource.org/cc/Distribution" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/Notice" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/Attribution" /> + <cc:prohibits + rdf:resource="http://web.resource.org/cc/CommercialUse" /> + <cc:permits + rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:groupmode="layer" + id="layer3" + inkscape:label="plug" + style="display:inline" /> + <g + inkscape:label="Livello 1" + inkscape:groupmode="layer" + id="layer1" + style="display:inline"> + <path + clip-rule="evenodd" + d="M 14.058476,7.6886644 L 296.8922,7.6886644 C 301.86421,7.6886644 305.94453,11.328347 305.94453,15.821082 L 305.94453,172.37821 C 305.94453,176.81329 301.8651,180.45297 296.8922,180.45297 L 14.058476,180.45297 C 9.0864814,180.45297 5.006169,176.81407 5.006169,172.37821 L 5.006169,15.821082 C 5.006169,11.328347 9.0864814,7.6886644 14.058476,7.6886644 z " + id="path2937" + style="fill:#0068c6;fill-rule:evenodd;fill-opacity:1" + sodipodi:nodetypes="ccccccccc" /> + <path + sodipodi:nodetypes="ccccccccc" + style="fill:white;fill-rule:evenodd" + id="path2935" + d="M 16.732988,10.320441 L 293.86055,10.320441 C 298.73224,10.320441 302.73024,13.841711 302.73024,18.188279 L 302.73024,169.65199 C 302.73024,173.94278 298.73312,177.46405 293.86055,177.46405 L 16.732988,177.46405 C 11.861304,177.46405 7.8633118,173.94354 7.8633118,169.65199 L 7.8633118,18.188279 C 7.8633118,13.841711 11.861304,10.320441 16.732988,10.320441 z " + clip-rule="evenodd" /> + <path + clip-rule="evenodd" + d="M 18.954005,12.463298 L 291.99668,12.463298 C 296.79655,12.463298 300.73562,15.89428 300.73562,20.129398 L 300.73562,167.70944 C 300.73562,171.89021 296.79742,175.32119 291.99668,175.32119 L 18.954005,175.32119 C 14.15413,175.32119 10.215069,171.89095 10.215069,167.70944 L 10.215069,20.129398 C 10.215069,15.89428 14.15413,12.463298 18.954005,12.463298 z " + id="path1067" + style="fill:#0068c6;fill-rule:evenodd;fill-opacity:1" + sodipodi:nodetypes="ccccccccc" /> + </g> + <g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="ipi" + style="display:inline"> + <g + id="g2026" + transform="translate(0,-4)"> + <path + style="fill:white;fill-rule:evenodd;display:inline" + id="path1084" + d="M 72.216369,26.435215 L 96.316461,24.681094 C 96.316461,39.171655 96.316461,53.58595 96.316461,68.000245 C 105.92599,53.509684 116.60325,39.095389 128.65223,25.138691 L 154.50645,31.697576 C 142.91506,44.586549 131.09275,58.924578 121.63681,73.262607 C 130.71248,88.515829 140.70334,102.47359 154.04991,118.33588 L 129.11195,125.73369 C 115.15525,110.09914 106.76598,95.074714 96.316461,78.906299 L 96.316461,121.84412 L 72.216369,124.89582 L 72.216369,26.435215 L 72.216369,26.435215 z " + clip-rule="evenodd" /> + <path + style="fill:white;fill-rule:evenodd;display:inline" + id="path1086" + d="M 96.546321,145.56394 C 110.65555,142.58849 107.07104,138.31866 118.58617,145.03008 L 126.0613,150.29137 C 127.43515,150.97778 128.73062,152.19908 130.02714,150.90151 C 132.84899,148.23219 135.59457,145.48766 138.41641,142.81835 C 139.63667,141.52077 138.41641,140.07065 137.80629,139.08025 L 137.72896,139.08025 L 132.31513,131.37844 L 128.72956,132.67603 C 127.81543,133.28616 126.59411,132.98003 125.52744,131.53204 L 117.59577,121.15878 C 110.27422,131.30218 98.452971,137.86106 85.030135,137.86106 C 62.914022,137.86106 44.91522,119.86438 44.91522,97.746146 C 44.91522,82.035328 53.990888,68.383694 67.183865,61.824808 L 67.183865,52.596609 C 66.726269,52.825407 66.269731,52.97794 65.886282,53.130472 C 60.701246,55.265923 60.395122,56.257382 51.929584,51.376351 L 44.456565,46.037724 C 43.082715,45.427595 41.786191,44.131071 40.490727,45.427595 C 37.668881,48.173175 34.923301,50.918755 32.101455,53.664335 C 30.881197,54.884592 32.177721,56.409915 32.711584,57.401374 L 38.429423,65.485582 L 42.625119,71.434338 C 43.235247,72.273266 43.462987,72.349532 43.158981,72.959661 C 42.77871,73.569789 42.472586,74.103652 42.091256,74.713781 C 36.52383,84.323311 40.413401,85.085972 28.515888,88.212883 L 19.440221,89.738205 C 18.06849,90.195802 16.238104,90.195802 16.160778,92.102454 C 16.160778,95.992026 16.084512,99.881595 16.084512,103.77117 C 16.008246,105.5253 17.992224,105.67889 19.136216,105.98289 L 28.823071,107.73701 L 36.068352,109.03459 C 37.059811,109.18818 37.286491,109.03459 37.516348,109.79619 C 40.491786,122.68516 44.380298,119.63557 37.89662,130.8467 L 32.635317,138.39598 C 31.948922,139.69356 30.727605,140.99008 32.025189,142.28555 C 34.770768,145.10739 37.439023,147.8551 40.184603,150.67694 C 41.404861,151.89508 42.930183,150.60067 43.922702,150.06682 L 52.00585,144.34686 L 58.030873,140.22742 C 58.870859,139.54104 58.947125,139.31329 59.557254,139.69356 C 71.606241,147.24496 72.063837,141.82901 75.572078,154.56652 L 77.249933,163.64006 C 77.707529,165.01391 77.783795,166.76804 79.614182,166.84429 C 83.503754,166.84429 87.469592,166.84429 91.359161,166.84429 C 93.113281,166.84429 93.266871,164.86033 93.494611,163.71632 L 95.172471,153.95532 L 96.316461,146.78419 C 96.392731,146.09779 96.392731,145.79062 96.546321,145.56394 z M 111.11315,139.46265 C 111.03688,139.5368 110.95956,139.5368 110.88329,139.5368 C 110.95956,139.5368 110.95956,139.46265 111.03688,139.46265 L 111.11315,139.46265 z M 97.306861,145.25781 C 97.079121,145.33408 96.773001,145.41141 96.545261,145.56394 C 96.696731,145.41034 96.926591,145.33408 97.306861,145.25781 z " + clip-rule="evenodd" /> + <path + style="fill:white;fill-rule:evenodd;display:inline" + id="path1088" + d="M 85.3352,134.96294 C 97.994321,134.96294 109.12917,128.55553 115.84059,118.79242 L 115.38299,118.03082 C 107.52758,126.72408 98.758041,132.36778 85.258934,132.6739 C 68.480389,132.97791 51.473047,117.95455 51.395721,98.276835 C 51.244248,85.616657 57.11568,77.074853 67.10654,70.973564 L 67.10654,65.634936 C 55.895422,71.965023 48.26987,84.091335 48.26987,97.89656 C 48.26987,118.25854 64.894823,134.96294 85.3352,134.96294 z " + clip-rule="evenodd" /> + <g + id="g2006" + style="display:inline"> + <g + id="g654" + transform="matrix(0.321775,0,0,0.202669,109.3365,90.80475)"> + <path + style="font-size:12px;fill:url(#linearGradient2041);fill-rule:evenodd;stroke:#da6d00;stroke-width:8.94388962" + d="M 445.8627,250.6016 C 445.5426,249.6783 553.5527,247.8569 554.3144,250.4038 C 576.618,262.7523 575.1416,299.3077 556.3294,313.6764 C 547.1875,313.427 447.4558,315.5964 442.5106,314.1833 C 397.3899,299.9316 422.9359,254.3613 445.8627,250.6016 z " + id="path655" + sodipodi:nodetypes="ccccc" + sodipodi:stroke-cmyk="(0 0.5 1 0.1466)" /> + <path + style="font-size:12px;fill-opacity:0.45;fill-rule:evenodd" + d="M 457.1213,245.6608 L 457.1213,318.0827 L 488.5497,318.0827 C 483.0839,298.0414 481.7175,265.7021 488.5497,245.6608 L 457.1213,245.6608 z " + id="path656" + sodipodi:nodetypes="ccccc" /> + </g> + <g + id="g651" + transform="matrix(0.321775,0,0,0.202669,109.3365,58.75348)"> + <path + style="font-size:12px;fill:url(#linearGradient2043);fill-rule:evenodd;stroke:#da6d00;stroke-width:8.94388962" + d="M 445.8627,250.6016 C 445.5426,249.6783 553.5527,247.8569 554.3144,250.4038 C 576.618,262.7523 575.1416,299.3077 556.3294,313.6764 C 547.1875,313.427 447.4558,315.5964 442.5106,314.1833 C 397.3899,299.9316 422.9359,254.3613 445.8627,250.6016 z " + id="path607" + sodipodi:nodetypes="ccccc" + sodipodi:stroke-cmyk="(0 0.5 1 0.1466)" /> + <path + style="font-size:12px;fill-opacity:0.45;fill-rule:evenodd" + d="M 457.1213,245.6608 L 457.1213,318.0827 L 488.5497,318.0827 C 483.0839,298.0414 481.7175,265.7021 488.5497,245.6608 L 457.1213,245.6608 z " + id="path648" + sodipodi:nodetypes="ccccc" /> + </g> + <path + style="font-size:12px;fill:url(#linearGradient2045);fill-rule:evenodd;stroke:#313131;stroke-width:2.64938402" + d="M 257.25983,93.099888 L 201.60382,93.096323 C 183.28171,93.095134 178.5073,137.90012 178.93253,154.96661 C 179.14353,163.43399 189.31961,168.8466 198.40979,168.79671 L 256.66089,168.47701 L 257.25983,93.099888 z " + id="path606" + sodipodi:nodetypes="cssscc" /> + </g> + <text + transform="scale(0.923679,1.082627)" + id="text2071" + y="120.63637" + x="172.36639" + style="font-size:111.22277069px;font-style:normal;font-weight:normal;fill:white;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Brushstroke" + xml:space="preserve"><tspan + y="120.63637" + x="172.36639" + id="tspan2073" + sodipodi:role="line">ipi</tspan></text> + </g> + </g> +</svg> |