From: Marcin Kusmierski Date: Fri, 26 Aug 2011 12:00:25 +0000 (+0200) Subject: added all files X-Git-Url: http://git.maemo.org/git/?p=ffqwlibrary;a=commitdiff_plain;h=1273d1fbb03faf468b080ca8f2f78717e6949815 added all files --- diff --git a/FFQWidgets.pdf b/FFQWidgets.pdf new file mode 100644 index 0000000..6ea0793 Binary files /dev/null and b/FFQWidgets.pdf differ diff --git a/libffqw-1.0/Doxyfile b/libffqw-1.0/Doxyfile new file mode 100644 index 0000000..8c7ad09 --- /dev/null +++ b/libffqw-1.0/Doxyfile @@ -0,0 +1,1510 @@ +# Doxyfile 1.5.8 + +# 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 +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = FFWidgets Library + +# 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 = 0.1 + +# 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 = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# 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: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_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 regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_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 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 the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = 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 OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = 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 + +# 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 + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# 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 = YES + +# 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 + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = YES + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# 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 +# and Mac 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 + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# 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 + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# 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 = NO + +# 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 = YES + +# 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 + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# 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. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +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 = sources + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# 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 *.m *.mm *.py *.f90 + +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 = YES + +# 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. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# 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 , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# 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 = YES + +# 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 +# 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 +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# 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 = YES + +# 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 HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# 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 compiled 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 CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# 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 + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# 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 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, 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. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. + +GENERATE_TREEVIEW = NONE + +# 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 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +#--------------------------------------------------------------------------- +# 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 = NO + +# 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 = a4wide + +# 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 = YES + +# 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_DEFINED 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. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +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::additions 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 + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# 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 = NO + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# 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 GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = 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 = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# 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 options 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 CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller 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 caller +# graphs for selected functions only using the \callergraph command. + +CALLER_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 + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = 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 in 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 DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# 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 the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# 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 + +#--------------------------------------------------------------------------- +# Options 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/libffqw-1.0/bin/libffqw-dev_1.0_armel.deb b/libffqw-1.0/bin/libffqw-dev_1.0_armel.deb new file mode 100644 index 0000000..c76a6df Binary files /dev/null and b/libffqw-1.0/bin/libffqw-dev_1.0_armel.deb differ diff --git a/libffqw-1.0/bin/libffqw_1.0_armel.deb b/libffqw-1.0/bin/libffqw_1.0_armel.deb new file mode 100644 index 0000000..8f7acbc Binary files /dev/null and b/libffqw-1.0/bin/libffqw_1.0_armel.deb differ diff --git a/libffqw-1.0/data/img/img.qrc b/libffqw-1.0/data/img/img.qrc new file mode 100644 index 0000000..872404f --- /dev/null +++ b/libffqw-1.0/data/img/img.qrc @@ -0,0 +1,68 @@ + + + standard/button_bottomcenter_clicked.svg + standard/button_bottomcenter_normal.svg + standard/button_bottomleft_clicked.svg + standard/button_bottomleft_normal.svg + standard/button_bottomright_clicked.svg + standard/button_bottomright_normal.svg + standard/button_center_clicked.svg + standard/button_centerleft_clicked.svg + standard/button_centerleft_normal.svg + standard/button_center_normal.svg + standard/button_centerright_clicked.svg + standard/button_centerright_normal.svg + standard/button_false.svg + standard/button_topcenter_clicked.svg + standard/button_topcenter_normal.svg + standard/button_topleft_clicked.svg + standard/button_topleft_normal.svg + standard/button_topright_clicked.svg + standard/button_topright_normal.svg + standard/button_true.svg + standard/chart_default.svg + standard/chart_legendOFF.svg + standard/chart_legendON.svg + standard/chart_zoomin.svg + standard/chart_zoomout.svg + standard/combo_button_bottomcenter_clicked.svg + standard/combo_button_bottomcenter_normal.svg + standard/combo_button_bottomleft_clicked.svg + standard/combo_button_bottomleft_normal.svg + standard/combo_button_bottomright_clicked.svg + standard/combo_button_bottomright_normal.svg + standard/combo_button_center_clicked.svg + standard/combo_button_centerleft_clicked.svg + standard/combo_button_centerleft_normal.svg + standard/combo_button_center_normal.svg + standard/combo_button_centerright_clicked.svg + standard/combo_button_centerright_normal.svg + standard/combo_button_topcenter_clicked.svg + standard/combo_button_topcenter_normal.svg + standard/combo_button_topleft_clicked.svg + standard/combo_button_topleft_normal.svg + standard/combo_button_topright_clicked.svg + standard/combo_button_topright_normal.svg + standard/combo_colorarrow.svg + standard/combo_colorarrow_pressed.svg + standard/combo_colorbackground.svg + standard/combo_colorbackground_pressed.svg + standard/combo_string_arrow.svg + standard/combo_string_arrow_pressed.svg + standard/combo_string_background.svg + standard/combo_string_background_pressed.svg + standard/combo_triangle.svg + standard/combo_triangle_pressed.svg + standard/dpad_background.svg + standard/dpad_button_down.svg + standard/dpad_button_down_pressed.svg + standard/dpad_button_left.svg + standard/dpad_button_left_pressed.svg + standard/dpad_button_right.svg + standard/dpad_button_right_pressed.svg + standard/dpad_button_up.svg + standard/dpad_button_up_pressed.svg + standard/radiobutton_false.svg + standard/radiobutton_true.svg + + diff --git a/libffqw-1.0/data/img/standard/button_bottomcenter_clicked.svg b/libffqw-1.0/data/img/standard/button_bottomcenter_clicked.svg new file mode 100644 index 0000000..4f7c236 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_bottomcenter_clicked.svg @@ -0,0 +1,1122 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_bottomcenter_normal.svg b/libffqw-1.0/data/img/standard/button_bottomcenter_normal.svg new file mode 100644 index 0000000..bff7151 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_bottomcenter_normal.svg @@ -0,0 +1,575 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_bottomleft_clicked.svg b/libffqw-1.0/data/img/standard/button_bottomleft_clicked.svg new file mode 100644 index 0000000..cec989c --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_bottomleft_clicked.svg @@ -0,0 +1,1122 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_bottomleft_normal.svg b/libffqw-1.0/data/img/standard/button_bottomleft_normal.svg new file mode 100644 index 0000000..422f443 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_bottomleft_normal.svg @@ -0,0 +1,565 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_bottomright_clicked.svg b/libffqw-1.0/data/img/standard/button_bottomright_clicked.svg new file mode 100644 index 0000000..8902372 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_bottomright_clicked.svg @@ -0,0 +1,1121 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_bottomright_normal.svg b/libffqw-1.0/data/img/standard/button_bottomright_normal.svg new file mode 100644 index 0000000..96da0b4 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_bottomright_normal.svg @@ -0,0 +1,609 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_center_clicked.svg b/libffqw-1.0/data/img/standard/button_center_clicked.svg new file mode 100644 index 0000000..edd9f85 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_center_clicked.svg @@ -0,0 +1,1155 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_center_normal.svg b/libffqw-1.0/data/img/standard/button_center_normal.svg new file mode 100644 index 0000000..f34dbd6 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_center_normal.svg @@ -0,0 +1,579 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_centerleft_clicked.svg b/libffqw-1.0/data/img/standard/button_centerleft_clicked.svg new file mode 100644 index 0000000..2c4a76c --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_centerleft_clicked.svg @@ -0,0 +1,1136 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_centerleft_normal.svg b/libffqw-1.0/data/img/standard/button_centerleft_normal.svg new file mode 100644 index 0000000..6184bf5 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_centerleft_normal.svg @@ -0,0 +1,609 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_centerright_clicked.svg b/libffqw-1.0/data/img/standard/button_centerright_clicked.svg new file mode 100644 index 0000000..9a1793b --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_centerright_clicked.svg @@ -0,0 +1,1137 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_centerright_normal.svg b/libffqw-1.0/data/img/standard/button_centerright_normal.svg new file mode 100644 index 0000000..aaa95a1 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_centerright_normal.svg @@ -0,0 +1,587 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_false.svg b/libffqw-1.0/data/img/standard/button_false.svg new file mode 100644 index 0000000..3317bb1 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_false.svg @@ -0,0 +1,514 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_topcenter_clicked.svg b/libffqw-1.0/data/img/standard/button_topcenter_clicked.svg new file mode 100644 index 0000000..523daa8 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_topcenter_clicked.svg @@ -0,0 +1,1131 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_topcenter_normal.svg b/libffqw-1.0/data/img/standard/button_topcenter_normal.svg new file mode 100644 index 0000000..b69662d --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_topcenter_normal.svg @@ -0,0 +1,565 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_topleft_clicked.svg b/libffqw-1.0/data/img/standard/button_topleft_clicked.svg new file mode 100644 index 0000000..976ac1d --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_topleft_clicked.svg @@ -0,0 +1,1111 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_topleft_normal.svg b/libffqw-1.0/data/img/standard/button_topleft_normal.svg new file mode 100644 index 0000000..187a2ee --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_topleft_normal.svg @@ -0,0 +1,566 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_topright_clicked.svg b/libffqw-1.0/data/img/standard/button_topright_clicked.svg new file mode 100644 index 0000000..51dcbdb --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_topright_clicked.svg @@ -0,0 +1,1121 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_topright_normal.svg b/libffqw-1.0/data/img/standard/button_topright_normal.svg new file mode 100644 index 0000000..943c800 --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_topright_normal.svg @@ -0,0 +1,575 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/button_true.svg b/libffqw-1.0/data/img/standard/button_true.svg new file mode 100644 index 0000000..eae911d --- /dev/null +++ b/libffqw-1.0/data/img/standard/button_true.svg @@ -0,0 +1,497 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/chart_default.svg b/libffqw-1.0/data/img/standard/chart_default.svg new file mode 100644 index 0000000..85b38f0 --- /dev/null +++ b/libffqw-1.0/data/img/standard/chart_default.svg @@ -0,0 +1,175 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/chart_legendOFF.svg b/libffqw-1.0/data/img/standard/chart_legendOFF.svg new file mode 100644 index 0000000..d0e3e81 --- /dev/null +++ b/libffqw-1.0/data/img/standard/chart_legendOFF.svg @@ -0,0 +1,574 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/chart_legendON.svg b/libffqw-1.0/data/img/standard/chart_legendON.svg new file mode 100644 index 0000000..35a321a --- /dev/null +++ b/libffqw-1.0/data/img/standard/chart_legendON.svg @@ -0,0 +1,574 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/chart_zoomin.svg b/libffqw-1.0/data/img/standard/chart_zoomin.svg new file mode 100644 index 0000000..e676bdc --- /dev/null +++ b/libffqw-1.0/data/img/standard/chart_zoomin.svg @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/chart_zoomout.svg b/libffqw-1.0/data/img/standard/chart_zoomout.svg new file mode 100644 index 0000000..522d081 --- /dev/null +++ b/libffqw-1.0/data/img/standard/chart_zoomout.svg @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_bottomcenter_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_bottomcenter_clicked.svg new file mode 100644 index 0000000..1ea9b25 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_bottomcenter_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_bottomcenter_normal.svg b/libffqw-1.0/data/img/standard/combo_button_bottomcenter_normal.svg new file mode 100644 index 0000000..6cedc9c --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_bottomcenter_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_bottomleft_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_bottomleft_clicked.svg new file mode 100644 index 0000000..d234a2e --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_bottomleft_clicked.svg @@ -0,0 +1,621 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_bottomleft_normal.svg b/libffqw-1.0/data/img/standard/combo_button_bottomleft_normal.svg new file mode 100644 index 0000000..25c95e1 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_bottomleft_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_bottomright_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_bottomright_clicked.svg new file mode 100644 index 0000000..590216d --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_bottomright_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_bottomright_normal.svg b/libffqw-1.0/data/img/standard/combo_button_bottomright_normal.svg new file mode 100644 index 0000000..5fd4c72 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_bottomright_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_center_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_center_clicked.svg new file mode 100644 index 0000000..2c43ff9 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_center_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_center_normal.svg b/libffqw-1.0/data/img/standard/combo_button_center_normal.svg new file mode 100644 index 0000000..35c2b83 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_center_normal.svg @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_centerleft_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_centerleft_clicked.svg new file mode 100644 index 0000000..6b3b52d --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_centerleft_clicked.svg @@ -0,0 +1,624 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_centerleft_normal.svg b/libffqw-1.0/data/img/standard/combo_button_centerleft_normal.svg new file mode 100644 index 0000000..82af72c --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_centerleft_normal.svg @@ -0,0 +1,527 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_centerright_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_centerright_clicked.svg new file mode 100644 index 0000000..a41afc7 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_centerright_clicked.svg @@ -0,0 +1,606 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_centerright_normal.svg b/libffqw-1.0/data/img/standard/combo_button_centerright_normal.svg new file mode 100644 index 0000000..b225906 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_centerright_normal.svg @@ -0,0 +1,527 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_topcenter_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_topcenter_clicked.svg new file mode 100644 index 0000000..ae218d9 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_topcenter_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_topcenter_normal.svg b/libffqw-1.0/data/img/standard/combo_button_topcenter_normal.svg new file mode 100644 index 0000000..011a412 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_topcenter_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_topleft_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_topleft_clicked.svg new file mode 100644 index 0000000..823d289 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_topleft_clicked.svg @@ -0,0 +1,648 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_topleft_normal.svg b/libffqw-1.0/data/img/standard/combo_button_topleft_normal.svg new file mode 100644 index 0000000..a30f950 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_topleft_normal.svg @@ -0,0 +1,523 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_topright_clicked.svg b/libffqw-1.0/data/img/standard/combo_button_topright_clicked.svg new file mode 100644 index 0000000..8e35adf --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_topright_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_button_topright_normal.svg b/libffqw-1.0/data/img/standard/combo_button_topright_normal.svg new file mode 100644 index 0000000..5e22a10 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_button_topright_normal.svg @@ -0,0 +1,561 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_colorarrow.svg b/libffqw-1.0/data/img/standard/combo_colorarrow.svg new file mode 100644 index 0000000..b55ec36 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_colorarrow.svg @@ -0,0 +1,975 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Text Text + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_colorarrow_pressed.svg b/libffqw-1.0/data/img/standard/combo_colorarrow_pressed.svg new file mode 100644 index 0000000..7d40d50 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_colorarrow_pressed.svg @@ -0,0 +1,1528 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_colorbackground.svg b/libffqw-1.0/data/img/standard/combo_colorbackground.svg new file mode 100644 index 0000000..e809fee --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_colorbackground.svg @@ -0,0 +1,720 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_colorbackground_pressed.svg b/libffqw-1.0/data/img/standard/combo_colorbackground_pressed.svg new file mode 100644 index 0000000..deb83f9 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_colorbackground_pressed.svg @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_string_arrow.svg b/libffqw-1.0/data/img/standard/combo_string_arrow.svg new file mode 100644 index 0000000..cd35dcf --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_string_arrow.svg @@ -0,0 +1,998 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Text Text + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_string_arrow_pressed.svg b/libffqw-1.0/data/img/standard/combo_string_arrow_pressed.svg new file mode 100644 index 0000000..4c52924 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_string_arrow_pressed.svg @@ -0,0 +1,1554 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_string_background.svg b/libffqw-1.0/data/img/standard/combo_string_background.svg new file mode 100644 index 0000000..e809fee --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_string_background.svg @@ -0,0 +1,720 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_string_background_pressed.svg b/libffqw-1.0/data/img/standard/combo_string_background_pressed.svg new file mode 100644 index 0000000..deb83f9 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_string_background_pressed.svg @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_triangle.svg b/libffqw-1.0/data/img/standard/combo_triangle.svg new file mode 100644 index 0000000..095c33c --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_triangle.svg @@ -0,0 +1,978 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text Text + + + + + + + diff --git a/libffqw-1.0/data/img/standard/combo_triangle_pressed.svg b/libffqw-1.0/data/img/standard/combo_triangle_pressed.svg new file mode 100644 index 0000000..cdd0ef4 --- /dev/null +++ b/libffqw-1.0/data/img/standard/combo_triangle_pressed.svg @@ -0,0 +1,931 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text Text + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_background.svg b/libffqw-1.0/data/img/standard/dpad_background.svg new file mode 100644 index 0000000..129b1b0 --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_background.svg @@ -0,0 +1,1885 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_down.svg b/libffqw-1.0/data/img/standard/dpad_button_down.svg new file mode 100644 index 0000000..22af200 --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_down.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_down_pressed.svg b/libffqw-1.0/data/img/standard/dpad_button_down_pressed.svg new file mode 100644 index 0000000..a335441 --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_down_pressed.svg @@ -0,0 +1,3909 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_left.svg b/libffqw-1.0/data/img/standard/dpad_button_left.svg new file mode 100644 index 0000000..d436e8a --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_left.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_left_pressed.svg b/libffqw-1.0/data/img/standard/dpad_button_left_pressed.svg new file mode 100644 index 0000000..996214e --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_left_pressed.svg @@ -0,0 +1,3913 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_right.svg b/libffqw-1.0/data/img/standard/dpad_button_right.svg new file mode 100644 index 0000000..361a5e4 --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_right.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_right_pressed.svg b/libffqw-1.0/data/img/standard/dpad_button_right_pressed.svg new file mode 100644 index 0000000..6d7714b --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_right_pressed.svg @@ -0,0 +1,3917 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_up.svg b/libffqw-1.0/data/img/standard/dpad_button_up.svg new file mode 100644 index 0000000..16eaa01 --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_up.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/dpad_button_up_pressed.svg b/libffqw-1.0/data/img/standard/dpad_button_up_pressed.svg new file mode 100644 index 0000000..6f6233a --- /dev/null +++ b/libffqw-1.0/data/img/standard/dpad_button_up_pressed.svg @@ -0,0 +1,3910 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/radiobutton_false.svg b/libffqw-1.0/data/img/standard/radiobutton_false.svg new file mode 100644 index 0000000..3a313b1 --- /dev/null +++ b/libffqw-1.0/data/img/standard/radiobutton_false.svg @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/data/img/standard/radiobutton_true.svg b/libffqw-1.0/data/img/standard/radiobutton_true.svg new file mode 100644 index 0000000..a7fbc46 --- /dev/null +++ b/libffqw-1.0/data/img/standard/radiobutton_true.svg @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-1.0/debian/README b/libffqw-1.0/debian/README new file mode 100644 index 0000000..242606a --- /dev/null +++ b/libffqw-1.0/debian/README @@ -0,0 +1,6 @@ +The Debian Package libffqw +---------------------------- + +Comments regarding the Package + + -- unknown Fri, 8 Jan 2010 14:15:07 +0100 diff --git a/libffqw-1.0/debian/README.Debian b/libffqw-1.0/debian/README.Debian new file mode 100644 index 0000000..8ab4a3d --- /dev/null +++ b/libffqw-1.0/debian/README.Debian @@ -0,0 +1,6 @@ +libffqw for Debian +------------------ + + + + -- unknown Fri, 8 Jan 2010 14:15:07 +0100 diff --git a/libffqw-1.0/debian/changelog b/libffqw-1.0/debian/changelog new file mode 100644 index 0000000..c673e87 --- /dev/null +++ b/libffqw-1.0/debian/changelog @@ -0,0 +1,5 @@ +libffqw (1.0) unstable; urgency=low + + * Initial Release. + + -- Michal Palczewski Fri, 8 Jan 2010 14:15:07 +0100 diff --git a/libffqw-1.0/debian/compat b/libffqw-1.0/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/libffqw-1.0/debian/compat @@ -0,0 +1 @@ +5 diff --git a/libffqw-1.0/debian/control b/libffqw-1.0/debian/control new file mode 100644 index 0000000..99d0a55 --- /dev/null +++ b/libffqw-1.0/debian/control @@ -0,0 +1,40 @@ +Source: libffqw +Priority: extra +Maintainer: Michal A. Palczewski +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 +Section: libs + +Package: libffqw-dev +Section: user/other +Architecture: any +Depends: libffqw (= ${Source-Version}) +Description: Finger Friendly Qt Widgets for Maemo + Library provides finger friendly widgets for Maemo platform. + Works On Fremantle and Diablo. Development packages. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC + +Package: libffqw +Section: user/other +Architecture: any +Depends: libqt4-core (>=4.6), libqt4-gui (>=4.6) +Description: Finger Friendly Qt Widgets for Maemo + Library provides finger friendly widgets for Maemo platform. + Works On Fremantle and Diablo. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC diff --git a/libffqw-1.0/debian/control~ b/libffqw-1.0/debian/control~ new file mode 100644 index 0000000..99d0a55 --- /dev/null +++ b/libffqw-1.0/debian/control~ @@ -0,0 +1,40 @@ +Source: libffqw +Priority: extra +Maintainer: Michal A. Palczewski +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 +Section: libs + +Package: libffqw-dev +Section: user/other +Architecture: any +Depends: libffqw (= ${Source-Version}) +Description: Finger Friendly Qt Widgets for Maemo + Library provides finger friendly widgets for Maemo platform. + Works On Fremantle and Diablo. Development packages. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC + +Package: libffqw +Section: user/other +Architecture: any +Depends: libqt4-core (>=4.6), libqt4-gui (>=4.6) +Description: Finger Friendly Qt Widgets for Maemo + Library provides finger friendly widgets for Maemo platform. + Works On Fremantle and Diablo. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC diff --git a/libffqw-1.0/debian/copyright b/libffqw-1.0/debian/copyright new file mode 100644 index 0000000..380a638 --- /dev/null +++ b/libffqw-1.0/debian/copyright @@ -0,0 +1,23 @@ +This is libffqw, written and maintained by unknown +on Fri, 8 Jan 2010 14:15:07 +0100. + +Copyright Holder: Comarch S.A. + +License: + + 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/libffqw-1.0/debian/cron.d.ex b/libffqw-1.0/debian/cron.d.ex new file mode 100644 index 0000000..75576e4 --- /dev/null +++ b/libffqw-1.0/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the libffqw package +# +0 4 * * * root libffqw_maintenance diff --git a/libffqw-1.0/debian/dirs b/libffqw-1.0/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/libffqw-1.0/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/libffqw-1.0/debian/docs b/libffqw-1.0/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/libffqw-1.0/debian/emacsen-install.ex b/libffqw-1.0/debian/emacsen-install.ex new file mode 100644 index 0000000..64f4d86 --- /dev/null +++ b/libffqw-1.0/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/libffqw + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=libffqw + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/libffqw-1.0/debian/emacsen-remove.ex b/libffqw-1.0/debian/emacsen-remove.ex new file mode 100644 index 0000000..a99dfcc --- /dev/null +++ b/libffqw-1.0/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/libffqw + +FLAVOR=$1 +PACKAGE=libffqw + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/libffqw.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/libffqw-1.0/debian/emacsen-startup.ex b/libffqw-1.0/debian/emacsen-startup.ex new file mode 100644 index 0000000..bc8681b --- /dev/null +++ b/libffqw-1.0/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50libffqw.el +;; for the Debian libffqw package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The libffqw package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/libffqw"))) +;; If package-dir does not exist, the libffqw package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'libffqw-mode "libffqw-mode" + "Major mode for editing libffqw files." t) + (add-to-list 'auto-mode-alist '("\\.libffqw$" . libffqw-mode)))) + diff --git a/libffqw-1.0/debian/files b/libffqw-1.0/debian/files new file mode 100644 index 0000000..b7cd5ae --- /dev/null +++ b/libffqw-1.0/debian/files @@ -0,0 +1,2 @@ +libffqw-dev_1.0_armel.deb user/other extra +libffqw_1.0_armel.deb user/other extra diff --git a/libffqw-1.0/debian/init.d.ex b/libffqw-1.0/debian/init.d.ex new file mode 100644 index 0000000..ee9d1e9 --- /dev/null +++ b/libffqw-1.0/debian/init.d.ex @@ -0,0 +1,81 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/libffqw +NAME=libffqw +DESC=libffqw + +test -x $DAEMON || exit 0 + +# Include libffqw defaults if available +if [ -f /etc/default/libffqw ] ; then + . /etc/default/libffqw +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/libffqw-1.0/debian/libffqw-default.ex b/libffqw-1.0/debian/libffqw-default.ex new file mode 100644 index 0000000..376c2f5 --- /dev/null +++ b/libffqw-1.0/debian/libffqw-default.ex @@ -0,0 +1,10 @@ +# Defaults for libffqw initscript +# sourced by /etc/init.d/libffqw +# installed at /etc/default/libffqw by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/libffqw-1.0/debian/libffqw-dev.dirs b/libffqw-1.0/debian/libffqw-dev.dirs new file mode 100644 index 0000000..4418816 --- /dev/null +++ b/libffqw-1.0/debian/libffqw-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/libffqw-1.0/debian/libffqw-dev.install b/libffqw-1.0/debian/libffqw-dev.install new file mode 100644 index 0000000..3c996c8 --- /dev/null +++ b/libffqw-1.0/debian/libffqw-dev.install @@ -0,0 +1,6 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/pkgconfig/* +usr/lib/*.la +usr/share/pkgconfig/* diff --git a/libffqw-1.0/debian/libffqw.doc-base.EX b/libffqw-1.0/debian/libffqw.doc-base.EX new file mode 100644 index 0000000..ad8ded1 --- /dev/null +++ b/libffqw-1.0/debian/libffqw.doc-base.EX @@ -0,0 +1,22 @@ +Document: libffqw +Title: Debian libffqw Manual +Author: +Abstract: This manual describes what libffqw is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/libffqw/libffqw.sgml.gz + +Format: postscript +Files: /usr/share/doc/libffqw/libffqw.ps.gz + +Format: text +Files: /usr/share/doc/libffqw/libffqw.text.gz + +Format: HTML +Index: /usr/share/doc/libffqw/html/index.html +Files: /usr/share/doc/libffqw/html/*.html + + diff --git a/libffqw-1.0/debian/libffqw.substvars b/libffqw-1.0/debian/libffqw.substvars new file mode 100644 index 0000000..768df32 --- /dev/null +++ b/libffqw-1.0/debian/libffqw.substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-maemo5-core (>= 4.6.0~git20091215), libqt4-maemo5-gui (>= 4.6.0~git20091215), libqt4-maemo5-svg (>= 4.6.0~git20091215), libstdc++6 (>= 4.2.1) diff --git a/libffqw-1.0/debian/libffqw1.dirs b/libffqw-1.0/debian/libffqw1.dirs new file mode 100644 index 0000000..6845771 --- /dev/null +++ b/libffqw-1.0/debian/libffqw1.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/libffqw-1.0/debian/libffqw1.install b/libffqw-1.0/debian/libffqw1.install new file mode 100644 index 0000000..d0dbfd1 --- /dev/null +++ b/libffqw-1.0/debian/libffqw1.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/libffqw-1.0/debian/manpage.1.ex b/libffqw-1.0/debian/manpage.1.ex new file mode 100644 index 0000000..bbd81d8 --- /dev/null +++ b/libffqw-1.0/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LIBFFQW SECTION "January 8, 2010" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +libffqw \- program to do something +.SH SYNOPSIS +.B libffqw +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B libffqw +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBlibffqw\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +libffqw was written by . +.PP +This manual page was written by unknown , +for the Debian project (but may be used by others). diff --git a/libffqw-1.0/debian/manpage.sgml.ex b/libffqw-1.0/debian/manpage.sgml.ex new file mode 100644 index 0000000..573e274 --- /dev/null +++ b/libffqw-1.0/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + January 8, 2010"> + + SECTION"> + michal.palczewski@comarch.com"> + + LIBFFQW"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + diff --git a/libffqw-1.0/debian/manpage.xml.ex b/libffqw-1.0/debian/manpage.xml.ex new file mode 100644 index 0000000..8e4ea44 --- /dev/null +++ b/libffqw-1.0/debian/manpage.xml.ex @@ -0,0 +1,148 @@ + +.
will be generated. You may view the +manual page with: nroff -man .
| less'. A +typical entry in a Makefile or Makefile.am is: + +DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ +manpages/docbook.xsl +XP=xsltproc -''-nonet + +manpage.1: manpage.dbk + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The +XSL files are in docbook-xsl. Please remember that if you +create the nroff version in one of the debian/rules file +targets (such as build), you will need to include xsltproc +and docbook-xsl in your Build-Depends control field. + +--> + + + FIRSTNAME"> + SURNAME"> + + January 8, 2010"> + + SECTION"> + michal.palczewski@comarch.com"> + + LIBFFQW"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ diff --git a/libffqw-1.0/debian/menu.ex b/libffqw-1.0/debian/menu.ex new file mode 100644 index 0000000..e460fb0 --- /dev/null +++ b/libffqw-1.0/debian/menu.ex @@ -0,0 +1,2 @@ +?package(libffqw):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\ + title="libffqw" command="/usr/bin/libffqw" diff --git a/libffqw-1.0/debian/postinst.ex b/libffqw-1.0/debian/postinst.ex new file mode 100644 index 0000000..82b2ebc --- /dev/null +++ b/libffqw-1.0/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-1.0/debian/postrm.ex b/libffqw-1.0/debian/postrm.ex new file mode 100644 index 0000000..91fc203 --- /dev/null +++ b/libffqw-1.0/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-1.0/debian/preinst.ex b/libffqw-1.0/debian/preinst.ex new file mode 100644 index 0000000..522d75c --- /dev/null +++ b/libffqw-1.0/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-1.0/debian/prerm.ex b/libffqw-1.0/debian/prerm.ex new file mode 100644 index 0000000..59e41eb --- /dev/null +++ b/libffqw-1.0/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-1.0/debian/rules b/libffqw-1.0/debian/rules new file mode 100755 index 0000000..6f73bd2 --- /dev/null +++ b/libffqw-1.0/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +# shared library versions, option 1 +version=2.0.5 +major=2 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/libffqw-1.0/debian/shlibs.local.ex b/libffqw-1.0/debian/shlibs.local.ex new file mode 100644 index 0000000..1aa6a65 --- /dev/null +++ b/libffqw-1.0/debian/shlibs.local.ex @@ -0,0 +1 @@ +liblibffqw 1.0 libffqw (>> 1.0-0), libffqw (<< 1.0-99) diff --git a/libffqw-1.0/debian/watch.ex b/libffqw-1.0/debian/watch.ex new file mode 100644 index 0000000..a625cc8 --- /dev/null +++ b/libffqw-1.0/debian/watch.ex @@ -0,0 +1,22 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php libffqw-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/libffqw-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/libffqw-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for debscripts >= 2.9 +# http://sf.net/libffqw/libffqw-(.*)\.tar\.gz + + diff --git a/libffqw-1.0/libffqw.pro b/libffqw-1.0/libffqw.pro new file mode 100644 index 0000000..7cb4243 --- /dev/null +++ b/libffqw-1.0/libffqw.pro @@ -0,0 +1,100 @@ +TEMPLATE = lib +TARGET = ffqw +QT += core \ + gui \ + svg +HEADERS += sources/ffabstractcombobox.h \ + sources/ffscrollingcheckbox.h \ + sources/ffscrollingbutton.h \ + sources/ffabstractbutton.h \ + sources/ffabstractwidget.h \ + sources/ffscrollinglabel.h \ + sources/ffviewcache.h \ + sources/ffstringcombobox.h \ + sources/ffdpad.h \ + sources/ffcolorcombobox.h \ + sources/ffdpadbutton.h \ + sources/ffscrollarea.h \ + sources/ffchart.h \ + sources/ffchartlegend.h \ + sources/ffchartscene.h \ + sources/ffchartbutton.h \ + sources/ffchartlegendcontrolpanel.h \ + sources/ffchartseries.h \ + sources/fflinecombobox.h \ + sources/ffscrollingradiobutton.h +SOURCES += sources/ffscrollingcheckbox.cpp \ + sources/ffabstractcombobox.cpp \ + sources/ffscrollingbutton.cpp \ + sources/ffabstractbutton.cpp \ + sources/ffdpad.cpp \ + sources/ffabstractwidget.cpp \ + sources/ffscrollinglabel.cpp \ + sources/ffviewcache.cpp \ + sources/ffstringcombobox.cpp \ + sources/ffcolorcombobox.cpp \ + sources/ffdpadbutton.cpp \ + sources/ffscrollarea.cpp \ + sources/ffchart.cpp \ + sources/ffchartlegend.cpp \ + sources/ffchartscene.cpp \ + sources/ffchartbutton.cpp \ + sources/ffchartlegendcontrolpanel.cpp \ + sources/ffchartseries.cpp \ + sources/fflinecombobox.cpp \ + sources/ffscrollingradiobutton.cpp + +RESOURCES += data/img/img.qrc + +VERSION = 1.0 + +headers.files += sources/ffcolorcombobutton.h \ + sources/ffchartscene.h \ + sources/ffchartlegend.h \ + sources/ffchartlegendcontrolbutton.h \ + sources/ffchartlegendcontrolpanel.h \ + sources/ffchart.h \ + sources/ffchartbutton.h \ + sources/ffcombobutton.h \ + sources/ffscrollingcheckbox.h \ + sources/ffscrollingbutton.h \ + sources/ffabstractbutton.h \ + sources/ffskin.h \ + sources/ffchartseries.h \ + sources/ffabstractwidget.h \ + sources/ffscrollinglabel.h \ + sources/ffviewcache.h \ + sources/ffstringcombobox.h \ + sources/ffdpad.h \ + sources/ffcolorcombobox.h \ + sources/ffcolorbutton.h \ + sources/ffstringbutton.h \ + sources/ffdpadbutton.h \ + sources/ffcolorchooser.h \ + sources/ffscrollarea.h \ + sources/ffscrollingradiobutton.h \ + sources/FFGui \ + sources/fflinecombobox.h \ + sources/ffabstractcombobox.h + +maemo { +DEFINES += MAEMO +} + +diablo_comp { +DEFINES += DIABLO_COMP +} + +deb { + message(Creating Makefile for DEB binary package) + target.path = debian/libffqw/usr/lib + headers.path = debian/libffqw-dev/usr/include + #INSTALLS = target +} +ELSE { + message(Creating Makefile for Linux) + headers.path = /usr/include + target.path = /usr/lib +} + +INSTALLS += headers target diff --git a/libffqw-1.0/sources/FFGui b/libffqw-1.0/sources/FFGui new file mode 100644 index 0000000..7178526 --- /dev/null +++ b/libffqw-1.0/sources/FFGui @@ -0,0 +1,10 @@ +#include "ffscrollingcheckbox.h" +#include "ffscrollingbutton.h" +#include "ffabstractbutton.h" +#include "ffscrollinglabel.h" +#include "ffcolorcombobox.h" +#include "fflinecombobox.h" +#include "ffstringcombobox.h" +#include "ffdpad.h" +#include "ffchart.h" +#include "ffscrollarea.h" diff --git a/libffqw-1.0/sources/ffabstractbutton.cpp b/libffqw-1.0/sources/ffabstractbutton.cpp new file mode 100644 index 0000000..f6a4e90 --- /dev/null +++ b/libffqw-1.0/sources/ffabstractbutton.cpp @@ -0,0 +1,762 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ + +/** + * @file ffabstractbutton.cpp + * @brief Implementation of the FFAbstractButton class. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * This widget have an inside rectangle (draw area). This rectangle is bounded by four margins (top, bottom, left, right). + * Function setMargins(int,int,int,int) provides interface to change this parameters. + */ + +#include "ffabstractbutton.h" + +/*Static FFViewCaches -improve performance*/ +FFViewCache* FFAbstractButton::topLeftNormal = NULL; +FFViewCache* FFAbstractButton::topRightNormal = NULL; +FFViewCache* FFAbstractButton::bottomLeftNormal = NULL; +FFViewCache* FFAbstractButton::bottomRightNormal = NULL; +FFViewCache* FFAbstractButton::topLeftClicked = NULL; +FFViewCache* FFAbstractButton::topRightClicked = NULL; +FFViewCache* FFAbstractButton::bottomLeftClicked = NULL; +FFViewCache* FFAbstractButton::bottomRightClicked = NULL; +/* static values + */ +bool FFAbstractButton::staticFFViewCacheUpdated = false; +int FFAbstractButton::minimumWidth = 0; +/** + * Constructs a FFAbstractButton with a parent. + * Set variable to initial values and set graphics used in widget. + */ +FFAbstractButton::FFAbstractButton(QWidget* parent) : + QAbstractButton(parent) +{ + init(); + +} + +/** + * A virtual destructor of FFAbstractButton. + */ +FFAbstractButton::~FFAbstractButton() +{ + ; +} + +/** + * Returns the left margin of inside drawing rectangle. + */ +int FFAbstractButton::leftMargin() +{ + return insideRect.leftMargin_; +} + +/** + * Returns the left margin of inside drawing rectangle. + */ +int FFAbstractButton::rightMargin() +{ + return insideRect.rightMargin_; +} + +/** + * Returns the top margin of inside drawing rectangle. + */ +int FFAbstractButton::topMargin() +{ + return insideRect.topMargin_; +} + +/** + * Returns the bottom margin of inside drawing rectangle. + */ +int FFAbstractButton::bottomMargin() +{ + return insideRect.bottomMargin_; +} + +/** + * Returns the horizontal spacing between any elements in inside rectangle. + */ +int FFAbstractButton::hSpacing() +{ + return insideRect.hSpacing_; +} + +/** + * Returns the vertical spacing between any elements in inside rectangle. + */ +int FFAbstractButton::vSpacing() +{ + return insideRect.vSpacing_; +} + +/** + * Sets left margin of elements on a button + * @param leftMargin left margin of elements on a button + */ +void FFAbstractButton::setLeftMargin(int leftMargin) +{ + insideRect.leftMargin_ = leftMargin; + insideRect.leftMarginTemp = leftMargin; + updateView(); + update(); +} + +/** + * Sets right margin of elements on a button + * @param rightMargin right margin of elements on a button + */ +void FFAbstractButton::setRightMargin(int rightMargin) +{ + insideRect.rightMargin_ = rightMargin; + insideRect.rightMarginTemp = rightMargin; + updateView(); + update(); +} + +/** + * Sets top margin of elements on a button + * @param topMargin top margin of elements on a button + */ +void FFAbstractButton::setTopMargin(int topMargin) +{ + insideRect.topMargin_ = topMargin; + insideRect.topMarginTemp = topMargin; + updateView(); + update(); +} + +/** + * Sets bottom margin of elements on a button + * @param bottomMargin bottom margin of elements on a button + */ +void FFAbstractButton::setBottomMargin(int bottomMargin) +{ + insideRect.bottomMargin_ = bottomMargin; + insideRect.bottomMarginTemp = bottomMargin; + updateView(); + update(); +} + +/** + * Provides interface to change this parameters. + * @param leftMargin set margin between left edge of widget to left edge of inside rectangle + * @param rightMargin set margin between right edge of widget to right edge of inside rectangle + * @param topMargin set margin between top edge of widget to top edge of inside rectangle + * @param bottomMargin set margin between bottom edge of widget to bottom edge of inside rectangle + */ +void FFAbstractButton::setMargins(int leftMargin, + int rightMargin, + int topMargin, + int bottomMargin) +{ + insideRect.setMargins(leftMargin, rightMargin, topMargin, bottomMargin); + updateView(); + update(); +} + +/** + * Sets horizontal spacing between any elements in inside rectangle. + * @param hSpacing Horizontal spacing + */ +void FFAbstractButton::setHSpacing(int hSpacing) +{ + insideRect.hSpacing_ = hSpacing; + insideRect.hSpacingTemp = hSpacing; + updateView(); +} + +/** + * Sets vertical spacing between any elements in inside rectangle. + * @param spacing Vertical spacing + */ +void FFAbstractButton::setVSpacing(int spacing) +{ + insideRect.vSpacing_ = spacing; + insideRect.vSpacingTemp = spacing; + updateView(); +} +/** + * Returns pen + */ +QPen FFAbstractButton::pen() +{ + return pen_; +} + +/** + * Sets pen + */ +void FFAbstractButton::setPen(QPen pen) +{ + pen_ = pen; +} +/** + * Repaints the view of this button. Overrides the virtual method from QWidget. + * If button is not clicked draw one type of pixmaps otherwise draw another. + * + * Composition of pixmaps: + * + * + *
topLeft topCenter topRight
centerLeft center centerRight
bottomLeft bottomCenter bottomRight
+ * @param event Contains all informations about event. + */ +void FFAbstractButton::paintEvent(QPaintEvent* event) +{ + Q_UNUSED(event) + + QPainter painter; + + painter.begin(this); + + if(!isClicked_) + { + painter.drawPixmap(QPoint(0, 0), topLeftNormal->pixmap()); + painter.drawPixmap(QPoint(topLeftNormal->defaultSize().width(), + 0), topCenterNormal->pixmap()); + painter.drawPixmap(QPoint(topLeftNormal->defaultSize().width() + + pixmapsPositionWidth_, 0), + topRightNormal->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftNormal->defaultSize().height()), + centerLeftNormal->pixmap()); + painter.drawPixmap(QPoint(centerLeftNormal->defaultSize().width(), + topCenterNormal->defaultSize().height()), + centerNormal->pixmap()); + painter.drawPixmap(QPoint(centerLeftNormal->defaultSize().width() + + pixmapsPositionWidth_, + topRightNormal->defaultSize().height()), + centerRightNormal->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftNormal->defaultSize().height() + + pixmapsPositionHeight_), + bottomLeftNormal->pixmap()); + painter.drawPixmap(QPoint(bottomLeftNormal->defaultSize().width(), + topCenterNormal->defaultSize().height() + + pixmapsPositionHeight_), + bottomCenterNormal->pixmap()); + painter.drawPixmap(QPoint(bottomLeftNormal->defaultSize().width() + + pixmapsPositionWidth_, + topRightNormal->defaultSize().height() + + pixmapsPositionHeight_), + bottomRightNormal->pixmap()); + } + else + { + painter.drawPixmap(QPoint(0, 0), topLeftClicked->pixmap()); + painter.drawPixmap(QPoint(topLeftClicked->defaultSize().width(), + 0), + topCenterClicked->pixmap()); + painter.drawPixmap(QPoint(topLeftClicked->defaultSize().width() + + pixmapsPositionWidth_, 0), + topRightClicked->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftClicked->defaultSize().height()), + centerLeftClicked->pixmap()); + painter.drawPixmap(QPoint(centerLeftClicked->defaultSize().width(), + topCenterClicked->defaultSize().height()), + centerClicked->pixmap()); + painter.drawPixmap(QPoint(centerLeftClicked->defaultSize().width() + + pixmapsPositionWidth_, + topRightClicked->defaultSize().height()), + centerRightClicked->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftClicked->defaultSize().height() + + pixmapsPositionHeight_), + bottomLeftClicked->pixmap()); + painter.drawPixmap(QPoint(bottomLeftClicked->defaultSize().width(), + topCenterClicked->defaultSize().height() + + pixmapsPositionHeight_), + bottomCenterClicked->pixmap()); + painter.drawPixmap(QPoint(bottomLeftClicked->defaultSize().width() + + pixmapsPositionWidth_, + topRightClicked->defaultSize().height() + + pixmapsPositionHeight_), + bottomRightClicked->pixmap()); + } + + paintIcon(&painter); + painter.end(); + +} + +/** + * Update button view after changing size of the widget. + * Update size of all pixmap which need it (without corners) + * @param event Contains all informations about event. + */ +void FFAbstractButton::resizeEvent(QResizeEvent* event) +{ + pixmapsPositionWidth_ = event->size().width() + - centerLeftNormal->defaultSize().width() + - centerRightNormal->defaultSize().width(); + + pixmapsPositionHeight_ = event->size().height() + - topCenterNormal->defaultSize().height() + - bottomCenterNormal->defaultSize().height(); + + if(event->oldSize().isValid()) + { + insideRect.scaleMargins(event->oldSize(), event->size()); + } + updateView(); + + if(!icon().isNull()) + { + QRect rect(0 + leftMargin(), + 0 + topMargin(), + geometry().width() - rightMargin() - leftMargin() + - 2 * insideRect.leftIndent_, + geometry().height() - bottomMargin() - topMargin()); + + iconSpace = icon().pixmap(rect.size()).size().width(); + } + else + { + iconSpace = 0; + } +} + +/** + * Initiates an object of FFAbstractgButton. Sets all needed fields. It is called by all constructors. + */ +void FFAbstractButton::init() +{ + + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); + path = BUTTON_PATH; + + isClicked_ = false; + iconSpace = 0; + + iconAlignment_ = DEFAULT_ICON_ALIGNMENT; + + if(NULL == topLeftNormal) + { + topLeftNormal = new FFViewCache; + } + + topCenterNormal = new FFViewCache; + + if(NULL == topRightNormal) + { + topRightNormal = new FFViewCache; + } + + centerLeftNormal = new FFViewCache; + centerNormal = new FFViewCache; + centerRightNormal = new FFViewCache; + + if(NULL == bottomLeftNormal) + { + bottomLeftNormal = new FFViewCache; + } + + bottomCenterNormal = new FFViewCache; + + if(NULL == bottomRightNormal) + { + bottomRightNormal = new FFViewCache; + } + + if(NULL == topLeftClicked) + { + topLeftClicked = new FFViewCache; + } + + topCenterClicked = new FFViewCache; + + if(NULL == topRightClicked) + { + topRightClicked = new FFViewCache; + } + + centerLeftClicked = new FFViewCache; + centerClicked = new FFViewCache; + centerRightClicked = new FFViewCache; + + if(NULL == bottomLeftClicked) + { + bottomLeftClicked = new FFViewCache; + } + + bottomCenterClicked = new FFViewCache; + + if(NULL == bottomRightClicked) + { + bottomRightClicked = new FFViewCache; + } + + setSkin(); +} +/** + * setSkin initiate FFViewCaches, update their size to default and set minimum width and height of widget + */ +void FFAbstractButton::setSkin() +{ + +// QSize sizeTmp = QSize(width(), height()); + + if(!topLeftNormal->isValid()) + { + topLeftNormal->init(path + "_topleft_normal.svg"); + } + + topCenterNormal->init(path + "_topcenter_normal.svg"); + + if(!topRightNormal->isValid()) + { + topRightNormal->init(path + "_topright_normal.svg"); + } + + centerLeftNormal->init(path + "_centerleft_normal.svg"); + centerNormal->init(path + "_center_normal.svg"); + centerRightNormal->init(path + "_centerright_normal.svg"); + + if(!bottomLeftNormal->isValid()) + { + bottomLeftNormal->init(path + "_bottomleft_normal.svg"); + } + + bottomCenterNormal->init(path + "_bottomcenter_normal.svg"); + + if(!bottomRightNormal->isValid()) + { + bottomRightNormal->init(path + "_bottomright_normal.svg"); + } + + if(!topLeftClicked->isValid()) + { + topLeftClicked->init(path + "_topleft_clicked.svg"); + } + + topCenterClicked->init(path + "_topcenter_clicked.svg"); + + if(!topRightClicked->isValid()) + { + topRightClicked->init(path + "_topright_clicked.svg"); + } + + centerLeftClicked->init(path + "_centerleft_clicked.svg"); + centerClicked->init(path + "_center_clicked.svg"); + centerRightClicked->init(path + "_centerright_clicked.svg"); + + if(!bottomLeftClicked->isValid()) + { + bottomLeftClicked->init(path + "_bottomleft_clicked.svg"); + } + + bottomCenterClicked->init(path + "_bottomcenter_clicked.svg"); + + if(!bottomRightClicked->isValid()) + { + bottomRightClicked->init(path + "_bottomright_clicked.svg"); + } + + pixmapsPositionWidth_ = centerNormal->defaultSize().width(); + pixmapsPositionHeight_ = centerNormal->defaultSize().height(); + + if(!staticFFViewCacheUpdated) + { + //Update view once after skin was set + topLeftNormal->updateView(topLeftNormal->defaultSize()); + topRightNormal->updateView(topRightNormal->defaultSize()); + bottomLeftNormal->updateView(bottomLeftNormal->defaultSize()); + bottomRightNormal->updateView(bottomRightNormal->defaultSize()); + + topLeftClicked->updateView(topLeftClicked->defaultSize()); + topRightClicked->updateView(topRightClicked->defaultSize()); + bottomLeftClicked->updateView(bottomLeftClicked->defaultSize()); + bottomRightClicked->updateView(bottomRightClicked->defaultSize()); + + minimumWidth + = qMax(topLeftNormal->defaultSize().width() + + topRightNormal->defaultSize().width(), + bottomLeftNormal->defaultSize().width() + + bottomRightNormal->defaultSize().width()); + + staticFFViewCacheUpdated = true; + } + + pixmapsPositionWidth_ = centerNormal->defaultSize().width(); + pixmapsPositionHeight_ = centerNormal->defaultSize().height(); + + insideRect.leftIndent_ = topLeftNormal->defaultSize().width(); + + setMinimumHeight(DEFAULT_BUTTON_HEIGHT); + setMinimumWidth(2 * minimumWidth); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFAbstractButton::mousePressEvent(QMouseEvent* event) +{ + Q_UNUSED(event) + isClicked_ = true; // isClicked contains boolean true information of mouse button pressed + update(); +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFAbstractButton::mouseReleaseEvent(QMouseEvent *event) +{ + Q_UNUSED(event) + + if(isClicked_) + { + if(!signalsBlocked()) + { + emit clicked(); + } + } + + isClicked_ = false; // isClicked contains boolean false information of mouse button unpressed + update(); +} + +/** + * Recalculate geometry of elements on button + */ +void FFAbstractButton::updateView() +{ + if(pixmapsPositionHeight_ <= 0) + { + pixmapsPositionHeight_ = 1; + } + //Update view all the time resize event appear: + topCenterNormal->updateView(QSize(pixmapsPositionWidth_, + topCenterNormal->defaultSize().height())); + bottomCenterNormal->updateView(QSize(pixmapsPositionWidth_, + bottomCenterNormal->defaultSize().height())); + + centerLeftNormal->updateView(QSize(centerLeftNormal->defaultSize().width(), + pixmapsPositionHeight_)); + centerRightNormal->updateView(QSize(centerRightNormal->defaultSize().width(), + pixmapsPositionHeight_)); + centerNormal->updateView(QSize(pixmapsPositionWidth_, + pixmapsPositionHeight_)); + + topCenterClicked->updateView(QSize(pixmapsPositionWidth_, + topCenterClicked->defaultSize().height())); + bottomCenterClicked->updateView(QSize(pixmapsPositionWidth_, + bottomCenterClicked->defaultSize().height())); + centerLeftClicked->updateView(QSize(centerLeftClicked->defaultSize().width(), + pixmapsPositionHeight_)); + centerRightClicked->updateView(QSize(centerRightClicked->defaultSize().width(), + pixmapsPositionHeight_)); + centerClicked->updateView(QSize(pixmapsPositionWidth_, + pixmapsPositionHeight_)); +} +/** + * Draws icon on button + */ +void FFAbstractButton::paintIcon(QPainter* painter) +{ + int move = 0; + if(iconAlignment_ == Qt::AlignLeft) + { + move = insideRect.leftIndent_; + } + else if(iconAlignment_ == Qt::AlignRight) + { + move = -insideRect.leftIndent_; + } + else + { + move = 0; + } + //if icon was set paint it + if(!icon().isNull()) + { + QRect rect(0 + leftMargin() + move, + 0 + topMargin(), + geometry().width() - rightMargin() - leftMargin(), + geometry().height() - bottomMargin() - topMargin()); + + //paint icon in button center + icon().paint(painter, + rect, + iconAlignment_, + QIcon::Normal, + QIcon::Off); + } + +} + +/** + * Initiate FFAbstractButtonPrivate + */ +FFAbstractButtonPrivate::FFAbstractButtonPrivate() +{ + setMargins(0.0, 0.0, 0.0, 0.0); + hSpacing_ = 0; + hSpacingTemp = 0; + vSpacing_ = 0; + vSpacingTemp = 0; + leftIndent_ = 0; +} + +/** + * Dectructor of FFAbstractButtonPrivate + */ +FFAbstractButtonPrivate::~FFAbstractButtonPrivate() +{ + ; +} + +/** + * scaleMargins scale margins eg. when resize event appear + * @param oldSize before eg. resize event + * @param newSize actual size after eg. resize event + */ +void FFAbstractButtonPrivate::scaleMargins(QSize oldSize, QSize newSize) +{ + float widthProportion = (float)newSize.width() / (float)oldSize.width(); + float heightProportion = (float)newSize.height() + / (float)oldSize.height(); + + leftMarginTemp *= widthProportion; + rightMarginTemp *= widthProportion; + topMarginTemp *= heightProportion; + bottomMarginTemp *= heightProportion; + hSpacingTemp *= heightProportion; + vSpacingTemp *= widthProportion; + + leftMargin_ = leftMarginTemp; + rightMargin_ = rightMarginTemp; + topMargin_ = topMarginTemp; + bottomMargin_ = bottomMarginTemp; + hSpacing_ = hSpacingTemp; + vSpacing_ = vSpacingTemp; +} + +/** + * setMargins set left, right, top and bottom margins + * @param leftMargin Size of left margin + * @param rightMargin Size of right margin + * @param topMargin Size of top margin + * @param bottomMargin Size of bottom margin + */ +void FFAbstractButtonPrivate::setMargins(int leftMargin, + int rightMargin, + int topMargin, + int bottomMargin) +{ + leftMargin_ = leftMargin; + rightMargin_ = rightMargin; + topMargin_ = topMargin; + bottomMargin_ = bottomMargin; + + leftMarginTemp = leftMargin; + rightMarginTemp = rightMargin; + topMarginTemp = topMargin; + bottomMarginTemp = bottomMargin; +} +/** + * Returns alignment of icon + */ +Qt::Alignment FFAbstractButton::iconAlignment() +{ + return iconAlignment_; +} +/** + * Sets alignment of icon + * @param iconAlignment new alignment of icon + */ +void FFAbstractButton::setIconAlignment(Qt::Alignment iconAlignment) +{ + this->iconAlignment_ = iconAlignment; +} +/** + * Returns default width of image used as button's corner + */ +int FFAbstractButton::indent() +{ + return insideRect.leftIndent_; +} + +/** + \fn void FFAbstractButton::clicked() + + This signal is emitted when the button will be clicked. + */ diff --git a/libffqw-1.0/sources/ffabstractbutton.h b/libffqw-1.0/sources/ffabstractbutton.h new file mode 100644 index 0000000..91b2b15 --- /dev/null +++ b/libffqw-1.0/sources/ffabstractbutton.h @@ -0,0 +1,222 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#ifndef FFABSTRACTBUTTON_H +#define FFABSTRACTBUTTON_H + +#include "ffviewcache.h" +#include "ffscrollinglabel.h" +#include +#include +#include + + +static const QString BUTTON_PATH= ":/standard/button"; /// + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractcombobox.cpp + * @brief Implementation of the FFAbstractComboBox and FFComboPopUp class. + * + * @author ComArch S.A. + * @date 2009.10.09 + * @version 1.0 + * + * This widget has activator(to open popup window) and popup window(to select item) + * FFAbstractComboBox and FFComboPopUp are friend classes in both directions + */ + +#include "ffabstractcombobox.h" + +/** + * Rounds argument up. + * @param var is an argument to round up + * @return value of rounded up argument + */ + +float roundUp(float var) +{ + if(0 > ((int)var - var )) + { + return (int)var + 1; + } + else + { + return (int)var; + } +} + +/** + * Constructs a FFAbstractButton with a parent. + * Sets variable to initial values. + */ +FFAbstractComboBox::FFAbstractComboBox(FFAbstractButton* activator, QWidget* parent): + QWidget(parent) +{ + cols_ = 1; + + //sets activator + activator_ = activator; + activator_->setObjectName("Activator"); + + //sets layout of combobx + mainLayout = new QGridLayout(); + mainLayout->setMargin(0); + mainLayout->setSpacing(0); + mainLayout->addWidget(activator_); + setLayout(mainLayout); + + //sets popup + popUp = new FFComboPopUp(this); + popUp->setWindowFlags(Qt::SplashScreen); + popUp->setGeometry(QApplication::desktop()->geometry()); + popUp->hide(); + popUp->setWindowModality(Qt::WindowModal); + + setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); + + //connects + connect(activator_, SIGNAL(clicked()), popUp, SLOT(exec())); + connect(this, SIGNAL(reset()),popUp,SLOT(recreatePopUp())); + connect(this, SIGNAL(itemsChanged(FFAbstractButton*)),popUp,SLOT(registerNewItem(FFAbstractButton*))); +} +/** + * A virtual destructor of FFAbstractButton. + */ +FFAbstractComboBox::~FFAbstractComboBox() +{ + ; +} + +/** + * Removes item from combobox + * @param index is a index of item + */ +void FFAbstractComboBox::removeItem(int index) +{ + if(items_.size()>index) + { + disconnect(items_.at(index)); + delete items_.takeAt(index); + } + emit reset(); +} +/** + * Calls setActivatorSpecs and emits signals activated(QVariant),activated(int) + * @param index is a index of item + */ +void FFAbstractComboBox::setCurrentItem(int index) +{ + if(items_.size()>index) + { + setActivatorSpecs(items_.at(index)); + if(!signalsBlocked()) + { + emit activated(activatorSpecs()); + emit activated(index); + } + } +} +/** + * Returns pointer to activator + */ +FFAbstractButton* FFAbstractComboBox::activator() +{ + return activator_; +} +/** + * Returns number of columns + */ +int FFAbstractComboBox::cols() +{ + return cols_; +} +/** + * Returns list of items + */ +QList FFAbstractComboBox::items() +{ + return items_; +} +/** + * Returns popup's layout spacing + */ +int FFAbstractComboBox::spacing() +{ + return popUp->scrollAreaLayout->spacing(); +} +/** + * Sets columns number + * @param cols a number of columns + */ +void FFAbstractComboBox::setCols(int cols) +{ + cols_ = cols; + emit reset(); +} +/** + * Sets popup's layout spacing + * @param spacing a size of spacing + */ +void FFAbstractComboBox::setSpacing(int spacing) +{ + popUp->scrollAreaLayout->setSpacing(spacing); + emit reset(); +} +/** + * Adds item to combobox + * @param item a pointer to adding item + * @param autoRecreate defines if layout should be recreated automatically + */ +void FFAbstractComboBox::insertItem(FFAbstractButton* item, bool autoRecreate) +{ + items_.append(item); + emit itemsChanged(item); + + if(autoRecreate) + { + emit reset(); + } +} + +/** + * Constructs a FFComboPopUp with a parent. + * Sets variable to initial values. + */ +FFComboPopUp::FFComboPopUp(QWidget* parent) : QDialog(parent) +{ + + parentCB = dynamic_cast(parent); + //sets popup window's layout + popUpLayout = new QGridLayout(); + popUpLayout->setMargin(0); + popUpLayout->setSpacing(0); + + //sets scrollarea and scrollarea's widget + scrollArea = new FFScrollArea(); + scrollArea->setWidgetResizable(true); + + popUpLayout->addWidget(scrollArea,0,0); + setLayout(popUpLayout); + + scrollAreaLayout = new QGridLayout(); + scrollAreaLayout->setSpacing(5); + scrollAreaLayout->setMargin(0); + + scrollAreaWidget = new QWidget(); + scrollAreaWidget->setStyleSheet("background-color:black;"); + + scrollAreaWidget->setLayout(scrollAreaLayout); + scrollArea->setWidget(scrollAreaWidget); + + //sets back button + backButton = new FFAbstractButton; + backButton->setMargins(0,0,5,5); + backButton->setIconAlignment(Qt::AlignRight); + backButton->setIcon(QIcon(QPixmap(":/standard/combo_colorarrow.svg"))); + scrollAreaLayout->addWidget(backButton,0,0,1,parentCB->cols_); + + //connect + connect(backButton,SIGNAL(clicked()),this,SLOT(reject())); +} +/** + * Serves show event. Override method from mother class. + */ +void FFComboPopUp::showEvent(QShowEvent* event) +{ + // The calculation of the size of the window so that it occupied little space as possible. + + int itemsHeight = 0; + + // for each row + for(int i=0; iitems_.size()/(float)parentCB->cols_); ++i) + { + // height of an element + itemsHeight += parentCB->items_.at(i)->minimumHeight(); + + //height of an spacing + itemsHeight += scrollAreaLayout->spacing(); + } + itemsHeight += backButton->minimumHeight(); + + if(itemsHeight > QApplication::desktop()->geometry().height()) + itemsHeight = QApplication::desktop()->geometry().height(); + + setGeometry(0,0,QApplication::desktop()->geometry().width(),itemsHeight); + + QDialog::showEvent(event); + +} +/** + * Refreshes popup layout at view event + */ +void FFComboPopUp::recreatePopUp() +{ + // Deleting old objects + QLayoutItem *child; + while((child = scrollAreaLayout->takeAt(0)) != 0) + { + delete child; + } + + // Arranging objects on the popup + scrollAreaLayout->addWidget(backButton,0,0,1,parentCB->cols_); + for(int i=0, cols=0, rows=1; iitems_.size();++i,++cols) + { + if(cols==parentCB->cols_) + { + ++rows; + } + cols%=parentCB->cols_; + scrollAreaLayout->addWidget(parentCB->items_.at(i),rows,cols); + } + + // Force refresh FFScrollArea (this line exist because FFScrollArea have a little imperfection - event filter problem) + scrollArea->setWidget(scrollAreaWidget); +} +/** + * Connects new item signal clicked to actual widget's slot accept + */ +void FFComboPopUp::registerNewItem(FFAbstractButton* newItem) +{ + connect(newItem,SIGNAL(clicked()),this,SLOT(accept())); +} +/** + * Calls setCurrentItem with widget index + */ +void FFComboPopUp::accept() +{ + parentCB->setCurrentItem(scrollAreaLayout->indexOf(dynamic_cast(sender()))-1); + QDialog::accept(); +} + +/** + \fn void FFAbstractComboBox::reset() + *This signal is emitted when is necessary to refresh layout of popup window. + */ + +/** + \fn void FFAbstractComboBox::activated(QVariant spec) + *This signal is emitted when option on combobox was chosen. + *@param spec contains specific chosen value + */ + +/** + \fn void FFAbstractComboBox::activated(int index) + *This signal is emitted when option on combobox was chosen. + *@param index contains index of chosen item + */ + + +/** + \fn void FFComboPopUp::selected(FFAbstractButton* selectedButton) + *This signal is emitted when item was selected + *@param selectedButton pointer to selected item + */ diff --git a/libffqw-1.0/sources/ffabstractcombobox.h b/libffqw-1.0/sources/ffabstractcombobox.h new file mode 100644 index 0000000..bb896e0 --- /dev/null +++ b/libffqw-1.0/sources/ffabstractcombobox.h @@ -0,0 +1,190 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ + +/** + * @file ffabstractcombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.10.9 + * @version 1.0 + */ + +#ifndef FFABSTRACTCOMBOBOX_H +#define FFABSTRACTCOMBOBOX_H + +#include +#include +#include +#include +#include +#include + +#include "ffabstractbutton.h" +#include "ffscrollarea.h" + +class FFComboPopUp; + +/** + * @author ComArch S.A. + * @date 2009.10.09 + * @version 1.0 + * + * @brief A class inherited by specific comboboxes + */ +class FFAbstractComboBox : public QWidget +{ + Q_OBJECT + friend class FFComboPopUp; + +public: + FFAbstractComboBox(FFAbstractButton* activator, QWidget* parent = 0); + virtual ~FFAbstractComboBox(); + + virtual void addItem(QVariant item) = 0; + virtual void removeItem(int index); + virtual void setCurrentItem(int index); + + FFAbstractButton* activator(); + int cols(); + QList items(); + QPen pen(); + int spacing(); + + void setCols(int cols); + void setSpacing(int spacing); + +protected: + FFAbstractButton* activator_; ///< activator shows actual combobox's value and activate popup window + QPen pen_; ///< contain actual pen + QList items_; /// + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +#include "ffabstractwidget.h" + +/** + * @file ffabstractwidget.cpp + * @brief Implementation of the FFAbstractWidget + * + * @author ComArch S.A. + * @date 2009.07.31 + * @version 1.0 + */ + +/** + * Constructs an FFAbstractWidget with a parent. + */ +FFAbstractWidget::FFAbstractWidget(QWidget* parent) + : QWidget(parent) +{ + +} + +/** + * A virtual destructor + */ +FFAbstractWidget::~FFAbstractWidget() +{ + +} diff --git a/libffqw-1.0/sources/ffabstractwidget.h b/libffqw-1.0/sources/ffabstractwidget.h new file mode 100644 index 0000000..cdc6dbf --- /dev/null +++ b/libffqw-1.0/sources/ffabstractwidget.h @@ -0,0 +1,243 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractwidget.h + * @brief contains all required declarations and basic utilities functions + * + * @author ComArch S.A. + * @date 2009.07.31 + * @version 1.0 + */ +#ifndef FFABSTRACTWIDGET_H_ +#define FFABSTRACTWIDGET_H_ + +#include + +class FFAbstractWidget; +typedef FFAbstractWidget FF; + +/** + * Defines default title text color for button + */ +const QColor FF_TITLE_COLOR = QColor(14,221,26); +/** + * Defines default description text color for button + */ +const QColor FF_DESCRIPTION_COLOR = QColor(100,100,100); +/** + * Defines default button height + */ +const int DEFAULT_BUTTON_HEIGHT = 65; +/** + * Defines default combo button height + */ +const int DEFAULT_COMBO_HEIGHT = 65; +/** + * Defines color for legend widget used on FFChart + */ +const QColor DEFAULT_LEGEND_BACKGROUND_COLOR = QColor(26,26,26); +/** + * Defines opacity for legend widget used on FFChart + */ +const qreal DEFAULT_LEGEND_BACKGROUND_OPACITY = 0.8; + +/** + * Defines default font name for widget title + */ +const QString FONT_TITLE_DEF = "Arial"; +/** + * Defines default font name for widget description + */ +const QString FONT_TEXT_DEF = "Arial"; + +/** + * Defines title text color for scrolling label + */ +const QColor COLOR_TITLE_DEF = QColor(50, 255, 50); +/** + * Defines description text color for scrolling label + */ +const QColor COLOR_TEXT_DEF = QColor(50, 50, 255); +/** + * Defines bright background color + */ +const QColor COLOR_BRIGHT_BACKGROUND_DEF = QColor(250, 255, 250); +/** + * Defines dark background color + */ +const QColor COLOR_DARK_BACKGROUND_DEF = QColor(250, 255, 250); +/** + * Defines bright foreground color + */ +const QColor COLOR_BRIGHT_FOREGROUND_DEF = QColor(250, 255, 250); +/** + * Defines dark foreground color + */ +const QColor COLOR_DARK_FOREGROUND_DEF = QColor(250, 255, 250); + +/** + * @author ComArch S.A. + * @date 2009.07.30 + * @version 1.0 + * + * @brief A parent-class for all widgets included in FFQW Library + */ + +class FFAbstractWidget : public QWidget +{ + Q_OBJECT + +public: + FFAbstractWidget(QWidget* parent = 0); + virtual ~FFAbstractWidget(); + +/** + * describes standard FF widgets' sizes + */ +enum Size +{ + SIZE_TINY = 0x0001, + SIZE_SMALL = 0x0002, + SIZE_NORMAL = 0x0004, + SIZE_LARGE = 0x0008, + SIZE_HUGE = 0x0010 +}; + +/** + * describes standard FF widgets' fonts + */ +enum Font +{ + FONT_TITLE = 0x0020, FONT_TEXT = 0x0040 +}; + +/** + * describes standard FF widgets' colors + */ +enum Color +{ + COLOR_TITLE = 0x0080, + COLOR_TEXT = 0x0100, + COLOR_BRIGHT_BACKGROUND = 0x0200, + COLOR_DARK_BACKGROUND = 0x0400, + COLOR_BRIGHT_FOREGROUND = 0x0800, + COLOR_DARK_FOREGROUND = 0x1000 +}; + +/** + * defines standard FF widgets' alignment + */ +enum Alignment +{ + ALIGNMENT_LEFT = 0x2000, + ALIGNMENT_RIGHT = 0x4000, + ALIGNMENT_CENTER = 0x8000 +}; + +/** + * defines standard FF widgets' scrolling type + */ +enum Scroll +{ + SCROLL_SIDE_TO_SIDE = 0x0001 +}; + +}; +/** + * Mask for checking size + */ +const int SIZE_MASK = FF::SIZE_TINY | + FF::SIZE_SMALL | + FF::SIZE_NORMAL | + FF::SIZE_LARGE | + FF::SIZE_HUGE; +/** + * Mask for checking font type + */ +const int FONT_MASK = FF::FONT_TITLE | FF::FONT_TEXT; + +/** + * Mask for checking color + */ +const int COLOR_MASK = FF::COLOR_TITLE | + FF::COLOR_BRIGHT_BACKGROUND | + FF::COLOR_DARK_BACKGROUND | + FF::COLOR_BRIGHT_FOREGROUND | + FF::COLOR_DARK_FOREGROUND; +/** + * Mask for checking alignment + */ +const int ALIGNMENT_MASK = FF::ALIGNMENT_LEFT | FF::ALIGNMENT_RIGHT | FF::ALIGNMENT_CENTER; + +#endif // FFABSTRACTWIDGET_H diff --git a/libffqw-1.0/sources/ffchart.cpp b/libffqw-1.0/sources/ffchart.cpp new file mode 100644 index 0000000..ca0f7ff --- /dev/null +++ b/libffqw-1.0/sources/ffchart.cpp @@ -0,0 +1,347 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchart.cpp + * @brief Implementation of the FFChartScene class. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#include "ffchart.h" + + +/** + * Constructs a FFChart with a parent. + */ +FFChart::FFChart(QWidget* parent) : + FFAbstractWidget(parent) +{ + init(); +} + +/** + * A virtual destructor. + */ +FFChart::~FFChart() +{ + +} + +/** + * Initiates an object of FFChart. Sets all needed fields and connections. + * It is called by all constructors. + */ +void FFChart::init() +{ + //sets size policy + setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + + + // creates needed objects + view = new QGraphicsView(this); + scene = new FFChartScene(this); + legend = new FFChartLegend(this); + + //sets default values + autoSort_ = true; + autoValidate_ = true; + + //sets view + view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view->setScene(scene); + //necessary with our librray in Qt 4.6 +#ifndef DIABLO_COMP + view->setOptimizationFlag(QGraphicsView::IndirectPainting); +#endif + + //sets legend size + legend->setGeometry(width() / 2, 0, width() / 2, height()); + //hides legend + legend->hide(); + + + + view->installEventFilter(this); + + //connects + connect(this,SIGNAL(seriesChanged(QList)),scene,SLOT(seriesChanged(QList))); + connect(legend, SIGNAL(updateSeries()), scene, SLOT(update())); +} + +/** + * Adds new series that will be drawn on the chart. + */ +void FFChart::addSeries(FFChartSeries* series) +{ + + //series validation + if(autoValidate_) + { + series->validate(); + } + //series' point sorting + if(autoSort_) + { + series->sort(); + } + + + series->pen()->setCosmetic(true); + + //add series to sies list and legend + series_.append(series); + + legend->addSeries(series); + + //updates scene + scene->update(); + + + emit seriesChanged(series_); +} + +/** + * Removes series indicated by given pointer. + */ +void FFChart::removeSeries(FFChartSeries* series) +{ + //searches for series and remove it + for(int i = 0; i < series_.size(); ++i) + { + if(series_[i] == series) + { + legend->deleteSeries(series); + series_.removeAt(i); + } + } + + //update scene + scene->update(); + + emit seriesChanged(series_); +} + +/** + * Removes all series. + */ +void FFChart::removeSeries() +{ + //removes series + int num = series_.size(); + for(int i = 0; i < num; ++i) + { + legend->deleteSeries(series_.at(0)); + series_.removeAt(0); + } + //updates scene + scene->update(); + + emit seriesChanged(series_); +} + +/** + * Returns a list with pointers to all series contained in the chart. + */ +QList FFChart::series() +{ + return series_; +} + +/** + * Returns pointer to series with given name. + * @return pointer to the looking series or NULL if series is not found + */ +FFChartSeries* FFChart::series(QString name) +{ + //return pointer to first added series with given name + + for(int i=0; iname() == name) + { + return series_[i]; + } + } + //If found nothing NULL is returned + return NULL; +} + +/** + * Turns on/off auto-sorting on series. If it is on then each newly added series + * will be sorted by 'x' values. + */ +void FFChart::setAutoSort(const bool& autoSort) +{ + autoSort_ = autoSort; +} + +/** + * Turns on/off auto-validating on series. If it is on then each newly added + * series will be cleaned with the same points. + */ +void FFChart::setAutoValidate(const bool& autoValidate) +{ + autoValidate_ = autoValidate; +} + +/** + * Returns true if auto-sorting is enabled, otherwise false. + */ +bool FFChart::isAutoSortEnabled() const +{ + return autoSort_; +} + +/** + * Returns true if auto-validating is enabled, otherwise false. + */ +bool FFChart::isAutoValidateEnabled() const +{ + return autoValidate_; +} + +/** + * Sets object that will be responsible for managing with events sent to + * the FFChart. + */ +void FFChart::installEventFilter(QObject* object) +{ + view->installEventFilter(object); +} + +/** + * Slot that zooms in the current chart into a rectangle which is smaller by + * a given ratio. + */ +void FFChart::zoomIn(qreal ratio) +{ + scene->zoomIn(ratio); +} + +/** + * Slot that zooms out the current chart into a rectangle which is larger by + * a given ratio. + */ +void FFChart::zoomOut(qreal ratio) +{ + scene->zoomOut(ratio); +} + +/** + * Moves the chart by given vector. + */ +void FFChart::moveBy(QPointF point) +{ + scene->moveBy(point.toPoint()); +} + +/** + * Overridden virtual method. It is responsible for managing with resize events. + */ +void FFChart::resizeEvent(QResizeEvent* event) +{ + Q_UNUSED(event) + view->resize(size()); + scene->setSceneRect(QRectF(0,0,event->size().width(),event->size().height())); + legend->setGeometry(width() / 2, 0, width() / 2, height()); + + QWidget::resizeEvent(event); +} + +/** + * Toggles the legend. If it is visible, this method makes it hidden and + * vice versa. + */ +void FFChart::showLegend() +{ + if(legend->isVisible()) + { + legend->hide(); + this->repaint(); + } + else + { + legend->show(); + this->repaint(); + } +} + +/*! + * \fn void FFChart::seriesChanged(QList); + * + * This Signal is emitted when the set of series was changed. + */ diff --git a/libffqw-1.0/sources/ffchart.h b/libffqw-1.0/sources/ffchart.h new file mode 100644 index 0000000..5114312 --- /dev/null +++ b/libffqw-1.0/sources/ffchart.h @@ -0,0 +1,172 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchart.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#ifndef FFCHART_H +#define FFCHART_H + +#include +#include +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractwidget.h" +#include "ffchartbutton.h" +#include "ffchartscene.h" +#include "ffchartseries.h" +#include "ffchartlegend.h" + + +/** + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + * + * @brief A good looking widget to visualize simple data series. + */ +#ifdef MAEMO + +class FFChart : public FFAbstractWidget +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFChart : public FFAbstractWidget +{ + Q_OBJECT + Q_PROPERTY(bool autosortSeries READ isAutoSortEnabled WRITE setAutoSort) + Q_PROPERTY(bool autoValidateSeries READ isAutoValidateEnabled WRITE setAutoValidate) + +#endif + +public: + FFChart(QWidget* parent = 0); + virtual ~FFChart(); + + void addSeries(FFChartSeries* series); + void removeSeries(FFChartSeries* series); + void removeSeries(); + + QList series(); + FFChartSeries* series(QString name); + + void setAutoSort(const bool& autoSort); + void setAutoValidate(const bool& autoValidate); + + bool isAutoSortEnabled() const; + bool isAutoValidateEnabled() const; + void installEventFilter(QObject* object); + +public slots: + void zoomIn(qreal ratio); + void zoomOut(qreal ratio); + void moveBy(QPointF point); + +protected: + void resizeEvent(QResizeEvent* event); + +private: + QGraphicsView* view; ///< view of ffChart + FFChartScene* scene; ///< scene of FFchart + FFChartLegend* legend; ///< legend of FFChart + + QList series_; /// series_); + +public slots: + void showLegend(); +}; + +#endif // FFCHART_H diff --git a/libffqw-1.0/sources/ffchartbutton.cpp b/libffqw-1.0/sources/ffchartbutton.cpp new file mode 100644 index 0000000..583fe72 --- /dev/null +++ b/libffqw-1.0/sources/ffchartbutton.cpp @@ -0,0 +1,333 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartbutton.cpp + * @brief Implementation of the FFChartButton class. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + * Extend QGraphicsSvgItem to easy use 1 or 2 image and added functionality + * to decrease and increase item after click + */ + +#include "ffchartbutton.h" + +/** + * Constructs a FFChartButton with a parent. + * Set variables to initial values. + */ +FFChartButton::FFChartButton(QGraphicsItem* parent) : + QGraphicsSvgItem(parent) +{ + init(); +} + +/** + * A virtual destructor of FFChartButton. + */ +FFChartButton::~FFChartButton() +{ + ; +} + +/** + * Set variables to initial values. + */ +void FFChartButton::init() +{ + //sets default values + state = false; //usefull when changing beetwen 2 images, it remember click state - what image should be display + twoImageON = false; //state to store if the button have 2 images + startedTimeLine = false; //state to store if time line ends + + sizeRatio = 1; + frameRange_ = DEFAULT_FRAME_RANGE; + duration_ = DEFAULT_DURATION_TIME; + zoomRatio_ = DEFAULT_ZOOM_RATIO; + scaleWidth = 1; + scaleHeight = 1; + + image = new FFViewCache; + image2 = new FFViewCache; + + //sets animation's parameters + animation = new QTimeLine(duration_, this); + animation->setFrameRange(0, frameRange_); + animation->setUpdateInterval(duration_ / frameRange_); + + //connects + connect(animation, SIGNAL(frameChanged(int)), this, SLOT(tick(int))); + connect(animation, SIGNAL(finished()), this, SLOT(animationFinished())); +} + +/** + * Function responsible for animation (zooming) + * @param frame Number of the frame + */ +void FFChartButton::tick(int frame) +{ + + qreal width = this->boundingRect().width(); + qreal height = this->boundingRect().height(); + qreal ratio = 1; + QGraphicsSvgItem::scale(1 / sizeRatio, 1 / sizeRatio); + + //Setting scaling ratio + //first part of animation + if(frame <= frameRange_ / 2) + { + ratio = ((zoomRatio_ - 1) * (frame)) / (frameRange_ / 2) + 1; + } + //second part of animation + else if(frame <= frameRange_) + { + ratio = (zoomRatio_ - 1) * (frameRange_ - frame) / (frameRange_ + / 2) + 1; + } + + sizeRatio = ratio; + //change scale and posiotion of button + QGraphicsSvgItem::scale(ratio, ratio); + this->setPos(startingPosition.x() - ((ratio * width - width) + * scaleWidth / 2), startingPosition.y() - ((ratio + * height - height) * scaleHeight / 2)); +} + +/** + * Function to handle situation when animation reach end + */ +void FFChartButton::animationFinished() +{ + animation->stop(); + sizeRatio = 1; + startedTimeLine = false; +} + +/** + * Set image of item + * @param path Path to image + */ +void FFChartButton::setImage(QString path) +{ + image->init(path + ".svg"); + image->updateView(image->defaultSize()); + setSharedRenderer(image->renderer()); + + twoImageON = false; +} + +/** + * Set images of item + * @param path Path to first image + * @param path2 Path to second image + */ +void FFChartButton::setImage(QString path, QString path2) +{ + + image->init(path + ".svg"); + image2->init(path2 + ".svg"); + + setSharedRenderer(image->renderer()); + twoImageON = true; +} + +/** + * Set size of item + * @param size New size of the item + */ +void FFChartButton::setSize(const QSizeF& size) +{ + qreal tmpScaleWidth = size.toSize().width() / boundingRect().width() + * scaleWidth; + qreal tmpScaleHeight = size.toSize().height() / boundingRect().height() + * scaleHeight; + scale(tmpScaleWidth, tmpScaleHeight); +} + +/** + * Set if item will be increasing (zoomRatio>1) or will be decreasing (zoomRatio<1) + * @param zoomRatio How much size will be changing during animation + */ +void FFChartButton::setZoomRatio(qreal zoomRatio) +{ + zoomRatio_ = zoomRatio; +} + +/** + * Set number of frame in animation + * @param frameRange Number of frames + */ +void FFChartButton::setFrameRange(int frameRange) +{ + frameRange_ = frameRange; + animation->setFrameRange(0, frameRange_); +} + +/** + * Set how much time animation take + * @param duration Time of animation + */ +void FFChartButton::setDuration(int duration) +{ + duration_ = duration; + animation->setDuration(duration_); +} + +/** + * Scale the item + * @param sx Size of scale in width + * @param sy Size of scale in height + */ +void FFChartButton::scale(qreal sx, qreal sy) +{ + scaleWidth = sx * scaleWidth; + scaleHeight = sy * scaleHeight; + QGraphicsSvgItem::scale(scaleWidth, scaleHeight); +} + +/** + * Return if the item will be increasing (zoomRatio>1) or will be decreasing (zoomRatio<1) + */ +qreal FFChartButton::zoomRatio() +{ + return zoomRatio_; +} + +/** + * Return number of frame in animation + */ +int FFChartButton::frameRange() +{ + return frameRange_; +} + +/** + * Return how much time animation take + */ +int FFChartButton::duration() +{ + return duration_; +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFChartButton::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) +{ + Q_UNUSED(event) + //If button has two images they are toggled + if(twoImageON) + { + if(state == false) + { + setSharedRenderer(image2->renderer()); + } + else + { + setSharedRenderer(image->renderer()); + } + state = !state; + } + + //Starts animation + if(!startedTimeLine) + { + startingPosition = this->pos(); + animation->start(); + startedTimeLine = true; + } + emit mouseRelease(); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFChartButton::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + Q_UNUSED(event) + emit mousePress(); +} + +/** + * \fn void FFChartButton::mouseRelease() + * This signal is emitted when the item is released. + */ + +/** + * \fn void FFChartButton::mousePress() + * This signal is emitted when the item is pressed. + */ diff --git a/libffqw-1.0/sources/ffchartbutton.h b/libffqw-1.0/sources/ffchartbutton.h new file mode 100644 index 0000000..e6a518f --- /dev/null +++ b/libffqw-1.0/sources/ffchartbutton.h @@ -0,0 +1,153 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + */ + +#ifndef FFCHARTBUTTON_H +#define FFCHARTBUTTON_H + +#include +#include +#include "ffviewcache.h" + +static const qreal DEFAULT_ZOOM_RATIO = 1.2; +static const int DEFAULT_DURATION_TIME = 400; +static const int DEFAULT_FRAME_RANGE = 20; + +/** + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * @brief Extend QGraphicsSvgItem to easy use 1 or 2 image and added + * functionality to decrease and increase item after click + */ + +class FFChartButton : public QGraphicsSvgItem +{ +Q_OBJECT +public: + FFChartButton(QGraphicsItem* parent = 0); + virtual ~FFChartButton(); + + void setImage(QString path); + void setImage(QString path,QString path2); + void setSize(const QSizeF& size); + void setZoomRatio(qreal zoomRatio); + void setFrameRange(int frameRange); + void setDuration(int duration); + void scale(qreal sx, qreal sy); + + qreal zoomRatio(); + int frameRange(); + int duration(); + +protected: + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); +private: + QTimeLine* animation; ///< stores timer of animation + FFViewCache* image; ///< cached image1 + FFViewCache* image2; ///< cached image2 + + int frameRange_; ///< duration of one frame + int duration_; ///< duration of animation + qreal zoomRatio_; ///< ratio of zooming + qreal sizeRatio; ///< ratio of resizing + QPointF startingPosition; ///< point of starting position on the scene + bool startedTimeLine; ///< true if animation is started + qreal scaleWidth ; ///< scale's ratio of width + qreal scaleHeight ; ///< scale's ratio of height + + bool twoImageON; ///< is true when two images are set + bool state; ///< stores information about it in which state currently is button. + + void init(); + +signals: + void mouseRelease(); + void mousePress(); + +private slots: + void tick(int frame); + void animationFinished(); +}; + +#endif // FFCHARTBUTTON_H diff --git a/libffqw-1.0/sources/ffchartlegend.cpp b/libffqw-1.0/sources/ffchartlegend.cpp new file mode 100644 index 0000000..81c7c0f --- /dev/null +++ b/libffqw-1.0/sources/ffchartlegend.cpp @@ -0,0 +1,390 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegend.cpp + * @brief Implementation of the FFChartLegend class + * + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + */ +#include "ffchartlegend.h" + +/** + * Constructs a FFChartLegend with a parent. + */ +FFChartLegend::FFChartLegend(QWidget* parent) : + FFAbstractWidget(parent) +{ + this->parent = parent; + init(); +} + +/** + * A virtual destructor. + */ +FFChartLegend::~FFChartLegend() +{ + int num = legendSeriesTable.size(); + for(int i = 0; i < num; ++i) + { + delete legendSeriesTable.at(0); + legendSeriesTable.remove(0); + } +} + +/** + * Initiates all needed fields and functionality + */ +void FFChartLegend::init() +{ + //sets default values + path = LEGEND_PATH; + + backgroundColor = DEFAULT_LEGEND_BACKGROUND_COLOR; + backgroundOpacity = DEFAULT_LEGEND_BACKGROUND_OPACITY; + + actualChangingSeries = NULL; + + //set style + setStyleSheet("background-color: transparent"); + + //sets layout + legendLayout = new QGridLayout(this); + legendLayout ->setMargin(0); + this->setLayout(legendLayout); + + legendScrollArea = new FFScrollArea(this); + legendScrollArea->setFrameStyle(0); + legendScrollAreaItem = new QWidget(legendScrollArea); + legendScrollAreaLayout = new QGridLayout(legendScrollAreaItem); + legendScrollAreaItem->setLayout(legendScrollAreaLayout); + legendScrollAreaLayout->setMargin(0); + legendScrollAreaLayout->setSpacing(5); + + legendScrollAreaItem->setStyleSheet("background-color: transparent"); + legendScrollArea->setWidget(legendScrollAreaItem); + legendScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + legendScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + legendScrollArea->setFrameStyle(0); + + legendLayout->addWidget(legendScrollArea); + + legendControlPanel = new FFChartLegendControlPanel(this); + legendControlPanel->hide(); + + //connects + connect(legendControlPanel, + SIGNAL(penChanged(QPen)), + this, + SLOT(changeSeriesPen(QPen))); +} + +/** + * Supports click event. Shows or hide chart's legend + */ +void FFChartLegend::popUp() +{ + if(isVisible()) + { + this->hide(); + } + else + { + this->show(); + } + +} + +/** + * It updates size of FFChartLegend's elements + * Calls changeSize() method + */ +void FFChartLegend::resizeEvent(QResizeEvent* event) +{ + Q_UNUSED(event) + if(this->isVisible()) + { + changeSize(); + } + +} +/** + * Fits size of FFChartLegend's elements chart when show event appeared. + * Calls changeSize() method. + */ +void FFChartLegend::showEvent(QShowEvent* event) +{ + Q_UNUSED(event) + + changeSize(); +} + +/** + * Add series to FFChartLegend. + * + * @param series is a pointer to series on a FFChart + */ +void FFChartLegend::addSeries(FFChartSeries* series) +{ + //creates buttons representing series + FFScrollingCheckBox* visibleCheckbox = + new FFScrollingCheckBox(legendScrollAreaItem); + FFLineButton* modifyButton = new FFLineButton(legendScrollAreaItem); + + //sets series name in buttons + visibleCheckbox->setDescription(series->name()); + visibleCheckbox->setChecked(series->isVisible()); + visibleCheckbox->disableTitle(true); + visibleCheckbox->setTopMargin(8); + visibleCheckbox->setBottomMargin(8); + visibleCheckbox->setRightMargin(2); + visibleCheckbox->setLeftMargin(2); + visibleCheckbox->setAttribute(Qt::WA_DeleteOnClose); + + modifyButton->setPen(*series->pen()); + modifyButton->setAttribute(Qt::WA_DeleteOnClose); + + SeriesContainer* tempSeriesPointer = + new SeriesContainer(series, + visibleCheckbox, + modifyButton); + //adds seriesContener to series table + legendSeriesTable.append(tempSeriesPointer); + + //adds buttons to layout + legendScrollAreaLayout->addWidget(legendSeriesTable.at(legendSeriesTable.size() + - 1)->visibleCheckBox_, + legendSeriesTable.size() - 1, + 0, + 1, + 2); + legendScrollAreaLayout->addWidget(legendSeriesTable.at(legendSeriesTable.size() + - 1)->controlPanelButton_, + legendSeriesTable.size() - 1, + 2, + 1, + 1); + + //connecting buttons to legend + connect(modifyButton, + SIGNAL(clicked()), + this, + SLOT(chooseChangingSeries())); + connect(visibleCheckbox, SIGNAL(clicked()), this, SLOT(changeVisible())); + changeSize(); +} + +/** + * Fits size of FFChartLegend's elements + */ +void FFChartLegend::changeSize() +{ + // sets geometry for legend elements + legendControlPanel->setGeometry(0, 0, size().width(), size().height()); + + legendScrollAreaItem->setGeometry(0, + 0, + legendScrollArea->width(), + legendSeriesTable.size() + * (DEFAULT_BUTTON_HEIGHT + + 5)); + //update legendscrollarea + legendScrollArea->setWidget(NULL); + legendScrollArea->setWidget(legendScrollAreaItem); +} + +/** + * Assign pointer on actual modified series to the temporary pointer. + */ +void FFChartLegend::chooseChangingSeries() +{ + //check which series was chosen to modification + for(int i = 0; i < legendSeriesTable.size(); i++) + { + if(legendSeriesTable.at(i)->controlPanelButton_ + == (FFLineButton*)sender()) + actualChangingSeries = legendSeriesTable.at(i); + } + + //sets and shows legendCotnrolPanel + legendControlPanel->setPen(*actualChangingSeries->series_->pen()); + legendControlPanel->show(); + if(NULL != parent) + parent->repaint(); +} + +/** + * Updates a pen of button representing actual modified series and emits + * signal to chart. + * + * @param pen represents setting series pen + */ + +void FFChartLegend::changeSeriesPen(QPen pen) +{ + actualChangingSeries->series_->setPen(pen); + actualChangingSeries->controlPanelButton_->setPen(pen); + emit updateSeries(); +} + +/** + * Updates series visibility + */ +void FFChartLegend::changeVisible() +{ + //looks for pointer to changing series and change it visibility and + //state of visibleCheckbox + + for(int i = 0; i < legendSeriesTable.size(); i++) + { + if(legendSeriesTable.at(i)->visibleCheckBox_ + == (FFScrollingCheckBox*)sender()) + { + bool + tempVisible = + !(legendSeriesTable.at(i)->series_->isVisible()); + + legendSeriesTable.at(i)->series_->setVisible(tempVisible); + legendSeriesTable.at(i)->visibleCheckBox_->setChecked(tempVisible); + } + } + + emit updateSeries(); +} + +/** + * Deletes series from series contener + * + * @param series is a pointer to series that will be removed. + */ +void FFChartLegend::deleteSeries(FFChartSeries* series) +{ + //looks for given series in legendSeriesTable and deletes it. + for(int i = 0; i < legendSeriesTable.size(); i++) + { + if(series == legendSeriesTable.at(i)->series_) + { + legendControlPanel->hide(); + + delete legendSeriesTable.at(i); + legendSeriesTable.remove(i); + } + + } + changeSize(); +} + +/** + * Draw FFChartLegend background + * @param event Contains all informations about event. + */ +void FFChartLegend::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter paint; + paint.begin(this); + paint.setOpacity(backgroundOpacity); + paint.setBrush(backgroundColor); + paint.setPen(Qt::transparent); + paint.drawRect(0, 0, width(), height()); + paint.end(); +} + +/** + \fn void FFChartLegend::updateSeries() + + This signal is emitted when the series is/are changed + */ + +/** + * Constructs a FFChartLegend with pointers to series, and buttons . + */ +SeriesContainer::SeriesContainer(FFChartSeries* series, + FFScrollingCheckBox* visibleCheckBox, + FFLineButton* controlPanelButton) +{ + series_ = series; + visibleCheckBox_ = visibleCheckBox; + controlPanelButton_ = controlPanelButton; +} + +/** + * A virtual destructor + */ +SeriesContainer::~SeriesContainer() +{ + visibleCheckBox_->close(); + controlPanelButton_->close(); +} diff --git a/libffqw-1.0/sources/ffchartlegend.h b/libffqw-1.0/sources/ffchartlegend.h new file mode 100644 index 0000000..7c03044 --- /dev/null +++ b/libffqw-1.0/sources/ffchartlegend.h @@ -0,0 +1,185 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegend.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + */ +#ifndef FFCHARTLEGEND_H +#define FFCHARTLEGEND_H +#include +#include +#include +#include +#include + +#include "ffabstractwidget.h" +#include "ffcolorcombobox.h" +#include "ffstringcombobox.h" +#include "ffscrollingcheckbox.h" +#include "fflinecombobox.h" +#include "ffchartlegendcontrolpanel.h" +#include "ffchartseries.h" +#include "ffscrollarea.h" + +static const QString LEGEND_PATH= ":/standard/";///< path to folder with graphics file + +class FFChartLegend; + +/** + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + * + * @brief A class to store series in legend + */ +class SeriesContainer +{ +private: + friend class FFChartLegend; + + SeriesContainer(FFChartSeries* series, + FFScrollingCheckBox* visibleCheck, + FFLineButton* modifyButton); + ~SeriesContainer(); + + FFChartSeries* series_; ///< pointer to series + FFScrollingCheckBox* visibleCheckBox_; ///< pointer to checkbox responsible for sieries's visiblity + + FFLineButton* controlPanelButton_; ///< pointer to button showing line's syle + +}; + +/** + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + * + * @brief A class of chart's legend + */ +class FFChartLegend : public FFAbstractWidget +{ + Q_OBJECT + +public: + FFChartLegend(QWidget* parent = 0); + virtual ~FFChartLegend(); + +public slots: + void addSeries(FFChartSeries* series); + void changeSize(); + void deleteSeries(FFChartSeries* ); + +protected: + virtual void resizeEvent(QResizeEvent* event); + virtual void showEvent(QShowEvent* event); + virtual void paintEvent(QPaintEvent *event); + +private: + void init(); + + QWidget* parent; ///< pointer to parent widget + + QString path; ///< path to folder with graphics file + + QGridLayout* legendLayout; ///< legend's layout + + FFScrollArea* legendScrollArea; ///< legend's scroll area + QWidget* legendScrollAreaItem; ///< widget placed on legendscrollarea + QGridLayout* legendScrollAreaLayout; ///< layout of legenScrollAreaItem + + QVector legendSeriesTable; ///< containar of all series on the legend + + SeriesContainer* actualChangingSeries; ///< pointer to actual changing series + + FFChartLegendControlPanel* legendControlPanel; ///< panel for changing line's style + + + QColor backgroundColor; ///< legend background color + qreal backgroundOpacity; ///< legend background opacity + +private slots: + void popUp(); + void chooseChangingSeries(); + void changeVisible(); + void changeSeriesPen(QPen); + +signals: + void updateSeries(); +}; + +#endif // FFCHARTLEGEND_H diff --git a/libffqw-1.0/sources/ffchartlegendcontrolpanel.cpp b/libffqw-1.0/sources/ffchartlegendcontrolpanel.cpp new file mode 100644 index 0000000..55c9706 --- /dev/null +++ b/libffqw-1.0/sources/ffchartlegendcontrolpanel.cpp @@ -0,0 +1,277 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegendcontrolpanel.cpp + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + */ +#include +#include "ffchartlegendcontrolpanel.h" + +/** + * Constructs a FFChartLegendControlPanel with parent. + * @param parent QWidget parent + */ +FFChartLegendControlPanel::FFChartLegendControlPanel(QWidget* parent) : + FFAbstractWidget(parent) +{ + this->parent = parent; + init(); +} + +/** + * A virtual destructor. + */ +FFChartLegendControlPanel::~FFChartLegendControlPanel() +{ + parent = NULL; + +} + +/** + * Returns pen_ - pen with line style, line color and line width + */ +QPen FFChartLegendControlPanel::pen() +{ + return pen_; +} + +/** + * Sets pen_ - pen with line style, line color and line width + */ +void FFChartLegendControlPanel::setPen(QPen pen) +{ + pen_ = pen; + colorSelector->setCurrentColor(pen.color()); + styleSelector->setCurrentLine(pen.style()); + thicknessSelector->setCurrentLine(pen.width()); +} + +/** + * Initiates all needed fields + */ +void FFChartLegendControlPanel::init() +{ + // sets default values + setAutoFillBackground(true); + + backgroundColor = DEFAULT_LEGEND_BACKGROUND_COLOR; + backgroundOpacity = DEFAULT_LEGEND_BACKGROUND_OPACITY; + + //Initialize pen_ + pen_.setWidth(0); + pen_.setStyle(Qt::SolidLine); + pen_.setColor(Qt::transparent); + + //sets hide button + hideButton = new FFAbstractButton(this); + + hideButton->setMargins(0, 0, 5, 5); + hideButton->setIconAlignment(Qt::AlignRight); + hideButton->setIcon(QIcon(QPixmap(":/standard/combo_colorarrow.svg"))); + + //creates selectors + colorSelector = new FFColorComboBox(this); + thicknessSelector = new FFLineComboBox(this); + styleSelector = new FFLineComboBox(this); + + //sets selectors and add needed items + QBrush emptyBrush(QColor(20, 80, 0)); + thicknessSelector->setTitle("Thickness's chooser"); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 1)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 2)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 3)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 4)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 5)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 6)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 7)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 8)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 9)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 10)); + + styleSelector->setTitle("Style's chooser"); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::SolidLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::DashLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 6, Qt::DotLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::DashDotDotLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::DashDotLine)); + + colorSelector->addItem(QColor(125, 125, 125)); + colorSelector->addItem(QColor(255, 0, 0)); + colorSelector->addItem(QColor(0, 255, 0)); + colorSelector->addItem(QColor(0, 0, 255)); + colorSelector->addItem(QColor(255, 255, 0)); + colorSelector->addItem(QColor(255, 255, 255)); + colorSelector->addItem(QColor(0, 255, 255)); + colorSelector->addItem(QColor(255, 0, 255)); + colorSelector->addItem(QColor(255, 255, 255)); + colorSelector->setCols(2); + + //creates and sets layout of controlPanel + gLayout = new QGridLayout(this); + gLayout->setMargin(0); + + gLayout->addWidget(thicknessSelector, 0, 0); + gLayout->addWidget(styleSelector, 1, 0); + gLayout->addWidget(colorSelector, 2, 0); + gLayout->addWidget(hideButton, 3, 0); + + //empty item added to layout + QSpacerItem* horizontalSpacer = new QSpacerItem(1, + 1, + QSizePolicy::Expanding, + QSizePolicy::Expanding); + gLayout->addItem(horizontalSpacer, 4, 0); + + //connects + connect(thicknessSelector, + SIGNAL(activated(QVariant)), + this, + SLOT(thicknessChanged(QVariant))); + connect(styleSelector, + SIGNAL(activated(QVariant)), + this, + SLOT(styleChanged(QVariant))); + connect(colorSelector, + SIGNAL(activated(QVariant)), + this, + SLOT(colorChanged(QVariant))); + connect(hideButton, SIGNAL(clicked()), this, SLOT(hide())); +} + +/** + * Slot to support sizeChooser and emit signal to legend + */ +void FFChartLegendControlPanel::thicknessChanged(QVariant localPen) +{ + pen_.setWidth(localPen.value ().width()); + emit penChanged(pen_); + +} + +/** + * Slot to support styleChooser and emit signal to legend + */ +void FFChartLegendControlPanel::styleChanged(QVariant localPen) +{ + pen_.setStyle(localPen.value ().style()); + emit penChanged(pen_); +} + +/** + * Slot to support colorChooserand emit signal to legend + */ +void FFChartLegendControlPanel::colorChanged(QVariant localPen) +{ + pen_.setColor(localPen.value ().color()); + emit penChanged(pen_); +} + +/** + * Slot to support hide feature + */ +void FFChartLegendControlPanel::hide() +{ + QWidget::hide(); + if(NULL != parent) + parent->parentWidget()->repaint(geometry()); +} + +/** + * Draws FFLegendControlPanel's background + * @param event Contains all informations about event. + */ +void FFChartLegendControlPanel::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter paint; + paint.begin(this); + paint.setOpacity(backgroundOpacity); + paint.setBrush(backgroundColor); + paint.setPen(Qt::transparent); + paint.drawRect(0, 0, width(), height()); + paint.end(); +} + diff --git a/libffqw-1.0/sources/ffchartlegendcontrolpanel.h b/libffqw-1.0/sources/ffchartlegendcontrolpanel.h new file mode 100644 index 0000000..f896e30 --- /dev/null +++ b/libffqw-1.0/sources/ffchartlegendcontrolpanel.h @@ -0,0 +1,148 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegendcontrolpanel.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + */ + +#ifndef FFCHARTLEGENDCONTROLPANEL_H +#define FFCHARTLEGENDCONTROLPANEL_H + +#include +#include +#include +#include + +#include "ffabstractwidget.h" +#include "ffcolorcombobox.h" +#include "fflinecombobox.h" +#include "ffstringcombobox.h" + +/** + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + * + * @brief A class providing interface to modifying series pen. + */ +class FFChartLegendControlPanel: public FFAbstractWidget +{ + Q_OBJECT +public: + FFChartLegendControlPanel(QWidget* parent=0); + + virtual ~FFChartLegendControlPanel(); + + QPen pen(); + + void setPen(QPen pen); + +public slots: + //slots to support sizeChooser styleChooser and color chooser + void colorChanged(QVariant localPen); + void thicknessChanged(QVariant localPen); + void styleChanged(QVariant localPen); + + void hide(); + +protected: + virtual void paintEvent(QPaintEvent *event); + +private: + void init(); + + QMap styleMap; /// sizeMap; ///< map with pen's thickness + + QPen pen_; ///< pen of actual series + + FFLineComboBox* thicknessSelector; ///< thickness's selector + FFLineComboBox* styleSelector; ///< syle's selector + FFColorComboBox* colorSelector; ///< color's selector + FFAbstractButton* hideButton;///< button to hide controlPanel + + QGridLayout* gLayout; ///< layout of controlPanel + + QColor backgroundColor; ///< background's color + qreal backgroundOpacity; ///< background's opacity + QWidget* parent; ///< pointer to parent +signals: + void penChanged(QPen pen); +}; + +#endif // FFCHARTLEGENDCONTROLPANEL_H diff --git a/libffqw-1.0/sources/ffchartscene.cpp b/libffqw-1.0/sources/ffchartscene.cpp new file mode 100644 index 0000000..292951e --- /dev/null +++ b/libffqw-1.0/sources/ffchartscene.cpp @@ -0,0 +1,903 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartscene.cpp + * @brief Implementation of the FFChartScene class. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#include "ffchartscene.h" + +// ############################################################ CONSTRUCTORS + +/** + * Constructs a FFChartScene with a parent. + */ +FFChartScene::FFChartScene(QObject* parent) : + QGraphicsScene(parent) +{ + init(); +} + +/** + * A virtual destructor. + */ +FFChartScene::~FFChartScene() +{ + +} + +/** + * Initiates an object of FFChartScene. Sets all needed fields connections. + * It is called by all constructors. + */ +void FFChartScene::init() +{ + //sets default configuration + moveModeSw = false; + zoomModeSw = false; + kineticCount = 0; + + accumulatedZoomFactor_ = QSize(1, 1); + QBrush zoomRectBrush(QColor(60, 80, 60)); + + QPen zoomRectPen; + zoomRectPen.setBrush(zoomRectBrush); + zoomRectPen.setColor(QColor(80, 180, 80)); + zoomRectPen.setWidth(3); + + zoomRect = new QGraphicsRectItem; + zoomRect->setPen(zoomRectPen); + zoomRect->setBrush(zoomRectBrush); + setBackgroundBrush(QBrush(QColor(30, 30, 30))); + + timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(kineticScroll())); + + zoomInButton.moveBy(10,10); + zoomOutButton.moveBy(10,90); + legendButton.moveBy(10, sceneRect().height() - 70); + + subaxesSpacing_ = 40; + subaxesPen_.setColor(QColor(80,80,80)); + subaxesPen_.setStyle(Qt::DashLine); + subaxesPen_.setCosmetic(true); + + axesValuesPen_.setColor(QColor(240, 240, 240)); + + //adds button to chart + addItem(&zoomInButton); + addItem(&zoomOutButton); + addItem(&legendButton); + + + + //connects + connect(&zoomInButton, SIGNAL(mouseRelease()), this, SLOT(zoomIn())); + connect(&zoomOutButton, SIGNAL(mouseRelease()), this, SLOT(zoomOut())); + connect(&legendButton, SIGNAL(mouseRelease()), parent(), SLOT(showLegend())); + + //sets chart's buttons + zoomInButton.setImage(":/standard/chart_zoomin"); + zoomOutButton.setImage(":/standard/chart_zoomout"); + legendButton.setImage(":/standard/chart_legendON",":/standard/chart_legendOFF"); + + zoomInButton.setZoomRatio(1.4); + zoomOutButton.setZoomRatio(0.6); + legendButton.setZoomRatio(1.4); + + zoomInButton.setSize(QSize(60, 60)); + zoomOutButton.setSize(QSize(60, 60)); + legendButton.setSize(QSize(60, 60)); + +} + +// ################################################################## PUBLIC + +/** + * Moves given point of chart to the scene's top left corner. + */ +void FFChartScene::moveTo(QPoint point) +{ + translateFactor_ = point; + update(); +} + +/** + * Moves given point of chart to the scene's top left corner. + */ +void FFChartScene::moveTo(float x, float y) +{ + translateFactor_ = QPointF(x, y); + update(); +} + +/** + * Moves the chart by a given vector. + */ +void FFChartScene::moveBy(QPoint destPoint) +{ + translateFactor_ += destPoint; + update(); +} + +/** + * Moves the chart by a given vector. + */ +void FFChartScene::moveBy(float x, float y) +{ + translateFactor_ += QPointF(x, y); + update(); +} + +/** + * Adds set of points to chart. + */ +void FFChartScene::addSeries(FFChartSeries* series) +{ + this->series.append(series); + itemsBoundingRect_ = itemsBoundingRect(&itemsBoundingValues_); + + update(); + + emit seriesChanged(this->series); +} + +/** + * Sets a list of series. + */ +void FFChartScene::setSeries(QList series) +{ + this->series = series; + itemsBoundingRect_ = itemsBoundingRect(&itemsBoundingValues_); + + update(); + + emit seriesChanged(&series); +} + +/** + * Overridden method from QGraphicsScene. + */ +void FFChartScene::setSceneRect(const QRectF& rect) +{ + QGraphicsScene::setSceneRect(rect); + legendButton.setPos(10, rect.height() - 70); + + translateFactor_.setX(rect.width() * 0.5); + translateFactor_.setY(rect.height() * 0.5); + + sceneRec = rect; +} + +/** + * Sets a distance in pixels between subaxes. + */ +void FFChartScene::setSubaxesSpacing(const float& subaxesSpacing) +{ + subaxesSpacing_ = subaxesSpacing; +} + +/** + * Returns a distance in pixels between subaxes. + */ +float FFChartScene::subaxesSpacing() const +{ + return subaxesSpacing_; +} + +/** + * Sets a pen that will be used to draw subaxes. + */ +void FFChartScene::setSubaxesPen(const QPen& subaxesPen) +{ + subaxesPen_ = subaxesPen; +} + +/** + * Returns a pen that is used to draw subaxes. + */ +QPen FFChartScene::subaxesPen() const +{ + return subaxesPen_; +} + +/** + * Sets a pen that will be used to draw values next to subaxes. + */ +void FFChartScene::setAxesValuesPen(const QPen& axesValuesPen) +{ + axesValuesPen_ = axesValuesPen; +} + +/** + * Returns a pen that is used to draw values next to subaxes. + */ +QPen FFChartScene::axesValuesPen() const +{ + return axesValuesPen_; +} + +// ############################################################ PUBLIC SLOTS + +/** + * Zooms the chart into the given rectangle. + */ +void FFChartScene::zoom(QRectF zoomRect) +{ + // Normalizing zoom rectangle (width and height must are greater than 0) + QRectF zoomRectNormalized(zoomRect); + if(zoomRect.width() < 0) + { + zoomRectNormalized.setX(zoomRect.x() + zoomRect.width()); + zoomRectNormalized.setWidth(qAbs(zoomRect.width())); + } + if(zoomRect.height() < 0) + { + zoomRectNormalized.setY(zoomRect.y() + zoomRect.height()); + zoomRectNormalized.setHeight(qAbs(zoomRect.height())); + } + + // Calculating zoom factor for scale() function ( >1 zoomin, <1 zoomout ) + QSizeF zoomFactor(sceneRec.width() / zoomRectNormalized.width(), + sceneRec.height() / zoomRectNormalized.height()); + + accumulatedZoomFactor_.setWidth(zoomFactor.width() + * accumulatedZoomFactor_.width()); + accumulatedZoomFactor_.setHeight(zoomFactor.height() + * accumulatedZoomFactor_.height()); + //checking if factor of zooming is not to high + if(accumulatedZoomFactor_.width() > 20 || accumulatedZoomFactor_.height() > 20) + { + accumulatedZoomFactor_.setWidth(20); + accumulatedZoomFactor_.setHeight(20); + return; + } + + + + translateFactor_ = QPointF((translateFactor_.x() + - zoomRectNormalized.x()) + * zoomFactor.width(), + (translateFactor_.y() + - zoomRectNormalized.y()) + * zoomFactor.height()); + + update(); +} + +/** + * Slot that changes series' set. + */ +void FFChartScene::seriesChanged(QList series) +{ + setSeries(series); +} + +/** + * Slot that zooms in the current chart into a rectangle which is smaller by + * a given ratio. + */ +void FFChartScene::zoomIn(qreal ratio) +{ + qreal dx, dy; + + if(accumulatedZoomFactor_.width() > 15) + { + dx = 0; + } + else + { + dx = ratio * sceneRec.width(); + } + + if(accumulatedZoomFactor_.height() > 15) + { + dy = 0; + } + else + { + dy = ratio * sceneRec.height(); + } + + zoom(QRectF(dx, dy, sceneRec.width() - 2 * dx, sceneRec.height() - 2 + * dy)); +} + +/** + * Slot that zooms out the current chart into a rectangle which is larger by + * a given ratio. + */ +void FFChartScene::zoomOut(qreal ratio) +{ + qreal dx, dy; + + if(accumulatedZoomFactor_.width() < 0.1) + { + dx = 0; + } + else + { + dx = ratio * sceneRec.width(); + } + + if(accumulatedZoomFactor_.height() < 0.1) + { + dy = 0; + } + else + { + dy = ratio * sceneRec.height(); + } + + zoom(QRectF(-dx, -dy, sceneRec.width() + 2 * dx, sceneRec.height() + 2 + * dy)); +} + +// ############################################################### PROTECTED + +/** + * Overridden method from QGraphicsScene. Draws all items that should be seen + * on the chart. + */ +void FFChartScene::drawItems(QPainter* painter, + int numItems, + QGraphicsItem* items[], + const QStyleOptionGraphicsItem options[], + QWidget* widget) +{ + Q_UNUSED(items) + Q_UNUSED(numItems) + Q_UNUSED(options) + + // Drawing zoom rectangle + if(zoomModeSw) + { + zoomRect->paint(painter, new QStyleOptionGraphicsItem, widget); + } + + painter->scale(1, 1); + + + // Drawing subaxes + drawSubAxes(painter, widget); + + // Drawing axes + drawAxes(painter, widget); + + // Drawing series + drawSeries(painter, widget); + + // Drawing axes values + drawValues(painter, widget); + + // Drawing static items + drawStaticItems(painter, widget); +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse press event. + * @param event Contains all informations about event. + */ +void FFChartScene::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QGraphicsScene::mousePressEvent(event); + + kinetic = false; + timer->stop(); + kineticCount = 0; + + if(itemAt(event->scenePos())) + { + return; + } + + pressPos = event->scenePos(); + moveModeSw = true; + zoomModeSw = false; + + if(timer->isActive() == false) + { + timer->start(80); + } + + update(); +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse double click event. + * @param event Contains all informations about event. + */ +void FFChartScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + if(itemAt(event->scenePos())) + { + return; + } + + zoomModeSw = true; + moveModeSw = false; + kinetic = false; + kineticCount = 0; + + zoomRect->setRect(event->scenePos().x(), event->scenePos().y(), 1, 1); + update(); +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse release event. + * @param event Contains all informations about event. + */ +void FFChartScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QGraphicsScene::mouseReleaseEvent(event); + + if(zoomModeSw) // zooming + { + zoomModeSw = false; + + if(qAbs(zoomRect->rect().width()) <= 15 + || qAbs(zoomRect->rect().height()) <= 15) + { + update(); + return; + } + + zoom(zoomRect->rect()); + update(); + } + else if(moveModeSw) //moving + { + moveModeSw = false; + + if(oldKineticVec != kineticVec && kineticCount > 2 && zoomModeSw == false) + { + kinetic = true; + kineticVec *= kineticRatio; + } + else + { + kinetic = false; + timer->stop(); + } + } +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse move event. + * @param event Contains all informations about event. + */ +void FFChartScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + + //if button's type is not left button return + if(event->buttons() != Qt::LeftButton) + { + return; + } + + kineticCount++; + + //updates parameters + //zooming mode + if(zoomModeSw) + { + zoomRect->setRect(pressPos.x(), + pressPos.y(), + event->scenePos().x() - pressPos.x(), + event->scenePos().y() - pressPos.y()); + } + //moving mode + else if(moveModeSw) + { + QPointF scrollRatio(event->scenePos().x() - pressPos.x(), + event->scenePos().y() - pressPos.y()); + + oldPressPos = pressPos; + pressPos = event->scenePos(); + translateFactor_ += scrollRatio; + } + update(); +} + +// ################################################################ PPRIVATE + +/** + * Returns a rectangle around all points in series + * @param boundaryValues vector of boundary values + * @return bounding rectangle QRectF + */ +QRectF FFChartScene::itemsBoundingRect(QVector* boundaryValues) +{ + //if any series are available returns zero rectangle + if(series.isEmpty()) + { + return QRectF(0, 0, 0, 0); + } + //if only one series is available returns rectangle for points from one + //series + if(series.size() == 1 && series.at(0)->size() == 1) + { + return QRectF(series.at(0)->at(0)->x(), + series.at(0)->at(0)->y(), + 0, + 0); + } + //looks for maximum points in all series + float minX = series.at(0)->at(0)->x(); + float maxX = series.at(0)->at(0)->x(); + float minY = series.at(0)->at(0)->y(); + float maxY = series.at(0)->at(0)->y(); + + for(int i = 0; i < series.size(); ++i) + { + for(int j = 0; j < series.at(i)->size(); ++j) + { + if(series.at(i)->at(j)->x() < minX) + { + minX = series.at(i)->at(j)->x(); + } + + if(series.at(i)->at(j)->y() < minY) + { + minY = series.at(i)->at(j)->y(); + } + + if(series.at(i)->at(j)->x() > maxX) + { + maxX = series.at(i)->at(j)->x(); + } + + if(series.at(i)->at(j)->y() > maxY) + { + maxY = series.at(i)->at(j)->y(); + } + } + } + + if(boundaryValues) + { + boundaryValues->clear(); + boundaryValues->append(minX); + boundaryValues->append(minY); + boundaryValues->append(maxX); + boundaryValues->append(maxY); + } + + return QRectF(minX, maxY, maxX - minX, maxY - minY); +} + +/** + * Slot that zooms in by default value. + */ +void FFChartScene::zoomIn() +{ + zoomIn(defaultZoomInRatio); +} + +/** + * Slot that zooms out by default value. + */ +void FFChartScene::zoomOut() +{ + zoomOut(defaultZoomOutRatio); +} + +/** + * Draws main axes. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawAxes(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget) + + painter->save(); + + painter->setPen(QColor(255, 255, 250)); + + // horizontal + painter->drawLine(QPointF(0, + translateFactor_.y()), + QPointF(sceneRec.width(), + translateFactor_.y())); + + // vertical + painter->drawLine(QPointF(translateFactor_.x(), + 0), + QPointF(translateFactor_.x(), + sceneRec.height())); + + painter->restore(); +} + +/** + * Draws subaxes. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawSubAxes(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget); + + painter->save(); + + //draws horizontal lines + int subaxesNumber = (int)(sceneRec.height() / subaxesSpacing_); + qreal offset = translateFactor_.y() - (qFloor(translateFactor_.y() / subaxesSpacing_)) * subaxesSpacing_; + + painter->setPen(subaxesPen_); + + int i; + for(i = 0; i <= subaxesNumber; i++) + { + painter->drawLine(QPointF(0, + offset + i * subaxesSpacing_), + QPointF(sceneRec.width(), + offset + i * subaxesSpacing_)); + } + + //draws vertical lines + subaxesNumber = (int)(sceneRec.width() / subaxesSpacing_); + offset = translateFactor_.x() - (qFloor(translateFactor_.x() / subaxesSpacing_)) * subaxesSpacing_; + + for(i = 0; i <= subaxesNumber; i++) + { + painter->drawLine(QPointF(offset + i * subaxesSpacing_, + 0), + QPointF(offset + i * subaxesSpacing_, + sceneRec.height())); + } + painter->restore(); + +} + +/** + * Draws all series on the chart. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawSeries(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget) + + //saves old painter + painter->save(); + //sets painter's configuration + painter->translate(translateFactor_); + painter->scale(accumulatedZoomFactor_.width(), + accumulatedZoomFactor_.height()); + + transform = painter->transform(); + transform.rotate(180, Qt::XAxis); + painter->setTransform(transform, false); + + //draws series + for(int i = 0; i < series.size(); ++i) + { + if(!series.at(i)->isVisible()) + { + continue; + } + + painter->setPen(*series.at(i)->pen()); + painter->drawPolyline(series.at(i)->data(), series.at(i)->size()); + } + //restores paitner + painter->restore(); +} + +/** + * Draws static items (they are not moving and being scaled) on the chart, + * e.g. zoom buttons. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawStaticItems(QPainter* painter, QWidget* widget) +{ + //draws zoomInButton + painter->save(); + painter->setMatrix(zoomInButton.sceneMatrix(), true); + zoomInButton.paint(painter, new QStyleOptionGraphicsItem, widget); + painter->restore(); + + //draws zoomOutButton + painter->save(); + painter->setMatrix(zoomOutButton.sceneMatrix(), true); + zoomOutButton.paint(painter, new QStyleOptionGraphicsItem, widget); + painter->restore(); + + //draws legendButton + painter->save(); + painter->setMatrix(legendButton.sceneMatrix(), true); + legendButton.paint(painter, new QStyleOptionGraphicsItem, widget); + painter->restore(); +} + +/* + * Draws values next to subaxes. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawValues(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget) + //saves painter + painter->save(); + + //sets painter + painter->setPen(axesValuesPen_); + painter->setFont(QFont(FONT_TITLE_DEF, 10)); + + //sets needed values + subaxesSpacing_ *= 2; + + //drawing values of axes + int subaxesNumber = (int)(sceneRec.height() / subaxesSpacing_); + qreal offset = translateFactor_.y() - (qFloor(translateFactor_.y() / subaxesSpacing_)) * subaxesSpacing_; + + int i; + + + if(translateFactor_.x() < 0) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(1, offset + i * subaxesSpacing_ + 11), QString::number((-translateFactor_.y() + offset + i * subaxesSpacing_) / -accumulatedZoomFactor_.height(), 'f', 1)); + } + } + else if(translateFactor_.x() > sceneRec.width()) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QRectF(sceneRec.width() - 305, offset + i * subaxesSpacing_ + 11, 300, 11), Qt::AlignRight | Qt::AlignVCenter, QString::number((-translateFactor_.y() + offset + i * subaxesSpacing_) / -accumulatedZoomFactor_.height(), 'f', 1)); + } + } + else + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(translateFactor_.x() + 1, offset + i * subaxesSpacing_ + 11), QString::number((-translateFactor_.y() + offset + i * subaxesSpacing_) / -accumulatedZoomFactor_.height(), 'f', 1)); + } + } + + subaxesNumber = (int)(sceneRec.width() / subaxesSpacing_); + offset = translateFactor_.x() - (qFloor(translateFactor_.x() / subaxesSpacing_)) * subaxesSpacing_; + + if(translateFactor_.y() < 0) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(offset + i * subaxesSpacing_ + 1, 11), QString::number((-translateFactor_.x() + offset + i * subaxesSpacing_) / accumulatedZoomFactor_.width(), 'f', 1)); + } + } + else if(translateFactor_.y() > sceneRec.height()) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(offset + i * subaxesSpacing_ + 1, sceneRec.height() - 5), QString::number((-translateFactor_.x() + offset + i * subaxesSpacing_) / accumulatedZoomFactor_.width(), 'f', 1)); + } + } + else + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(offset + i * subaxesSpacing_ + 1, translateFactor_.y() + 11), QString::number((-translateFactor_.x() + offset + i * subaxesSpacing_) / accumulatedZoomFactor_.width(), 'f', 1)); + } + } + + subaxesSpacing_ /= 2; + + painter->restore(); +} + +/** + * This method is responsible for kinetic scrolling. + */ +void FFChartScene::kineticScroll() +{ + //check if kinetic mode is active + if(kinetic) + { + translateFactor_ += kineticVec; + + if(qAbs((kineticVec *= 0.8).x()) < 0.5 && qAbs((kineticVec + *= 0.8).y()) < 0.5) + { + timer->stop(); + kinetic = false; + } + + update(); + } + //otherwise updates kinetic's vectors + else + { + oldKineticVec = kineticVec; + kineticVec = pressPos - oldPressPos; + } +} + +/*! + * \fn void FFChartScene::seriesChanged(QList*); + * + * Signal that is emitted when the set of series has changed. + */ diff --git a/libffqw-1.0/sources/ffchartscene.h b/libffqw-1.0/sources/ffchartscene.h new file mode 100644 index 0000000..64203a8 --- /dev/null +++ b/libffqw-1.0/sources/ffchartscene.h @@ -0,0 +1,214 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartscene.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#ifndef FFCHARTSCENE_H +#define FFCHARTSCENE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ffchartseries.h" +#include "ffchartbutton.h" +#include "ffabstractwidget.h" +#include +/** + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + * + * @brief Reimplemented a QGraphicsScene class. It is used by the FFChart class + * to whole drawing. + */ + +class FFChartScene : public QGraphicsScene +{ +Q_OBJECT +public: + FFChartScene(QObject* parent = 0); + virtual ~FFChartScene(); + + void moveTo(QPoint point); + void moveTo(float x, float y); + void moveBy(QPoint destPoint); + void moveBy(float x, float y); + + void addSeries(FFChartSeries* series); + void setSeries(QList series); + + void setSceneRect(const QRectF& rect); + + void setSubaxesSpacing(const float& subaxesSpacing); + float subaxesSpacing() const; + + void setSubaxesPen(const QPen& subaxesPen); + QPen subaxesPen() const; + + void setAxesValuesPen(const QPen& axesValuesPen); + QPen axesValuesPen() const; + +public slots: + void seriesChanged(QList series); + void zoom(QRectF zoomRect); + void zoomIn(qreal ratio); + void zoomOut(qreal ratio); + +signals: + void seriesChanged(QList*); + +protected: + void drawItems(QPainter* painter, + int numItems, + QGraphicsItem* items[], + const QStyleOptionGraphicsItem options[], + QWidget * widget); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + +private: + QTimer* timer; ///< animation's timer + + QTransform transform; ///< tool uses to transformations + + float subaxesSpacing_; ///< spacing between suaxes + QPen subaxesPen_; ///< a pen of subaxes + QPen axesValuesPen_; ///< a pen of subaxes' values + + QPointF translateFactor_; ///< new point of scene's top left corner + + QSizeF accumulatedZoomFactor_; ///< accumulates factor of zooming + QPointF pressPos; ///< stores actual press position + QPointF oldPressPos;///< stores old press position + QPointF kineticVec; ///< stores kintetic vector + QPointF oldKineticVec; ///< stores old kinetic vector + + QRectF itemsBoundingRect_; ///< bounding rectangle of items + + QVector itemsBoundingValues_; ///< stores items' bounding values + QRectF sceneRec; ///< stores scene's rectangle + + QGraphicsRectItem* zoomRect; ///< stores pointer to zoom rectangle + + FFChartButton zoomInButton; ///< button to zooming in + FFChartButton zoomOutButton; ///< button to zooming out + FFChartButton legendButton; ///< button to showing legend + QList staticItems; ///< list of items on the scene + QList series; ///< list of series + + bool zoomModeSw; ///< true if zooming mode is active + bool moveModeSw; ///< true if moving mode is active + bool kinetic; ///< true if kinetic is active + + int kineticCount; ///< kinetic's counter + + void init(); + QRectF itemsBoundingRect(QVector* boundaryValues = 0); + + void drawAxes(QPainter* painter, QWidget* widget); + void drawSubAxes(QPainter* painter, QWidget* widget); + void drawSeries(QPainter* painter, QWidget* widget); + void drawStaticItems(QPainter* painter, QWidget* widget); + void drawValues(QPainter* painter, QWidget* widget); + +private slots: + void kineticScroll(); + void zoomIn(); + void zoomOut(); + +private: + static const qreal kineticRatio = 1.5; ///< ratio of kinetic scolling + static const qreal defaultZoomInRatio = 0.2; ///< ratio of zoom in + static const qreal defaultZoomOutRatio = 1.0;///< ratio of zoom out +}; +#endif // FFCHARTSCENE diff --git a/libffqw-1.0/sources/ffchartseries.cpp b/libffqw-1.0/sources/ffchartseries.cpp new file mode 100644 index 0000000..404dbf8 --- /dev/null +++ b/libffqw-1.0/sources/ffchartseries.cpp @@ -0,0 +1,308 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartseries.cpp + * @brief Implementation of the FFChartSeries class. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#include "ffchartseries.h" + +/** + * Construct FFSeries + */ +FFChartSeries::FFChartSeries() +{ + init(); +} +/** + * Constructs a FFChartSeries with points' vector and name. + * + */ +FFChartSeries::FFChartSeries(const QVector& series, + const QString& name) +{ + init(); + pen_ = QPen(); + set(series,name); +} +/** + * Constructs a FFChartSeries with points' vector, pen and name. + */ +FFChartSeries::FFChartSeries(const QVector& series, + const QPen& pen, + const QString& name) +{ + init(); + set(series,pen,name); +} +/** + * A virtual destructor. + */ +FFChartSeries::~FFChartSeries() +{ + ; +} +/** + * Sets default values + */ +void FFChartSeries::init() +{ + visibility_ = true; +} + +/** + * Returns series's name + */ +QString FFChartSeries::name() const +{ + return name_; +} +/** + * Returns series's pen + */ +QPen* FFChartSeries::pen() +{ + return &pen_; +} +/** + * Returns true if series is visible + */ +bool FFChartSeries::isVisible() +{ + return visibility_; + +} +/** + * Sets series's name + */ +void FFChartSeries::setName(const QString& name) +{ + name_ = name; +} +/** + * Sets series's pen + */ +void FFChartSeries::setPen(const QPen& pen) +{ + pen_ = pen; +} +/** + * Sets series's points and name + */ +void FFChartSeries::set(const QVector& series, + const QString& name) +{ + //call set function with previously created Pen + set(series,this->pen_,name); +} +/** + * Sets series's points,pen nad name + */ +void FFChartSeries::set(const QVector& series, + const QPen& pen, + const QString& name) +{ + series_ = series; + pen_ = pen; + name_ = name; + +} +/** + * Sets series's color + */ +void FFChartSeries::setColor(const QColor& color) +{ + pen_.setColor(color); +} +/** + * Sets pen's style + */ +void FFChartSeries::setStyle(const Qt::PenStyle& style) +{ + pen_.setStyle(style); +} +/** + * Sets series's visibility + */ +void FFChartSeries::setVisible(bool visibility) +{ + visibility_ = visibility; +} +/** + * Sorts series's points + */ +void FFChartSeries::sort() +{ + sort(0,series_.size()-1); +} +/** + * Validates series's points. Removes points with repeated x value. + */ +void FFChartSeries::validate() +{ + int current; + + for(int i=0; ii; j--) + { + if(series_[j].x() == current) + { + for(int k=j;k>=i;k--) + { + if(series_[j].x()==current) + { + series_.remove(k); + } + } + break; + } + } + } +} +/** + * Returns vector of series's points + */ +QVector FFChartSeries::series() +{ + return series_; +} +/** + * Returns point from series at given index + * @param num is a index of point in seires + */ +QPointF* FFChartSeries::at(const int& num) +{ + return &series_[num]; +} + +/** + * Returns number of series's points + */ +int FFChartSeries::size() const +{ + return series_.size(); +} +/** + * Returns pointer to the data stored in vector + */ +QPointF* FFChartSeries::data() +{ + return series_.data(); +} + +/** + * Sorts points in series + */ +void FFChartSeries::sort(int left, int right) +{ + int i = left; + int j = right; + + QPointF* pointsTab; + QPointF tempPoint; + + float x = series_[(left + right) / 2].x(); + do + { + while(series_[i].x() < x) + i++; + while(series_[j].x() > x) + j--; + if(i <= j) + { + pointsTab = series_.data(); + + tempPoint = pointsTab[i]; + pointsTab[i] = pointsTab[j]; + pointsTab[j] = tempPoint; + + i++; + j--; + } + } while(i <= j); + if(left < j) + sort(left, j); + if(right > i) + sort(i, right); +} + + + diff --git a/libffqw-1.0/sources/ffchartseries.h b/libffqw-1.0/sources/ffchartseries.h new file mode 100644 index 0000000..8776f58 --- /dev/null +++ b/libffqw-1.0/sources/ffchartseries.h @@ -0,0 +1,147 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartseries.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + */ + +#ifndef FFChartSeries_H +#define FFChartSeries_H + +#include +#include +#include +#include + +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class containing series data. + */ +class FFChartSeries +{ +public: + FFChartSeries(); + FFChartSeries(const QVector& series, + const QString& name = ""); + + FFChartSeries(const QVector& series, + const QPen& pen, + const QString& name = ""); + virtual ~FFChartSeries(); + + void set(const QVector& series, + const QString& name = ""); + void set(const QVector& series, + const QPen& pen, + const QString& name = ""); + + void sort(); + void validate(); + + QString name() const; + QPen* pen(); + + bool isVisible(); + + void setName(const QString& name); + void setPen(const QPen& pen); + void setColor(const QColor& color); + void setStyle(const Qt::PenStyle& style); + void setVisible(bool visibility); + + QPointF* at(const int& num); + int size() const; + + QVector series(); + QPointF* data(); + +private: + QVector series_; ///< vector of points + QString name_; ///< name of series + QPen pen_; ///< pen of series + bool visibility_; ///< visibility of series + + void init(); + void sort(int left, int right); + +}; + +#endif // FFChartSeries_H diff --git a/libffqw-1.0/sources/ffcolorcombobox.cpp b/libffqw-1.0/sources/ffcolorcombobox.cpp new file mode 100644 index 0000000..d40d2c8 --- /dev/null +++ b/libffqw-1.0/sources/ffcolorcombobox.cpp @@ -0,0 +1,258 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffcolorcombobox.cpp + * @brief Implementation of the FFColorComboBox class + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#include "ffcolorcombobox.h" + +/** + * Constructs a FFColorComboBox with a parent. + */ +FFColorComboBox::FFColorComboBox(QWidget* parent) : + FFAbstractComboBox(new FFColorButton, parent) +{ + +} + +/** + * A virtual destructor. + */ +FFColorComboBox::~FFColorComboBox() +{ + ; +} + +/** + * Adds item to combobox + * @param spec is a color for item + */ +void FFColorComboBox::addItem(QColor spec) +{ + addItem(QVariant(spec)); +} +/** + * Adds item to combobox + * @param spec is a pen with color for item + */ +void FFColorComboBox::addItem(QPen spec) +{ + addItem(spec.color()); +} +/** + * Adds items to combobox + * @param items is a list of colors for items + */ +void FFColorComboBox::addItems(QList items) +{ + for(int i = 0; i < items.size(); ++i) + { + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFColorButton* temp = new FFColorButton; + temp->setColor(items.at(i)); + + // Second step: You must call this function with previously prepared button + insertItem(temp, false); + } + emit reset(); +} +/** + * Adds items to combobox + * @param items is a list of QPen-s with colors for items + */ +void FFColorComboBox::addItems(QList items) +{ + for(int i = 0; i < items.size(); ++i) + { + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFColorButton* temp = new FFColorButton; + temp->setColor(items.at(i).color()); + + // Second step: You must call this function with previously prepared button + insertItem(temp, false); + } + emit reset(); +} + +/** + * Sets actual color. If a color is not in colorcombobox nothing happens. + *@param color is a color to set + */ +void FFColorComboBox::setCurrentColor(QColor color) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast(items_[i])->color() == color) + { + setCurrentItem(i); + return; + } + } +} + +/** + * Sets chosen value of FFColoroComboBox on activator + * @param item is a pointer to chosen item. + */ + +void FFColorComboBox::setActivatorSpecs(FFAbstractButton* item) +{ + if(FFColorButton* but = dynamic_cast(item)) + { + dynamic_cast(activator_)->setColor(but->color()); + } +} +/** + * Returns QVariant element containing value of chosen item + */ +QVariant FFColorComboBox::activatorSpecs() +{ + return QVariant(dynamic_cast(activator_)->pen()); +} + +/** + * Adds new item to FFColorComboBox + */ +void FFColorComboBox::addItem(QVariant spec) +{ + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFColorButton* temp = new FFColorButton; + temp->setColor(spec.value()); + + // Second step: You must call this function with previously prepared button + insertItem(temp); +} + +/** + * Constructs FFColorButton with given parent + */ +FFColorButton::FFColorButton(QWidget* parent) : + FFAbstractButton(parent) +{ + setMargins(15,15,15,15); +} +/** + * A virtual destructor + */ +FFColorButton::~FFColorButton() +{ + ; +} +/** + * Sets a color painted on the button + */ +void FFColorButton::setColor(QColor color) +{ + QBrush brush; + brush = pen_.brush(); + brush.setStyle(Qt::SolidPattern); + brush.setColor(color); + pen_.setBrush(brush); + pen_.setColor(color); +} +/** + * Returns color painted on the button + */ +QColor FFColorButton::color() +{ + return pen_.color(); +} +/** + * Serves paint event, draws rounded rectangle. Overrides parent's method + * @param event Contains all informations about event. + */ +void FFColorButton::paintEvent(QPaintEvent* event) +{ + FFAbstractButton::paintEvent(event); + + QPainter painter; + painter.begin(this); + + painter.setPen(pen_); + painter.setBrush(pen_.brush()); + + painter.setRenderHint(QPainter::Antialiasing,true); + painter.drawRoundedRect(leftMargin() + indent(), + topMargin(), + width() - leftMargin() - rightMargin() - 2 * indent(), + height() - topMargin() - bottomMargin(),10,10); + + painter.end(); + +} diff --git a/libffqw-1.0/sources/ffcolorcombobox.h b/libffqw-1.0/sources/ffcolorcombobox.h new file mode 100644 index 0000000..94b91cf --- /dev/null +++ b/libffqw-1.0/sources/ffcolorcombobox.h @@ -0,0 +1,157 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffcolorcombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#ifndef FFCOLORCOMBOBOX_H +#define FFCOLORCOMBOBOX_H + +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractcombobox.h" + +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of combobox with colors + */ +#ifdef MAEMO + +class FFColorComboBox : public FFAbstractComboBox + +#else + +class QDESIGNER_WIDGET_EXPORT FFColorComboBox : public FFAbstractComboBox + +#endif +{ + Q_OBJECT + +public: + FFColorComboBox(QWidget* parent = 0); + virtual ~FFColorComboBox(); + + void addItem(QColor item); + void addItem(QPen item); + void addItems(QList items); + void addItems(QList items); + +public slots: + void setCurrentColor(QColor item); + +protected: + virtual void setActivatorSpecs(FFAbstractButton* item); + virtual QVariant activatorSpecs(); + +private: + void addItem(QVariant item); + +}; +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of buttons with painted color + */ +class FFColorButton : public FFAbstractButton +{ + Q_OBJECT +public: + FFColorButton(QWidget* parent=0); + virtual ~FFColorButton(); + + QColor color(); + void setColor(QColor color); + +protected: + void paintEvent(QPaintEvent* event); + +}; + +#endif // FFCOLORCOMBOBOX_H diff --git a/libffqw-1.0/sources/ffdpad.cpp b/libffqw-1.0/sources/ffdpad.cpp new file mode 100644 index 0000000..9381c3d --- /dev/null +++ b/libffqw-1.0/sources/ffdpad.cpp @@ -0,0 +1,268 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpad.cpp + * @brief Implementation of the FFDPad class + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ +#include "ffdpad.h" + + +/** + * Constructs a FFDPad with a parent + */ +FFDPad::FFDPad(QWidget* parent) : + FFAbstractWidget(parent), size_(DEFAULT_SIZE, DEFAULT_SIZE) +{ + init(); +} + +/** + * Constructs a FFDPad with given size and parent. + */ +FFDPad::FFDPad(QSize size, QWidget* parent) : + FFAbstractWidget(parent) +{ + this->size_ = QSize(size.width(),size.height()); + init(); +} + +/** A virtual destructor */ +FFDPad::~FFDPad() +{ + ; +} +/** + * Initiates FFDPad class. Sets all needed fields, connections and calls. + * It is called by all constructors. + */ +void FFDPad::init() +{ + + //sets size policy + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + setMinimumSize(QSize(DEFAULT_MIN_SIZE, DEFAULT_MIN_SIZE)); + + //Sets default values + + + path = DPAD_PATH; + ax = 0; + ay = 0; + + if(size_.height() <= 0 || size_.width() <= 0) + { + this->size_ = QSize(DEFAULT_SIZE,DEFAULT_SIZE); + } + + layout = new QGridLayout(this); + layout->setMargin(0); + layout->setSpacing(0); + + background = new FFViewCache(this); + + //creates FFDPadButtons + buttonUp = new FFDPadButton(path + "_button_up", + DPAD_UP, + this); + buttonDown = new FFDPadButton(path + "_button_down", + DPAD_DOWN, + this); + buttonLeft = new FFDPadButton(path + "_button_left", + DPAD_LEFT, + this); + buttonRight = new FFDPadButton(path + "_button_right", + DPAD_RIGHT, + this); + //connects + connect(buttonUp,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + connect(buttonDown,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + connect(buttonLeft,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + connect(buttonRight,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + + //adds buttons to layout + layout->addWidget(buttonUp, 0, 0, 1, 1); + layout->addWidget(buttonDown, 0, 0, 1, 1); + layout->addWidget(buttonLeft, 0, 0, 1, 1); + layout->addWidget(buttonRight, 0, 0, 1, 1); + + this->setSize(size_); + + background->init(path + "_background.svg"); + background->updateView(size_); + +} + + +/** + * Returns size of FFDPad + */ +QSize FFDPad::size() const +{ + return this->geometry().size(); +} + +/** + * Sets FFDPad's size. + * If both edges are equal FFDPad have it`s maximum size cause it is always square. + * If size`s parameters are not equal then FFDPad is located in center of the widget. + * @param size Size of FFDPad widget + */ +void FFDPad::setSize(QSize size) +{ + calculateSize(size); + buttonUp -> setSize(size_); + buttonDown -> setSize(size_); + buttonLeft -> setSize(size_); + buttonRight -> setSize(size_); + setGeometry(geometry().x(), geometry().y(), size.width(), size.height()); +} + +/** + * Updates FFDPad view and events' mask after changing size of the widget, + * only when resizable_ is set up. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPad::resizeEvent(QResizeEvent* event) +{ + calculateSize(event->size()); + buttonUp -> setSize(size_); + buttonDown -> setSize(size_); + buttonLeft -> setSize(size_); + buttonRight -> setSize(size_); + background -> updateView(size_); + ax = 0; + ay = 0; + + if(event ->size().width() > event -> size().height()) + { + ax = (size_.width() - event -> size().width()) / 2; + } + else + { + ay = (size_.height() - event -> size().height()) / 2; + } + + buttonUp -> move(-ax, -ay); + buttonDown -> move(-ax, -ay); + buttonLeft -> move(-ax, -ay); + buttonRight -> move(-ax, -ay); + +} + +/** + * Repaints the view of the FFDPAd. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPad::paintEvent(QPaintEvent* event) +{ + Q_UNUSED(event) + QPainter paint(this); + paint.setOpacity(0.3); + paint.drawPixmap(-ax, -ay, background->pixmap()); +} + +/** + * Check and save size of the widget. Determine the size of the square. + * @param size Size to calculate square. + */ +void FFDPad::calculateSize(QSize size) +{ + if(size.height() <= 0 || size.width() <= 0) + { + this->size_ = QSize(DEFAULT_SIZE, DEFAULT_SIZE); + } + else + { + if(size.width() > size.height()) + { + this->size_ = QSize(size.height(),size.height()); + } + else + { + this->size_ = QSize(size.width(),size.width()); + } + } + update(); +} + +/** + \fn void FFDPad::clicked(int type) + + This signal is emitted when the one of four buttons will be released. + */ diff --git a/libffqw-1.0/sources/ffdpad.h b/libffqw-1.0/sources/ffdpad.h new file mode 100644 index 0000000..0aef2df --- /dev/null +++ b/libffqw-1.0/sources/ffdpad.h @@ -0,0 +1,169 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpad.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ +#ifndef FFDPAD_H +#define FFDPAD_H + +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffdpadbutton.h" +#include "ffviewcache.h" +#include "ffabstractwidget.h" + + +static const QString DPAD_PATH= ":/standard/dpad";///< a part of path to graphics file + +static const int DEFAULT_SIZE = 150; ///< defines a default size of FFDPad +static const int DEFAULT_MIN_SIZE = 100; //< defines a min size of FFDPad + + +/** + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + * + * @brief A class of 4-way button + */ +#ifdef MAEMO + +class FFDPad : public FFAbstractWidget +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFDPad : public FFAbstractWidget +{ + Q_OBJECT + Q_PROPERTY(QSize size READ size WRITE setSize) + +#endif +public: + FFDPad(QWidget* parent = 0); + FFDPad(QSize size, QWidget* parent = 0); + virtual ~FFDPad(); + + enum BUTTON_TYPE + { + DPAD_LEFT, //!< signal from left button + DPAD_RIGHT, //!< signal from right button + DPAD_UP, //!< signal from up button + DPAD_DOWN //!< signal from down button + }; + + void setSize(QSize size); + QSize size() const; + + void calculateSize(QSize size); + +signals: + void clicked(int type); + +protected: + virtual void paintEvent(QPaintEvent*); + virtual void resizeEvent(QResizeEvent* event); + +private: + void init(); + + FFViewCache* background; ///< cached dpad's background + + + QGridLayout* layout; ///< a layout of dpad + + FFDPadButton* buttonUp; ///< pointer to the button "Up" + FFDPadButton* buttonDown; ///< pointer to the button "Down" + FFDPadButton* buttonLeft; ///< pointer to the button "Left" + FFDPadButton* buttonRight; ///< pointer to the button "Right" + + QSize size_; ///< size of dpad + QString path; ///< part of path to the graphics file + + int ax; ///< variable used to center dpad's buttons on X axis + int ay; ///< variable used to center dpad's buttons on Y axis +}; + +#endif // FFDPAD_H diff --git a/libffqw-1.0/sources/ffdpadbutton.cpp b/libffqw-1.0/sources/ffdpadbutton.cpp new file mode 100644 index 0000000..c564bbd --- /dev/null +++ b/libffqw-1.0/sources/ffdpadbutton.cpp @@ -0,0 +1,216 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpadbutton.cpp + * @brief Implementation of the FFiPadButton class + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ + +#include "ffdpadbutton.h" + +/** + * Constructs a FFDPadButton with size and parent. + */ +FFDPadButton::FFDPadButton(QString path, int type, QWidget* parent) : + QAbstractButton(parent) +{ + + //initiates button's elements + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + this->type_ = type; + + pressed_ = false; + this->path = path; + + this->type_ = type; + buttonView = new FFViewCache(this); + buttonPressedView = new FFViewCache(this); + + buttonView->init(path + ".svg"); + buttonPressedView->init(path + "_pressed.svg"); + updateMask(); +} + +/** A virtual destructor */ +FFDPadButton::~FFDPadButton() +{ + +} + +/** + * Sets size of FFDPadButton + * Calls updateView of FFViewCache objects to fit pixmap's size + * to new FFDPadButton's size. + * Calls updateMask() to set new event's mask for FFDPadButton. + * + * @param size is a new size of FFDPadButton + */ +void FFDPadButton::setSize(QSize size) +{ + + buttonView->updateView(size); + buttonPressedView->updateView(size); + setGeometry(0,0, size.width(),size.height()); + updateMask(); + update(); +} + +/** + * Returns a value that tells if the FFDPadButton is pressed. + */ +bool FFDPadButton::isPressed() const +{ + return pressed_; +} +/** + * Sets FFDPadButton's state. Value "true" means that the FFDPadButton is pressed. + */ +void FFDPadButton::setPressed(bool pressed_) +{ + this->pressed_ = pressed_; +} +/** + * Returns a value defining type of pressed FFDPadButton. + */ +int FFDPadButton::type() const +{ + return type_; +} +/** + * Sets type of FFDPadButton defined in enum BUTTON_TYPE,which is placed + * in file ffdipabutton.h. + */ +void FFDPadButton::setType(int type_) +{ + this->type_ = type_; +} +/** + * Updates events' mask for FFDPadButton based on pixmap + */ +void FFDPadButton::updateMask() +{ + if(pressed_) + setMask(buttonPressedView->pixmap().mask()); + else + setMask(buttonView->pixmap().mask()); +} + +/** + * Repaints the view of FFDPadButton. There are 2 views of FFDiButton for both + * states pressed and unpressed. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPadButton::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter paint(this); + if(pressed_) + paint.drawPixmap(0, 0, buttonPressedView->pixmap()); + else + paint.drawPixmap(0, 0, buttonView->pixmap()); +} +/** + * Sets pressed_ value on true and calls updateMask() method. + * At the end calls update() method. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPadButton::mousePressEvent(QMouseEvent *) +{ + pressed_ = true; + update(); +} +/** + * Sets pressed_ value on false and calls updateMask() and update() method. + * At the end emit buttonClicked() signal. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPadButton::mouseReleaseEvent(QMouseEvent *) +{ + pressed_ = false; + update(); + emit clicked(this->type_); +} + +/** + \fn void FFDPadButton::clicked(int type) + + This signal is emitted when the button was released. + +*/ diff --git a/libffqw-1.0/sources/ffdpadbutton.h b/libffqw-1.0/sources/ffdpadbutton.h new file mode 100644 index 0000000..ae29474 --- /dev/null +++ b/libffqw-1.0/sources/ffdpadbutton.h @@ -0,0 +1,130 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpadbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ +#ifndef FFDPADBUTTON_H_ +#define FFDPADBUTTON_H_ + +#include +#include +#include +#include + +#include "ffviewcache.h" + +/** + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + * + * @brief A class used by 4-way button + */ +class FFDPadButton : public QAbstractButton +{ +Q_OBJECT +public: + FFDPadButton(QString path, int type, QWidget* parent = 0); + virtual ~FFDPadButton(); + + void updateMask(); + void setSize(QSize); + bool isPressed() const; + int type() const; + void setPressed(bool pressed_); + void setType(int typ_); + +protected: + virtual void paintEvent(QPaintEvent *event); + virtual void mousePressEvent(QMouseEvent*event); + virtual void mouseReleaseEvent(QMouseEvent*event); + +private: + FFViewCache* buttonView; ///< cached dpadbutton's view + FFViewCache* buttonPressedView; ///< cached dpadbutton's clicked view + + QString path; ///< part of path to graphics files + int type_; ///< contains type of button + bool pressed_; ///< is true when button is pressed + +signals: + void clicked(int type); +}; + +#endif /* FFDPADBUTTON_H_ */ diff --git a/libffqw-1.0/sources/fflinecombobox.cpp b/libffqw-1.0/sources/fflinecombobox.cpp new file mode 100644 index 0000000..f969b62 --- /dev/null +++ b/libffqw-1.0/sources/fflinecombobox.cpp @@ -0,0 +1,247 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file fflinecombobox.cpp + * @brief Implementation of the FFLineComboBox class + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#include "fflinecombobox.h" + +/** + * Constructs a FFStringComboBox with a parent. + */ +FFLineComboBox::FFLineComboBox(QWidget* parent) : + FFAbstractComboBox(new FFLineButton,parent) +{ + +} + +/** + * A virtual destructor. + */ +FFLineComboBox::~FFLineComboBox() +{ + ; +} +/** + * Adds item to combobox + * @param item is a pen with parameters for new item + */ +void FFLineComboBox::addItem(QPen item) +{ + addItem(QVariant(item)); +} +/** + * Adds items to combobox + * @param items is a list of pens with parameters for new items + */ +void FFLineComboBox::addItems(QList items) +{ + for(int i = 0; i < items.size(); ++i) + { + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFLineButton* temp = new FFLineButton; + temp->setPen(items.at(i)); + + // Second step: You must call this function with previously prepared button + insertItem(temp, false); + } + emit reset(); +} + +/** + * Sets chosen value of FFLineComboBox on activator + * @param item is a pointer to chosen item. + */ +void FFLineComboBox::setActivatorSpecs(FFAbstractButton* item) +{ + if(FFLineButton* but = dynamic_cast(item)) + { + dynamic_cast(activator_)->setPen(but->pen()); + } +} +/** + * Returns QVariant element containing value of chosen item + */ +QVariant FFLineComboBox::activatorSpecs() +{ + return QVariant(dynamic_cast(activator_)->pen()); +} + +/** + * Sets actual line's style. If a style is not in linecombobox nothing happens. + *@param style is a style of pen to set + */ +void FFLineComboBox::setCurrentLine(Qt::PenStyle style) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast(items_[i])->pen().style() == style) + { + setCurrentItem(i); + return; + } + } +} + +/** + * Sets actual line's thickness. If thickness is not in linecombobox nothing happens. + * @param thickness is a thickness of pen to set + */ +void FFLineComboBox::setCurrentLine(int thickness) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast(items_[i])->pen().width() == thickness) + { + setCurrentItem(i); + return; + } + } +} + +// ##################################################################### PRIVATE + +/** + * Adds new item to FFLineComboBox + */ +void FFLineComboBox::addItem(QVariant spec) +{ + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFLineButton* temp = new FFLineButton; + temp->setPen(spec.value()); + + // Second step: You must call this function with previously prepared button + insertItem(temp); +} + +/** + * Constructs FFLineButton with parent + */ + +FFLineButton::FFLineButton(QWidget* parent) : + FFScrollingButton(parent) +{ + + setDescription(""); + setTitle(""); +} +/** + * A virtual destructor + */ +FFLineButton::~FFLineButton() +{ + ; +} + +// ################################################################### PROTECTED +/** + * Serves paint event, draws line. Overrides parent's method + * @param event Contains all informations about event. + */ +void FFLineButton::paintEvent(QPaintEvent* event) +{ + FFScrollingButton::paintEvent(event); + + + QPainter painter; + painter.begin(this); + + painter.setPen(pen_); + + painter.drawLine(indent() + leftMargin(), + 0.5 * height(), + width() - indent() -rightMargin(), + 0.5 * height()); + painter.end(); +} +/** + * Sets title of linecombobox + */ +void FFLineComboBox::setTitle(QString title) +{ + dynamic_cast(activator_)->setTitle(title); +} + +/** + * Returns title of line combobox + */ +QString FFLineComboBox::title() +{ + return dynamic_cast(activator_)->title(); +} diff --git a/libffqw-1.0/sources/fflinecombobox.h b/libffqw-1.0/sources/fflinecombobox.h new file mode 100644 index 0000000..70575c6 --- /dev/null +++ b/libffqw-1.0/sources/fflinecombobox.h @@ -0,0 +1,149 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file fflinecombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#ifndef FFLINECOMBOBOX_H +#define FFLINECOMBOBOX_H + +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractcombobox.h" +#include "ffscrollingbutton.h" +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of combobox with lines + */ + +#ifdef MAEMO + +class FFLineComboBox : public FFAbstractComboBox + +#else + +class QDESIGNER_WIDGET_EXPORT FFLineComboBox : public FFAbstractComboBox + +#endif +{ + Q_OBJECT + +public : + FFLineComboBox(QWidget* parent = 0); + virtual ~FFLineComboBox(); + + void addItem(QPen item); + void addItems(QList items); + void setTitle(QString title); + QString title(); +public slots: + void setCurrentLine(Qt::PenStyle style); + void setCurrentLine(int thickness); + +protected: + virtual void setActivatorSpecs(FFAbstractButton* item); + virtual QVariant activatorSpecs(); + +private : + void addItem(QVariant item); + QString title_; +}; + +class FFLineButton : public FFScrollingButton +{ +Q_OBJECT +public: + FFLineButton(QWidget* parent = 0); + virtual ~FFLineButton(); + +protected: + void paintEvent(QPaintEvent* event); + +}; + +#endif // FFLINECOMBOBOX_H diff --git a/libffqw-1.0/sources/ffscrollarea.cpp b/libffqw-1.0/sources/ffscrollarea.cpp new file mode 100644 index 0000000..9bcfdd4 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollarea.cpp @@ -0,0 +1,422 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollarea.cpp + * @brief Implementation of the FFScrollArea class + * + * @author ComArch S.A. + * @date 2009.09.20 + * @version 1.0 + */ + +#include "ffscrollarea.h" +#include +#include +#include +#include + +//defines view of scrollbars +#define SCROLLBAR_STYLE " \ + QScrollBar:vertical, QScrollBar:horizontal { \ + border: 0px solid transparent; \ + background: transparent; \ + width: 5px; \ + height: 5px; /* change this to 5px or more to see horizontal scrollbar */\ + margin: 2px 2px 2px 2px; \ + } \ + QScrollBar::sub-page, QScrollBar::add-page { \ + background: rgb(45,45,45); \ + } \ + QScrollBar::handle:vertical { \ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, \ + stop:0 rgba(30,30,30,0), stop: 0.1 #1d1, stop:0.9 #2e2, stop: 1 rgba(30,30,30,0)); \ + min-height: 25px; \ + } \ + QScrollBar::handle:horizontal { \ + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, \ + stop:0 rgba(30,30,30,0), stop: 0.1 #1d1, stop:0.9 #2e2, stop: 1 rgba(30,30,30,0)); \ + min-width: 25px; \ + } \ + QScrollBar::add-line, QScrollBar::sub-line { \ + border: 0px solid transparent; \ + } \ + QScrollArea { \ + background-color: #222; color: #ddd; \ + } \ +" + +/** + * Constructs FFScrollArea with parent + */ +FFScrollArea::FFScrollArea(QWidget* parent) : + QScrollArea(parent) +{ + init(); +} +/** + * A virtual destructor + */ +FFScrollArea::~FFScrollArea() +{ + +} +/** + * Initiates FFScrollArea class. Sets all needed fields, connections and calls. + * It is called by the constructor. + */ +void FFScrollArea::init() +{ + //sets FFScrollArea view properties + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + this->setFrameStyle(0); + setStyleSheet(SCROLLBAR_STYLE); + setStyleSheet("background-color: transparent"); + //initiates all fields with default values + moved = false; + animate = false; + + oldPos = QPointF(0, 0); + prevPos = QPointF(0, 0); + pos = QPointF(0, 0); + speed = QPointF(0, 0); + movement = QPointF(0, 0); + + x = 0; + y = 0; + + slowingDownRate_ = DEFAULT_SLOWING_DOWN_RATE; + postionSumplingTime_ = DEFAULT_POSIOTION_SUMPLING_TIME; + kineticAnimationTime_ = DEFAULT_KINETIC_ANIMATION_TIME; + minMotionLength_ = DEFAULT_MIN_MOTION_LENGTH; + + timerPos.stop(); + timerAnim.stop(); + + //connects signals and slots + connect(&timerPos, SIGNAL(timeout()), this, SLOT(updatePos())); + connect(&timerAnim, SIGNAL(timeout()), this, SLOT(animation())); +} + +/** + * Method using to serve events. Overrides the virtual method from parent. + * + * @param object is a pointer handled object + * @param ev is a pointer to handled event + */ + +bool FFScrollArea::eventFilter(QObject* object, QEvent* ev) +{ + //Does nothing when QEvent type is Paint + if(ev->type() == QEvent::Paint) + return false; + + if(QMouseEvent* event = dynamic_cast(ev)) + { + //Serves MouseButtonPressEvent + if(event->type() == QEvent::MouseButtonPress) + { + + moved = false; + movement = QPointF(0, 0); + timerAnim.stop(); + if(event) + { + //sets started values after each press event + x = event->globalX(); + y = event->globalY(); + prevPos = event->globalPos(); + oldPos = event->globalPos(); + speed = QPointF(0.0, 0.0); + pos = QPointF(0.0, 0.0); + + //starts position sampling timer + timerPos.start(postionSumplingTime_); + } + else + { + return 0; + } + + } + //Serves MouseMoveEvent + if(event->type() == QEvent::MouseMove) + { + + //sets and calculates motion parameters + int offsetY = event->globalY() - y; + int offsetX = event->globalX() - x; + + int valY = this->verticalScrollBar()->value() - offsetY; + int valX = this->horizontalScrollBar()->value() + - offsetX; + + y = event->globalY(); + x = event->globalX(); + + //If motion length is shorter then minMotionLength_ + //scrollbars postion will be not set. + if(minMotionLength_ < qAbs(movement.y()) + || minMotionLength_ + < qAbs(movement.x())) + { + //sets new scrollBars' values + this->verticalScrollBar()->setValue(valY); + this->horizontalScrollBar()->setValue(valX); + moved = true; + + } + + //Updates parameters + movement.setY(movement.y() + qAbs(prevPos.y() + - event->globalY())); + movement.setX(movement.x() + qAbs(prevPos.x() + - event->globalX())); + + prevPos = event->globalPos(); + } + //Serves MouseButtonReleaseEvent + if(event->type() == QEvent::MouseButtonRelease) + { + //Stops position's sampling + timerPos.stop(); + + if(moved) + { + //blocks signals + object->blockSignals(true); + object->event(event); + object->blockSignals(false); + + //sets cursor position after + //MouseButtonReleaseEvent + pos.setY((float)(this->verticalScrollBar()->value())); + pos.setX((float)(this->horizontalScrollBar()->value())); + + //starts animation + timerAnim.start(kineticAnimationTime_); + return true; + } + else + { + //do nothing + return false; + } + } + } + //calls parent's event filter + return QScrollArea::eventFilter(object, ev); +} + +/** + * Sets widget on FFScrollArea + * Overrides the virtual method from parent. + * + * @param widget pointer to setting widget + */ + +void FFScrollArea::setWidget(QWidget* widget) +{ + //calls parent method + ((QScrollArea*)this)->setWidget(widget); + //calls method to install EventFilter + installFilterRecursive(widget); +} +/** + * Installs eventFilter to each widget on FFScrollArea + * + * @param wdg pointer to widget to which eventFilter is installing. + */ +void FFScrollArea::installFilterRecursive(QWidget* wdg) +{ + if(!wdg) + return; + //Installs eventFilter to current widget + wdg->installEventFilter(this); + + //Calls installFilterRecursive to all children + const QList widgets = wdg->children(); + for(int i = 0; i < widgets.length(); ++i) + { + QWidget* wdg = dynamic_cast (widgets.at(i)); + if(wdg) + installFilterRecursive(wdg); + } +} +/** + * Updates motion's speed and cursor's position + */ +void FFScrollArea::updatePos() +{ + //sets motion's speed + speed.setY(oldPos.y() - this->cursor().pos().y()); + speed.setX(oldPos.x() - this->cursor().pos().x()); + //sets current cursor's position + oldPos = this->cursor().pos(); + +} + +/** + * Method responsible for kinetic's animation. + */ + +void FFScrollArea::animation() +{ + //If speed is less then 1 animations is stopped + if(1 < qAbs(speed.x()) || 1 < qAbs(speed.y())) + { + //updates position + pos.setY(pos.y() + speed.y()); + pos.setX(pos.x() + speed.x()); + + //sets new position on scrollbars + this->verticalScrollBar()->setValue((int)pos.y()); + this->horizontalScrollBar()->setValue((int)pos.x()); + + //updates speed + speed.setY(speed.y() * slowingDownRate_); + speed.setX(speed.x() * slowingDownRate_); + } + else + { + //Stops animation + timerAnim.stop(); + } +} + +/** + * Returns rate responsible for kinetic speed slowing + */ +float FFScrollArea::getSlowingDownRate() const +{ + return slowingDownRate_; +} +/** + * Sets rate responsible for kinetic speed slowing + */ +void FFScrollArea::setSlowingDownRate(float slowingDownRate_) +{ + this->slowingDownRate_ = slowingDownRate_; +} + +/** + * Returns kinetic animation frame time in ms. + */ +int FFScrollArea::getKineticAnimationTime() const +{ + return kineticAnimationTime_; +} + +/** + * Sets kinetic animation frame time in ms. + */ +void FFScrollArea::setKineticAnimationTime(int kineticAnimationTime_) +{ + this->kineticAnimationTime_ = kineticAnimationTime_; +} + +/** + * Returns cursor position sampling time in ms. + */ +int FFScrollArea::getPostionSumplingTime() const +{ + return postionSumplingTime_; +} + +/** + * Sets cursor position sampling time in ms. + */ +void FFScrollArea::setPostionSumplingTime(int postionSumplingTime_) +{ + this->postionSumplingTime_ = postionSumplingTime_; +} + +/** + * Sets value needed to blocking signals + * + */ +void FFScrollArea::setMinMotionLength(int minMotionLength_) +{ + this->minMotionLength_ = minMotionLength_; +} + +/** + * Returns value needed to blocking signals + */ +int FFScrollArea::getMinMotionLength() const +{ + return minMotionLength_; +} + + diff --git a/libffqw-1.0/sources/ffscrollarea.h b/libffqw-1.0/sources/ffscrollarea.h new file mode 100644 index 0000000..1045c0e --- /dev/null +++ b/libffqw-1.0/sources/ffscrollarea.h @@ -0,0 +1,152 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollarea.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.20 + * @version 1.0 + */ + +#ifndef QFFSCROLLAREA_H +#define QFFSCROLLAREA_H + +#include +#include +#include +#include +#include +#include +#include + +static const float DEFAULT_SLOWING_DOWN_RATE = 0.85; +static const int DEFAULT_POSIOTION_SUMPLING_TIME = 80; +static const int DEFAULT_KINETIC_ANIMATION_TIME = 50; +static const int DEFAULT_MIN_MOTION_LENGTH = 20; + +/** + * @author ComArch S.A. + * @date 2009.09.20 + * @version 1.0 + * + * @brief A class providing a scrolling view onto another widget. + */ +class FFScrollArea : public QScrollArea +{ + Q_OBJECT + +public: + FFScrollArea(QWidget* parent = 0); + ~FFScrollArea(); + bool eventFilter(QObject * o, QEvent *event); + void setWidget(QWidget* widget); + + void init(); + float getSlowingDownRate() const; + void setSlowingDownRate(float slowingDownRate_); + int getKineticAnimationTime() const; + void setKineticAnimationTime(int kineticAnimationTime_); + int getPostionSumplingTime() const; + void setPostionSumplingTime(int postionSumplingTime_); + int getMinMotionLength() const; + void setMinMotionLength(int minMotionLength_); + +private: + bool moved; ///< is true when widget on scrolarea is moved + bool animate; ///< is true when animation is active + + int x; ///< variable to storing cursor global position (X axis) + int y; ///< variable to storing cursor global position (Y axis) + int postionSumplingTime_; ///< period of position sampling + int kineticAnimationTime_; ///< period of one animation's frame + int minMotionLength_; ///< is motion is shorter then this value moved is false + float slowingDownRate_; ///< rate of animation slowing + + QPointF pos; ///< cursor position when button was released + QPointF speed; ///< contains motion speed value during kinetic animation + QPointF movement; ///< way's length traveled during mousemoveevent + QPointF prevPos; ///< is used to moving when area is pressed + QPointF oldPos; ///< is used to kinetic + QTimer timerPos; ///< timer is used to sampling cursor position + QTimer timerAnim; ///< timer is used to kinetic animation + + void installFilterRecursive(QWidget* widget); + +private slots: + void updatePos(); + void animation(); +}; + +#endif // QFFSCROLLAREA_H diff --git a/libffqw-1.0/sources/ffscrollingbutton.cpp b/libffqw-1.0/sources/ffscrollingbutton.cpp new file mode 100644 index 0000000..77b5d8d --- /dev/null +++ b/libffqw-1.0/sources/ffscrollingbutton.cpp @@ -0,0 +1,581 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#include "ffscrollingbutton.h" + +/** + * Constructs a FFScrollingButton with a parent. + * Sets variable to initial values and set graphics used in widget. + */ +FFScrollingButton::FFScrollingButton(QWidget* parent) : + FFAbstractButton(parent) +{ + init(); +} + +/** + * Constructs a FFScrollingButton with a parent , title and description. + * Sets variable to initial values and sets graphics used in widget. + */ +FFScrollingButton::FFScrollingButton(QString title, QString description, QWidget* parent) : + FFAbstractButton(parent) +{ + init(); + title_->setText(title); + description_->setText(description); +} + + +/** + * A virtual destructor. + */ +FFScrollingButton::~FFScrollingButton() +{ + ; +} + +/** + * Initiates an object of FFScrollingButton. Sets all needed fields. + */ +void FFScrollingButton::init() +{ + //sets title's label + title_ = new FFScrollingLabel(this); + title_->setResizable(true); + title_->setColor(FF_TITLE_COLOR); + title_->show(); + + //sets desciption's label + description_ = new FFScrollingLabel(this); + description_->setResizable(true); + description_->setColor(FF_DESCRIPTION_COLOR); + description_->show(); + + //sets indents + titleIndent_ = indent(); + descriptionIndent_ = indent(); + + titleIndentTemp = indent(); + descriptionIndentTemp = indent(); + + //sets switches + titleSwitch_ = true; + descriptionSwitch_ = true; + + //sets margins + setTopMargin(DEFAULT_TOPBOTTOM_MARGIN); + setBottomMargin(DEFAULT_TOPBOTTOM_MARGIN); + + //sets ratio + ratio_ = DEFAULT_RATIO; +} + +/** + * Returns the text from FFScrollingLabel named title + */ +QString FFScrollingButton::title() const +{ + return title_->text(); +} + +/** + * Returns alignment of title. + */ +FFScrollingLabel::Alignment FFScrollingButton::titleAlignment() const +{ + return titleWidget()->alignment(); +} + +/** + * Returns title`s color. + */ +QColor FFScrollingButton::titleColor() const +{ + return title_->color(); +} + +/** + * Returns title`s indent. + */ +int FFScrollingButton::titleIndent() const +{ + return titleIndent_; +} + +/** + * Returns title`s font. + */ +QFont FFScrollingButton::titleFont() const +{ + return title_->font(); +} + +/** + * Returns the text from FFScrollingLabel named description. + */ +QString FFScrollingButton::description() const +{ + return description_->text(); +} + +/** + * Return alignment of description. + */ +FFScrollingLabel::Alignment FFScrollingButton::descriptionAlignment() const +{ + return descriptionWidget()->alignment(); +} + +/** + * Return description`s color. + */ +QColor FFScrollingButton::descriptionColor() const +{ + return description_->color(); +} + +/** + * Returns description`s indent. + */ +int FFScrollingButton::descriptionIndent() const +{ + return descriptionIndent_; +} + +/** + * Returns description`s font. + */ +QFont FFScrollingButton::descriptionFont() const +{ + return description_->font(); +} + +/** + * Returns ratio. + */ +float FFScrollingButton::ratio() const +{ + return ratio_; +} + +/** + * Sets a text of the title. + * @param title Title text. + */ +void FFScrollingButton::setTitle(const QString& title) +{ + title_->setText(title); + update(); +} + +/** + * Sets a alignment of the title. + * @param alignment Title text. + */ +void FFScrollingButton::setTitleAlignment(FFScrollingLabel::Alignment alignment) +{ + titleWidget()->setAlignment(alignment); + update(); +} + +/** + * Sets a color of text on title. + * @param color Color of title. + */ +void FFScrollingButton::setTitleColor(QColor color) +{ + title_->setColor(color); + update(); +} + +/** + * Sets a font that will be used to print the text of the title. + * @param font Font style. + */ +void FFScrollingButton::setTitleFont(QFont font) +{ + title_->setFont(font); + update(); +} + +/** + * Sets Indent of title. + * @param indent Indent of title. + */ +void FFScrollingButton::setTitleIndent(int indent) +{ + titleIndent_ = indent; + titleIndentTemp = indent; + updateView(); +} + +/** + * Sets a text of the description. + * @param text Description text + */ +void FFScrollingButton::setDescription(const QString& text) +{ + description_->setText(text); + update(); +} + +/** + * Sets a alignment of the title. + * @param alignment Title text. + */ +void FFScrollingButton::setDescriptionAlignment(FFScrollingLabel::Alignment alignment) +{ + descriptionWidget()->setAlignment(alignment); + update(); +} + +/** + * Sets a color of text on description. + * @param color Color of description. + */ +void FFScrollingButton::setDescriptionColor(QColor color) +{ + description_->setColor(color); + update(); +} + +/** + * Sets a font that will be used to print the text of the description. + * @param font Font style. + */ +void FFScrollingButton::setDescriptionFont(QFont font) +{ + description_->setFont(font); + update(); +} + +/** + * Sets Indent of description. + * @param indent Indent of description. + */ +void FFScrollingButton::setDescriptionIndent(int indent) +{ + descriptionIndent_ = indent; + descriptionIndentTemp = indent; + updateView(); +} + +/** + * Sets ratio. + * @param ratio Ratio between size of title and description. + */ +void FFScrollingButton::setRatio(float ratio) +{ + if(ratio >= 0.05 && ratio <= 0.95) + { + ratio_ = ratio; + } + else if(ratio < 0.05) + { + ratio_ = 0.05; + } + else + { + ratio_ = 0.95; + } + calculateRatio(); + updateView(); +} + +/** + * Disables title. Show/hide title. + * @param state State true/false to set visible of description. + */ +void FFScrollingButton::disableTitle(bool state) +{ + titleSwitch_ = !state; + title_->setVisible(titleSwitch_); + update(); +} + +/** + * Disables description. Show/hide description. + * @param state State true/false to set visible of description. + */ +void FFScrollingButton::disableDescription(bool state) +{ + descriptionSwitch_ = !state; + description_->setVisible(descriptionSwitch_); + update(); +} + +/** + * Returns state of title visibility. If returned value is true visibility is on. + */ +bool FFScrollingButton::isDisabledTitle() +{ + return titleSwitch_; +} + +/** + * Returns state of description visibility. If returned value is true visibility is on. + */ +bool FFScrollingButton::isDisabledDescription() +{ + return descriptionSwitch_; +} + +/** + * Repaints the view of button. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingButton::paintEvent(QPaintEvent* event) +{ + FFAbstractButton::paintEvent(event); +} + +/** + * Updates button`s view after changing size of the widget. + * Updates size of all pixmaps which need it (without corners) + * @param event Contains all informations about event. + */ +void FFScrollingButton::resizeEvent(QResizeEvent* event) +{ + FFAbstractButton::resizeEvent(event); + calculateRatio(); + updateView(); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFScrollingButton::mousePressEvent(QMouseEvent* event) +{ + FFAbstractButton::mousePressEvent(event); +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFScrollingButton::mouseReleaseEvent(QMouseEvent* event) +{ + FFAbstractButton::mouseReleaseEvent(event); +} + +/** + * Paints icon if it was set. + * @param painter is a tool to paint icon on widget. + */ +void FFScrollingButton::paintIcon(QPainter* painter) +{ + int move = 0; + if(iconAlignment_ == Qt::AlignLeft) + { + move = titleIndent_; + } + else + { + move = -titleIndent_; + } + + // if icon was set paint it + + if (!icon().isNull()) + { + QRect rect(0+leftMargin() + move, + 0+topMargin(), + geometry().width()-rightMargin()-leftMargin() , + geometry().height()-bottomMargin()-topMargin()); + + //paint icon in button center + icon().paint(painter,rect,iconAlignment_,QIcon::Normal, QIcon::Off); + } +} + +/** + * Returns pointer to title FFScrolingLabel. + */ +FFScrollingLabel* FFScrollingButton::titleWidget() const +{ + return title_; +} + +/** + * Returns pointer to description FFScrolingLabel. + */ +FFScrollingLabel* FFScrollingButton::descriptionWidget() const +{ + return description_; +} + +/** + * Changes tRatio - title ratio and dRatio - description ratio to show/not show title/description. + */ +void FFScrollingButton::calculateRatio() +{ + if(titleSwitch_ && descriptionSwitch_) // show title and description + { + tRatio = ratio_; + dRatio = 1.0 - ratio_; + } + else if(!titleSwitch_ && descriptionSwitch_) // show only description + { + tRatio = 0; + dRatio = 1; + } + else if(titleSwitch_ && !descriptionSwitch_) // show only title + { + tRatio = 1; + dRatio = 0; + } +} + +/** + * Scales title and description indent. When resize event appears and calls out scaleIndent it changes indents to fit to new size. + * @param oldSize Old size of widget. + * @param newSize New size of widget. + */ +void FFScrollingButton::scaleIndent(QSize oldSize, QSize newSize) +{ + float widthProportion = (float)newSize.width() / (float)oldSize.width(); + + titleIndentTemp *= widthProportion; + descriptionIndentTemp *= widthProportion; + + titleIndent_ = titleIndentTemp; + descriptionIndent_ = descriptionIndentTemp; +} + +/** + * Recalculates geometry of labels (indent, margins etc.) + */ +void FFScrollingButton::updateView() +{ + // sets neede values + int margins = topMargin() + bottomMargin() + hSpacing(); + + int xT = 0; + int xD = 0; + + int w = 0; + + w = width() - 2 * descriptionIndent_ - leftMargin() - rightMargin() - iconSpace; + //values depend from alignment + if(iconAlignment() == Qt::AlignLeft) + { + xT = leftMargin() + titleIndent_ + iconSpace; + xD = leftMargin() + descriptionIndent_ + iconSpace; + + } + else + { + xT = leftMargin() + titleIndent_; + xD = leftMargin() + descriptionIndent_; + } + //sets geometry of labels with texts + title_->setGeometry(xT, + topMargin(), + w, + (height() - margins) * tRatio); + + description_->setGeometry(xD, + topMargin() + title_->size().height() + hSpacing(), + w , + (height() - margins) * dRatio); + + update(); + FFAbstractButton::updateView(); +} +/** + * Sets icon's alignment + */ +void FFScrollingButton::setIconAlignment(Qt::Alignment iconAlignment) +{ + switch(iconAlignment) + { + case Qt::AlignLeft: + case Qt::AlignRight: + FFAbstractButton::setIconAlignment(iconAlignment); + break; + default: + qDebug() << "You can only use Qt::AlignLeft or Qt::AlignRight"; + break; + } +} +// ####################################################### PRIVATE diff --git a/libffqw-1.0/sources/ffscrollingbutton.h b/libffqw-1.0/sources/ffscrollingbutton.h new file mode 100644 index 0000000..3646cc4 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollingbutton.h @@ -0,0 +1,216 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#ifndef FFSCROLLINGBUTTON_H +#define FFSCROLLINGBUTTON_H + +#ifndef MAEMO +#include +#endif + +#include "ffabstractbutton.h" +#include "ffviewcache.h" +#include "ffscrollinglabel.h" + +/** + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * @brief A class responsible for button with 2 labels + */ +const int DEFAULT_TOPBOTTOM_MARGIN = 2; ///< Default top and bottom margin +const float DEFAULT_RATIO = 0.3; ///< Default title/description height ratio + +#ifdef MAEMO + +class FFScrollingButton : public FFAbstractButton +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFScrollingButton : public FFAbstractButton +{ + Q_OBJECT + + Q_PROPERTY(QString title READ title WRITE setTitle) + Q_PROPERTY(QString description READ description WRITE setDescription) + + Q_PROPERTY(qreal ratio READ ratio WRITE setRatio) + + Q_PROPERTY(QColor titleColor READ titleColor WRITE setTitleColor) + Q_PROPERTY(QColor descriptionColor READ descriptionColor WRITE setDescriptionColor) + + Q_PROPERTY(int titleIndent READ titleIndent WRITE setTitleIndent) + Q_PROPERTY(int descriptionIndent READ descriptionIndent WRITE setDescriptionIndent) + + Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont) + Q_PROPERTY(QFont descriptionFont READ descriptionFont WRITE setDescriptionFont) + + Q_PROPERTY(bool titleDisabled READ isDisabledTitle WRITE disableTitle) + Q_PROPERTY(bool descriptionDisabled READ isDisabledDescription WRITE disableDescription) + + Q_PROPERTY(FFScrollingLabel::Alignment titleAlignment READ titleAlignment WRITE setTitleAlignment) + Q_PROPERTY(FFScrollingLabel::Alignment descriptionAlignment READ descriptionAlignment WRITE setDescriptionAlignment) + +#endif + +public: + FFScrollingButton(QWidget* parent = 0); + FFScrollingButton(QString title, QString description, QWidget* parent = + 0); + virtual ~FFScrollingButton(); + + QString title() const; + FFScrollingLabel::Alignment titleAlignment() const; + QColor titleColor() const; + int titleIndent() const; + QFont titleFont() const; + + QString description() const; + FFScrollingLabel::Alignment descriptionAlignment() const; + QColor descriptionColor() const; + int descriptionIndent() const; + QFont descriptionFont() const; + + float ratio() const; + + void setTitle(const QString& title); + void setTitleAlignment(FFScrollingLabel::Alignment alignment); + void setTitleColor(QColor color); + void setTitleIndent(int indent); + void setTitleFont(QFont font); + void setDescription(const QString& text); + void setDescriptionAlignment(FFScrollingLabel::Alignment alignment); + void setDescriptionColor(QColor color); + void setDescriptionIndent(int indent); + void setDescriptionFont(QFont font); + + void setRatio(float ratio); + + void disableTitle(bool state); + void disableDescription(bool state); + + bool isDisabledTitle(); + bool isDisabledDescription(); + void setIconAlignment(Qt::Alignment iconAlignment); + +protected: + + int titleIndent_; ///< indnet of title + int descriptionIndent_; ///< indent of description + + bool titleSwitch_; ///< is true when title is visible + bool descriptionSwitch_;///< is true when description is visible + + float ratio_; ///< title/description height ratio + float tRatio; ///< title height ratio + float dRatio; ///< description height ratio + + virtual void paintEvent(QPaintEvent* event); + virtual void resizeEvent(QResizeEvent* event); + virtual void mousePressEvent(QMouseEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event); + + virtual void paintIcon(QPainter* painter); + + FFScrollingLabel* titleWidget() const; + FFScrollingLabel* descriptionWidget() const; + + void scaleIndent(QSize oldSize, QSize newSize); + + void calculateRatio(); + + virtual void updateView(); + +private: + FFScrollingLabel* description_; ///< is using to displaying description of button + FFScrollingLabel* title_; ///< is using to displaying title of button + + float titleIndentTemp; ///< temporary title's indent + float descriptionIndentTemp; ///< temporary description's indent + + void init(); +}; + +#endif // FFSCROLLINGBUTTON_H diff --git a/libffqw-1.0/sources/ffscrollingcheckbox.cpp b/libffqw-1.0/sources/ffscrollingcheckbox.cpp new file mode 100644 index 0000000..1a2e325 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollingcheckbox.cpp @@ -0,0 +1,318 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingcheckbox.cpp + * @brief Implementation of the FFScrollingCheckBox class. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#include "ffscrollingcheckbox.h" + + +/*Static FFViewCaches -improve performance*/ +FFViewCache* FFScrollingCheckBox::stateTrue = NULL; +FFViewCache* FFScrollingCheckBox::stateFalse = NULL; +/** + * Constructs a FFScrollingCheckBox with a parent. + * Sets variable to initial values and set graphics used in widget. + */ +FFScrollingCheckBox::FFScrollingCheckBox(QWidget* parent) : + FFScrollingButton(parent) +{ + path = SCROLLINGCHECKBOX_PATH; + init(); +} +/** + * Constructs a FFScrollingCheckBox with a parent and new path to + * False/Normal Graphics. + * Set variable to initial values and set graphics used in widget. + */ +FFScrollingCheckBox::FFScrollingCheckBox(const QString& path, QWidget* parent ) : + FFScrollingButton(parent) +{ + this->path = path; + init(); +} + +/** + * A virtual destructor. + */ +FFScrollingCheckBox::~FFScrollingCheckBox() +{ + ; +} + +/** + * Repaint the view of checkbox button. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::paintEvent(QPaintEvent* event) +{ + //calls parental paint event + FFAbstractButton::paintEvent(event); + + //sets values for drawing + int x=0,y=0; + if(width() > height()) + { + x = leftMargin() + indent(); + y = topMargin() ; + } + else + { + x = leftMargin() + indent(); + y = topMargin() ; + } + + QPainter painter; + painter.begin(this); + + //draws image. + if( isChecked()) + { + painter.drawPixmap(x,y,stateTrue->pixmap()); + } + else + { + painter.drawPixmap(x,y,stateFalse->pixmap()); + } + painter.end(); +} + +/** + * Updates button`s view after changing size of the widget. + * Update size of all pixmap which need it (without corners) + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::resizeEvent(QResizeEvent* event) +{ + FFAbstractButton::resizeEvent(event); + calculateRatio(); + updateView(); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::mousePressEvent(QMouseEvent* event) +{ + FFScrollingButton::mousePressEvent(event); +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::mouseReleaseEvent(QMouseEvent* event) +{ + if(isClicked_) + { + if(!signalsBlocked()) + { + toggle(); + } + } + FFScrollingButton::mouseReleaseEvent(event); +} +/** + * Paints icon if it was set. + * @param painter is a tool to paint icon on widget. + */ +void FFScrollingCheckBox::paintIcon(QPainter* painter) +{ + // if icon was set paint it + if (!icon().isNull()) + { + QRect rect(0+leftMargin() + qMin(width() - leftMargin() - rightMargin(), + height() - topMargin() - bottomMargin()), + 0+topMargin(), + geometry().width()-rightMargin()-leftMargin(), + geometry().height()-bottomMargin()-topMargin()); + + //paint icon in button center + icon().paint(painter,rect,iconAlignment(),QIcon::Normal, QIcon::Off); + } +} +/** + * Returns text icon space. + */ +int FFScrollingCheckBox::textIconSpace() +{ + return textIconSpace_; +} + +/** + * Initiates an object of FFScrollingCheckBox. Sets all needed fields. + */ +void FFScrollingCheckBox::init() +{ + + + setCheckable(true); + setChecked(false); + textIconSpace_ = DEFAULT_TEXTICON_SPACE; + + if(NULL == stateFalse) + { + stateFalse = new FFViewCache; + stateFalse->init(path + "_false.svg"); + stateFalse->updateView(stateFalse->defaultSize()); + } + + if(NULL == stateTrue) + { + + stateTrue = new FFViewCache; + stateTrue->init(path + "_true.svg"); + stateTrue->updateView(stateTrue->defaultSize()); + } + setTitleIndent(0); + setDescriptionIndent(0); + setMinimumWidth(minimumHeight() + leftMargin() + rightMargin() + indent()); + setMargins(0,0,0,0); +} + +/** + * Sets text icon space + */ +void FFScrollingCheckBox::setTextIconSpace(int textIconSpace) +{ + textIconSpace_=textIconSpace; +} +/** + * Updates button's view parameters + */ +void FFScrollingCheckBox::updateView() +{ + int margins = topMargin() + bottomMargin() + hSpacing(); + int checkboxEdge = qMin(width() - leftMargin() - rightMargin(), + height() - topMargin() - bottomMargin()); + QSize size= QSize(0,0); + if(width() > height()) + { + titleWidget()->setVisible(true); + descriptionWidget()->setVisible(true); + //sets button's labels geometry + titleWidget()->setGeometry(vSpacing() + checkboxEdge + leftMargin() + iconSpace + textIconSpace_ + + titleIndent() + indent(), + topMargin(), + width() - leftMargin() - rightMargin() - titleIndent() - checkboxEdge - hSpacing() - iconSpace - textIconSpace_ - indent(), + (height() - margins) * tRatio); + + descriptionWidget()->setGeometry(vSpacing() + checkboxEdge + leftMargin() + descriptionIndent() + iconSpace + textIconSpace_ + indent(), + topMargin() + titleWidget()->size().height() + hSpacing(), + width() - checkboxEdge - leftMargin() - descriptionIndent() - rightMargin() - hSpacing() - iconSpace - textIconSpace_ - indent(), + (height() - margins) * (dRatio)); + size = QSize(checkboxEdge, checkboxEdge); + } + else + { + size = QSize(width()-(leftMargin() + rightMargin() + 2* indent()),checkboxEdge-(topMargin()+bottomMargin())); + } + + if(minimumSize().width() >= width() ) + { + titleWidget()->setVisible(false); + descriptionWidget()->setVisible(false); + } + + stateFalse->updateView(size); + stateTrue->updateView(size); + + update(); + + //calls update view from parent + FFAbstractButton::updateView(); +} +/** + * Sets icon alignment + * @param iconAlignment contains new alignemnt for icon + */ +void FFScrollingCheckBox::setIconAlignment(Qt::Alignment iconAlignment) +{ + //Sets only possible alignment options + switch(iconAlignment) + { + case Qt::AlignLeft: + FFAbstractButton::setIconAlignment(iconAlignment); + break; + default: + qDebug() << "You can only use Qt::AlignLeft or Qt::AlignRight"; + break; + } +} diff --git a/libffqw-1.0/sources/ffscrollingcheckbox.h b/libffqw-1.0/sources/ffscrollingcheckbox.h new file mode 100644 index 0000000..8f80817 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollingcheckbox.h @@ -0,0 +1,153 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingcheckbox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#ifndef FFSCROLLINGCHECKBOX_H +#define FFSCROLLINGCHECKBOX_H + + +#ifndef MAEMO +#include +#endif + +#include "ffviewcache.h" +#include "ffscrollinglabel.h" +#include "ffscrollingbutton.h" + +/** + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * @brief A class responsible for button with 2 labels and checkbox + */ + +static const QString SCROLLINGCHECKBOX_PATH = ":/standard/button"; ///< part of path to graphics files +static const int DEFAULT_TEXTICON_SPACE = 10; ///< default space of text icon + +#ifdef MAEMO + +class FFScrollingCheckBox : public FFScrollingButton + +#else + + +class QDESIGNER_WIDGET_EXPORT FFScrollingCheckBox : public FFScrollingButton + +#endif +{ + Q_OBJECT + +public: + FFScrollingCheckBox(QWidget* parent = 0); + virtual ~FFScrollingCheckBox(); + +protected: + FFScrollingCheckBox(const QString& path, QWidget* parent = 0); + virtual void paintEvent(QPaintEvent* event); + virtual void resizeEvent(QResizeEvent* event); + virtual void mousePressEvent(QMouseEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event); + + virtual void paintIcon(QPainter* painter); + + int textIconSpace(); + + void setTextIconSpace(int textIconSpace); + +private: + + static FFViewCache* stateTrue; ///< cached true icon view + static FFViewCache* stateFalse; ///< cached false icon view + + + QString path ; ///< stores a part of path to the graphics files + int textIconSpace_; ///< stores text icon space + + void init(); + virtual void updateView(); + void setIconAlignment(Qt::Alignment iconAlignment); +signals: + + +}; + +#endif // FFSCROLLINGCHECKBOX_H diff --git a/libffqw-1.0/sources/ffscrollinglabel.cpp b/libffqw-1.0/sources/ffscrollinglabel.cpp new file mode 100644 index 0000000..8bb7ae9 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollinglabel.cpp @@ -0,0 +1,701 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollinglabel.cpp + * @brief Implementation of the FFScrollingLabel class. + * + * @author ComArch S.A. + * @date 2009.08.07 + * @version 1.1 + */ + +#include "ffscrollinglabel.h" + +/** + * Constructs a FFScrollingLabel with a parent. + */ +FFScrollingLabel::FFScrollingLabel(QWidget* parent) : + FFAbstractWidget(parent) +{ + QFont font = QFont(FONT_TEXT_DEF, LABEL_SIZE_NORMAL); + init(DEFAULT_TEXT, font); +} + +/** + * Constructs a FFScrollingLabel with a given text and parent. + */ +FFScrollingLabel::FFScrollingLabel(QString text, QWidget* parent) : + FFAbstractWidget(parent) +{ + QFont font = QFont(FONT_TEXT_DEF, LABEL_SIZE_NORMAL); + init(text, font); +} + +/** + * Constructs a FFScrollingLabel with a given text, font and parent. + */ +FFScrollingLabel::FFScrollingLabel(QString text, QFont font, QWidget* parent) : + FFAbstractWidget(parent) +{ + init(text, font); +} + +/** + * A virtual destructor. + */ +FFScrollingLabel::~FFScrollingLabel() +{ + +} + +/** + * Initiates an object of FFScrollingLabel. Sets all needed fields and calls + * update() method. It is called by all constructors. + * + * @param text a text that will be shown at the label + * @param font a font that will be used to print a text on the label + */ +void FFScrollingLabel::init(QString text, QFont font) +{ + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + text_ = text; + font_ = font; + + timer = new QTimer(this); + + //connecting timer with method responsible for moving the text + connect(timer, SIGNAL(timeout()), this, SLOT(scrollSideToSide())); + + //setting default values + scrollSpeed_ = -DEFAULT_SCROLL_SPEED; + endScrollDelay_ = DEFAULT_END_SCROLL_DELAY; + color_ = COLOR_TEXT; + resizable_ = true; + fitToFont_ = false; + smoothDisappear_ = true; + painter = new QPainter(); + timerDelay_ = TIMER_DELAY; + alignment_ = ALIGNMENT_LEFT; + + //updating view of the label + updateView(); +} + +/** + * Updates text, font and size of the label. + * Makes that changing text, font or/and s painter->setFont(font_);ize takes effect. It is automatically + * called by resizeEvent(), setFont(), setText(), setSmoothDisappear(), so + * there is no need to call it by you. + */ +void FFScrollingLabel::updateView() +{ + //for calculate width and height of the text using a given font + QFontMetrics textSize(font_); + + //fitting the label's size to the font's size + if(fitToFont_) + { + resize(width(), textSize.size(0, text_).height()); + } + + //creating the gradient used to drawing the text on the label + gradient.setStart(0, 0); + gradient.setFinalStop(width(), 0); + gradient.setColorAt(0.2, color_); + gradient.setColorAt(0.0, Qt::transparent); + gradient.setColorAt(0.8, color_); + gradient.setColorAt(1.0, Qt::transparent); + + //if developer wants a gradient at ends of the label and if text width + //is greater than label width + if(smoothDisappear_ && textSize.size(0, text_).width() > width()) + { + //this pen will be used to drawing the text in paintEvent() + pen.setBrush(QBrush(gradient)); + } + else + { + //this pen will be used to drawing the text in paintEvent() + pen.setBrush(color_); + } + + //calculating length (in pixels) of the text + length_ = textSize.width(text_, text_.length()); + + //resetting text offset (used in text movement) + calcTextPos(); + textOffset = textStartPos; + + //resetting field responsible for freezing text movement at ends + endScrollDelayIterationL = 0; + endScrollDelayIterationR = 0; + + //if the text width is greater than label width and the label is wider + //than 0 pixels + if(length_ > width() && width() > 0) + { + if(timer->isActive() == false) + { + timer->start(timerDelay_); + } + } + else + { + timer->stop(); + } +} + +/** + * Calculates a position of the text's left edge. + */ +void FFScrollingLabel::calcTextPos() +{ + switch(alignment_) + { + case ALIGNMENT_CENTER: + textStartPos = (width() - length_) / 2; + break; + + case ALIGNMENT_LEFT: + textStartPos = 0; + break; + + case ALIGNMENT_RIGHT: + textStartPos = width() - length_; + break; + } +} + +/** + * Changes gradient using to draw a text. + * + * @param left point in which transparent color is changing into a solid color + * @param right point in which a solid color is changing into transparent color + */ +void FFScrollingLabel::changeGradient(qreal left, qreal right) +{ + gradient.setStart(0, 0); + gradient.setFinalStop(width(), 0); + + gradient.setColorAt(0.0, Qt::transparent); + gradient.setColorAt(1.0, Qt::transparent); + gradient.setColorAt(left, color_); + gradient.setColorAt(right, color_); + + pen.setBrush(QBrush(gradient)); + update(); +} + +/** + * Method that implements algorithm to scroll text from side to side. + * It is created as a slot, thus it can be called by a timer. + */ +void FFScrollingLabel::scrollSideToSide() +{ + textOffset += scrollSpeed_; + if(textOffset + length_ - scrollSpeed_ < width()) + { + textOffset -= scrollSpeed_; + if(endScrollDelayIterationR > endScrollDelay_) + { + scrollSpeed_ = -scrollSpeed_; + textOffset += scrollSpeed_; + endScrollDelayIterationR = 0; + changeGradient(0.2, 0.8); + } + else + { + endScrollDelayIterationR++; + changeGradient(0.2, 1); + } + } + else if(textOffset > 0) + { + textOffset -= scrollSpeed_; + + if(endScrollDelayIterationL > endScrollDelay_) + { + scrollSpeed_ = -scrollSpeed_; + textOffset += scrollSpeed_; + endScrollDelayIterationL = 0; + changeGradient(0.2, 0.8); + } + else + { + endScrollDelayIterationL++; + changeGradient(0, 0.8); + } + } + else + { + update(); + } +} + +///////////////////////////////////////////////////////OVERRIDDEN + +/** + * Repaints the view of this label. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::paintEvent(QPaintEvent* event) +{ + Q_UNUSED(event); + + painter->begin(this); + painter->setPen(pen); + painter->setFont(font_); + painter->drawText(textOffset, + 0, + width() - textOffset, + height(), + 0, + text_); + painter->end(); +} + +/** + * Updates label's view after changing size of this widget. It calls update(). + * If resizable is set up it also fits the font size to the label's size. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::resizeEvent(QResizeEvent* event) +{ + if(resizable_) + { + font_.setPixelSize(event->size().height() * 0.85 <= 0 ? 1 : event->size().height() * 0.85); + updateView(); + } + if(fitToFont_) + { + fitToFont_ = false; + updateView(); + fitToFont_ = true; + } +} + +/** + * Returns the recommended size for the widget. Overrides the virtual + * method from QWidget. + */ +QSize FFScrollingLabel::sizeHint() const +{ + return QSize(length_, font_.pixelSize()); +} + +/** + * Stops the label's timer when the label is hiding. + * It means if the label is not visible there are no useless calculates. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::hideEvent(QHideEvent* event) +{ + Q_UNUSED(event); + + timer->stop(); + +} + +/** + * Starts the label's timer when the label is showing. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::showEvent(QShowEvent* event) +{ + Q_UNUSED(event); + + if(timer->isActive() == false && length_ > width() && width() > 0) + { + timer->start(timerDelay_); + } + +} + +/** + * Returns the font that is used to printing label-text. + */ +QFont FFScrollingLabel::font() const +{ + return font_; +} + +/** + * Sets a font that will be used to print the text on the label. + * Calls update() method. + */ +void FFScrollingLabel::setFont(QFont font) +{ + this->font_ = font; + updateView(); + update(); +} + +/** + * Sets parameters of the font used to print a text on the label. + * Calls update() method. + */ +void FFScrollingLabel::setFont(int fontParam) +{ + int fontSize = 0; + QString fontType; + //search font size to set + switch(fontParam & SIZE_MASK) + { + case SIZE_TINY: + fontSize = LABEL_SIZE_TINY; + break; + + case SIZE_SMALL: + fontSize = LABEL_SIZE_SMALL; + break; + + case SIZE_NORMAL: + fontSize = LABEL_SIZE_NORMAL; + break; + + case SIZE_LARGE: + fontSize = LABEL_SIZE_LARGE; + break; + + case SIZE_HUGE: + fontSize = LABEL_SIZE_HUGE; + break; + } + + //search font type to set + switch(fontParam & FONT_MASK) + { + case FONT_TITLE: + fontType = FONT_TITLE_DEF; + break; + + case FONT_TEXT: + fontType = FONT_TEXT_DEF; + break; + } + + //search font color to set + switch(fontParam & COLOR_MASK) + { + case COLOR_TITLE: + color_ = COLOR_TITLE_DEF; + break; + + case COLOR_TEXT: + color_ = COLOR_TEXT_DEF; + break; + + case COLOR_BRIGHT_BACKGROUND: + color_ = COLOR_BRIGHT_BACKGROUND_DEF; + break; + + case COLOR_DARK_BACKGROUND: + color_ = COLOR_DARK_BACKGROUND_DEF; + break; + + case COLOR_BRIGHT_FOREGROUND: + color_ = COLOR_BRIGHT_FOREGROUND_DEF; + break; + + case COLOR_DARK_FOREGROUND: + color_ = COLOR_DARK_FOREGROUND_DEF; + break; + } + //search label's alignment to set + alignment_ = Alignment(fontParam & ALIGNMENT_MASK); + switch(alignment_) + { + case ALIGNMENT_CENTER: + textStartPos = (width() - length_) / 2; + break; + + case ALIGNMENT_LEFT: + textStartPos = 0; + break; + + case ALIGNMENT_RIGHT: + textStartPos = width() - length_; + break; + } + + setFont(QFont(fontType, fontSize)); + updateView(); + update(); +} + +/** + * Returns the text printed on the label. + */ +QString FFScrollingLabel::text() const +{ + return text_; +} + +/** + * Sets the text on the label. Calls update() method. + */ +void FFScrollingLabel::setText(QString text) +{ + this->text_ = text; + updateView(); + update(); +} + +/** + * Returns a value that tells if the label is automatically fitting up + * to a layout. + */ +bool FFScrollingLabel::isResizable() const +{ + return resizable_; +} + +/** + * Turns on/off auto-fitting the label size to the layout. If it is set to true + * then with every change of the label's size, the font size will be changed. + * If false, the font size will be fixed. If resizable is true, fitToFont + * property is setting up to false. + */ +void FFScrollingLabel::setResizable(bool resizable) +{ + if((this->resizable_ = resizable)) + { + this->fitToFont_ = false; + } + else + { + + this->fitToFont_ = true; + } + update(); +} + +/** + * Returns the speed of text scrolling. + */ +int FFScrollingLabel::scrollSpeed() const +{ + return scrollSpeed_; +} + +/** + * Sets the speed of text scrolling. + */ +void FFScrollingLabel::setScrollSpeed(int scrollSpeed) +{ + this->scrollSpeed_ = scrollSpeed; + update(); +} + +/** + * Returns time that the text waits between changing move direction. The time is + * calculating as: timerDelay * endScrollDelay. + */ +int FFScrollingLabel::endScrollDelay() const +{ + return endScrollDelay_; +} + +/** + * Sets time that the text waits between changing move direction. The time is + * calculating as: timerDelay * endScrollDelay. + */ +void FFScrollingLabel::setEndScrollDelay(int endScrollDelay) +{ + this->endScrollDelay_ = endScrollDelay; + update(); +} + +/** + * Returns the color using which is printing a text. + */ +QColor FFScrollingLabel::color() const +{ + return color_; +} + +/** + * Sets the color that is used to print a text. + */ +void FFScrollingLabel::setColor(QColor color) +{ + this->color_ = color; + updateView(); + update(); +} + +/** + * Returns true if the size of label is fitting up to the font size. + */ +bool FFScrollingLabel::fitToFont() const +{ + return fitToFont_; +} + +/** + * Turns on/off fitting up size of label to the font size. If fitToFont is true + * resizable property is setting up to false. + */ +void FFScrollingLabel::setFitToFont(bool fitToFont) +{ + if((this->fitToFont_ = fitToFont)) + { + resizable_ = false; + } + else + { + resizable_ = true; + } + update(); +} + +/** + * Sets the scrolling type. + */ +void FFScrollingLabel::setScrollType(int type) +{ + switch(type) + { + case SCROLL_SIDE_TO_SIDE: + disconnect(timer, + SIGNAL(timeOut()), + this, + previousScrollType.toAscii()); + connect(timer, + SIGNAL(timeOut()), + this, + SLOT(scrollSpeed())); + previousScrollType = SLOT(scrollSpeed()); + break; + } + update(); +} + +/** + * Returns true if the gradient at ends is set up, otherwise false. + */ +bool FFScrollingLabel::isSmoothDisappear() const +{ + return smoothDisappear_; +} + +/** + * Turns on/off a gradient at the ends of the label. Calls update() method. + */ +void FFScrollingLabel::setSmoothDisappear(bool smoothDisappear) +{ + this->smoothDisappear_ = smoothDisappear; + updateView(); + update(); +} + +/** + * Returns time (in milliseconds) between movements of the text. + */ +int FFScrollingLabel::timerDelay() +{ + return timerDelay_; +} + +/** + * Sets time (in milliseconds) between movements of the text. + */ +void FFScrollingLabel::setTimerDelay(int delay) +{ + timerDelay_ = delay; + timer->stop(); + timer->start(timerDelay_); + update(); +} + +/** + * Sets alignment of the text. + */ +void FFScrollingLabel::setAlignment(FFScrollingLabel::Alignment alignment) +{ + alignment_ = alignment; + calcTextPos(); + updateView(); + update(); +} + +/** + * Returns alignment used in this label. + */ +FFScrollingLabel::Alignment FFScrollingLabel::alignment() +{ + return alignment_; +} diff --git a/libffqw-1.0/sources/ffscrollinglabel.h b/libffqw-1.0/sources/ffscrollinglabel.h new file mode 100644 index 0000000..8386701 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollinglabel.h @@ -0,0 +1,223 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollinglabel.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.07 + * @version 1.1 + * + * @brief A label with scrolling text. + */ + +#ifndef FFSCROLLINGLABEL_H +#define FFSCROLLINGLABEL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractwidget.h" +#include "ffviewcache.h" + +const int TIMER_DELAY = 200; ///< delay for timer responsible for scrolling +const QString DEFAULT_TEXT = "Default text"; ///< text printed on a label as default +const int DEFAULT_SCROLL_SPEED = 10; ///< number of pixels which defines step of scrolling +const int DEFAULT_END_SCROLL_DELAY = 10; ///< number of gaps when one of label's edge is visible +const int LABEL_SIZE_TINY = 6; ///< defines size of tiny label's font +const int LABEL_SIZE_SMALL = 10; ///< defines size of small label's font +const int LABEL_SIZE_NORMAL = 12; ///< defines size of normal label's font +const int LABEL_SIZE_LARGE = 16; ///< defines size of large label's font +const int LABEL_SIZE_HUGE = 24; ///< defines size of huge label's font + +/** + * @author ComArch S.A. + * @date 2009.08.07 + * @version 1.1 + * + * @brief A label with scrolling text. + */ +#ifdef MAEMO + +class FFScrollingLabel : public FFAbstractWidget +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFScrollingLabel : public FFAbstractWidget +{ + Q_OBJECT + Q_ENUMS(Alignment) + Q_PROPERTY(QFont font READ font WRITE setFont) + Q_PROPERTY(QString text READ text WRITE setText) + Q_PROPERTY(bool resizable READ isResizable WRITE setResizable) + Q_PROPERTY(int scrollSpeed READ scrollSpeed WRITE setScrollSpeed) + Q_PROPERTY(int endScrollDelay READ endScrollDelay WRITE setEndScrollDelay) + Q_PROPERTY(QColor color READ color WRITE setColor) + Q_PROPERTY(bool fitToFont READ fitToFont WRITE setFitToFont) + Q_PROPERTY(bool smoothDisappear READ isSmoothDisappear WRITE setSmoothDisappear) + Q_PROPERTY(int timerDelay READ timerDelay WRITE setTimerDelay) + Q_PROPERTY(FFScrollingLabel::Alignment alignment READ alignment WRITE setAlignment) + +#endif +public: + FFScrollingLabel(QWidget* parent = 0); + FFScrollingLabel(QString text, QWidget *parent = 0); + FFScrollingLabel(QString text, QFont font, QWidget* parent = 0); + virtual ~FFScrollingLabel(); + + enum Alignment + { + ALIGNMENT_LEFT = 0x2000, ///< label alignment to left + ALIGNMENT_RIGHT = 0x4000, ///< label alignment to right + ALIGNMENT_CENTER = 0x8000 ///< label alignment to center + }; + + QFont font() const; + QString text() const; + bool isResizable() const; + int scrollSpeed() const; + int endScrollDelay() const; + QColor color() const; + bool fitToFont() const; + bool isSmoothDisappear() const; + int timerDelay(); + FFScrollingLabel::Alignment alignment(); + + void setFont(QFont font); + void setFont(int fontParam); + void setText(QString text); + void setResizable(bool resizable); + void setScrollSpeed(int scrollSpeed); + void setEndScrollDelay(int endScrollDelay); + void setColor(QColor color); + void setFitToFont(bool fitToFont); + void setScrollType(int type); + void setSmoothDisappear(bool smoothDisappear); + void setTimerDelay(int delay); + void setAlignment(FFScrollingLabel::Alignment alignment); + + void updateView(); + +protected: + virtual void paintEvent(QPaintEvent *event); + virtual void resizeEvent(QResizeEvent *event); + virtual QSize sizeHint() const; + virtual void hideEvent(QHideEvent* event); + virtual void showEvent(QShowEvent* event); + +private: + QPainter* painter; ///< pointer to painter + QLinearGradient gradient; ///< stores gradient for label + QPen pen; ///< stores pen where gradient is set + QString text_; ///< stores text of label + QFont font_; ///< stores font of text + QTimer* timer; ///< timer used to animation + bool resizable_; ///< is true when font size should change with widget's size changes. + QColor color_; ///< stores color used to create gradient + + int length_; ///< length of the text + int textOffset; ///< text's offset + int scrollSpeed_; ///< scoll's speed + int endScrollDelay_; ///< gap during one of edges is visible + int endScrollDelayIterationL; ///< contains value how many times text is in stopped state on left + int endScrollDelayIterationR; ///< contains value how many times text is in stopped state on right + bool fitToFont_; ///< if is true the widgets height is adjusted to font size + QString previousScrollType; ///< stores scrolling type + bool smoothDisappear_; ///< is true when the gradient at ends is set up + int timerDelay_; ///< defines how often text is repainted + Alignment alignment_; ///< stores text's alignment + int textStartPos; ///< contains start text's posiotion + + void init(QString text, QFont font); + void calcTextPos(); + inline void changeGradient(qreal left, qreal right); + +private slots: + void scrollSideToSide(); +}; + +#endif // FFSCROLLINGLABEL_H diff --git a/libffqw-1.0/sources/ffscrollingradiobutton.cpp b/libffqw-1.0/sources/ffscrollingradiobutton.cpp new file mode 100644 index 0000000..562362b --- /dev/null +++ b/libffqw-1.0/sources/ffscrollingradiobutton.cpp @@ -0,0 +1,101 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingradiobutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.10.13 + * @version 1.0 + */ + +#include "ffscrollingradiobutton.h" +#include + +/** + * Constructs FFScrollingRadioButton with parent + */ +FFScrollingRadioButton::FFScrollingRadioButton(QWidget* parent) : FFScrollingCheckBox(SCROLLINGRADIOBUTTON_PATH,parent) +{ + path = SCROLLINGRADIOBUTTON_PATH ; + + setAutoExclusive(true); +} +/** + * A virtual destructor + */ +FFScrollingRadioButton::~FFScrollingRadioButton() +{ + +} diff --git a/libffqw-1.0/sources/ffscrollingradiobutton.h b/libffqw-1.0/sources/ffscrollingradiobutton.h new file mode 100644 index 0000000..b5c9968 --- /dev/null +++ b/libffqw-1.0/sources/ffscrollingradiobutton.h @@ -0,0 +1,112 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingradiobutton.h + * @brief Implementation of the FFScrollingRadioButton class. + * + * @author ComArch S.A. + * @date 2009.10.13 + * @version 1.0 + */ + +#ifndef FFSCROLLINGRADIOBUTTON_H_ +#define FFSCROLLINGRADIOBUTTON_H_ + +#ifndef MAEMO +#include +#endif + +#include "ffscrollingcheckbox.h" + + +static const QString SCROLLINGRADIOBUTTON_PATH = ":/standard/radiobutton"; ///< part of path to graphics files + +/** + * @author ComArch S.A. + * @date 2009.10.13 + * @version 1.0 + * + * @brief A class responsible for button with 2 labels and radiobutton + */ +class FFScrollingRadioButton : public FFScrollingCheckBox +{ + Q_OBJECT +public: + FFScrollingRadioButton(QWidget* parent = 0); + virtual ~FFScrollingRadioButton(); +private: + QString path; ///< contains part of path to graphics files +}; + +#endif /* FFSCROLLINGRADIOBUTTON_H_ */ diff --git a/libffqw-1.0/sources/ffstringcombobox.cpp b/libffqw-1.0/sources/ffstringcombobox.cpp new file mode 100644 index 0000000..7b6a1bf --- /dev/null +++ b/libffqw-1.0/sources/ffstringcombobox.cpp @@ -0,0 +1,193 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffstringcombobox.cpp + * @brief Implementation of the FFStringComboBox class + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + + +#include "ffstringcombobox.h" +/** + * Constructs a FFStringComboBox with a parent. + */ +FFStringComboBox::FFStringComboBox(QString title, QWidget* parent) : + FFAbstractComboBox(new FFScrollingButton(title,""), parent) +{ + activator_ -> setIcon(QIcon(":/standard/combo_triangle_pressed.svg")); + activator_ -> setMargins(0,0,10,10); + activator_ -> setIconAlignment(Qt::AlignRight); + +} + +/** + * A virtual destructor. + */ +FFStringComboBox::~FFStringComboBox() +{ + ; +} + +/** + * Adds item to combobox + * @param item is a text for item + */ +void FFStringComboBox::addItem(QString item) +{ + addItem(QVariant(item)); +} +/** + * Adds items to combobox + * @param items is a list of text for items + */ +void FFStringComboBox::addItems(QList items) +{ + for(int i=0; isetDescription(items.at(i)); + temp->disableTitle(true); + + // Second step: You must call this function with previously prepared button + insertItem(temp,false); + } + emit reset(); +} +/** + * Returns title of combobox + */ +QString FFStringComboBox::title() +{ + return dynamic_cast(activator_)->title(); +} +/** + * Sets title of combobox + */ +void FFStringComboBox::setTitle(QString title) +{ + dynamic_cast(activator_)->setTitle(title); +} +/** + * Sets chosen value of FFStringComboBox on activator + * @param item is a pointer to chosen item. + */ + +void FFStringComboBox::setActivatorSpecs(FFAbstractButton* item) +{ + if(FFScrollingButton* but = dynamic_cast(item)) + { + dynamic_cast(activator_)->setDescription(but->description()); + } +} +/** + * Returns QVariant element containing value of chosen item + */ +QVariant FFStringComboBox::activatorSpecs() +{ + return QVariant(dynamic_cast(activator_)->description()); +} + + +/** + * Sets actual text. + *@param text is a text to set + */ +void FFStringComboBox::setCurrentText(QString text) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast (items_[i])->description() == text) + { + setCurrentItem(i); + return; + } + } +} +/** + * Adds new item to FFStringComboBox + */ +void FFStringComboBox::addItem(QVariant spec) +{ + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFScrollingButton* temp = new FFScrollingButton; + temp->setDescription(spec.toString()); + temp->disableTitle(true); + + // Second step: You must call this function with previously prepared button + insertItem(temp); +} diff --git a/libffqw-1.0/sources/ffstringcombobox.h b/libffqw-1.0/sources/ffstringcombobox.h new file mode 100644 index 0000000..ff8a94f --- /dev/null +++ b/libffqw-1.0/sources/ffstringcombobox.h @@ -0,0 +1,136 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffstringcombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#ifndef FFSTRINGCOMBOBOX_H_ +#define FFSTRINGCOMBOBOX_H_ + +#ifndef MAEMO +#include +#endif + +#include "ffabstractcombobox.h" +#include "ffscrollingbutton.h" + +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of combobox with texts + */ + +#ifdef MAEMO + +class FFStringComboBox : public FFAbstractComboBox + +#else + +class QDESIGNER_WIDGET_EXPORT FFStringComboBox : public FFAbstractComboBox + +#endif +{ + Q_OBJECT + +public: + FFStringComboBox(QString title = 0, QWidget* parent = 0); + virtual ~FFStringComboBox(); + + void addItem(QString item); + void addItems(QList items); + + QString title(); + + void setTitle(QString title); + +public slots: + void setCurrentText(QString text); + +protected: + virtual void setActivatorSpecs(FFAbstractButton* item); + virtual QVariant activatorSpecs(); + +private: + void addItem(QVariant item); + +}; + +#endif // FFSTRINGCOMBOBOX_H diff --git a/libffqw-1.0/sources/ffviewcache.cpp b/libffqw-1.0/sources/ffviewcache.cpp new file mode 100644 index 0000000..2c643fb --- /dev/null +++ b/libffqw-1.0/sources/ffviewcache.cpp @@ -0,0 +1,176 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffviewcache.cpp + * @brief Implementation of the FFViewCache class + * + * @author ComArch S.A. + * @date 2009.07.30 + * @version 1.0 + */ +#include "ffviewcache.h" + + +QHash FFViewCache::graphicsTable; + +/** Constructs an FFViewCache with a parent. */ +FFViewCache::FFViewCache(QObject* parent) : QObject(parent) +{ + renderer_ = new QSvgRenderer(this); +} + +/** A virtual destructor */ +FFViewCache::~FFViewCache() +{ + ; +} + +/** + * This method is used to initiate FFViewCache class. + * Reads graphic from file in "svg" format and calls updateView method to set + * class parameters. + * + * @param path a text with path to file with a graphic +*/ + +void FFViewCache::init(QString path) +{ + + if(!graphicsTable.contains(path)) + { + QSvgRenderer* rend= new QSvgRenderer; + rend->load(path); + graphicsTable[path] = rend; + + } + renderer_= graphicsTable[path]; +} + +/** + * Fills QPixmap with graphic loaded by the QSvgRenderer from a file. + * + * @param size specifies size of a QPixmap storing a graphic +*/ +void FFViewCache::updateView(QSize size) +{ + /* creates pixmap with correct size */ + pixmap_ = QPixmap(size); + /* background will be transparent */ + pixmap_.fill(Qt::transparent); + + /* creates painter and fill pixmap by graphic */ + QPainter painter; + painter.begin(&pixmap_); + renderer_->render(&painter); + painter.end(); +} + +/** + * Returns graphic read from svg file +*/ +QPixmap FFViewCache::pixmap() const +{ + return pixmap_; +} + +/** + * Returns Svg renderer + */ +QSvgRenderer* FFViewCache::renderer() const +{ + return renderer_; +} + +/** + * Returns true when a file with graphic was correctly read + */ +bool FFViewCache::isValid() const +{ + return renderer_->isValid(); +} + +/** + * Returns default size of graphic read from file + */ +QSize FFViewCache::defaultSize() const +{ + return renderer_->defaultSize(); +} +/** + * Sets pixmap size to 0 + */ +void FFViewCache::setPixmapToZero() +{ + pixmap_ = QPixmap(0,0); +} diff --git a/libffqw-1.0/sources/ffviewcache.h b/libffqw-1.0/sources/ffviewcache.h new file mode 100644 index 0000000..4cb526a --- /dev/null +++ b/libffqw-1.0/sources/ffviewcache.h @@ -0,0 +1,124 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffviewcache.h + * @brief Contains a necessary class declaration. + * + * @author Marcin Kusmierski, Damian Plonek, Michał Palczewski, Dawid Klimt + * @date 2009.07.30 + * @version 1.0 + */ + +#ifndef FFVIEWCACHE_H +#define FFVIEWCACHE_H + +#include +#include +#include +#include +#include +/** + * @author ComArch S.A. + * @date 2009.07.30 + * @version 1.0 + * + * @brief A class responsible for widgets' view and event mask + */ +class FFViewCache : public QObject +{ +Q_OBJECT +public: + FFViewCache(QObject* parent = 0); + virtual ~FFViewCache(); + + void init(QString path); + void updateView(QSize size); + QPixmap pixmap() const; + QSvgRenderer* renderer() const; + bool isValid() const; + QSize defaultSize() const; + void setPixmapToZero(); + +private: + + static QHash graphicsTable; /// Mon, 11 Jan 2010 12:58:59 +0100 diff --git a/libffqw-demo-1.0/debian/README.Debian b/libffqw-demo-1.0/debian/README.Debian new file mode 100644 index 0000000..6c24058 --- /dev/null +++ b/libffqw-demo-1.0/debian/README.Debian @@ -0,0 +1,6 @@ +libffqw-demo for Debian +----------------------- + + + + -- unknown Mon, 11 Jan 2010 12:58:59 +0100 diff --git a/libffqw-demo-1.0/debian/changelog b/libffqw-demo-1.0/debian/changelog new file mode 100644 index 0000000..c38f61d --- /dev/null +++ b/libffqw-demo-1.0/debian/changelog @@ -0,0 +1,5 @@ +libffqw-demo (1.0) stable; urgency=low + + * Initial Release. + + -- Michal Palczewski Mon, 11 Jan 2010 12:58:59 +0100 diff --git a/libffqw-demo-1.0/debian/compat b/libffqw-demo-1.0/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/libffqw-demo-1.0/debian/compat @@ -0,0 +1 @@ +5 diff --git a/libffqw-demo-1.0/debian/control b/libffqw-demo-1.0/debian/control new file mode 100644 index 0000000..9245328 --- /dev/null +++ b/libffqw-demo-1.0/debian/control @@ -0,0 +1,23 @@ +Source: libffqw-demo +Section: user/other +Priority: extra +Maintainer: Michal Palczewski +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: libffqw-demo +Architecture: any +Depends: libffqw (= 1.0) | libffqw-n810 (= 1.0) +Description: Demo application for FFQW library. + This demo application shows features of Finger Friendly Qt Widgets Library + (FFQW). Demo and FFQW is designed to use for Nokia N900, but can be use with + Nokia N810. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC diff --git a/libffqw-demo-1.0/debian/copyright b/libffqw-demo-1.0/debian/copyright new file mode 100644 index 0000000..ec9c117 --- /dev/null +++ b/libffqw-demo-1.0/debian/copyright @@ -0,0 +1,23 @@ +This is libffqw-demo, written and maintained by unknown +on Mon, 11 Jan 2010 12:58:59 +0100. + +Copyright Holder: Comarch S.A. + +License: + + 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/libffqw-demo-1.0/debian/cron.d.ex b/libffqw-demo-1.0/debian/cron.d.ex new file mode 100644 index 0000000..5e2e3b7 --- /dev/null +++ b/libffqw-demo-1.0/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the libffqw-demo package +# +0 4 * * * root libffqw-demo_maintenance diff --git a/libffqw-demo-1.0/debian/dirs b/libffqw-demo-1.0/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/libffqw-demo-1.0/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/libffqw-demo-1.0/debian/docs b/libffqw-demo-1.0/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/libffqw-demo-1.0/debian/emacsen-install.ex b/libffqw-demo-1.0/debian/emacsen-install.ex new file mode 100644 index 0000000..2bc864a --- /dev/null +++ b/libffqw-demo-1.0/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/libffqw-demo + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=libffqw-demo + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/libffqw-demo-1.0/debian/emacsen-remove.ex b/libffqw-demo-1.0/debian/emacsen-remove.ex new file mode 100644 index 0000000..d00df9d --- /dev/null +++ b/libffqw-demo-1.0/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/libffqw-demo + +FLAVOR=$1 +PACKAGE=libffqw-demo + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/libffqw-demo.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/libffqw-demo-1.0/debian/emacsen-startup.ex b/libffqw-demo-1.0/debian/emacsen-startup.ex new file mode 100644 index 0000000..e207bd9 --- /dev/null +++ b/libffqw-demo-1.0/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50libffqw-demo.el +;; for the Debian libffqw-demo package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The libffqw-demo package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/libffqw-demo"))) +;; If package-dir does not exist, the libffqw-demo package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'libffqw-demo-mode "libffqw-demo-mode" + "Major mode for editing libffqw-demo files." t) + (add-to-list 'auto-mode-alist '("\\.libffqw-demo$" . libffqw-demo-mode)))) + diff --git a/libffqw-demo-1.0/debian/files b/libffqw-demo-1.0/debian/files new file mode 100644 index 0000000..1dbf7bc --- /dev/null +++ b/libffqw-demo-1.0/debian/files @@ -0,0 +1 @@ +libffqw-demo_1.0_armel.deb user/other extra diff --git a/libffqw-demo-1.0/debian/init.d.ex b/libffqw-demo-1.0/debian/init.d.ex new file mode 100644 index 0000000..3a30264 --- /dev/null +++ b/libffqw-demo-1.0/debian/init.d.ex @@ -0,0 +1,81 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/libffqw-demo +NAME=libffqw-demo +DESC=libffqw-demo + +test -x $DAEMON || exit 0 + +# Include libffqw-demo defaults if available +if [ -f /etc/default/libffqw-demo ] ; then + . /etc/default/libffqw-demo +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/libffqw-demo-1.0/debian/libffqw-demo-default.ex b/libffqw-demo-1.0/debian/libffqw-demo-default.ex new file mode 100644 index 0000000..061b5f2 --- /dev/null +++ b/libffqw-demo-1.0/debian/libffqw-demo-default.ex @@ -0,0 +1,10 @@ +# Defaults for libffqw-demo initscript +# sourced by /etc/init.d/libffqw-demo +# installed at /etc/default/libffqw-demo by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/libffqw-demo-1.0/debian/libffqw-demo.doc-base.EX b/libffqw-demo-1.0/debian/libffqw-demo.doc-base.EX new file mode 100644 index 0000000..3858ef1 --- /dev/null +++ b/libffqw-demo-1.0/debian/libffqw-demo.doc-base.EX @@ -0,0 +1,22 @@ +Document: libffqw-demo +Title: Debian libffqw-demo Manual +Author: +Abstract: This manual describes what libffqw-demo is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/libffqw-demo/libffqw-demo.sgml.gz + +Format: postscript +Files: /usr/share/doc/libffqw-demo/libffqw-demo.ps.gz + +Format: text +Files: /usr/share/doc/libffqw-demo/libffqw-demo.text.gz + +Format: HTML +Index: /usr/share/doc/libffqw-demo/html/index.html +Files: /usr/share/doc/libffqw-demo/html/*.html + + diff --git a/libffqw-demo-1.0/debian/libffqw-demo.substvars b/libffqw-demo-1.0/debian/libffqw-demo.substvars new file mode 100644 index 0000000..4c9540d --- /dev/null +++ b/libffqw-demo-1.0/debian/libffqw-demo.substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.5.0-1), libdbus-1-3 (>= 1.1.4), libdbus-glib-1-2 (>= 0.76), libgcc1 (>= 1:4.2.1), libgconf2-6 (>= 2.13.5), libglib2.0-0 (>= 2.20.0), libosso1 (>= 2.23), libqt4-maemo5-core (>= 4.6.0~git20091215), libqt4-maemo5-gui (>= 4.6.0~git20091215), libqt4-maemo5-svg (>= 4.6.0~git20091215), libstdc++6 (>= 4.2.1) diff --git a/libffqw-demo-1.0/debian/manpage.1.ex b/libffqw-demo-1.0/debian/manpage.1.ex new file mode 100644 index 0000000..53b4bc0 --- /dev/null +++ b/libffqw-demo-1.0/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LIBFFQW-DEMO SECTION "January 11, 2010" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +libffqw-demo \- program to do something +.SH SYNOPSIS +.B libffqw-demo +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B libffqw-demo +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBlibffqw-demo\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +libffqw-demo was written by . +.PP +This manual page was written by unknown , +for the Debian project (but may be used by others). diff --git a/libffqw-demo-1.0/debian/manpage.sgml.ex b/libffqw-demo-1.0/debian/manpage.sgml.ex new file mode 100644 index 0000000..25cf7ea --- /dev/null +++ b/libffqw-demo-1.0/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + January 11, 2010"> + + SECTION"> + michal.palczewski@comarch.com"> + + LIBFFQW-DEMO"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + diff --git a/libffqw-demo-1.0/debian/manpage.xml.ex b/libffqw-demo-1.0/debian/manpage.xml.ex new file mode 100644 index 0000000..9b68bfa --- /dev/null +++ b/libffqw-demo-1.0/debian/manpage.xml.ex @@ -0,0 +1,148 @@ + +.
will be generated. You may view the +manual page with: nroff -man .
| less'. A +typical entry in a Makefile or Makefile.am is: + +DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ +manpages/docbook.xsl +XP=xsltproc -''-nonet + +manpage.1: manpage.dbk + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The +XSL files are in docbook-xsl. Please remember that if you +create the nroff version in one of the debian/rules file +targets (such as build), you will need to include xsltproc +and docbook-xsl in your Build-Depends control field. + +--> + + + FIRSTNAME"> + SURNAME"> + + January 11, 2010"> + + SECTION"> + michal.palczewski@comarch.com"> + + LIBFFQW-DEMO"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ diff --git a/libffqw-demo-1.0/debian/menu.ex b/libffqw-demo-1.0/debian/menu.ex new file mode 100644 index 0000000..c03467a --- /dev/null +++ b/libffqw-demo-1.0/debian/menu.ex @@ -0,0 +1,2 @@ +?package(libffqw-demo):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\ + title="libffqw-demo" command="/usr/bin/libffqw-demo" diff --git a/libffqw-demo-1.0/debian/postinst.ex b/libffqw-demo-1.0/debian/postinst.ex new file mode 100644 index 0000000..e3bf604 --- /dev/null +++ b/libffqw-demo-1.0/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for libffqw-demo +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-demo-1.0/debian/postrm.ex b/libffqw-demo-1.0/debian/postrm.ex new file mode 100644 index 0000000..1b7989a --- /dev/null +++ b/libffqw-demo-1.0/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for libffqw-demo +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-demo-1.0/debian/preinst.ex b/libffqw-demo-1.0/debian/preinst.ex new file mode 100644 index 0000000..03e3452 --- /dev/null +++ b/libffqw-demo-1.0/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for libffqw-demo +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-demo-1.0/debian/prerm.ex b/libffqw-demo-1.0/debian/prerm.ex new file mode 100644 index 0000000..fb58bd9 --- /dev/null +++ b/libffqw-demo-1.0/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for libffqw-demo +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-demo-1.0/debian/rules b/libffqw-demo-1.0/debian/rules new file mode 100755 index 0000000..762b961 --- /dev/null +++ b/libffqw-demo-1.0/debian/rules @@ -0,0 +1,98 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/libffqw-demo.sgml > libffqw-demo.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/libffqw-demo. + $(MAKE) DESTDIR=$(CURDIR)/debian/libffqw-demo install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/libffqw-demo-1.0/debian/watch.ex b/libffqw-demo-1.0/debian/watch.ex new file mode 100644 index 0000000..b1d7cde --- /dev/null +++ b/libffqw-demo-1.0/debian/watch.ex @@ -0,0 +1,22 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php libffqw-demo-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/libffqw-demo-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/libffqw-demo-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for debscripts >= 2.9 +# http://sf.net/libffqw-demo/libffqw-demo-(.*)\.tar\.gz + + diff --git a/libffqw-demo-1.0/demo.pro b/libffqw-demo-1.0/demo.pro new file mode 100644 index 0000000..cab6804 --- /dev/null +++ b/libffqw-demo-1.0/demo.pro @@ -0,0 +1,48 @@ +TEMPLATE = app +TARGET = ffqwdemo +CONFIG += link_pkgconfig +QT += core \ + gui \ + svg +HEADERS += sources/mainwindow.h +SOURCES += sources/main.cpp \ + sources/mainwindow.cpp +RESOURCES += +LIBS += -L../../ \ + -L/etc/lib/ \ + -lffqw +INCLUDEPATH += ../../sources + +maemo { + LIBS+= -losso \ + -ldbus-glib-1 \ + -ldbus-1 \ + -lgobject-2.0 \ + -lglib-2.0 + DEFINES += MAEMO + PKGCONFIG += dbus-1 glib-2.0 dbus-glib-1 gconf-2.0 osso-ic +} + +deb { + message(Creating Makefile for DEB binary package) + + desktop.files = data/ffqwdemo.desktop + desktop.path = debian/libffqw-demo/usr/share/applications/hildon/ + + pics.files = data/ffqwdemo.png + pics.path = debian/libffqw-demo/usr/share/pixmaps/ + + service.files = data/ffqwdemo.service + service.path = debian/libffqw-demo/usr/share/dbus-1/services/ + + target.files = ffqwdemo + target.path = debian/libffqw-demo/usr/bin + + INSTALLS += desktop pics service +} +else { + target.path = /usr/bin + message(Creating Makefile for Linux) +} + +INSTALLS += target diff --git a/libffqw-demo-1.0/sources/main.cpp b/libffqw-demo-1.0/sources/main.cpp new file mode 100644 index 0000000..b00d708 --- /dev/null +++ b/libffqw-demo-1.0/sources/main.cpp @@ -0,0 +1,121 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file main.cpp + * @brief Main file of demo. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + */ + +#include "mainwindow.h" +#include +#include + +#ifdef MAEMO +#include +#endif + +int main(int argc, char *argv[]) +{ + #ifdef MAEMO + + osso_context_t* ossoContext = 0; + ossoContext = osso_initialize("com.comarch.ffqwdemo", "1.0", FALSE, 0); + + if (ossoContext == 0) + { + qDebug() << "Failed to initialize LibOSSO\n"; + g_error("Failed to initialize LibOSSO\n"); + return EXIT_FAILURE; + } + #endif + + QApplication::setGraphicsSystem("raster"); + QApplication a(argc, argv); + Q_INIT_RESOURCE(img); + + MainWindow w; + + w.show(); + + int result = a.exec(); + + #ifdef MAEMO + osso_deinitialize(ossoContext); + #endif + + return result; +} diff --git a/libffqw-demo-1.0/sources/mainwindow.cpp b/libffqw-demo-1.0/sources/mainwindow.cpp new file mode 100644 index 0000000..7706c6b --- /dev/null +++ b/libffqw-demo-1.0/sources/mainwindow.cpp @@ -0,0 +1,418 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file mainwindow.cpp + * @brief Implementation of mainwindow class. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + */ + +#include "mainwindow.h" + + +/** + *Function to generate points used in the library demonstration graph. + */ +float fun01(float x) +{ + return (sin(x/5)*10 + qAbs(x)) - 50; +} + +/** + *Function to generate points used in the library demonstration graph. + */ +float fun02(float x) +{ + if(x==0) + x=0.000001; + return sin(x/4)/ (x/100); +} + +/** + *Function to generate points used in the library demonstration graph. + */ +float fun03(float x) +{ + return (x*x)/300; +} + +/** + *Function to generate points used in the library demonstration graph. + */ +float fun04(float x) +{ + return (x*x*x)/1000; +} + +/** + *Function to generate points used in the library demonstration graph. + */ +float fun05(float x) +{ + return x; +} + +/** + *Function to generate points used in the library demonstration graph. + */ +float fun06(float x) +{ + if(x<-50) + return -50; + else if(x>=-50 && x<=50) + return x - 20; + else if(x>50) + return 50; +} + +/** + *Main function to show FFQW library features. + */ +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent) +{ + QWidget* centralWidget = new QWidget; + setCentralWidget(centralWidget); + resize(800, 480); + + chartTab = new QWidget; + + + chart = new FFChart; + + functions = new FFStringComboBox; + combo = new FFColorComboBox; + line = new FFLineComboBox; + + QVBoxLayout* chartLayout = new QVBoxLayout; + chartLayout->addWidget(chart); + chartLayout->addWidget(functions); + + centralWidget->setLayout(chartLayout); + + fun.append("Set 01 - sinusoids"); + fun.append("Set 02 - parabolic"); + fun.append("Set 03 - linears"); + functions->addItems(fun); + functions->setTitle("Choose a functions set"); + + setFocusPolicy(Qt::ClickFocus); + chart->setFocusPolicy(Qt::ClickFocus); + init(); + + chart->installEventFilter(this); + + leftKeySw = false; + rightKeySw = false; + upKeySw = false; + downKeySw = false; + + connect(functions,SIGNAL(activated(int)),this,SLOT(changeFunctions(int))); + functions->setCurrentItem(0); +} + +MainWindow::~MainWindow() +{ + +} + +/** + * Initiate an object of demo application. Set all needed fields. + */ +void MainWindow::init() +{ + setStyleSheet( "background: black;" + "padding: 0px;" + "spacing: 0px;" + "border: 0px;"); + + chartTab->setStyleSheet( "background: black;" + "padding: 0px;" + "spacing: 0px;" + "border: 0px;"); + { + // Sinusoids + for(float i=-150;i<150;i+=1) + { + series01.append(QPointF(i,fun01(i))); + } + + for(float i=-150;i<150;i+=1) + { + series02.append(QPointF(i,fun02(i))); + } + + // Linears + for(float i = -250; i < 250; i += 1) + { + series03.append(QPointF(i, fun03(i))); + } + + for(float i = -150; i < 150; i += 1) + { + series04.append(QPointF(i, fun04(i))); + } + + // Linears + series05.append(QPointF(-150,-150)); + series05.append(QPointF(150,150)); + + series06.append(QPointF(-150,-150)); + series06.append(QPointF(-50,-150)); + series06.append(QPointF(50,150)); + series06.append(QPointF(150,150)); + + series07.append(QPointF(-200,20)); + series07.append(QPointF(-80,20)); + series07.append(QPointF(-70,-80)); + series07.append(QPointF(-60,120)); + series07.append(QPointF(-50,20)); + series07.append(QPointF( 70,20)); + series07.append(QPointF( 80,-60)); + series07.append(QPointF( 90,110)); + series07.append(QPointF(100,20)); + series07.append(QPointF(200,20)); + + series08.append(QPointF(-200,-200)); + series08.append(QPointF( 200,-200)); + + series09.append(QPointF(-200,-180)); + series09.append(QPointF(200,-180)); + + series10.append(QPointF(-200,-160)); + series10.append(QPointF(200,-160)); + + series11.append(QPointF(-200,-140)); + series11.append(QPointF(200,-140)); + } + changeFunctions(1); +} + +/** + * Change set of function to display in gprah to another. + */ + void MainWindow::changeFunctions(int funNum) +{ + if(funNum == 0) + { + chart->removeSeries(); + chart->addSeries(new FFChartSeries(series01,QPen(QBrush(QColor(255,255,0)),2),"SRP lev 2008")); + chart->addSeries(new FFChartSeries(series02,QPen(QBrush(QColor(255,0,255)),2),"SRP standardized lev 2008")); + } + else if(funNum == 1) + { + chart->removeSeries(); + chart->addSeries(new FFChartSeries(series03,QPen(QBrush(QColor(0,0,255)),2),"Swimming Performance")); + chart->addSeries(new FFChartSeries(series04,QPen(QBrush(QColor(0,255,0)),2),"Running Performance")); + } + else if(funNum == 2) + { + chart->removeSeries(); + chart->addSeries(new FFChartSeries(series05,QPen(QBrush(QColor( 0,255, 0)),2),"FFQW Progress")); + chart->addSeries(new FFChartSeries(series06,QPen(QBrush(QColor(255, 0, 0)),2),"Standardized Reverse Progress")); + chart->addSeries(new FFChartSeries(series07,QPen(QBrush(QColor(255,255, 0)),2),"Standardized Tech Progress")); + chart->addSeries(new FFChartSeries(series08,QPen(QBrush(QColor(255,255,255)),2),"EKG")); + chart->addSeries(new FFChartSeries(series09,QPen(QBrush(QColor( 0,255,255)),2),"PKB Lev")); + chart->addSeries(new FFChartSeries(series10,QPen(QBrush(QColor( 0, 0,255)),2),"YETI Lev")); + chart->addSeries(new FFChartSeries(series11,QPen(QBrush(QColor(150,150,150)),2),"Mot Ratio")); + } +} + +/** + * Support key press events in demo application. + */ + void MainWindow::keyPressEvent(QKeyEvent* event) + { + switch ( event->key () ) + { + case Qt::Key_F5: //HOME + break; + case Qt::Key_F6: //FULL_SCREEN + break; + case Qt::Key_F7: //+ + chart->zoomIn(0.2); + break; + case Qt::Key_F8: //- + chart->zoomOut(0.2); + break; + case Qt::Key_F4: //MENU + break; + case Qt::Key_Left: //LEFT + leftKeySw=true; + if(upKeySw) + { + chart->moveBy(QPoint(10,10)); + break; + } + if(downKeySw) + { + chart->moveBy(QPoint(10,-10)); + break; + } + chart->moveBy(QPoint(10,0)); + break; + case Qt::Key_Right: //RIGHT + rightKeySw=true; + if(upKeySw) + { + chart->moveBy(QPoint(-10, 10)); + break; + } + if(downKeySw) + { + chart->moveBy(QPoint(-10, -10)); + break; + } + chart->moveBy(QPoint(- 10,0)); + break; + case Qt::Key_Up: //UP + upKeySw=true; + if(leftKeySw) + { + chart->moveBy(QPoint(10, 10)); + break; + } + if(rightKeySw) + { + chart->moveBy(QPoint(-10, 10)); + break; + } + chart->moveBy(QPoint(0,10)); + break; + case Qt::Key_Down: //DOWN + downKeySw=true; + if(leftKeySw) + { + chart->moveBy(QPoint(10, -10)); + break; + } + if(rightKeySw) + { + chart->moveBy(QPoint(-10, -10)); + break; + } + chart->moveBy(QPoint(0,-10)); + break; + case Qt::Key_Return: //ENTER + break; + case Qt::Key_Escape: //BACK + break; + default: + event->ignore (); + } + } + +/** + * Support key release events in demo application. + */ + void MainWindow::keyReleaseEvent(QKeyEvent* event) + { + switch(event->key()) + { + case Qt::Key_Left: //LEFT + leftKeySw = false; + break; + case Qt::Key_Right: //RIGHT + rightKeySw = false; + break; + case Qt::Key_Up: //UP + upKeySw = false; + break; + case Qt::Key_Down: //DOWN + downKeySw = false; + break; + default: + event->ignore(); + } + } + +/** + * Reimplement standard eventFilter. + */ +bool MainWindow::eventFilter(QObject *object, QEvent *event) +{ + Q_UNUSED(object); + if(event->type() == QEvent::KeyPress) + { + QKeyEvent *keyEvent = static_cast (event); + keyPressEvent(keyEvent); + return true; + } + else + { + return false; + } +} diff --git a/libffqw-demo-1.0/sources/mainwindow.h b/libffqw-demo-1.0/sources/mainwindow.h new file mode 100644 index 0000000..f8906de --- /dev/null +++ b/libffqw-demo-1.0/sources/mainwindow.h @@ -0,0 +1,157 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file mainwindow.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + */ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include +#include +#include +#include + +#ifdef MAEMO +#include +#endif + +#include "FFGui" + +/** + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + * + * @brief A class responsible for demo application that show FFQW library features. + */ + +class MainWindow : public QMainWindow +{ +Q_OBJECT + +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + + QWidget* chartTab; +private: + FFChart* chart; + FFStringComboBox* functions; + FFColorComboBox* combo; + FFLineComboBox* line; + + bool leftKeySw; + bool rightKeySw; + bool upKeySw; + bool downKeySw; + QList fun; + + void init(); + + QVector functionsList; + + QVector series01; + QVector series02; + + QVector series03; + QVector series04; + + QVector series05; + QVector series06; + QVector series07; + QVector series08; + QVector series09; + QVector series10; + QVector series11; + +private slots: + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + bool eventFilter(QObject *object, QEvent *event); + void changeFunctions(int funNum); + +protected: + +}; + +#endif // MAINWINDOW_H diff --git a/libffqw-n810-1.0/Doxyfile b/libffqw-n810-1.0/Doxyfile new file mode 100644 index 0000000..8c7ad09 --- /dev/null +++ b/libffqw-n810-1.0/Doxyfile @@ -0,0 +1,1510 @@ +# Doxyfile 1.5.8 + +# 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 +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = FFWidgets Library + +# 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 = 0.1 + +# 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 = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# 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: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_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 regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_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 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 the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = 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 OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = 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 + +# 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 + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# 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 = YES + +# 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 + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = YES + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# 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 +# and Mac 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 + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# 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 + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# 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 = NO + +# 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 = YES + +# 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 + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# 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. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +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 = sources + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# 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 *.m *.mm *.py *.f90 + +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 = YES + +# 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. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# 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 , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# 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 = YES + +# 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 +# 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 +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# 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 = YES + +# 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 HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# 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 compiled 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 CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# 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 + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# 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 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, 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. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. + +GENERATE_TREEVIEW = NONE + +# 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 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +#--------------------------------------------------------------------------- +# 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 = NO + +# 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 = a4wide + +# 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 = YES + +# 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_DEFINED 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. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +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::additions 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 + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# 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 = NO + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# 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 GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = 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 = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# 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 options 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 CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller 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 caller +# graphs for selected functions only using the \callergraph command. + +CALLER_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 + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = 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 in 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 DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# 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 the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# 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 + +#--------------------------------------------------------------------------- +# Options 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/libffqw-n810-1.0/bin/libffqw-n810-dev_1.0_armel.deb b/libffqw-n810-1.0/bin/libffqw-n810-dev_1.0_armel.deb new file mode 100644 index 0000000..f3e11d6 Binary files /dev/null and b/libffqw-n810-1.0/bin/libffqw-n810-dev_1.0_armel.deb differ diff --git a/libffqw-n810-1.0/bin/libffqw-n810_1.0_armel.deb b/libffqw-n810-1.0/bin/libffqw-n810_1.0_armel.deb new file mode 100644 index 0000000..5c3f0b8 Binary files /dev/null and b/libffqw-n810-1.0/bin/libffqw-n810_1.0_armel.deb differ diff --git a/libffqw-n810-1.0/data/img/img.qrc b/libffqw-n810-1.0/data/img/img.qrc new file mode 100644 index 0000000..872404f --- /dev/null +++ b/libffqw-n810-1.0/data/img/img.qrc @@ -0,0 +1,68 @@ + + + standard/button_bottomcenter_clicked.svg + standard/button_bottomcenter_normal.svg + standard/button_bottomleft_clicked.svg + standard/button_bottomleft_normal.svg + standard/button_bottomright_clicked.svg + standard/button_bottomright_normal.svg + standard/button_center_clicked.svg + standard/button_centerleft_clicked.svg + standard/button_centerleft_normal.svg + standard/button_center_normal.svg + standard/button_centerright_clicked.svg + standard/button_centerright_normal.svg + standard/button_false.svg + standard/button_topcenter_clicked.svg + standard/button_topcenter_normal.svg + standard/button_topleft_clicked.svg + standard/button_topleft_normal.svg + standard/button_topright_clicked.svg + standard/button_topright_normal.svg + standard/button_true.svg + standard/chart_default.svg + standard/chart_legendOFF.svg + standard/chart_legendON.svg + standard/chart_zoomin.svg + standard/chart_zoomout.svg + standard/combo_button_bottomcenter_clicked.svg + standard/combo_button_bottomcenter_normal.svg + standard/combo_button_bottomleft_clicked.svg + standard/combo_button_bottomleft_normal.svg + standard/combo_button_bottomright_clicked.svg + standard/combo_button_bottomright_normal.svg + standard/combo_button_center_clicked.svg + standard/combo_button_centerleft_clicked.svg + standard/combo_button_centerleft_normal.svg + standard/combo_button_center_normal.svg + standard/combo_button_centerright_clicked.svg + standard/combo_button_centerright_normal.svg + standard/combo_button_topcenter_clicked.svg + standard/combo_button_topcenter_normal.svg + standard/combo_button_topleft_clicked.svg + standard/combo_button_topleft_normal.svg + standard/combo_button_topright_clicked.svg + standard/combo_button_topright_normal.svg + standard/combo_colorarrow.svg + standard/combo_colorarrow_pressed.svg + standard/combo_colorbackground.svg + standard/combo_colorbackground_pressed.svg + standard/combo_string_arrow.svg + standard/combo_string_arrow_pressed.svg + standard/combo_string_background.svg + standard/combo_string_background_pressed.svg + standard/combo_triangle.svg + standard/combo_triangle_pressed.svg + standard/dpad_background.svg + standard/dpad_button_down.svg + standard/dpad_button_down_pressed.svg + standard/dpad_button_left.svg + standard/dpad_button_left_pressed.svg + standard/dpad_button_right.svg + standard/dpad_button_right_pressed.svg + standard/dpad_button_up.svg + standard/dpad_button_up_pressed.svg + standard/radiobutton_false.svg + standard/radiobutton_true.svg + + diff --git a/libffqw-n810-1.0/data/img/standard/button_bottomcenter_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_bottomcenter_clicked.svg new file mode 100644 index 0000000..4f7c236 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_bottomcenter_clicked.svg @@ -0,0 +1,1122 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_bottomcenter_normal.svg b/libffqw-n810-1.0/data/img/standard/button_bottomcenter_normal.svg new file mode 100644 index 0000000..bff7151 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_bottomcenter_normal.svg @@ -0,0 +1,575 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_bottomleft_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_bottomleft_clicked.svg new file mode 100644 index 0000000..cec989c --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_bottomleft_clicked.svg @@ -0,0 +1,1122 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_bottomleft_normal.svg b/libffqw-n810-1.0/data/img/standard/button_bottomleft_normal.svg new file mode 100644 index 0000000..422f443 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_bottomleft_normal.svg @@ -0,0 +1,565 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_bottomright_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_bottomright_clicked.svg new file mode 100644 index 0000000..8902372 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_bottomright_clicked.svg @@ -0,0 +1,1121 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_bottomright_normal.svg b/libffqw-n810-1.0/data/img/standard/button_bottomright_normal.svg new file mode 100644 index 0000000..96da0b4 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_bottomright_normal.svg @@ -0,0 +1,609 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_center_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_center_clicked.svg new file mode 100644 index 0000000..edd9f85 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_center_clicked.svg @@ -0,0 +1,1155 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_center_normal.svg b/libffqw-n810-1.0/data/img/standard/button_center_normal.svg new file mode 100644 index 0000000..f34dbd6 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_center_normal.svg @@ -0,0 +1,579 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_centerleft_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_centerleft_clicked.svg new file mode 100644 index 0000000..2c4a76c --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_centerleft_clicked.svg @@ -0,0 +1,1136 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_centerleft_normal.svg b/libffqw-n810-1.0/data/img/standard/button_centerleft_normal.svg new file mode 100644 index 0000000..6184bf5 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_centerleft_normal.svg @@ -0,0 +1,609 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_centerright_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_centerright_clicked.svg new file mode 100644 index 0000000..9a1793b --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_centerright_clicked.svg @@ -0,0 +1,1137 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_centerright_normal.svg b/libffqw-n810-1.0/data/img/standard/button_centerright_normal.svg new file mode 100644 index 0000000..aaa95a1 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_centerright_normal.svg @@ -0,0 +1,587 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_false.svg b/libffqw-n810-1.0/data/img/standard/button_false.svg new file mode 100644 index 0000000..3317bb1 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_false.svg @@ -0,0 +1,514 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_topcenter_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_topcenter_clicked.svg new file mode 100644 index 0000000..523daa8 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_topcenter_clicked.svg @@ -0,0 +1,1131 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_topcenter_normal.svg b/libffqw-n810-1.0/data/img/standard/button_topcenter_normal.svg new file mode 100644 index 0000000..b69662d --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_topcenter_normal.svg @@ -0,0 +1,565 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_topleft_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_topleft_clicked.svg new file mode 100644 index 0000000..976ac1d --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_topleft_clicked.svg @@ -0,0 +1,1111 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_topleft_normal.svg b/libffqw-n810-1.0/data/img/standard/button_topleft_normal.svg new file mode 100644 index 0000000..187a2ee --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_topleft_normal.svg @@ -0,0 +1,566 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_topright_clicked.svg b/libffqw-n810-1.0/data/img/standard/button_topright_clicked.svg new file mode 100644 index 0000000..51dcbdb --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_topright_clicked.svg @@ -0,0 +1,1121 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_topright_normal.svg b/libffqw-n810-1.0/data/img/standard/button_topright_normal.svg new file mode 100644 index 0000000..943c800 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_topright_normal.svg @@ -0,0 +1,575 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/button_true.svg b/libffqw-n810-1.0/data/img/standard/button_true.svg new file mode 100644 index 0000000..eae911d --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/button_true.svg @@ -0,0 +1,497 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/chart_default.svg b/libffqw-n810-1.0/data/img/standard/chart_default.svg new file mode 100644 index 0000000..85b38f0 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/chart_default.svg @@ -0,0 +1,175 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/chart_legendOFF.svg b/libffqw-n810-1.0/data/img/standard/chart_legendOFF.svg new file mode 100644 index 0000000..d0e3e81 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/chart_legendOFF.svg @@ -0,0 +1,574 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/chart_legendON.svg b/libffqw-n810-1.0/data/img/standard/chart_legendON.svg new file mode 100644 index 0000000..35a321a --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/chart_legendON.svg @@ -0,0 +1,574 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/chart_zoomin.svg b/libffqw-n810-1.0/data/img/standard/chart_zoomin.svg new file mode 100644 index 0000000..e676bdc --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/chart_zoomin.svg @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/chart_zoomout.svg b/libffqw-n810-1.0/data/img/standard/chart_zoomout.svg new file mode 100644 index 0000000..522d081 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/chart_zoomout.svg @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_bottomcenter_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_bottomcenter_clicked.svg new file mode 100644 index 0000000..1ea9b25 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_bottomcenter_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_bottomcenter_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_bottomcenter_normal.svg new file mode 100644 index 0000000..6cedc9c --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_bottomcenter_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_bottomleft_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_bottomleft_clicked.svg new file mode 100644 index 0000000..d234a2e --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_bottomleft_clicked.svg @@ -0,0 +1,621 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_bottomleft_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_bottomleft_normal.svg new file mode 100644 index 0000000..25c95e1 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_bottomleft_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_bottomright_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_bottomright_clicked.svg new file mode 100644 index 0000000..590216d --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_bottomright_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_bottomright_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_bottomright_normal.svg new file mode 100644 index 0000000..5fd4c72 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_bottomright_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_center_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_center_clicked.svg new file mode 100644 index 0000000..2c43ff9 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_center_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_center_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_center_normal.svg new file mode 100644 index 0000000..35c2b83 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_center_normal.svg @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_centerleft_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_centerleft_clicked.svg new file mode 100644 index 0000000..6b3b52d --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_centerleft_clicked.svg @@ -0,0 +1,624 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_centerleft_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_centerleft_normal.svg new file mode 100644 index 0000000..82af72c --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_centerleft_normal.svg @@ -0,0 +1,527 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_centerright_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_centerright_clicked.svg new file mode 100644 index 0000000..a41afc7 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_centerright_clicked.svg @@ -0,0 +1,606 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_centerright_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_centerright_normal.svg new file mode 100644 index 0000000..b225906 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_centerright_normal.svg @@ -0,0 +1,527 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_topcenter_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_topcenter_clicked.svg new file mode 100644 index 0000000..ae218d9 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_topcenter_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_topcenter_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_topcenter_normal.svg new file mode 100644 index 0000000..011a412 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_topcenter_normal.svg @@ -0,0 +1,524 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_topleft_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_topleft_clicked.svg new file mode 100644 index 0000000..823d289 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_topleft_clicked.svg @@ -0,0 +1,648 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_topleft_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_topleft_normal.svg new file mode 100644 index 0000000..a30f950 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_topleft_normal.svg @@ -0,0 +1,523 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_topright_clicked.svg b/libffqw-n810-1.0/data/img/standard/combo_button_topright_clicked.svg new file mode 100644 index 0000000..8e35adf --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_topright_clicked.svg @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_button_topright_normal.svg b/libffqw-n810-1.0/data/img/standard/combo_button_topright_normal.svg new file mode 100644 index 0000000..5e22a10 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_button_topright_normal.svg @@ -0,0 +1,561 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_colorarrow.svg b/libffqw-n810-1.0/data/img/standard/combo_colorarrow.svg new file mode 100644 index 0000000..b55ec36 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_colorarrow.svg @@ -0,0 +1,975 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Text Text + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_colorarrow_pressed.svg b/libffqw-n810-1.0/data/img/standard/combo_colorarrow_pressed.svg new file mode 100644 index 0000000..7d40d50 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_colorarrow_pressed.svg @@ -0,0 +1,1528 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_colorbackground.svg b/libffqw-n810-1.0/data/img/standard/combo_colorbackground.svg new file mode 100644 index 0000000..e809fee --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_colorbackground.svg @@ -0,0 +1,720 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_colorbackground_pressed.svg b/libffqw-n810-1.0/data/img/standard/combo_colorbackground_pressed.svg new file mode 100644 index 0000000..deb83f9 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_colorbackground_pressed.svg @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_string_arrow.svg b/libffqw-n810-1.0/data/img/standard/combo_string_arrow.svg new file mode 100644 index 0000000..cd35dcf --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_string_arrow.svg @@ -0,0 +1,998 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Text Text + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_string_arrow_pressed.svg b/libffqw-n810-1.0/data/img/standard/combo_string_arrow_pressed.svg new file mode 100644 index 0000000..4c52924 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_string_arrow_pressed.svg @@ -0,0 +1,1554 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_string_background.svg b/libffqw-n810-1.0/data/img/standard/combo_string_background.svg new file mode 100644 index 0000000..e809fee --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_string_background.svg @@ -0,0 +1,720 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_string_background_pressed.svg b/libffqw-n810-1.0/data/img/standard/combo_string_background_pressed.svg new file mode 100644 index 0000000..deb83f9 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_string_background_pressed.svg @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_triangle.svg b/libffqw-n810-1.0/data/img/standard/combo_triangle.svg new file mode 100644 index 0000000..095c33c --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_triangle.svg @@ -0,0 +1,978 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text Text + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/combo_triangle_pressed.svg b/libffqw-n810-1.0/data/img/standard/combo_triangle_pressed.svg new file mode 100644 index 0000000..cdd0ef4 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/combo_triangle_pressed.svg @@ -0,0 +1,931 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text Text + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_background.svg b/libffqw-n810-1.0/data/img/standard/dpad_background.svg new file mode 100644 index 0000000..129b1b0 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_background.svg @@ -0,0 +1,1885 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_down.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_down.svg new file mode 100644 index 0000000..22af200 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_down.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_down_pressed.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_down_pressed.svg new file mode 100644 index 0000000..a335441 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_down_pressed.svg @@ -0,0 +1,3909 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_left.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_left.svg new file mode 100644 index 0000000..d436e8a --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_left.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_left_pressed.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_left_pressed.svg new file mode 100644 index 0000000..996214e --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_left_pressed.svg @@ -0,0 +1,3913 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_right.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_right.svg new file mode 100644 index 0000000..361a5e4 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_right.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_right_pressed.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_right_pressed.svg new file mode 100644 index 0000000..6d7714b --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_right_pressed.svg @@ -0,0 +1,3917 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_up.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_up.svg new file mode 100644 index 0000000..16eaa01 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_up.svg @@ -0,0 +1,1941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/dpad_button_up_pressed.svg b/libffqw-n810-1.0/data/img/standard/dpad_button_up_pressed.svg new file mode 100644 index 0000000..6f6233a --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/dpad_button_up_pressed.svg @@ -0,0 +1,3910 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/radiobutton_false.svg b/libffqw-n810-1.0/data/img/standard/radiobutton_false.svg new file mode 100644 index 0000000..3a313b1 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/radiobutton_false.svg @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/data/img/standard/radiobutton_true.svg b/libffqw-n810-1.0/data/img/standard/radiobutton_true.svg new file mode 100644 index 0000000..a7fbc46 --- /dev/null +++ b/libffqw-n810-1.0/data/img/standard/radiobutton_true.svg @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libffqw-n810-1.0/debian/README b/libffqw-n810-1.0/debian/README new file mode 100644 index 0000000..242606a --- /dev/null +++ b/libffqw-n810-1.0/debian/README @@ -0,0 +1,6 @@ +The Debian Package libffqw +---------------------------- + +Comments regarding the Package + + -- unknown Fri, 8 Jan 2010 14:15:07 +0100 diff --git a/libffqw-n810-1.0/debian/README.Debian b/libffqw-n810-1.0/debian/README.Debian new file mode 100644 index 0000000..8ab4a3d --- /dev/null +++ b/libffqw-n810-1.0/debian/README.Debian @@ -0,0 +1,6 @@ +libffqw for Debian +------------------ + + + + -- unknown Fri, 8 Jan 2010 14:15:07 +0100 diff --git a/libffqw-n810-1.0/debian/changelog b/libffqw-n810-1.0/debian/changelog new file mode 100644 index 0000000..425e0f8 --- /dev/null +++ b/libffqw-n810-1.0/debian/changelog @@ -0,0 +1,5 @@ +libffqw-n810 (1.0) unstable; urgency=low + + * Initial Release. + + -- Michal Palczewski Fri, 8 Jan 2010 14:15:07 +0100 diff --git a/libffqw-n810-1.0/debian/compat b/libffqw-n810-1.0/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/libffqw-n810-1.0/debian/compat @@ -0,0 +1 @@ +5 diff --git a/libffqw-n810-1.0/debian/control b/libffqw-n810-1.0/debian/control new file mode 100644 index 0000000..0cbdb9b --- /dev/null +++ b/libffqw-n810-1.0/debian/control @@ -0,0 +1,40 @@ +Source: libffqw-n810 +Priority: extra +Maintainer: Michal A. Palczewski +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 +Section: libs + +Package: libffqw-n810-dev +Section: user/other +Architecture: any +Depends: libffqw-n810 (= ${Source-Version}) +Description: Finger Friendly Qt Widgets for Maemo + Library provides finger friendly widgets for Maemo platform. + Works On Fremantle and Diablo. Development packages. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC + +Package: libffqw-n810 +Section: user/other +Architecture: any +Depends: libqt4-gui (>=4.5), libqt4-gui (<<4.6), libqt4-svg (>=4.5), libqt4-svg (<<4.6), +Description: Finger Friendly Qt Widgets for Maemo + Library provides finger friendly widgets for Maemo platform. + Works On Fremantle and Diablo. +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A + /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBCAwFL1gZpM4AAAAZdEVYdENv + bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABF0lEQVRIx9VWMRLCIBBcGAtMOhkrC1+AKUxp + 5R98h3/wB34hrX/wBTbKGyxTqqmMjUTIkIBK4rgzTJjLHcvtHQxEZFGJJ87bO0JisqbVnCii0+La + GMBXDACQ74rWhZWfjYy6SL6FUomM5qxUO7XtSIevnw2DLrLIDzdT0nTYDZEcj03DtCadq8C+fr1K + F8sjLiKxS+dbZJdfLI/Gl6n2Dg2VyUUk1bwT6Xg6BAPANRtFTzCIclEYo7HYov0qsv1/EW08F9x4 + dl4tlurBXDJj1AM+uXp+W6OPD6ijpkGIXAT/KZ1qnLeIfPQOmlFoMuqSwUcWHxCRReVpf32rBvVs + uWRWm/4SogAwW0atBG2LuDamnlukrwfkA722cNGhoLXOAAAAAElFTkSuQmCC diff --git a/libffqw-n810-1.0/debian/copyright b/libffqw-n810-1.0/debian/copyright new file mode 100644 index 0000000..380a638 --- /dev/null +++ b/libffqw-n810-1.0/debian/copyright @@ -0,0 +1,23 @@ +This is libffqw, written and maintained by unknown +on Fri, 8 Jan 2010 14:15:07 +0100. + +Copyright Holder: Comarch S.A. + +License: + + 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/libffqw-n810-1.0/debian/cron.d.ex b/libffqw-n810-1.0/debian/cron.d.ex new file mode 100644 index 0000000..75576e4 --- /dev/null +++ b/libffqw-n810-1.0/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the libffqw package +# +0 4 * * * root libffqw_maintenance diff --git a/libffqw-n810-1.0/debian/dirs b/libffqw-n810-1.0/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/libffqw-n810-1.0/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/libffqw-n810-1.0/debian/docs b/libffqw-n810-1.0/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/libffqw-n810-1.0/debian/emacsen-install.ex b/libffqw-n810-1.0/debian/emacsen-install.ex new file mode 100644 index 0000000..64f4d86 --- /dev/null +++ b/libffqw-n810-1.0/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/libffqw + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=libffqw + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/libffqw-n810-1.0/debian/emacsen-remove.ex b/libffqw-n810-1.0/debian/emacsen-remove.ex new file mode 100644 index 0000000..a99dfcc --- /dev/null +++ b/libffqw-n810-1.0/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/libffqw + +FLAVOR=$1 +PACKAGE=libffqw + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/libffqw.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/libffqw-n810-1.0/debian/emacsen-startup.ex b/libffqw-n810-1.0/debian/emacsen-startup.ex new file mode 100644 index 0000000..bc8681b --- /dev/null +++ b/libffqw-n810-1.0/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50libffqw.el +;; for the Debian libffqw package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The libffqw package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/libffqw"))) +;; If package-dir does not exist, the libffqw package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'libffqw-mode "libffqw-mode" + "Major mode for editing libffqw files." t) + (add-to-list 'auto-mode-alist '("\\.libffqw$" . libffqw-mode)))) + diff --git a/libffqw-n810-1.0/debian/files b/libffqw-n810-1.0/debian/files new file mode 100644 index 0000000..00ab8f9 --- /dev/null +++ b/libffqw-n810-1.0/debian/files @@ -0,0 +1,2 @@ +libffqw-n810-dev_1.0_armel.deb user/other extra +libffqw-n810_1.0_armel.deb user/other extra diff --git a/libffqw-n810-1.0/debian/init.d.ex b/libffqw-n810-1.0/debian/init.d.ex new file mode 100644 index 0000000..ee9d1e9 --- /dev/null +++ b/libffqw-n810-1.0/debian/init.d.ex @@ -0,0 +1,81 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/libffqw +NAME=libffqw +DESC=libffqw + +test -x $DAEMON || exit 0 + +# Include libffqw defaults if available +if [ -f /etc/default/libffqw ] ; then + . /etc/default/libffqw +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/libffqw-n810-1.0/debian/libffqw-default.ex b/libffqw-n810-1.0/debian/libffqw-default.ex new file mode 100644 index 0000000..376c2f5 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw-default.ex @@ -0,0 +1,10 @@ +# Defaults for libffqw initscript +# sourced by /etc/init.d/libffqw +# installed at /etc/default/libffqw by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/libffqw-n810-1.0/debian/libffqw-dev.dirs b/libffqw-n810-1.0/debian/libffqw-dev.dirs new file mode 100644 index 0000000..4418816 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/libffqw-n810-1.0/debian/libffqw-dev.install b/libffqw-n810-1.0/debian/libffqw-dev.install new file mode 100644 index 0000000..3c996c8 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw-dev.install @@ -0,0 +1,6 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/pkgconfig/* +usr/lib/*.la +usr/share/pkgconfig/* diff --git a/libffqw-n810-1.0/debian/libffqw-n810.substvars b/libffqw-n810-1.0/debian/libffqw-n810.substvars new file mode 100644 index 0000000..768df32 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw-n810.substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-maemo5-core (>= 4.6.0~git20091215), libqt4-maemo5-gui (>= 4.6.0~git20091215), libqt4-maemo5-svg (>= 4.6.0~git20091215), libstdc++6 (>= 4.2.1) diff --git a/libffqw-n810-1.0/debian/libffqw.doc-base.EX b/libffqw-n810-1.0/debian/libffqw.doc-base.EX new file mode 100644 index 0000000..ad8ded1 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw.doc-base.EX @@ -0,0 +1,22 @@ +Document: libffqw +Title: Debian libffqw Manual +Author: +Abstract: This manual describes what libffqw is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/libffqw/libffqw.sgml.gz + +Format: postscript +Files: /usr/share/doc/libffqw/libffqw.ps.gz + +Format: text +Files: /usr/share/doc/libffqw/libffqw.text.gz + +Format: HTML +Index: /usr/share/doc/libffqw/html/index.html +Files: /usr/share/doc/libffqw/html/*.html + + diff --git a/libffqw-n810-1.0/debian/libffqw.substvars b/libffqw-n810-1.0/debian/libffqw.substvars new file mode 100644 index 0000000..768df32 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw.substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-maemo5-core (>= 4.6.0~git20091215), libqt4-maemo5-gui (>= 4.6.0~git20091215), libqt4-maemo5-svg (>= 4.6.0~git20091215), libstdc++6 (>= 4.2.1) diff --git a/libffqw-n810-1.0/debian/libffqw1.dirs b/libffqw-n810-1.0/debian/libffqw1.dirs new file mode 100644 index 0000000..6845771 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw1.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/libffqw-n810-1.0/debian/libffqw1.install b/libffqw-n810-1.0/debian/libffqw1.install new file mode 100644 index 0000000..d0dbfd1 --- /dev/null +++ b/libffqw-n810-1.0/debian/libffqw1.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/libffqw-n810-1.0/debian/manpage.1.ex b/libffqw-n810-1.0/debian/manpage.1.ex new file mode 100644 index 0000000..bbd81d8 --- /dev/null +++ b/libffqw-n810-1.0/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH LIBFFQW SECTION "January 8, 2010" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +libffqw \- program to do something +.SH SYNOPSIS +.B libffqw +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B libffqw +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBlibffqw\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +libffqw was written by . +.PP +This manual page was written by unknown , +for the Debian project (but may be used by others). diff --git a/libffqw-n810-1.0/debian/manpage.sgml.ex b/libffqw-n810-1.0/debian/manpage.sgml.ex new file mode 100644 index 0000000..573e274 --- /dev/null +++ b/libffqw-n810-1.0/debian/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + January 8, 2010"> + + SECTION"> + michal.palczewski@comarch.com"> + + LIBFFQW"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + diff --git a/libffqw-n810-1.0/debian/manpage.xml.ex b/libffqw-n810-1.0/debian/manpage.xml.ex new file mode 100644 index 0000000..8e4ea44 --- /dev/null +++ b/libffqw-n810-1.0/debian/manpage.xml.ex @@ -0,0 +1,148 @@ + +.
will be generated. You may view the +manual page with: nroff -man .
| less'. A +typical entry in a Makefile or Makefile.am is: + +DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ +manpages/docbook.xsl +XP=xsltproc -''-nonet + +manpage.1: manpage.dbk + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The +XSL files are in docbook-xsl. Please remember that if you +create the nroff version in one of the debian/rules file +targets (such as build), you will need to include xsltproc +and docbook-xsl in your Build-Depends control field. + +--> + + + FIRSTNAME"> + SURNAME"> + + January 8, 2010"> + + SECTION"> + michal.palczewski@comarch.com"> + + LIBFFQW"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ diff --git a/libffqw-n810-1.0/debian/menu.ex b/libffqw-n810-1.0/debian/menu.ex new file mode 100644 index 0000000..e460fb0 --- /dev/null +++ b/libffqw-n810-1.0/debian/menu.ex @@ -0,0 +1,2 @@ +?package(libffqw):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\ + title="libffqw" command="/usr/bin/libffqw" diff --git a/libffqw-n810-1.0/debian/postinst.ex b/libffqw-n810-1.0/debian/postinst.ex new file mode 100644 index 0000000..82b2ebc --- /dev/null +++ b/libffqw-n810-1.0/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-n810-1.0/debian/postrm.ex b/libffqw-n810-1.0/debian/postrm.ex new file mode 100644 index 0000000..91fc203 --- /dev/null +++ b/libffqw-n810-1.0/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-n810-1.0/debian/preinst.ex b/libffqw-n810-1.0/debian/preinst.ex new file mode 100644 index 0000000..522d75c --- /dev/null +++ b/libffqw-n810-1.0/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-n810-1.0/debian/prerm.ex b/libffqw-n810-1.0/debian/prerm.ex new file mode 100644 index 0000000..59e41eb --- /dev/null +++ b/libffqw-n810-1.0/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for libffqw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/libffqw-n810-1.0/debian/rules b/libffqw-n810-1.0/debian/rules new file mode 100755 index 0000000..6f73bd2 --- /dev/null +++ b/libffqw-n810-1.0/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +# shared library versions, option 1 +version=2.0.5 +major=2 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/libffqw-n810-1.0/debian/shlibs.local.ex b/libffqw-n810-1.0/debian/shlibs.local.ex new file mode 100644 index 0000000..1aa6a65 --- /dev/null +++ b/libffqw-n810-1.0/debian/shlibs.local.ex @@ -0,0 +1 @@ +liblibffqw 1.0 libffqw (>> 1.0-0), libffqw (<< 1.0-99) diff --git a/libffqw-n810-1.0/debian/watch.ex b/libffqw-n810-1.0/debian/watch.ex new file mode 100644 index 0000000..a625cc8 --- /dev/null +++ b/libffqw-n810-1.0/debian/watch.ex @@ -0,0 +1,22 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php libffqw-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/libffqw-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/libffqw-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for debscripts >= 2.9 +# http://sf.net/libffqw/libffqw-(.*)\.tar\.gz + + diff --git a/libffqw-n810-1.0/libffqw-n810.pro b/libffqw-n810-1.0/libffqw-n810.pro new file mode 100644 index 0000000..e194b4d --- /dev/null +++ b/libffqw-n810-1.0/libffqw-n810.pro @@ -0,0 +1,101 @@ +TEMPLATE = lib +TARGET = ffqw +QT += core \ + gui \ + svg +CONFIG += diablo_comp +HEADERS += sources/ffabstractcombobox.h \ + sources/ffscrollingcheckbox.h \ + sources/ffscrollingbutton.h \ + sources/ffabstractbutton.h \ + sources/ffabstractwidget.h \ + sources/ffscrollinglabel.h \ + sources/ffviewcache.h \ + sources/ffstringcombobox.h \ + sources/ffdpad.h \ + sources/ffcolorcombobox.h \ + sources/ffdpadbutton.h \ + sources/ffscrollarea.h \ + sources/ffchart.h \ + sources/ffchartlegend.h \ + sources/ffchartscene.h \ + sources/ffchartbutton.h \ + sources/ffchartlegendcontrolpanel.h \ + sources/ffchartseries.h \ + sources/fflinecombobox.h \ + sources/ffscrollingradiobutton.h +SOURCES += sources/ffscrollingcheckbox.cpp \ + sources/ffabstractcombobox.cpp \ + sources/ffscrollingbutton.cpp \ + sources/ffabstractbutton.cpp \ + sources/ffdpad.cpp \ + sources/ffabstractwidget.cpp \ + sources/ffscrollinglabel.cpp \ + sources/ffviewcache.cpp \ + sources/ffstringcombobox.cpp \ + sources/ffcolorcombobox.cpp \ + sources/ffdpadbutton.cpp \ + sources/ffscrollarea.cpp \ + sources/ffchart.cpp \ + sources/ffchartlegend.cpp \ + sources/ffchartscene.cpp \ + sources/ffchartbutton.cpp \ + sources/ffchartlegendcontrolpanel.cpp \ + sources/ffchartseries.cpp \ + sources/fflinecombobox.cpp \ + sources/ffscrollingradiobutton.cpp + +RESOURCES += data/img/img.qrc + +VERSION = 1.0 + +headers.files += sources/ffcolorcombobutton.h \ + sources/ffchartscene.h \ + sources/ffchartlegend.h \ + sources/ffchartlegendcontrolbutton.h \ + sources/ffchartlegendcontrolpanel.h \ + sources/ffchart.h \ + sources/ffchartbutton.h \ + sources/ffcombobutton.h \ + sources/ffscrollingcheckbox.h \ + sources/ffscrollingbutton.h \ + sources/ffabstractbutton.h \ + sources/ffskin.h \ + sources/ffchartseries.h \ + sources/ffabstractwidget.h \ + sources/ffscrollinglabel.h \ + sources/ffviewcache.h \ + sources/ffstringcombobox.h \ + sources/ffdpad.h \ + sources/ffcolorcombobox.h \ + sources/ffcolorbutton.h \ + sources/ffstringbutton.h \ + sources/ffdpadbutton.h \ + sources/ffcolorchooser.h \ + sources/ffscrollarea.h \ + sources/ffscrollingradiobutton.h \ + sources/FFGui \ + sources/fflinecombobox.h \ + sources/ffabstractcombobox.h + +maemo { +DEFINES += MAEMO +} + +diablo_comp { +DEFINES += DIABLO_COMP +} + +deb { + message(Creating Makefile for DEB binary package) + target.path = debian/libffqw-n810/usr/lib + headers.path = debian/libffqw-n810-dev/usr/include + #INSTALLS = target +} +ELSE { + message(Creating Makefile for Linux) + headers.path = /usr/include + target.path = /usr/lib +} + +INSTALLS += headers target diff --git a/libffqw-n810-1.0/sources/FFGui b/libffqw-n810-1.0/sources/FFGui new file mode 100644 index 0000000..7178526 --- /dev/null +++ b/libffqw-n810-1.0/sources/FFGui @@ -0,0 +1,10 @@ +#include "ffscrollingcheckbox.h" +#include "ffscrollingbutton.h" +#include "ffabstractbutton.h" +#include "ffscrollinglabel.h" +#include "ffcolorcombobox.h" +#include "fflinecombobox.h" +#include "ffstringcombobox.h" +#include "ffdpad.h" +#include "ffchart.h" +#include "ffscrollarea.h" diff --git a/libffqw-n810-1.0/sources/ffabstractbutton.cpp b/libffqw-n810-1.0/sources/ffabstractbutton.cpp new file mode 100644 index 0000000..f6a4e90 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffabstractbutton.cpp @@ -0,0 +1,762 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ + +/** + * @file ffabstractbutton.cpp + * @brief Implementation of the FFAbstractButton class. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * This widget have an inside rectangle (draw area). This rectangle is bounded by four margins (top, bottom, left, right). + * Function setMargins(int,int,int,int) provides interface to change this parameters. + */ + +#include "ffabstractbutton.h" + +/*Static FFViewCaches -improve performance*/ +FFViewCache* FFAbstractButton::topLeftNormal = NULL; +FFViewCache* FFAbstractButton::topRightNormal = NULL; +FFViewCache* FFAbstractButton::bottomLeftNormal = NULL; +FFViewCache* FFAbstractButton::bottomRightNormal = NULL; +FFViewCache* FFAbstractButton::topLeftClicked = NULL; +FFViewCache* FFAbstractButton::topRightClicked = NULL; +FFViewCache* FFAbstractButton::bottomLeftClicked = NULL; +FFViewCache* FFAbstractButton::bottomRightClicked = NULL; +/* static values + */ +bool FFAbstractButton::staticFFViewCacheUpdated = false; +int FFAbstractButton::minimumWidth = 0; +/** + * Constructs a FFAbstractButton with a parent. + * Set variable to initial values and set graphics used in widget. + */ +FFAbstractButton::FFAbstractButton(QWidget* parent) : + QAbstractButton(parent) +{ + init(); + +} + +/** + * A virtual destructor of FFAbstractButton. + */ +FFAbstractButton::~FFAbstractButton() +{ + ; +} + +/** + * Returns the left margin of inside drawing rectangle. + */ +int FFAbstractButton::leftMargin() +{ + return insideRect.leftMargin_; +} + +/** + * Returns the left margin of inside drawing rectangle. + */ +int FFAbstractButton::rightMargin() +{ + return insideRect.rightMargin_; +} + +/** + * Returns the top margin of inside drawing rectangle. + */ +int FFAbstractButton::topMargin() +{ + return insideRect.topMargin_; +} + +/** + * Returns the bottom margin of inside drawing rectangle. + */ +int FFAbstractButton::bottomMargin() +{ + return insideRect.bottomMargin_; +} + +/** + * Returns the horizontal spacing between any elements in inside rectangle. + */ +int FFAbstractButton::hSpacing() +{ + return insideRect.hSpacing_; +} + +/** + * Returns the vertical spacing between any elements in inside rectangle. + */ +int FFAbstractButton::vSpacing() +{ + return insideRect.vSpacing_; +} + +/** + * Sets left margin of elements on a button + * @param leftMargin left margin of elements on a button + */ +void FFAbstractButton::setLeftMargin(int leftMargin) +{ + insideRect.leftMargin_ = leftMargin; + insideRect.leftMarginTemp = leftMargin; + updateView(); + update(); +} + +/** + * Sets right margin of elements on a button + * @param rightMargin right margin of elements on a button + */ +void FFAbstractButton::setRightMargin(int rightMargin) +{ + insideRect.rightMargin_ = rightMargin; + insideRect.rightMarginTemp = rightMargin; + updateView(); + update(); +} + +/** + * Sets top margin of elements on a button + * @param topMargin top margin of elements on a button + */ +void FFAbstractButton::setTopMargin(int topMargin) +{ + insideRect.topMargin_ = topMargin; + insideRect.topMarginTemp = topMargin; + updateView(); + update(); +} + +/** + * Sets bottom margin of elements on a button + * @param bottomMargin bottom margin of elements on a button + */ +void FFAbstractButton::setBottomMargin(int bottomMargin) +{ + insideRect.bottomMargin_ = bottomMargin; + insideRect.bottomMarginTemp = bottomMargin; + updateView(); + update(); +} + +/** + * Provides interface to change this parameters. + * @param leftMargin set margin between left edge of widget to left edge of inside rectangle + * @param rightMargin set margin between right edge of widget to right edge of inside rectangle + * @param topMargin set margin between top edge of widget to top edge of inside rectangle + * @param bottomMargin set margin between bottom edge of widget to bottom edge of inside rectangle + */ +void FFAbstractButton::setMargins(int leftMargin, + int rightMargin, + int topMargin, + int bottomMargin) +{ + insideRect.setMargins(leftMargin, rightMargin, topMargin, bottomMargin); + updateView(); + update(); +} + +/** + * Sets horizontal spacing between any elements in inside rectangle. + * @param hSpacing Horizontal spacing + */ +void FFAbstractButton::setHSpacing(int hSpacing) +{ + insideRect.hSpacing_ = hSpacing; + insideRect.hSpacingTemp = hSpacing; + updateView(); +} + +/** + * Sets vertical spacing between any elements in inside rectangle. + * @param spacing Vertical spacing + */ +void FFAbstractButton::setVSpacing(int spacing) +{ + insideRect.vSpacing_ = spacing; + insideRect.vSpacingTemp = spacing; + updateView(); +} +/** + * Returns pen + */ +QPen FFAbstractButton::pen() +{ + return pen_; +} + +/** + * Sets pen + */ +void FFAbstractButton::setPen(QPen pen) +{ + pen_ = pen; +} +/** + * Repaints the view of this button. Overrides the virtual method from QWidget. + * If button is not clicked draw one type of pixmaps otherwise draw another. + * + * Composition of pixmaps: + * + * + *
topLeft topCenter topRight
centerLeft center centerRight
bottomLeft bottomCenter bottomRight
+ * @param event Contains all informations about event. + */ +void FFAbstractButton::paintEvent(QPaintEvent* event) +{ + Q_UNUSED(event) + + QPainter painter; + + painter.begin(this); + + if(!isClicked_) + { + painter.drawPixmap(QPoint(0, 0), topLeftNormal->pixmap()); + painter.drawPixmap(QPoint(topLeftNormal->defaultSize().width(), + 0), topCenterNormal->pixmap()); + painter.drawPixmap(QPoint(topLeftNormal->defaultSize().width() + + pixmapsPositionWidth_, 0), + topRightNormal->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftNormal->defaultSize().height()), + centerLeftNormal->pixmap()); + painter.drawPixmap(QPoint(centerLeftNormal->defaultSize().width(), + topCenterNormal->defaultSize().height()), + centerNormal->pixmap()); + painter.drawPixmap(QPoint(centerLeftNormal->defaultSize().width() + + pixmapsPositionWidth_, + topRightNormal->defaultSize().height()), + centerRightNormal->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftNormal->defaultSize().height() + + pixmapsPositionHeight_), + bottomLeftNormal->pixmap()); + painter.drawPixmap(QPoint(bottomLeftNormal->defaultSize().width(), + topCenterNormal->defaultSize().height() + + pixmapsPositionHeight_), + bottomCenterNormal->pixmap()); + painter.drawPixmap(QPoint(bottomLeftNormal->defaultSize().width() + + pixmapsPositionWidth_, + topRightNormal->defaultSize().height() + + pixmapsPositionHeight_), + bottomRightNormal->pixmap()); + } + else + { + painter.drawPixmap(QPoint(0, 0), topLeftClicked->pixmap()); + painter.drawPixmap(QPoint(topLeftClicked->defaultSize().width(), + 0), + topCenterClicked->pixmap()); + painter.drawPixmap(QPoint(topLeftClicked->defaultSize().width() + + pixmapsPositionWidth_, 0), + topRightClicked->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftClicked->defaultSize().height()), + centerLeftClicked->pixmap()); + painter.drawPixmap(QPoint(centerLeftClicked->defaultSize().width(), + topCenterClicked->defaultSize().height()), + centerClicked->pixmap()); + painter.drawPixmap(QPoint(centerLeftClicked->defaultSize().width() + + pixmapsPositionWidth_, + topRightClicked->defaultSize().height()), + centerRightClicked->pixmap()); + painter.drawPixmap(QPoint(0, + topLeftClicked->defaultSize().height() + + pixmapsPositionHeight_), + bottomLeftClicked->pixmap()); + painter.drawPixmap(QPoint(bottomLeftClicked->defaultSize().width(), + topCenterClicked->defaultSize().height() + + pixmapsPositionHeight_), + bottomCenterClicked->pixmap()); + painter.drawPixmap(QPoint(bottomLeftClicked->defaultSize().width() + + pixmapsPositionWidth_, + topRightClicked->defaultSize().height() + + pixmapsPositionHeight_), + bottomRightClicked->pixmap()); + } + + paintIcon(&painter); + painter.end(); + +} + +/** + * Update button view after changing size of the widget. + * Update size of all pixmap which need it (without corners) + * @param event Contains all informations about event. + */ +void FFAbstractButton::resizeEvent(QResizeEvent* event) +{ + pixmapsPositionWidth_ = event->size().width() + - centerLeftNormal->defaultSize().width() + - centerRightNormal->defaultSize().width(); + + pixmapsPositionHeight_ = event->size().height() + - topCenterNormal->defaultSize().height() + - bottomCenterNormal->defaultSize().height(); + + if(event->oldSize().isValid()) + { + insideRect.scaleMargins(event->oldSize(), event->size()); + } + updateView(); + + if(!icon().isNull()) + { + QRect rect(0 + leftMargin(), + 0 + topMargin(), + geometry().width() - rightMargin() - leftMargin() + - 2 * insideRect.leftIndent_, + geometry().height() - bottomMargin() - topMargin()); + + iconSpace = icon().pixmap(rect.size()).size().width(); + } + else + { + iconSpace = 0; + } +} + +/** + * Initiates an object of FFAbstractgButton. Sets all needed fields. It is called by all constructors. + */ +void FFAbstractButton::init() +{ + + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); + path = BUTTON_PATH; + + isClicked_ = false; + iconSpace = 0; + + iconAlignment_ = DEFAULT_ICON_ALIGNMENT; + + if(NULL == topLeftNormal) + { + topLeftNormal = new FFViewCache; + } + + topCenterNormal = new FFViewCache; + + if(NULL == topRightNormal) + { + topRightNormal = new FFViewCache; + } + + centerLeftNormal = new FFViewCache; + centerNormal = new FFViewCache; + centerRightNormal = new FFViewCache; + + if(NULL == bottomLeftNormal) + { + bottomLeftNormal = new FFViewCache; + } + + bottomCenterNormal = new FFViewCache; + + if(NULL == bottomRightNormal) + { + bottomRightNormal = new FFViewCache; + } + + if(NULL == topLeftClicked) + { + topLeftClicked = new FFViewCache; + } + + topCenterClicked = new FFViewCache; + + if(NULL == topRightClicked) + { + topRightClicked = new FFViewCache; + } + + centerLeftClicked = new FFViewCache; + centerClicked = new FFViewCache; + centerRightClicked = new FFViewCache; + + if(NULL == bottomLeftClicked) + { + bottomLeftClicked = new FFViewCache; + } + + bottomCenterClicked = new FFViewCache; + + if(NULL == bottomRightClicked) + { + bottomRightClicked = new FFViewCache; + } + + setSkin(); +} +/** + * setSkin initiate FFViewCaches, update their size to default and set minimum width and height of widget + */ +void FFAbstractButton::setSkin() +{ + +// QSize sizeTmp = QSize(width(), height()); + + if(!topLeftNormal->isValid()) + { + topLeftNormal->init(path + "_topleft_normal.svg"); + } + + topCenterNormal->init(path + "_topcenter_normal.svg"); + + if(!topRightNormal->isValid()) + { + topRightNormal->init(path + "_topright_normal.svg"); + } + + centerLeftNormal->init(path + "_centerleft_normal.svg"); + centerNormal->init(path + "_center_normal.svg"); + centerRightNormal->init(path + "_centerright_normal.svg"); + + if(!bottomLeftNormal->isValid()) + { + bottomLeftNormal->init(path + "_bottomleft_normal.svg"); + } + + bottomCenterNormal->init(path + "_bottomcenter_normal.svg"); + + if(!bottomRightNormal->isValid()) + { + bottomRightNormal->init(path + "_bottomright_normal.svg"); + } + + if(!topLeftClicked->isValid()) + { + topLeftClicked->init(path + "_topleft_clicked.svg"); + } + + topCenterClicked->init(path + "_topcenter_clicked.svg"); + + if(!topRightClicked->isValid()) + { + topRightClicked->init(path + "_topright_clicked.svg"); + } + + centerLeftClicked->init(path + "_centerleft_clicked.svg"); + centerClicked->init(path + "_center_clicked.svg"); + centerRightClicked->init(path + "_centerright_clicked.svg"); + + if(!bottomLeftClicked->isValid()) + { + bottomLeftClicked->init(path + "_bottomleft_clicked.svg"); + } + + bottomCenterClicked->init(path + "_bottomcenter_clicked.svg"); + + if(!bottomRightClicked->isValid()) + { + bottomRightClicked->init(path + "_bottomright_clicked.svg"); + } + + pixmapsPositionWidth_ = centerNormal->defaultSize().width(); + pixmapsPositionHeight_ = centerNormal->defaultSize().height(); + + if(!staticFFViewCacheUpdated) + { + //Update view once after skin was set + topLeftNormal->updateView(topLeftNormal->defaultSize()); + topRightNormal->updateView(topRightNormal->defaultSize()); + bottomLeftNormal->updateView(bottomLeftNormal->defaultSize()); + bottomRightNormal->updateView(bottomRightNormal->defaultSize()); + + topLeftClicked->updateView(topLeftClicked->defaultSize()); + topRightClicked->updateView(topRightClicked->defaultSize()); + bottomLeftClicked->updateView(bottomLeftClicked->defaultSize()); + bottomRightClicked->updateView(bottomRightClicked->defaultSize()); + + minimumWidth + = qMax(topLeftNormal->defaultSize().width() + + topRightNormal->defaultSize().width(), + bottomLeftNormal->defaultSize().width() + + bottomRightNormal->defaultSize().width()); + + staticFFViewCacheUpdated = true; + } + + pixmapsPositionWidth_ = centerNormal->defaultSize().width(); + pixmapsPositionHeight_ = centerNormal->defaultSize().height(); + + insideRect.leftIndent_ = topLeftNormal->defaultSize().width(); + + setMinimumHeight(DEFAULT_BUTTON_HEIGHT); + setMinimumWidth(2 * minimumWidth); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFAbstractButton::mousePressEvent(QMouseEvent* event) +{ + Q_UNUSED(event) + isClicked_ = true; // isClicked contains boolean true information of mouse button pressed + update(); +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFAbstractButton::mouseReleaseEvent(QMouseEvent *event) +{ + Q_UNUSED(event) + + if(isClicked_) + { + if(!signalsBlocked()) + { + emit clicked(); + } + } + + isClicked_ = false; // isClicked contains boolean false information of mouse button unpressed + update(); +} + +/** + * Recalculate geometry of elements on button + */ +void FFAbstractButton::updateView() +{ + if(pixmapsPositionHeight_ <= 0) + { + pixmapsPositionHeight_ = 1; + } + //Update view all the time resize event appear: + topCenterNormal->updateView(QSize(pixmapsPositionWidth_, + topCenterNormal->defaultSize().height())); + bottomCenterNormal->updateView(QSize(pixmapsPositionWidth_, + bottomCenterNormal->defaultSize().height())); + + centerLeftNormal->updateView(QSize(centerLeftNormal->defaultSize().width(), + pixmapsPositionHeight_)); + centerRightNormal->updateView(QSize(centerRightNormal->defaultSize().width(), + pixmapsPositionHeight_)); + centerNormal->updateView(QSize(pixmapsPositionWidth_, + pixmapsPositionHeight_)); + + topCenterClicked->updateView(QSize(pixmapsPositionWidth_, + topCenterClicked->defaultSize().height())); + bottomCenterClicked->updateView(QSize(pixmapsPositionWidth_, + bottomCenterClicked->defaultSize().height())); + centerLeftClicked->updateView(QSize(centerLeftClicked->defaultSize().width(), + pixmapsPositionHeight_)); + centerRightClicked->updateView(QSize(centerRightClicked->defaultSize().width(), + pixmapsPositionHeight_)); + centerClicked->updateView(QSize(pixmapsPositionWidth_, + pixmapsPositionHeight_)); +} +/** + * Draws icon on button + */ +void FFAbstractButton::paintIcon(QPainter* painter) +{ + int move = 0; + if(iconAlignment_ == Qt::AlignLeft) + { + move = insideRect.leftIndent_; + } + else if(iconAlignment_ == Qt::AlignRight) + { + move = -insideRect.leftIndent_; + } + else + { + move = 0; + } + //if icon was set paint it + if(!icon().isNull()) + { + QRect rect(0 + leftMargin() + move, + 0 + topMargin(), + geometry().width() - rightMargin() - leftMargin(), + geometry().height() - bottomMargin() - topMargin()); + + //paint icon in button center + icon().paint(painter, + rect, + iconAlignment_, + QIcon::Normal, + QIcon::Off); + } + +} + +/** + * Initiate FFAbstractButtonPrivate + */ +FFAbstractButtonPrivate::FFAbstractButtonPrivate() +{ + setMargins(0.0, 0.0, 0.0, 0.0); + hSpacing_ = 0; + hSpacingTemp = 0; + vSpacing_ = 0; + vSpacingTemp = 0; + leftIndent_ = 0; +} + +/** + * Dectructor of FFAbstractButtonPrivate + */ +FFAbstractButtonPrivate::~FFAbstractButtonPrivate() +{ + ; +} + +/** + * scaleMargins scale margins eg. when resize event appear + * @param oldSize before eg. resize event + * @param newSize actual size after eg. resize event + */ +void FFAbstractButtonPrivate::scaleMargins(QSize oldSize, QSize newSize) +{ + float widthProportion = (float)newSize.width() / (float)oldSize.width(); + float heightProportion = (float)newSize.height() + / (float)oldSize.height(); + + leftMarginTemp *= widthProportion; + rightMarginTemp *= widthProportion; + topMarginTemp *= heightProportion; + bottomMarginTemp *= heightProportion; + hSpacingTemp *= heightProportion; + vSpacingTemp *= widthProportion; + + leftMargin_ = leftMarginTemp; + rightMargin_ = rightMarginTemp; + topMargin_ = topMarginTemp; + bottomMargin_ = bottomMarginTemp; + hSpacing_ = hSpacingTemp; + vSpacing_ = vSpacingTemp; +} + +/** + * setMargins set left, right, top and bottom margins + * @param leftMargin Size of left margin + * @param rightMargin Size of right margin + * @param topMargin Size of top margin + * @param bottomMargin Size of bottom margin + */ +void FFAbstractButtonPrivate::setMargins(int leftMargin, + int rightMargin, + int topMargin, + int bottomMargin) +{ + leftMargin_ = leftMargin; + rightMargin_ = rightMargin; + topMargin_ = topMargin; + bottomMargin_ = bottomMargin; + + leftMarginTemp = leftMargin; + rightMarginTemp = rightMargin; + topMarginTemp = topMargin; + bottomMarginTemp = bottomMargin; +} +/** + * Returns alignment of icon + */ +Qt::Alignment FFAbstractButton::iconAlignment() +{ + return iconAlignment_; +} +/** + * Sets alignment of icon + * @param iconAlignment new alignment of icon + */ +void FFAbstractButton::setIconAlignment(Qt::Alignment iconAlignment) +{ + this->iconAlignment_ = iconAlignment; +} +/** + * Returns default width of image used as button's corner + */ +int FFAbstractButton::indent() +{ + return insideRect.leftIndent_; +} + +/** + \fn void FFAbstractButton::clicked() + + This signal is emitted when the button will be clicked. + */ diff --git a/libffqw-n810-1.0/sources/ffabstractbutton.h b/libffqw-n810-1.0/sources/ffabstractbutton.h new file mode 100644 index 0000000..91b2b15 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffabstractbutton.h @@ -0,0 +1,222 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#ifndef FFABSTRACTBUTTON_H +#define FFABSTRACTBUTTON_H + +#include "ffviewcache.h" +#include "ffscrollinglabel.h" +#include +#include +#include + + +static const QString BUTTON_PATH= ":/standard/button"; /// + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractcombobox.cpp + * @brief Implementation of the FFAbstractComboBox and FFComboPopUp class. + * + * @author ComArch S.A. + * @date 2009.10.09 + * @version 1.0 + * + * This widget has activator(to open popup window) and popup window(to select item) + * FFAbstractComboBox and FFComboPopUp are friend classes in both directions + */ + +#include "ffabstractcombobox.h" + +/** + * Rounds argument up. + * @param var is an argument to round up + * @return value of rounded up argument + */ + +float roundUp(float var) +{ + if(0 > ((int)var - var )) + { + return (int)var + 1; + } + else + { + return (int)var; + } +} + +/** + * Constructs a FFAbstractButton with a parent. + * Sets variable to initial values. + */ +FFAbstractComboBox::FFAbstractComboBox(FFAbstractButton* activator, QWidget* parent): + QWidget(parent) +{ + cols_ = 1; + + //sets activator + activator_ = activator; + activator_->setObjectName("Activator"); + + //sets layout of combobx + mainLayout = new QGridLayout(); + mainLayout->setMargin(0); + mainLayout->setSpacing(0); + mainLayout->addWidget(activator_); + setLayout(mainLayout); + + //sets popup + popUp = new FFComboPopUp(this); + popUp->setWindowFlags(Qt::SplashScreen); + popUp->setGeometry(QApplication::desktop()->geometry()); + popUp->hide(); + popUp->setWindowModality(Qt::WindowModal); + + setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); + + //connects + connect(activator_, SIGNAL(clicked()), popUp, SLOT(exec())); + connect(this, SIGNAL(reset()),popUp,SLOT(recreatePopUp())); + connect(this, SIGNAL(itemsChanged(FFAbstractButton*)),popUp,SLOT(registerNewItem(FFAbstractButton*))); +} +/** + * A virtual destructor of FFAbstractButton. + */ +FFAbstractComboBox::~FFAbstractComboBox() +{ + ; +} + +/** + * Removes item from combobox + * @param index is a index of item + */ +void FFAbstractComboBox::removeItem(int index) +{ + if(items_.size()>index) + { + disconnect(items_.at(index)); + delete items_.takeAt(index); + } + emit reset(); +} +/** + * Calls setActivatorSpecs and emits signals activated(QVariant),activated(int) + * @param index is a index of item + */ +void FFAbstractComboBox::setCurrentItem(int index) +{ + if(items_.size()>index) + { + setActivatorSpecs(items_.at(index)); + if(!signalsBlocked()) + { + emit activated(activatorSpecs()); + emit activated(index); + } + } +} +/** + * Returns pointer to activator + */ +FFAbstractButton* FFAbstractComboBox::activator() +{ + return activator_; +} +/** + * Returns number of columns + */ +int FFAbstractComboBox::cols() +{ + return cols_; +} +/** + * Returns list of items + */ +QList FFAbstractComboBox::items() +{ + return items_; +} +/** + * Returns popup's layout spacing + */ +int FFAbstractComboBox::spacing() +{ + return popUp->scrollAreaLayout->spacing(); +} +/** + * Sets columns number + * @param cols a number of columns + */ +void FFAbstractComboBox::setCols(int cols) +{ + cols_ = cols; + emit reset(); +} +/** + * Sets popup's layout spacing + * @param spacing a size of spacing + */ +void FFAbstractComboBox::setSpacing(int spacing) +{ + popUp->scrollAreaLayout->setSpacing(spacing); + emit reset(); +} +/** + * Adds item to combobox + * @param item a pointer to adding item + * @param autoRecreate defines if layout should be recreated automatically + */ +void FFAbstractComboBox::insertItem(FFAbstractButton* item, bool autoRecreate) +{ + items_.append(item); + emit itemsChanged(item); + + if(autoRecreate) + { + emit reset(); + } +} + +/** + * Constructs a FFComboPopUp with a parent. + * Sets variable to initial values. + */ +FFComboPopUp::FFComboPopUp(QWidget* parent) : QDialog(parent) +{ + + parentCB = dynamic_cast(parent); + //sets popup window's layout + popUpLayout = new QGridLayout(); + popUpLayout->setMargin(0); + popUpLayout->setSpacing(0); + + //sets scrollarea and scrollarea's widget + scrollArea = new FFScrollArea(); + scrollArea->setWidgetResizable(true); + + popUpLayout->addWidget(scrollArea,0,0); + setLayout(popUpLayout); + + scrollAreaLayout = new QGridLayout(); + scrollAreaLayout->setSpacing(5); + scrollAreaLayout->setMargin(0); + + scrollAreaWidget = new QWidget(); + scrollAreaWidget->setStyleSheet("background-color:black;"); + + scrollAreaWidget->setLayout(scrollAreaLayout); + scrollArea->setWidget(scrollAreaWidget); + + //sets back button + backButton = new FFAbstractButton; + backButton->setMargins(0,0,5,5); + backButton->setIconAlignment(Qt::AlignRight); + backButton->setIcon(QIcon(QPixmap(":/standard/combo_colorarrow.svg"))); + scrollAreaLayout->addWidget(backButton,0,0,1,parentCB->cols_); + + //connect + connect(backButton,SIGNAL(clicked()),this,SLOT(reject())); +} +/** + * Serves show event. Override method from mother class. + */ +void FFComboPopUp::showEvent(QShowEvent* event) +{ + // The calculation of the size of the window so that it occupied little space as possible. + + int itemsHeight = 0; + + // for each row + for(int i=0; iitems_.size()/(float)parentCB->cols_); ++i) + { + // height of an element + itemsHeight += parentCB->items_.at(i)->minimumHeight(); + + //height of an spacing + itemsHeight += scrollAreaLayout->spacing(); + } + + itemsHeight += backButton->minimumHeight(); + + if(itemsHeight > QApplication::desktop()->geometry().height()) + itemsHeight = QApplication::desktop()->geometry().height(); + + setGeometry(0,0,QApplication::desktop()->geometry().width(),itemsHeight); + + QDialog::showEvent(event); + +} +/** + * Refreshes popup layout at view event + */ +void FFComboPopUp::recreatePopUp() +{ + // Deleting old objects + QLayoutItem *child; + while((child = scrollAreaLayout->takeAt(0)) != 0) + { + delete child; + } + + // Arranging objects on the popup + scrollAreaLayout->addWidget(backButton,0,0,1,parentCB->cols_); + for(int i=0, cols=0, rows=1; iitems_.size();++i,++cols) + { + if(cols==parentCB->cols_) + { + ++rows; + } + cols%=parentCB->cols_; + scrollAreaLayout->addWidget(parentCB->items_.at(i),rows,cols); + } + + // Force refresh FFScrollArea (this line exist because FFScrollArea have a little imperfection - event filter problem) + scrollArea->setWidget(scrollAreaWidget); +} +/** + * Connects new item signal clicked to actual widget's slot accept + */ +void FFComboPopUp::registerNewItem(FFAbstractButton* newItem) +{ + connect(newItem,SIGNAL(clicked()),this,SLOT(accept())); +} +/** + * Calls setCurrentItem with widget index + */ +void FFComboPopUp::accept() +{ + parentCB->setCurrentItem(scrollAreaLayout->indexOf(dynamic_cast(sender()))-1); + QDialog::accept(); +} + +/** + \fn void FFAbstractComboBox::reset() + *This signal is emitted when is necessary to refresh layout of popup window. + */ + +/** + \fn void FFAbstractComboBox::activated(QVariant spec) + *This signal is emitted when option on combobox was chosen. + *@param spec contains specific chosen value + */ + +/** + \fn void FFAbstractComboBox::activated(int index) + *This signal is emitted when option on combobox was chosen. + *@param index contains index of chosen item + */ + + +/** + \fn void FFComboPopUp::selected(FFAbstractButton* selectedButton) + *This signal is emitted when item was selected + *@param selectedButton pointer to selected item + */ diff --git a/libffqw-n810-1.0/sources/ffabstractcombobox.h b/libffqw-n810-1.0/sources/ffabstractcombobox.h new file mode 100644 index 0000000..eabb0b9 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffabstractcombobox.h @@ -0,0 +1,191 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractcombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.10.9 + * @version 1.0 + */ + +#ifndef FFABSTRACTCOMBOBOX_H +#define FFABSTRACTCOMBOBOX_H + +#include +#include +#include +#include +#include +#include + +#include "ffabstractbutton.h" +#include "ffscrollarea.h" + +class FFComboPopUp; + +//const int SCROLLBAR_SIZE = 5;///< Default scrollbar's size + +/** + * @author ComArch S.A. + * @date 2009.10.09 + * @version 1.0 + * + * @brief A class inherited by specific comboboxes + */ +class FFAbstractComboBox : public QWidget +{ + Q_OBJECT + friend class FFComboPopUp; + +public: + FFAbstractComboBox(FFAbstractButton* activator, QWidget* parent = 0); + virtual ~FFAbstractComboBox(); + + virtual void addItem(QVariant item) = 0; + virtual void removeItem(int index); + virtual void setCurrentItem(int index); + + FFAbstractButton* activator(); + int cols(); + QList items(); + QPen pen(); + int spacing(); + + void setCols(int cols); + void setSpacing(int spacing); + +protected: + FFAbstractButton* activator_; ///< activator shows actual combobox's value and activate popup window + QPen pen_; ///< contain actual pen + QList items_; /// + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +#include "ffabstractwidget.h" + +/** + * @file ffabstractwidget.cpp + * @brief Implementation of the FFAbstractWidget + * + * @author ComArch S.A. + * @date 2009.07.31 + * @version 1.0 + */ + +/** + * Constructs an FFAbstractWidget with a parent. + */ +FFAbstractWidget::FFAbstractWidget(QWidget* parent) + : QWidget(parent) +{ + +} + +/** + * A virtual destructor + */ +FFAbstractWidget::~FFAbstractWidget() +{ + +} diff --git a/libffqw-n810-1.0/sources/ffabstractwidget.h b/libffqw-n810-1.0/sources/ffabstractwidget.h new file mode 100644 index 0000000..cdc6dbf --- /dev/null +++ b/libffqw-n810-1.0/sources/ffabstractwidget.h @@ -0,0 +1,243 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffabstractwidget.h + * @brief contains all required declarations and basic utilities functions + * + * @author ComArch S.A. + * @date 2009.07.31 + * @version 1.0 + */ +#ifndef FFABSTRACTWIDGET_H_ +#define FFABSTRACTWIDGET_H_ + +#include + +class FFAbstractWidget; +typedef FFAbstractWidget FF; + +/** + * Defines default title text color for button + */ +const QColor FF_TITLE_COLOR = QColor(14,221,26); +/** + * Defines default description text color for button + */ +const QColor FF_DESCRIPTION_COLOR = QColor(100,100,100); +/** + * Defines default button height + */ +const int DEFAULT_BUTTON_HEIGHT = 65; +/** + * Defines default combo button height + */ +const int DEFAULT_COMBO_HEIGHT = 65; +/** + * Defines color for legend widget used on FFChart + */ +const QColor DEFAULT_LEGEND_BACKGROUND_COLOR = QColor(26,26,26); +/** + * Defines opacity for legend widget used on FFChart + */ +const qreal DEFAULT_LEGEND_BACKGROUND_OPACITY = 0.8; + +/** + * Defines default font name for widget title + */ +const QString FONT_TITLE_DEF = "Arial"; +/** + * Defines default font name for widget description + */ +const QString FONT_TEXT_DEF = "Arial"; + +/** + * Defines title text color for scrolling label + */ +const QColor COLOR_TITLE_DEF = QColor(50, 255, 50); +/** + * Defines description text color for scrolling label + */ +const QColor COLOR_TEXT_DEF = QColor(50, 50, 255); +/** + * Defines bright background color + */ +const QColor COLOR_BRIGHT_BACKGROUND_DEF = QColor(250, 255, 250); +/** + * Defines dark background color + */ +const QColor COLOR_DARK_BACKGROUND_DEF = QColor(250, 255, 250); +/** + * Defines bright foreground color + */ +const QColor COLOR_BRIGHT_FOREGROUND_DEF = QColor(250, 255, 250); +/** + * Defines dark foreground color + */ +const QColor COLOR_DARK_FOREGROUND_DEF = QColor(250, 255, 250); + +/** + * @author ComArch S.A. + * @date 2009.07.30 + * @version 1.0 + * + * @brief A parent-class for all widgets included in FFQW Library + */ + +class FFAbstractWidget : public QWidget +{ + Q_OBJECT + +public: + FFAbstractWidget(QWidget* parent = 0); + virtual ~FFAbstractWidget(); + +/** + * describes standard FF widgets' sizes + */ +enum Size +{ + SIZE_TINY = 0x0001, + SIZE_SMALL = 0x0002, + SIZE_NORMAL = 0x0004, + SIZE_LARGE = 0x0008, + SIZE_HUGE = 0x0010 +}; + +/** + * describes standard FF widgets' fonts + */ +enum Font +{ + FONT_TITLE = 0x0020, FONT_TEXT = 0x0040 +}; + +/** + * describes standard FF widgets' colors + */ +enum Color +{ + COLOR_TITLE = 0x0080, + COLOR_TEXT = 0x0100, + COLOR_BRIGHT_BACKGROUND = 0x0200, + COLOR_DARK_BACKGROUND = 0x0400, + COLOR_BRIGHT_FOREGROUND = 0x0800, + COLOR_DARK_FOREGROUND = 0x1000 +}; + +/** + * defines standard FF widgets' alignment + */ +enum Alignment +{ + ALIGNMENT_LEFT = 0x2000, + ALIGNMENT_RIGHT = 0x4000, + ALIGNMENT_CENTER = 0x8000 +}; + +/** + * defines standard FF widgets' scrolling type + */ +enum Scroll +{ + SCROLL_SIDE_TO_SIDE = 0x0001 +}; + +}; +/** + * Mask for checking size + */ +const int SIZE_MASK = FF::SIZE_TINY | + FF::SIZE_SMALL | + FF::SIZE_NORMAL | + FF::SIZE_LARGE | + FF::SIZE_HUGE; +/** + * Mask for checking font type + */ +const int FONT_MASK = FF::FONT_TITLE | FF::FONT_TEXT; + +/** + * Mask for checking color + */ +const int COLOR_MASK = FF::COLOR_TITLE | + FF::COLOR_BRIGHT_BACKGROUND | + FF::COLOR_DARK_BACKGROUND | + FF::COLOR_BRIGHT_FOREGROUND | + FF::COLOR_DARK_FOREGROUND; +/** + * Mask for checking alignment + */ +const int ALIGNMENT_MASK = FF::ALIGNMENT_LEFT | FF::ALIGNMENT_RIGHT | FF::ALIGNMENT_CENTER; + +#endif // FFABSTRACTWIDGET_H diff --git a/libffqw-n810-1.0/sources/ffchart.cpp b/libffqw-n810-1.0/sources/ffchart.cpp new file mode 100644 index 0000000..ca0f7ff --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchart.cpp @@ -0,0 +1,347 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchart.cpp + * @brief Implementation of the FFChartScene class. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#include "ffchart.h" + + +/** + * Constructs a FFChart with a parent. + */ +FFChart::FFChart(QWidget* parent) : + FFAbstractWidget(parent) +{ + init(); +} + +/** + * A virtual destructor. + */ +FFChart::~FFChart() +{ + +} + +/** + * Initiates an object of FFChart. Sets all needed fields and connections. + * It is called by all constructors. + */ +void FFChart::init() +{ + //sets size policy + setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + + + // creates needed objects + view = new QGraphicsView(this); + scene = new FFChartScene(this); + legend = new FFChartLegend(this); + + //sets default values + autoSort_ = true; + autoValidate_ = true; + + //sets view + view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view->setScene(scene); + //necessary with our librray in Qt 4.6 +#ifndef DIABLO_COMP + view->setOptimizationFlag(QGraphicsView::IndirectPainting); +#endif + + //sets legend size + legend->setGeometry(width() / 2, 0, width() / 2, height()); + //hides legend + legend->hide(); + + + + view->installEventFilter(this); + + //connects + connect(this,SIGNAL(seriesChanged(QList)),scene,SLOT(seriesChanged(QList))); + connect(legend, SIGNAL(updateSeries()), scene, SLOT(update())); +} + +/** + * Adds new series that will be drawn on the chart. + */ +void FFChart::addSeries(FFChartSeries* series) +{ + + //series validation + if(autoValidate_) + { + series->validate(); + } + //series' point sorting + if(autoSort_) + { + series->sort(); + } + + + series->pen()->setCosmetic(true); + + //add series to sies list and legend + series_.append(series); + + legend->addSeries(series); + + //updates scene + scene->update(); + + + emit seriesChanged(series_); +} + +/** + * Removes series indicated by given pointer. + */ +void FFChart::removeSeries(FFChartSeries* series) +{ + //searches for series and remove it + for(int i = 0; i < series_.size(); ++i) + { + if(series_[i] == series) + { + legend->deleteSeries(series); + series_.removeAt(i); + } + } + + //update scene + scene->update(); + + emit seriesChanged(series_); +} + +/** + * Removes all series. + */ +void FFChart::removeSeries() +{ + //removes series + int num = series_.size(); + for(int i = 0; i < num; ++i) + { + legend->deleteSeries(series_.at(0)); + series_.removeAt(0); + } + //updates scene + scene->update(); + + emit seriesChanged(series_); +} + +/** + * Returns a list with pointers to all series contained in the chart. + */ +QList FFChart::series() +{ + return series_; +} + +/** + * Returns pointer to series with given name. + * @return pointer to the looking series or NULL if series is not found + */ +FFChartSeries* FFChart::series(QString name) +{ + //return pointer to first added series with given name + + for(int i=0; iname() == name) + { + return series_[i]; + } + } + //If found nothing NULL is returned + return NULL; +} + +/** + * Turns on/off auto-sorting on series. If it is on then each newly added series + * will be sorted by 'x' values. + */ +void FFChart::setAutoSort(const bool& autoSort) +{ + autoSort_ = autoSort; +} + +/** + * Turns on/off auto-validating on series. If it is on then each newly added + * series will be cleaned with the same points. + */ +void FFChart::setAutoValidate(const bool& autoValidate) +{ + autoValidate_ = autoValidate; +} + +/** + * Returns true if auto-sorting is enabled, otherwise false. + */ +bool FFChart::isAutoSortEnabled() const +{ + return autoSort_; +} + +/** + * Returns true if auto-validating is enabled, otherwise false. + */ +bool FFChart::isAutoValidateEnabled() const +{ + return autoValidate_; +} + +/** + * Sets object that will be responsible for managing with events sent to + * the FFChart. + */ +void FFChart::installEventFilter(QObject* object) +{ + view->installEventFilter(object); +} + +/** + * Slot that zooms in the current chart into a rectangle which is smaller by + * a given ratio. + */ +void FFChart::zoomIn(qreal ratio) +{ + scene->zoomIn(ratio); +} + +/** + * Slot that zooms out the current chart into a rectangle which is larger by + * a given ratio. + */ +void FFChart::zoomOut(qreal ratio) +{ + scene->zoomOut(ratio); +} + +/** + * Moves the chart by given vector. + */ +void FFChart::moveBy(QPointF point) +{ + scene->moveBy(point.toPoint()); +} + +/** + * Overridden virtual method. It is responsible for managing with resize events. + */ +void FFChart::resizeEvent(QResizeEvent* event) +{ + Q_UNUSED(event) + view->resize(size()); + scene->setSceneRect(QRectF(0,0,event->size().width(),event->size().height())); + legend->setGeometry(width() / 2, 0, width() / 2, height()); + + QWidget::resizeEvent(event); +} + +/** + * Toggles the legend. If it is visible, this method makes it hidden and + * vice versa. + */ +void FFChart::showLegend() +{ + if(legend->isVisible()) + { + legend->hide(); + this->repaint(); + } + else + { + legend->show(); + this->repaint(); + } +} + +/*! + * \fn void FFChart::seriesChanged(QList); + * + * This Signal is emitted when the set of series was changed. + */ diff --git a/libffqw-n810-1.0/sources/ffchart.h b/libffqw-n810-1.0/sources/ffchart.h new file mode 100644 index 0000000..5114312 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchart.h @@ -0,0 +1,172 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchart.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#ifndef FFCHART_H +#define FFCHART_H + +#include +#include +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractwidget.h" +#include "ffchartbutton.h" +#include "ffchartscene.h" +#include "ffchartseries.h" +#include "ffchartlegend.h" + + +/** + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + * + * @brief A good looking widget to visualize simple data series. + */ +#ifdef MAEMO + +class FFChart : public FFAbstractWidget +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFChart : public FFAbstractWidget +{ + Q_OBJECT + Q_PROPERTY(bool autosortSeries READ isAutoSortEnabled WRITE setAutoSort) + Q_PROPERTY(bool autoValidateSeries READ isAutoValidateEnabled WRITE setAutoValidate) + +#endif + +public: + FFChart(QWidget* parent = 0); + virtual ~FFChart(); + + void addSeries(FFChartSeries* series); + void removeSeries(FFChartSeries* series); + void removeSeries(); + + QList series(); + FFChartSeries* series(QString name); + + void setAutoSort(const bool& autoSort); + void setAutoValidate(const bool& autoValidate); + + bool isAutoSortEnabled() const; + bool isAutoValidateEnabled() const; + void installEventFilter(QObject* object); + +public slots: + void zoomIn(qreal ratio); + void zoomOut(qreal ratio); + void moveBy(QPointF point); + +protected: + void resizeEvent(QResizeEvent* event); + +private: + QGraphicsView* view; ///< view of ffChart + FFChartScene* scene; ///< scene of FFchart + FFChartLegend* legend; ///< legend of FFChart + + QList series_; /// series_); + +public slots: + void showLegend(); +}; + +#endif // FFCHART_H diff --git a/libffqw-n810-1.0/sources/ffchartbutton.cpp b/libffqw-n810-1.0/sources/ffchartbutton.cpp new file mode 100644 index 0000000..583fe72 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartbutton.cpp @@ -0,0 +1,333 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartbutton.cpp + * @brief Implementation of the FFChartButton class. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + * Extend QGraphicsSvgItem to easy use 1 or 2 image and added functionality + * to decrease and increase item after click + */ + +#include "ffchartbutton.h" + +/** + * Constructs a FFChartButton with a parent. + * Set variables to initial values. + */ +FFChartButton::FFChartButton(QGraphicsItem* parent) : + QGraphicsSvgItem(parent) +{ + init(); +} + +/** + * A virtual destructor of FFChartButton. + */ +FFChartButton::~FFChartButton() +{ + ; +} + +/** + * Set variables to initial values. + */ +void FFChartButton::init() +{ + //sets default values + state = false; //usefull when changing beetwen 2 images, it remember click state - what image should be display + twoImageON = false; //state to store if the button have 2 images + startedTimeLine = false; //state to store if time line ends + + sizeRatio = 1; + frameRange_ = DEFAULT_FRAME_RANGE; + duration_ = DEFAULT_DURATION_TIME; + zoomRatio_ = DEFAULT_ZOOM_RATIO; + scaleWidth = 1; + scaleHeight = 1; + + image = new FFViewCache; + image2 = new FFViewCache; + + //sets animation's parameters + animation = new QTimeLine(duration_, this); + animation->setFrameRange(0, frameRange_); + animation->setUpdateInterval(duration_ / frameRange_); + + //connects + connect(animation, SIGNAL(frameChanged(int)), this, SLOT(tick(int))); + connect(animation, SIGNAL(finished()), this, SLOT(animationFinished())); +} + +/** + * Function responsible for animation (zooming) + * @param frame Number of the frame + */ +void FFChartButton::tick(int frame) +{ + + qreal width = this->boundingRect().width(); + qreal height = this->boundingRect().height(); + qreal ratio = 1; + QGraphicsSvgItem::scale(1 / sizeRatio, 1 / sizeRatio); + + //Setting scaling ratio + //first part of animation + if(frame <= frameRange_ / 2) + { + ratio = ((zoomRatio_ - 1) * (frame)) / (frameRange_ / 2) + 1; + } + //second part of animation + else if(frame <= frameRange_) + { + ratio = (zoomRatio_ - 1) * (frameRange_ - frame) / (frameRange_ + / 2) + 1; + } + + sizeRatio = ratio; + //change scale and posiotion of button + QGraphicsSvgItem::scale(ratio, ratio); + this->setPos(startingPosition.x() - ((ratio * width - width) + * scaleWidth / 2), startingPosition.y() - ((ratio + * height - height) * scaleHeight / 2)); +} + +/** + * Function to handle situation when animation reach end + */ +void FFChartButton::animationFinished() +{ + animation->stop(); + sizeRatio = 1; + startedTimeLine = false; +} + +/** + * Set image of item + * @param path Path to image + */ +void FFChartButton::setImage(QString path) +{ + image->init(path + ".svg"); + image->updateView(image->defaultSize()); + setSharedRenderer(image->renderer()); + + twoImageON = false; +} + +/** + * Set images of item + * @param path Path to first image + * @param path2 Path to second image + */ +void FFChartButton::setImage(QString path, QString path2) +{ + + image->init(path + ".svg"); + image2->init(path2 + ".svg"); + + setSharedRenderer(image->renderer()); + twoImageON = true; +} + +/** + * Set size of item + * @param size New size of the item + */ +void FFChartButton::setSize(const QSizeF& size) +{ + qreal tmpScaleWidth = size.toSize().width() / boundingRect().width() + * scaleWidth; + qreal tmpScaleHeight = size.toSize().height() / boundingRect().height() + * scaleHeight; + scale(tmpScaleWidth, tmpScaleHeight); +} + +/** + * Set if item will be increasing (zoomRatio>1) or will be decreasing (zoomRatio<1) + * @param zoomRatio How much size will be changing during animation + */ +void FFChartButton::setZoomRatio(qreal zoomRatio) +{ + zoomRatio_ = zoomRatio; +} + +/** + * Set number of frame in animation + * @param frameRange Number of frames + */ +void FFChartButton::setFrameRange(int frameRange) +{ + frameRange_ = frameRange; + animation->setFrameRange(0, frameRange_); +} + +/** + * Set how much time animation take + * @param duration Time of animation + */ +void FFChartButton::setDuration(int duration) +{ + duration_ = duration; + animation->setDuration(duration_); +} + +/** + * Scale the item + * @param sx Size of scale in width + * @param sy Size of scale in height + */ +void FFChartButton::scale(qreal sx, qreal sy) +{ + scaleWidth = sx * scaleWidth; + scaleHeight = sy * scaleHeight; + QGraphicsSvgItem::scale(scaleWidth, scaleHeight); +} + +/** + * Return if the item will be increasing (zoomRatio>1) or will be decreasing (zoomRatio<1) + */ +qreal FFChartButton::zoomRatio() +{ + return zoomRatio_; +} + +/** + * Return number of frame in animation + */ +int FFChartButton::frameRange() +{ + return frameRange_; +} + +/** + * Return how much time animation take + */ +int FFChartButton::duration() +{ + return duration_; +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFChartButton::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) +{ + Q_UNUSED(event) + //If button has two images they are toggled + if(twoImageON) + { + if(state == false) + { + setSharedRenderer(image2->renderer()); + } + else + { + setSharedRenderer(image->renderer()); + } + state = !state; + } + + //Starts animation + if(!startedTimeLine) + { + startingPosition = this->pos(); + animation->start(); + startedTimeLine = true; + } + emit mouseRelease(); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFChartButton::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + Q_UNUSED(event) + emit mousePress(); +} + +/** + * \fn void FFChartButton::mouseRelease() + * This signal is emitted when the item is released. + */ + +/** + * \fn void FFChartButton::mousePress() + * This signal is emitted when the item is pressed. + */ diff --git a/libffqw-n810-1.0/sources/ffchartbutton.h b/libffqw-n810-1.0/sources/ffchartbutton.h new file mode 100644 index 0000000..e6a518f --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartbutton.h @@ -0,0 +1,153 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.03 + * @version 1.0 + */ + +#ifndef FFCHARTBUTTON_H +#define FFCHARTBUTTON_H + +#include +#include +#include "ffviewcache.h" + +static const qreal DEFAULT_ZOOM_RATIO = 1.2; +static const int DEFAULT_DURATION_TIME = 400; +static const int DEFAULT_FRAME_RANGE = 20; + +/** + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * @brief Extend QGraphicsSvgItem to easy use 1 or 2 image and added + * functionality to decrease and increase item after click + */ + +class FFChartButton : public QGraphicsSvgItem +{ +Q_OBJECT +public: + FFChartButton(QGraphicsItem* parent = 0); + virtual ~FFChartButton(); + + void setImage(QString path); + void setImage(QString path,QString path2); + void setSize(const QSizeF& size); + void setZoomRatio(qreal zoomRatio); + void setFrameRange(int frameRange); + void setDuration(int duration); + void scale(qreal sx, qreal sy); + + qreal zoomRatio(); + int frameRange(); + int duration(); + +protected: + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); +private: + QTimeLine* animation; ///< stores timer of animation + FFViewCache* image; ///< cached image1 + FFViewCache* image2; ///< cached image2 + + int frameRange_; ///< duration of one frame + int duration_; ///< duration of animation + qreal zoomRatio_; ///< ratio of zooming + qreal sizeRatio; ///< ratio of resizing + QPointF startingPosition; ///< point of starting position on the scene + bool startedTimeLine; ///< true if animation is started + qreal scaleWidth ; ///< scale's ratio of width + qreal scaleHeight ; ///< scale's ratio of height + + bool twoImageON; ///< is true when two images are set + bool state; ///< stores information about it in which state currently is button. + + void init(); + +signals: + void mouseRelease(); + void mousePress(); + +private slots: + void tick(int frame); + void animationFinished(); +}; + +#endif // FFCHARTBUTTON_H diff --git a/libffqw-n810-1.0/sources/ffchartlegend.cpp b/libffqw-n810-1.0/sources/ffchartlegend.cpp new file mode 100644 index 0000000..81c7c0f --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartlegend.cpp @@ -0,0 +1,390 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegend.cpp + * @brief Implementation of the FFChartLegend class + * + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + */ +#include "ffchartlegend.h" + +/** + * Constructs a FFChartLegend with a parent. + */ +FFChartLegend::FFChartLegend(QWidget* parent) : + FFAbstractWidget(parent) +{ + this->parent = parent; + init(); +} + +/** + * A virtual destructor. + */ +FFChartLegend::~FFChartLegend() +{ + int num = legendSeriesTable.size(); + for(int i = 0; i < num; ++i) + { + delete legendSeriesTable.at(0); + legendSeriesTable.remove(0); + } +} + +/** + * Initiates all needed fields and functionality + */ +void FFChartLegend::init() +{ + //sets default values + path = LEGEND_PATH; + + backgroundColor = DEFAULT_LEGEND_BACKGROUND_COLOR; + backgroundOpacity = DEFAULT_LEGEND_BACKGROUND_OPACITY; + + actualChangingSeries = NULL; + + //set style + setStyleSheet("background-color: transparent"); + + //sets layout + legendLayout = new QGridLayout(this); + legendLayout ->setMargin(0); + this->setLayout(legendLayout); + + legendScrollArea = new FFScrollArea(this); + legendScrollArea->setFrameStyle(0); + legendScrollAreaItem = new QWidget(legendScrollArea); + legendScrollAreaLayout = new QGridLayout(legendScrollAreaItem); + legendScrollAreaItem->setLayout(legendScrollAreaLayout); + legendScrollAreaLayout->setMargin(0); + legendScrollAreaLayout->setSpacing(5); + + legendScrollAreaItem->setStyleSheet("background-color: transparent"); + legendScrollArea->setWidget(legendScrollAreaItem); + legendScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + legendScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + legendScrollArea->setFrameStyle(0); + + legendLayout->addWidget(legendScrollArea); + + legendControlPanel = new FFChartLegendControlPanel(this); + legendControlPanel->hide(); + + //connects + connect(legendControlPanel, + SIGNAL(penChanged(QPen)), + this, + SLOT(changeSeriesPen(QPen))); +} + +/** + * Supports click event. Shows or hide chart's legend + */ +void FFChartLegend::popUp() +{ + if(isVisible()) + { + this->hide(); + } + else + { + this->show(); + } + +} + +/** + * It updates size of FFChartLegend's elements + * Calls changeSize() method + */ +void FFChartLegend::resizeEvent(QResizeEvent* event) +{ + Q_UNUSED(event) + if(this->isVisible()) + { + changeSize(); + } + +} +/** + * Fits size of FFChartLegend's elements chart when show event appeared. + * Calls changeSize() method. + */ +void FFChartLegend::showEvent(QShowEvent* event) +{ + Q_UNUSED(event) + + changeSize(); +} + +/** + * Add series to FFChartLegend. + * + * @param series is a pointer to series on a FFChart + */ +void FFChartLegend::addSeries(FFChartSeries* series) +{ + //creates buttons representing series + FFScrollingCheckBox* visibleCheckbox = + new FFScrollingCheckBox(legendScrollAreaItem); + FFLineButton* modifyButton = new FFLineButton(legendScrollAreaItem); + + //sets series name in buttons + visibleCheckbox->setDescription(series->name()); + visibleCheckbox->setChecked(series->isVisible()); + visibleCheckbox->disableTitle(true); + visibleCheckbox->setTopMargin(8); + visibleCheckbox->setBottomMargin(8); + visibleCheckbox->setRightMargin(2); + visibleCheckbox->setLeftMargin(2); + visibleCheckbox->setAttribute(Qt::WA_DeleteOnClose); + + modifyButton->setPen(*series->pen()); + modifyButton->setAttribute(Qt::WA_DeleteOnClose); + + SeriesContainer* tempSeriesPointer = + new SeriesContainer(series, + visibleCheckbox, + modifyButton); + //adds seriesContener to series table + legendSeriesTable.append(tempSeriesPointer); + + //adds buttons to layout + legendScrollAreaLayout->addWidget(legendSeriesTable.at(legendSeriesTable.size() + - 1)->visibleCheckBox_, + legendSeriesTable.size() - 1, + 0, + 1, + 2); + legendScrollAreaLayout->addWidget(legendSeriesTable.at(legendSeriesTable.size() + - 1)->controlPanelButton_, + legendSeriesTable.size() - 1, + 2, + 1, + 1); + + //connecting buttons to legend + connect(modifyButton, + SIGNAL(clicked()), + this, + SLOT(chooseChangingSeries())); + connect(visibleCheckbox, SIGNAL(clicked()), this, SLOT(changeVisible())); + changeSize(); +} + +/** + * Fits size of FFChartLegend's elements + */ +void FFChartLegend::changeSize() +{ + // sets geometry for legend elements + legendControlPanel->setGeometry(0, 0, size().width(), size().height()); + + legendScrollAreaItem->setGeometry(0, + 0, + legendScrollArea->width(), + legendSeriesTable.size() + * (DEFAULT_BUTTON_HEIGHT + + 5)); + //update legendscrollarea + legendScrollArea->setWidget(NULL); + legendScrollArea->setWidget(legendScrollAreaItem); +} + +/** + * Assign pointer on actual modified series to the temporary pointer. + */ +void FFChartLegend::chooseChangingSeries() +{ + //check which series was chosen to modification + for(int i = 0; i < legendSeriesTable.size(); i++) + { + if(legendSeriesTable.at(i)->controlPanelButton_ + == (FFLineButton*)sender()) + actualChangingSeries = legendSeriesTable.at(i); + } + + //sets and shows legendCotnrolPanel + legendControlPanel->setPen(*actualChangingSeries->series_->pen()); + legendControlPanel->show(); + if(NULL != parent) + parent->repaint(); +} + +/** + * Updates a pen of button representing actual modified series and emits + * signal to chart. + * + * @param pen represents setting series pen + */ + +void FFChartLegend::changeSeriesPen(QPen pen) +{ + actualChangingSeries->series_->setPen(pen); + actualChangingSeries->controlPanelButton_->setPen(pen); + emit updateSeries(); +} + +/** + * Updates series visibility + */ +void FFChartLegend::changeVisible() +{ + //looks for pointer to changing series and change it visibility and + //state of visibleCheckbox + + for(int i = 0; i < legendSeriesTable.size(); i++) + { + if(legendSeriesTable.at(i)->visibleCheckBox_ + == (FFScrollingCheckBox*)sender()) + { + bool + tempVisible = + !(legendSeriesTable.at(i)->series_->isVisible()); + + legendSeriesTable.at(i)->series_->setVisible(tempVisible); + legendSeriesTable.at(i)->visibleCheckBox_->setChecked(tempVisible); + } + } + + emit updateSeries(); +} + +/** + * Deletes series from series contener + * + * @param series is a pointer to series that will be removed. + */ +void FFChartLegend::deleteSeries(FFChartSeries* series) +{ + //looks for given series in legendSeriesTable and deletes it. + for(int i = 0; i < legendSeriesTable.size(); i++) + { + if(series == legendSeriesTable.at(i)->series_) + { + legendControlPanel->hide(); + + delete legendSeriesTable.at(i); + legendSeriesTable.remove(i); + } + + } + changeSize(); +} + +/** + * Draw FFChartLegend background + * @param event Contains all informations about event. + */ +void FFChartLegend::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter paint; + paint.begin(this); + paint.setOpacity(backgroundOpacity); + paint.setBrush(backgroundColor); + paint.setPen(Qt::transparent); + paint.drawRect(0, 0, width(), height()); + paint.end(); +} + +/** + \fn void FFChartLegend::updateSeries() + + This signal is emitted when the series is/are changed + */ + +/** + * Constructs a FFChartLegend with pointers to series, and buttons . + */ +SeriesContainer::SeriesContainer(FFChartSeries* series, + FFScrollingCheckBox* visibleCheckBox, + FFLineButton* controlPanelButton) +{ + series_ = series; + visibleCheckBox_ = visibleCheckBox; + controlPanelButton_ = controlPanelButton; +} + +/** + * A virtual destructor + */ +SeriesContainer::~SeriesContainer() +{ + visibleCheckBox_->close(); + controlPanelButton_->close(); +} diff --git a/libffqw-n810-1.0/sources/ffchartlegend.h b/libffqw-n810-1.0/sources/ffchartlegend.h new file mode 100644 index 0000000..7c03044 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartlegend.h @@ -0,0 +1,185 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegend.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + */ +#ifndef FFCHARTLEGEND_H +#define FFCHARTLEGEND_H +#include +#include +#include +#include +#include + +#include "ffabstractwidget.h" +#include "ffcolorcombobox.h" +#include "ffstringcombobox.h" +#include "ffscrollingcheckbox.h" +#include "fflinecombobox.h" +#include "ffchartlegendcontrolpanel.h" +#include "ffchartseries.h" +#include "ffscrollarea.h" + +static const QString LEGEND_PATH= ":/standard/";///< path to folder with graphics file + +class FFChartLegend; + +/** + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + * + * @brief A class to store series in legend + */ +class SeriesContainer +{ +private: + friend class FFChartLegend; + + SeriesContainer(FFChartSeries* series, + FFScrollingCheckBox* visibleCheck, + FFLineButton* modifyButton); + ~SeriesContainer(); + + FFChartSeries* series_; ///< pointer to series + FFScrollingCheckBox* visibleCheckBox_; ///< pointer to checkbox responsible for sieries's visiblity + + FFLineButton* controlPanelButton_; ///< pointer to button showing line's syle + +}; + +/** + * @author ComArch S.A. + * @date 2009.08.20 + * @version 1.0 + * + * @brief A class of chart's legend + */ +class FFChartLegend : public FFAbstractWidget +{ + Q_OBJECT + +public: + FFChartLegend(QWidget* parent = 0); + virtual ~FFChartLegend(); + +public slots: + void addSeries(FFChartSeries* series); + void changeSize(); + void deleteSeries(FFChartSeries* ); + +protected: + virtual void resizeEvent(QResizeEvent* event); + virtual void showEvent(QShowEvent* event); + virtual void paintEvent(QPaintEvent *event); + +private: + void init(); + + QWidget* parent; ///< pointer to parent widget + + QString path; ///< path to folder with graphics file + + QGridLayout* legendLayout; ///< legend's layout + + FFScrollArea* legendScrollArea; ///< legend's scroll area + QWidget* legendScrollAreaItem; ///< widget placed on legendscrollarea + QGridLayout* legendScrollAreaLayout; ///< layout of legenScrollAreaItem + + QVector legendSeriesTable; ///< containar of all series on the legend + + SeriesContainer* actualChangingSeries; ///< pointer to actual changing series + + FFChartLegendControlPanel* legendControlPanel; ///< panel for changing line's style + + + QColor backgroundColor; ///< legend background color + qreal backgroundOpacity; ///< legend background opacity + +private slots: + void popUp(); + void chooseChangingSeries(); + void changeVisible(); + void changeSeriesPen(QPen); + +signals: + void updateSeries(); +}; + +#endif // FFCHARTLEGEND_H diff --git a/libffqw-n810-1.0/sources/ffchartlegendcontrolpanel.cpp b/libffqw-n810-1.0/sources/ffchartlegendcontrolpanel.cpp new file mode 100644 index 0000000..55c9706 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartlegendcontrolpanel.cpp @@ -0,0 +1,277 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegendcontrolpanel.cpp + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + */ +#include +#include "ffchartlegendcontrolpanel.h" + +/** + * Constructs a FFChartLegendControlPanel with parent. + * @param parent QWidget parent + */ +FFChartLegendControlPanel::FFChartLegendControlPanel(QWidget* parent) : + FFAbstractWidget(parent) +{ + this->parent = parent; + init(); +} + +/** + * A virtual destructor. + */ +FFChartLegendControlPanel::~FFChartLegendControlPanel() +{ + parent = NULL; + +} + +/** + * Returns pen_ - pen with line style, line color and line width + */ +QPen FFChartLegendControlPanel::pen() +{ + return pen_; +} + +/** + * Sets pen_ - pen with line style, line color and line width + */ +void FFChartLegendControlPanel::setPen(QPen pen) +{ + pen_ = pen; + colorSelector->setCurrentColor(pen.color()); + styleSelector->setCurrentLine(pen.style()); + thicknessSelector->setCurrentLine(pen.width()); +} + +/** + * Initiates all needed fields + */ +void FFChartLegendControlPanel::init() +{ + // sets default values + setAutoFillBackground(true); + + backgroundColor = DEFAULT_LEGEND_BACKGROUND_COLOR; + backgroundOpacity = DEFAULT_LEGEND_BACKGROUND_OPACITY; + + //Initialize pen_ + pen_.setWidth(0); + pen_.setStyle(Qt::SolidLine); + pen_.setColor(Qt::transparent); + + //sets hide button + hideButton = new FFAbstractButton(this); + + hideButton->setMargins(0, 0, 5, 5); + hideButton->setIconAlignment(Qt::AlignRight); + hideButton->setIcon(QIcon(QPixmap(":/standard/combo_colorarrow.svg"))); + + //creates selectors + colorSelector = new FFColorComboBox(this); + thicknessSelector = new FFLineComboBox(this); + styleSelector = new FFLineComboBox(this); + + //sets selectors and add needed items + QBrush emptyBrush(QColor(20, 80, 0)); + thicknessSelector->setTitle("Thickness's chooser"); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 1)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 2)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 3)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 4)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 5)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 6)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 7)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 8)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 9)); + thicknessSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 10)); + + styleSelector->setTitle("Style's chooser"); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::SolidLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::DashLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), 6, Qt::DotLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::DashDotDotLine)); + styleSelector->addItem(QPen(QBrush(qRgb(100, 100, 100)), + 6, + Qt::DashDotLine)); + + colorSelector->addItem(QColor(125, 125, 125)); + colorSelector->addItem(QColor(255, 0, 0)); + colorSelector->addItem(QColor(0, 255, 0)); + colorSelector->addItem(QColor(0, 0, 255)); + colorSelector->addItem(QColor(255, 255, 0)); + colorSelector->addItem(QColor(255, 255, 255)); + colorSelector->addItem(QColor(0, 255, 255)); + colorSelector->addItem(QColor(255, 0, 255)); + colorSelector->addItem(QColor(255, 255, 255)); + colorSelector->setCols(2); + + //creates and sets layout of controlPanel + gLayout = new QGridLayout(this); + gLayout->setMargin(0); + + gLayout->addWidget(thicknessSelector, 0, 0); + gLayout->addWidget(styleSelector, 1, 0); + gLayout->addWidget(colorSelector, 2, 0); + gLayout->addWidget(hideButton, 3, 0); + + //empty item added to layout + QSpacerItem* horizontalSpacer = new QSpacerItem(1, + 1, + QSizePolicy::Expanding, + QSizePolicy::Expanding); + gLayout->addItem(horizontalSpacer, 4, 0); + + //connects + connect(thicknessSelector, + SIGNAL(activated(QVariant)), + this, + SLOT(thicknessChanged(QVariant))); + connect(styleSelector, + SIGNAL(activated(QVariant)), + this, + SLOT(styleChanged(QVariant))); + connect(colorSelector, + SIGNAL(activated(QVariant)), + this, + SLOT(colorChanged(QVariant))); + connect(hideButton, SIGNAL(clicked()), this, SLOT(hide())); +} + +/** + * Slot to support sizeChooser and emit signal to legend + */ +void FFChartLegendControlPanel::thicknessChanged(QVariant localPen) +{ + pen_.setWidth(localPen.value ().width()); + emit penChanged(pen_); + +} + +/** + * Slot to support styleChooser and emit signal to legend + */ +void FFChartLegendControlPanel::styleChanged(QVariant localPen) +{ + pen_.setStyle(localPen.value ().style()); + emit penChanged(pen_); +} + +/** + * Slot to support colorChooserand emit signal to legend + */ +void FFChartLegendControlPanel::colorChanged(QVariant localPen) +{ + pen_.setColor(localPen.value ().color()); + emit penChanged(pen_); +} + +/** + * Slot to support hide feature + */ +void FFChartLegendControlPanel::hide() +{ + QWidget::hide(); + if(NULL != parent) + parent->parentWidget()->repaint(geometry()); +} + +/** + * Draws FFLegendControlPanel's background + * @param event Contains all informations about event. + */ +void FFChartLegendControlPanel::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter paint; + paint.begin(this); + paint.setOpacity(backgroundOpacity); + paint.setBrush(backgroundColor); + paint.setPen(Qt::transparent); + paint.drawRect(0, 0, width(), height()); + paint.end(); +} + diff --git a/libffqw-n810-1.0/sources/ffchartlegendcontrolpanel.h b/libffqw-n810-1.0/sources/ffchartlegendcontrolpanel.h new file mode 100644 index 0000000..f896e30 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartlegendcontrolpanel.h @@ -0,0 +1,148 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartlegendcontrolpanel.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + */ + +#ifndef FFCHARTLEGENDCONTROLPANEL_H +#define FFCHARTLEGENDCONTROLPANEL_H + +#include +#include +#include +#include + +#include "ffabstractwidget.h" +#include "ffcolorcombobox.h" +#include "fflinecombobox.h" +#include "ffstringcombobox.h" + +/** + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + * + * @brief A class providing interface to modifying series pen. + */ +class FFChartLegendControlPanel: public FFAbstractWidget +{ + Q_OBJECT +public: + FFChartLegendControlPanel(QWidget* parent=0); + + virtual ~FFChartLegendControlPanel(); + + QPen pen(); + + void setPen(QPen pen); + +public slots: + //slots to support sizeChooser styleChooser and color chooser + void colorChanged(QVariant localPen); + void thicknessChanged(QVariant localPen); + void styleChanged(QVariant localPen); + + void hide(); + +protected: + virtual void paintEvent(QPaintEvent *event); + +private: + void init(); + + QMap styleMap; /// sizeMap; ///< map with pen's thickness + + QPen pen_; ///< pen of actual series + + FFLineComboBox* thicknessSelector; ///< thickness's selector + FFLineComboBox* styleSelector; ///< syle's selector + FFColorComboBox* colorSelector; ///< color's selector + FFAbstractButton* hideButton;///< button to hide controlPanel + + QGridLayout* gLayout; ///< layout of controlPanel + + QColor backgroundColor; ///< background's color + qreal backgroundOpacity; ///< background's opacity + QWidget* parent; ///< pointer to parent +signals: + void penChanged(QPen pen); +}; + +#endif // FFCHARTLEGENDCONTROLPANEL_H diff --git a/libffqw-n810-1.0/sources/ffchartscene.cpp b/libffqw-n810-1.0/sources/ffchartscene.cpp new file mode 100644 index 0000000..292951e --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartscene.cpp @@ -0,0 +1,903 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartscene.cpp + * @brief Implementation of the FFChartScene class. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#include "ffchartscene.h" + +// ############################################################ CONSTRUCTORS + +/** + * Constructs a FFChartScene with a parent. + */ +FFChartScene::FFChartScene(QObject* parent) : + QGraphicsScene(parent) +{ + init(); +} + +/** + * A virtual destructor. + */ +FFChartScene::~FFChartScene() +{ + +} + +/** + * Initiates an object of FFChartScene. Sets all needed fields connections. + * It is called by all constructors. + */ +void FFChartScene::init() +{ + //sets default configuration + moveModeSw = false; + zoomModeSw = false; + kineticCount = 0; + + accumulatedZoomFactor_ = QSize(1, 1); + QBrush zoomRectBrush(QColor(60, 80, 60)); + + QPen zoomRectPen; + zoomRectPen.setBrush(zoomRectBrush); + zoomRectPen.setColor(QColor(80, 180, 80)); + zoomRectPen.setWidth(3); + + zoomRect = new QGraphicsRectItem; + zoomRect->setPen(zoomRectPen); + zoomRect->setBrush(zoomRectBrush); + setBackgroundBrush(QBrush(QColor(30, 30, 30))); + + timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(kineticScroll())); + + zoomInButton.moveBy(10,10); + zoomOutButton.moveBy(10,90); + legendButton.moveBy(10, sceneRect().height() - 70); + + subaxesSpacing_ = 40; + subaxesPen_.setColor(QColor(80,80,80)); + subaxesPen_.setStyle(Qt::DashLine); + subaxesPen_.setCosmetic(true); + + axesValuesPen_.setColor(QColor(240, 240, 240)); + + //adds button to chart + addItem(&zoomInButton); + addItem(&zoomOutButton); + addItem(&legendButton); + + + + //connects + connect(&zoomInButton, SIGNAL(mouseRelease()), this, SLOT(zoomIn())); + connect(&zoomOutButton, SIGNAL(mouseRelease()), this, SLOT(zoomOut())); + connect(&legendButton, SIGNAL(mouseRelease()), parent(), SLOT(showLegend())); + + //sets chart's buttons + zoomInButton.setImage(":/standard/chart_zoomin"); + zoomOutButton.setImage(":/standard/chart_zoomout"); + legendButton.setImage(":/standard/chart_legendON",":/standard/chart_legendOFF"); + + zoomInButton.setZoomRatio(1.4); + zoomOutButton.setZoomRatio(0.6); + legendButton.setZoomRatio(1.4); + + zoomInButton.setSize(QSize(60, 60)); + zoomOutButton.setSize(QSize(60, 60)); + legendButton.setSize(QSize(60, 60)); + +} + +// ################################################################## PUBLIC + +/** + * Moves given point of chart to the scene's top left corner. + */ +void FFChartScene::moveTo(QPoint point) +{ + translateFactor_ = point; + update(); +} + +/** + * Moves given point of chart to the scene's top left corner. + */ +void FFChartScene::moveTo(float x, float y) +{ + translateFactor_ = QPointF(x, y); + update(); +} + +/** + * Moves the chart by a given vector. + */ +void FFChartScene::moveBy(QPoint destPoint) +{ + translateFactor_ += destPoint; + update(); +} + +/** + * Moves the chart by a given vector. + */ +void FFChartScene::moveBy(float x, float y) +{ + translateFactor_ += QPointF(x, y); + update(); +} + +/** + * Adds set of points to chart. + */ +void FFChartScene::addSeries(FFChartSeries* series) +{ + this->series.append(series); + itemsBoundingRect_ = itemsBoundingRect(&itemsBoundingValues_); + + update(); + + emit seriesChanged(this->series); +} + +/** + * Sets a list of series. + */ +void FFChartScene::setSeries(QList series) +{ + this->series = series; + itemsBoundingRect_ = itemsBoundingRect(&itemsBoundingValues_); + + update(); + + emit seriesChanged(&series); +} + +/** + * Overridden method from QGraphicsScene. + */ +void FFChartScene::setSceneRect(const QRectF& rect) +{ + QGraphicsScene::setSceneRect(rect); + legendButton.setPos(10, rect.height() - 70); + + translateFactor_.setX(rect.width() * 0.5); + translateFactor_.setY(rect.height() * 0.5); + + sceneRec = rect; +} + +/** + * Sets a distance in pixels between subaxes. + */ +void FFChartScene::setSubaxesSpacing(const float& subaxesSpacing) +{ + subaxesSpacing_ = subaxesSpacing; +} + +/** + * Returns a distance in pixels between subaxes. + */ +float FFChartScene::subaxesSpacing() const +{ + return subaxesSpacing_; +} + +/** + * Sets a pen that will be used to draw subaxes. + */ +void FFChartScene::setSubaxesPen(const QPen& subaxesPen) +{ + subaxesPen_ = subaxesPen; +} + +/** + * Returns a pen that is used to draw subaxes. + */ +QPen FFChartScene::subaxesPen() const +{ + return subaxesPen_; +} + +/** + * Sets a pen that will be used to draw values next to subaxes. + */ +void FFChartScene::setAxesValuesPen(const QPen& axesValuesPen) +{ + axesValuesPen_ = axesValuesPen; +} + +/** + * Returns a pen that is used to draw values next to subaxes. + */ +QPen FFChartScene::axesValuesPen() const +{ + return axesValuesPen_; +} + +// ############################################################ PUBLIC SLOTS + +/** + * Zooms the chart into the given rectangle. + */ +void FFChartScene::zoom(QRectF zoomRect) +{ + // Normalizing zoom rectangle (width and height must are greater than 0) + QRectF zoomRectNormalized(zoomRect); + if(zoomRect.width() < 0) + { + zoomRectNormalized.setX(zoomRect.x() + zoomRect.width()); + zoomRectNormalized.setWidth(qAbs(zoomRect.width())); + } + if(zoomRect.height() < 0) + { + zoomRectNormalized.setY(zoomRect.y() + zoomRect.height()); + zoomRectNormalized.setHeight(qAbs(zoomRect.height())); + } + + // Calculating zoom factor for scale() function ( >1 zoomin, <1 zoomout ) + QSizeF zoomFactor(sceneRec.width() / zoomRectNormalized.width(), + sceneRec.height() / zoomRectNormalized.height()); + + accumulatedZoomFactor_.setWidth(zoomFactor.width() + * accumulatedZoomFactor_.width()); + accumulatedZoomFactor_.setHeight(zoomFactor.height() + * accumulatedZoomFactor_.height()); + //checking if factor of zooming is not to high + if(accumulatedZoomFactor_.width() > 20 || accumulatedZoomFactor_.height() > 20) + { + accumulatedZoomFactor_.setWidth(20); + accumulatedZoomFactor_.setHeight(20); + return; + } + + + + translateFactor_ = QPointF((translateFactor_.x() + - zoomRectNormalized.x()) + * zoomFactor.width(), + (translateFactor_.y() + - zoomRectNormalized.y()) + * zoomFactor.height()); + + update(); +} + +/** + * Slot that changes series' set. + */ +void FFChartScene::seriesChanged(QList series) +{ + setSeries(series); +} + +/** + * Slot that zooms in the current chart into a rectangle which is smaller by + * a given ratio. + */ +void FFChartScene::zoomIn(qreal ratio) +{ + qreal dx, dy; + + if(accumulatedZoomFactor_.width() > 15) + { + dx = 0; + } + else + { + dx = ratio * sceneRec.width(); + } + + if(accumulatedZoomFactor_.height() > 15) + { + dy = 0; + } + else + { + dy = ratio * sceneRec.height(); + } + + zoom(QRectF(dx, dy, sceneRec.width() - 2 * dx, sceneRec.height() - 2 + * dy)); +} + +/** + * Slot that zooms out the current chart into a rectangle which is larger by + * a given ratio. + */ +void FFChartScene::zoomOut(qreal ratio) +{ + qreal dx, dy; + + if(accumulatedZoomFactor_.width() < 0.1) + { + dx = 0; + } + else + { + dx = ratio * sceneRec.width(); + } + + if(accumulatedZoomFactor_.height() < 0.1) + { + dy = 0; + } + else + { + dy = ratio * sceneRec.height(); + } + + zoom(QRectF(-dx, -dy, sceneRec.width() + 2 * dx, sceneRec.height() + 2 + * dy)); +} + +// ############################################################### PROTECTED + +/** + * Overridden method from QGraphicsScene. Draws all items that should be seen + * on the chart. + */ +void FFChartScene::drawItems(QPainter* painter, + int numItems, + QGraphicsItem* items[], + const QStyleOptionGraphicsItem options[], + QWidget* widget) +{ + Q_UNUSED(items) + Q_UNUSED(numItems) + Q_UNUSED(options) + + // Drawing zoom rectangle + if(zoomModeSw) + { + zoomRect->paint(painter, new QStyleOptionGraphicsItem, widget); + } + + painter->scale(1, 1); + + + // Drawing subaxes + drawSubAxes(painter, widget); + + // Drawing axes + drawAxes(painter, widget); + + // Drawing series + drawSeries(painter, widget); + + // Drawing axes values + drawValues(painter, widget); + + // Drawing static items + drawStaticItems(painter, widget); +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse press event. + * @param event Contains all informations about event. + */ +void FFChartScene::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QGraphicsScene::mousePressEvent(event); + + kinetic = false; + timer->stop(); + kineticCount = 0; + + if(itemAt(event->scenePos())) + { + return; + } + + pressPos = event->scenePos(); + moveModeSw = true; + zoomModeSw = false; + + if(timer->isActive() == false) + { + timer->start(80); + } + + update(); +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse double click event. + * @param event Contains all informations about event. + */ +void FFChartScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + if(itemAt(event->scenePos())) + { + return; + } + + zoomModeSw = true; + moveModeSw = false; + kinetic = false; + kineticCount = 0; + + zoomRect->setRect(event->scenePos().x(), event->scenePos().y(), 1, 1); + update(); +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse release event. + * @param event Contains all informations about event. + */ +void FFChartScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QGraphicsScene::mouseReleaseEvent(event); + + if(zoomModeSw) // zooming + { + zoomModeSw = false; + + if(qAbs(zoomRect->rect().width()) <= 15 + || qAbs(zoomRect->rect().height()) <= 15) + { + update(); + return; + } + + zoom(zoomRect->rect()); + update(); + } + else if(moveModeSw) //moving + { + moveModeSw = false; + + if(oldKineticVec != kineticVec && kineticCount > 2 && zoomModeSw == false) + { + kinetic = true; + kineticVec *= kineticRatio; + } + else + { + kinetic = false; + timer->stop(); + } + } +} + +/** + * Overridden virtual method from QGraphicsScene. It is responsible for + * handling a mouse move event. + * @param event Contains all informations about event. + */ +void FFChartScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + + //if button's type is not left button return + if(event->buttons() != Qt::LeftButton) + { + return; + } + + kineticCount++; + + //updates parameters + //zooming mode + if(zoomModeSw) + { + zoomRect->setRect(pressPos.x(), + pressPos.y(), + event->scenePos().x() - pressPos.x(), + event->scenePos().y() - pressPos.y()); + } + //moving mode + else if(moveModeSw) + { + QPointF scrollRatio(event->scenePos().x() - pressPos.x(), + event->scenePos().y() - pressPos.y()); + + oldPressPos = pressPos; + pressPos = event->scenePos(); + translateFactor_ += scrollRatio; + } + update(); +} + +// ################################################################ PPRIVATE + +/** + * Returns a rectangle around all points in series + * @param boundaryValues vector of boundary values + * @return bounding rectangle QRectF + */ +QRectF FFChartScene::itemsBoundingRect(QVector* boundaryValues) +{ + //if any series are available returns zero rectangle + if(series.isEmpty()) + { + return QRectF(0, 0, 0, 0); + } + //if only one series is available returns rectangle for points from one + //series + if(series.size() == 1 && series.at(0)->size() == 1) + { + return QRectF(series.at(0)->at(0)->x(), + series.at(0)->at(0)->y(), + 0, + 0); + } + //looks for maximum points in all series + float minX = series.at(0)->at(0)->x(); + float maxX = series.at(0)->at(0)->x(); + float minY = series.at(0)->at(0)->y(); + float maxY = series.at(0)->at(0)->y(); + + for(int i = 0; i < series.size(); ++i) + { + for(int j = 0; j < series.at(i)->size(); ++j) + { + if(series.at(i)->at(j)->x() < minX) + { + minX = series.at(i)->at(j)->x(); + } + + if(series.at(i)->at(j)->y() < minY) + { + minY = series.at(i)->at(j)->y(); + } + + if(series.at(i)->at(j)->x() > maxX) + { + maxX = series.at(i)->at(j)->x(); + } + + if(series.at(i)->at(j)->y() > maxY) + { + maxY = series.at(i)->at(j)->y(); + } + } + } + + if(boundaryValues) + { + boundaryValues->clear(); + boundaryValues->append(minX); + boundaryValues->append(minY); + boundaryValues->append(maxX); + boundaryValues->append(maxY); + } + + return QRectF(minX, maxY, maxX - minX, maxY - minY); +} + +/** + * Slot that zooms in by default value. + */ +void FFChartScene::zoomIn() +{ + zoomIn(defaultZoomInRatio); +} + +/** + * Slot that zooms out by default value. + */ +void FFChartScene::zoomOut() +{ + zoomOut(defaultZoomOutRatio); +} + +/** + * Draws main axes. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawAxes(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget) + + painter->save(); + + painter->setPen(QColor(255, 255, 250)); + + // horizontal + painter->drawLine(QPointF(0, + translateFactor_.y()), + QPointF(sceneRec.width(), + translateFactor_.y())); + + // vertical + painter->drawLine(QPointF(translateFactor_.x(), + 0), + QPointF(translateFactor_.x(), + sceneRec.height())); + + painter->restore(); +} + +/** + * Draws subaxes. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawSubAxes(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget); + + painter->save(); + + //draws horizontal lines + int subaxesNumber = (int)(sceneRec.height() / subaxesSpacing_); + qreal offset = translateFactor_.y() - (qFloor(translateFactor_.y() / subaxesSpacing_)) * subaxesSpacing_; + + painter->setPen(subaxesPen_); + + int i; + for(i = 0; i <= subaxesNumber; i++) + { + painter->drawLine(QPointF(0, + offset + i * subaxesSpacing_), + QPointF(sceneRec.width(), + offset + i * subaxesSpacing_)); + } + + //draws vertical lines + subaxesNumber = (int)(sceneRec.width() / subaxesSpacing_); + offset = translateFactor_.x() - (qFloor(translateFactor_.x() / subaxesSpacing_)) * subaxesSpacing_; + + for(i = 0; i <= subaxesNumber; i++) + { + painter->drawLine(QPointF(offset + i * subaxesSpacing_, + 0), + QPointF(offset + i * subaxesSpacing_, + sceneRec.height())); + } + painter->restore(); + +} + +/** + * Draws all series on the chart. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawSeries(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget) + + //saves old painter + painter->save(); + //sets painter's configuration + painter->translate(translateFactor_); + painter->scale(accumulatedZoomFactor_.width(), + accumulatedZoomFactor_.height()); + + transform = painter->transform(); + transform.rotate(180, Qt::XAxis); + painter->setTransform(transform, false); + + //draws series + for(int i = 0; i < series.size(); ++i) + { + if(!series.at(i)->isVisible()) + { + continue; + } + + painter->setPen(*series.at(i)->pen()); + painter->drawPolyline(series.at(i)->data(), series.at(i)->size()); + } + //restores paitner + painter->restore(); +} + +/** + * Draws static items (they are not moving and being scaled) on the chart, + * e.g. zoom buttons. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawStaticItems(QPainter* painter, QWidget* widget) +{ + //draws zoomInButton + painter->save(); + painter->setMatrix(zoomInButton.sceneMatrix(), true); + zoomInButton.paint(painter, new QStyleOptionGraphicsItem, widget); + painter->restore(); + + //draws zoomOutButton + painter->save(); + painter->setMatrix(zoomOutButton.sceneMatrix(), true); + zoomOutButton.paint(painter, new QStyleOptionGraphicsItem, widget); + painter->restore(); + + //draws legendButton + painter->save(); + painter->setMatrix(legendButton.sceneMatrix(), true); + legendButton.paint(painter, new QStyleOptionGraphicsItem, widget); + painter->restore(); +} + +/* + * Draws values next to subaxes. + * @param painter a tool to drawing elements + * @param widget points to the widget where elements will be drew + */ +void FFChartScene::drawValues(QPainter* painter, QWidget* widget) +{ + Q_UNUSED(widget) + //saves painter + painter->save(); + + //sets painter + painter->setPen(axesValuesPen_); + painter->setFont(QFont(FONT_TITLE_DEF, 10)); + + //sets needed values + subaxesSpacing_ *= 2; + + //drawing values of axes + int subaxesNumber = (int)(sceneRec.height() / subaxesSpacing_); + qreal offset = translateFactor_.y() - (qFloor(translateFactor_.y() / subaxesSpacing_)) * subaxesSpacing_; + + int i; + + + if(translateFactor_.x() < 0) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(1, offset + i * subaxesSpacing_ + 11), QString::number((-translateFactor_.y() + offset + i * subaxesSpacing_) / -accumulatedZoomFactor_.height(), 'f', 1)); + } + } + else if(translateFactor_.x() > sceneRec.width()) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QRectF(sceneRec.width() - 305, offset + i * subaxesSpacing_ + 11, 300, 11), Qt::AlignRight | Qt::AlignVCenter, QString::number((-translateFactor_.y() + offset + i * subaxesSpacing_) / -accumulatedZoomFactor_.height(), 'f', 1)); + } + } + else + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(translateFactor_.x() + 1, offset + i * subaxesSpacing_ + 11), QString::number((-translateFactor_.y() + offset + i * subaxesSpacing_) / -accumulatedZoomFactor_.height(), 'f', 1)); + } + } + + subaxesNumber = (int)(sceneRec.width() / subaxesSpacing_); + offset = translateFactor_.x() - (qFloor(translateFactor_.x() / subaxesSpacing_)) * subaxesSpacing_; + + if(translateFactor_.y() < 0) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(offset + i * subaxesSpacing_ + 1, 11), QString::number((-translateFactor_.x() + offset + i * subaxesSpacing_) / accumulatedZoomFactor_.width(), 'f', 1)); + } + } + else if(translateFactor_.y() > sceneRec.height()) + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(offset + i * subaxesSpacing_ + 1, sceneRec.height() - 5), QString::number((-translateFactor_.x() + offset + i * subaxesSpacing_) / accumulatedZoomFactor_.width(), 'f', 1)); + } + } + else + { + for(i = -1; i <= subaxesNumber; i++) + { + painter->drawText(QPointF(offset + i * subaxesSpacing_ + 1, translateFactor_.y() + 11), QString::number((-translateFactor_.x() + offset + i * subaxesSpacing_) / accumulatedZoomFactor_.width(), 'f', 1)); + } + } + + subaxesSpacing_ /= 2; + + painter->restore(); +} + +/** + * This method is responsible for kinetic scrolling. + */ +void FFChartScene::kineticScroll() +{ + //check if kinetic mode is active + if(kinetic) + { + translateFactor_ += kineticVec; + + if(qAbs((kineticVec *= 0.8).x()) < 0.5 && qAbs((kineticVec + *= 0.8).y()) < 0.5) + { + timer->stop(); + kinetic = false; + } + + update(); + } + //otherwise updates kinetic's vectors + else + { + oldKineticVec = kineticVec; + kineticVec = pressPos - oldPressPos; + } +} + +/*! + * \fn void FFChartScene::seriesChanged(QList*); + * + * Signal that is emitted when the set of series has changed. + */ diff --git a/libffqw-n810-1.0/sources/ffchartscene.h b/libffqw-n810-1.0/sources/ffchartscene.h new file mode 100644 index 0000000..64203a8 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartscene.h @@ -0,0 +1,214 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartscene.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#ifndef FFCHARTSCENE_H +#define FFCHARTSCENE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ffchartseries.h" +#include "ffchartbutton.h" +#include "ffabstractwidget.h" +#include +/** + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + * + * @brief Reimplemented a QGraphicsScene class. It is used by the FFChart class + * to whole drawing. + */ + +class FFChartScene : public QGraphicsScene +{ +Q_OBJECT +public: + FFChartScene(QObject* parent = 0); + virtual ~FFChartScene(); + + void moveTo(QPoint point); + void moveTo(float x, float y); + void moveBy(QPoint destPoint); + void moveBy(float x, float y); + + void addSeries(FFChartSeries* series); + void setSeries(QList series); + + void setSceneRect(const QRectF& rect); + + void setSubaxesSpacing(const float& subaxesSpacing); + float subaxesSpacing() const; + + void setSubaxesPen(const QPen& subaxesPen); + QPen subaxesPen() const; + + void setAxesValuesPen(const QPen& axesValuesPen); + QPen axesValuesPen() const; + +public slots: + void seriesChanged(QList series); + void zoom(QRectF zoomRect); + void zoomIn(qreal ratio); + void zoomOut(qreal ratio); + +signals: + void seriesChanged(QList*); + +protected: + void drawItems(QPainter* painter, + int numItems, + QGraphicsItem* items[], + const QStyleOptionGraphicsItem options[], + QWidget * widget); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + +private: + QTimer* timer; ///< animation's timer + + QTransform transform; ///< tool uses to transformations + + float subaxesSpacing_; ///< spacing between suaxes + QPen subaxesPen_; ///< a pen of subaxes + QPen axesValuesPen_; ///< a pen of subaxes' values + + QPointF translateFactor_; ///< new point of scene's top left corner + + QSizeF accumulatedZoomFactor_; ///< accumulates factor of zooming + QPointF pressPos; ///< stores actual press position + QPointF oldPressPos;///< stores old press position + QPointF kineticVec; ///< stores kintetic vector + QPointF oldKineticVec; ///< stores old kinetic vector + + QRectF itemsBoundingRect_; ///< bounding rectangle of items + + QVector itemsBoundingValues_; ///< stores items' bounding values + QRectF sceneRec; ///< stores scene's rectangle + + QGraphicsRectItem* zoomRect; ///< stores pointer to zoom rectangle + + FFChartButton zoomInButton; ///< button to zooming in + FFChartButton zoomOutButton; ///< button to zooming out + FFChartButton legendButton; ///< button to showing legend + QList staticItems; ///< list of items on the scene + QList series; ///< list of series + + bool zoomModeSw; ///< true if zooming mode is active + bool moveModeSw; ///< true if moving mode is active + bool kinetic; ///< true if kinetic is active + + int kineticCount; ///< kinetic's counter + + void init(); + QRectF itemsBoundingRect(QVector* boundaryValues = 0); + + void drawAxes(QPainter* painter, QWidget* widget); + void drawSubAxes(QPainter* painter, QWidget* widget); + void drawSeries(QPainter* painter, QWidget* widget); + void drawStaticItems(QPainter* painter, QWidget* widget); + void drawValues(QPainter* painter, QWidget* widget); + +private slots: + void kineticScroll(); + void zoomIn(); + void zoomOut(); + +private: + static const qreal kineticRatio = 1.5; ///< ratio of kinetic scolling + static const qreal defaultZoomInRatio = 0.2; ///< ratio of zoom in + static const qreal defaultZoomOutRatio = 1.0;///< ratio of zoom out +}; +#endif // FFCHARTSCENE diff --git a/libffqw-n810-1.0/sources/ffchartseries.cpp b/libffqw-n810-1.0/sources/ffchartseries.cpp new file mode 100644 index 0000000..404dbf8 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartseries.cpp @@ -0,0 +1,308 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartseries.cpp + * @brief Implementation of the FFChartSeries class. + * + * @author ComArch S.A. + * @date 2009.09.01 + * @version 1.1 + */ + +#include "ffchartseries.h" + +/** + * Construct FFSeries + */ +FFChartSeries::FFChartSeries() +{ + init(); +} +/** + * Constructs a FFChartSeries with points' vector and name. + * + */ +FFChartSeries::FFChartSeries(const QVector& series, + const QString& name) +{ + init(); + pen_ = QPen(); + set(series,name); +} +/** + * Constructs a FFChartSeries with points' vector, pen and name. + */ +FFChartSeries::FFChartSeries(const QVector& series, + const QPen& pen, + const QString& name) +{ + init(); + set(series,pen,name); +} +/** + * A virtual destructor. + */ +FFChartSeries::~FFChartSeries() +{ + ; +} +/** + * Sets default values + */ +void FFChartSeries::init() +{ + visibility_ = true; +} + +/** + * Returns series's name + */ +QString FFChartSeries::name() const +{ + return name_; +} +/** + * Returns series's pen + */ +QPen* FFChartSeries::pen() +{ + return &pen_; +} +/** + * Returns true if series is visible + */ +bool FFChartSeries::isVisible() +{ + return visibility_; + +} +/** + * Sets series's name + */ +void FFChartSeries::setName(const QString& name) +{ + name_ = name; +} +/** + * Sets series's pen + */ +void FFChartSeries::setPen(const QPen& pen) +{ + pen_ = pen; +} +/** + * Sets series's points and name + */ +void FFChartSeries::set(const QVector& series, + const QString& name) +{ + //call set function with previously created Pen + set(series,this->pen_,name); +} +/** + * Sets series's points,pen nad name + */ +void FFChartSeries::set(const QVector& series, + const QPen& pen, + const QString& name) +{ + series_ = series; + pen_ = pen; + name_ = name; + +} +/** + * Sets series's color + */ +void FFChartSeries::setColor(const QColor& color) +{ + pen_.setColor(color); +} +/** + * Sets pen's style + */ +void FFChartSeries::setStyle(const Qt::PenStyle& style) +{ + pen_.setStyle(style); +} +/** + * Sets series's visibility + */ +void FFChartSeries::setVisible(bool visibility) +{ + visibility_ = visibility; +} +/** + * Sorts series's points + */ +void FFChartSeries::sort() +{ + sort(0,series_.size()-1); +} +/** + * Validates series's points. Removes points with repeated x value. + */ +void FFChartSeries::validate() +{ + int current; + + for(int i=0; ii; j--) + { + if(series_[j].x() == current) + { + for(int k=j;k>=i;k--) + { + if(series_[j].x()==current) + { + series_.remove(k); + } + } + break; + } + } + } +} +/** + * Returns vector of series's points + */ +QVector FFChartSeries::series() +{ + return series_; +} +/** + * Returns point from series at given index + * @param num is a index of point in seires + */ +QPointF* FFChartSeries::at(const int& num) +{ + return &series_[num]; +} + +/** + * Returns number of series's points + */ +int FFChartSeries::size() const +{ + return series_.size(); +} +/** + * Returns pointer to the data stored in vector + */ +QPointF* FFChartSeries::data() +{ + return series_.data(); +} + +/** + * Sorts points in series + */ +void FFChartSeries::sort(int left, int right) +{ + int i = left; + int j = right; + + QPointF* pointsTab; + QPointF tempPoint; + + float x = series_[(left + right) / 2].x(); + do + { + while(series_[i].x() < x) + i++; + while(series_[j].x() > x) + j--; + if(i <= j) + { + pointsTab = series_.data(); + + tempPoint = pointsTab[i]; + pointsTab[i] = pointsTab[j]; + pointsTab[j] = tempPoint; + + i++; + j--; + } + } while(i <= j); + if(left < j) + sort(left, j); + if(right > i) + sort(i, right); +} + + + diff --git a/libffqw-n810-1.0/sources/ffchartseries.h b/libffqw-n810-1.0/sources/ffchartseries.h new file mode 100644 index 0000000..8776f58 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffchartseries.h @@ -0,0 +1,147 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffchartseries.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.24 + * @version 1.0 + */ + +#ifndef FFChartSeries_H +#define FFChartSeries_H + +#include +#include +#include +#include + +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class containing series data. + */ +class FFChartSeries +{ +public: + FFChartSeries(); + FFChartSeries(const QVector& series, + const QString& name = ""); + + FFChartSeries(const QVector& series, + const QPen& pen, + const QString& name = ""); + virtual ~FFChartSeries(); + + void set(const QVector& series, + const QString& name = ""); + void set(const QVector& series, + const QPen& pen, + const QString& name = ""); + + void sort(); + void validate(); + + QString name() const; + QPen* pen(); + + bool isVisible(); + + void setName(const QString& name); + void setPen(const QPen& pen); + void setColor(const QColor& color); + void setStyle(const Qt::PenStyle& style); + void setVisible(bool visibility); + + QPointF* at(const int& num); + int size() const; + + QVector series(); + QPointF* data(); + +private: + QVector series_; ///< vector of points + QString name_; ///< name of series + QPen pen_; ///< pen of series + bool visibility_; ///< visibility of series + + void init(); + void sort(int left, int right); + +}; + +#endif // FFChartSeries_H diff --git a/libffqw-n810-1.0/sources/ffcolorcombobox.cpp b/libffqw-n810-1.0/sources/ffcolorcombobox.cpp new file mode 100644 index 0000000..d40d2c8 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffcolorcombobox.cpp @@ -0,0 +1,258 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffcolorcombobox.cpp + * @brief Implementation of the FFColorComboBox class + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#include "ffcolorcombobox.h" + +/** + * Constructs a FFColorComboBox with a parent. + */ +FFColorComboBox::FFColorComboBox(QWidget* parent) : + FFAbstractComboBox(new FFColorButton, parent) +{ + +} + +/** + * A virtual destructor. + */ +FFColorComboBox::~FFColorComboBox() +{ + ; +} + +/** + * Adds item to combobox + * @param spec is a color for item + */ +void FFColorComboBox::addItem(QColor spec) +{ + addItem(QVariant(spec)); +} +/** + * Adds item to combobox + * @param spec is a pen with color for item + */ +void FFColorComboBox::addItem(QPen spec) +{ + addItem(spec.color()); +} +/** + * Adds items to combobox + * @param items is a list of colors for items + */ +void FFColorComboBox::addItems(QList items) +{ + for(int i = 0; i < items.size(); ++i) + { + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFColorButton* temp = new FFColorButton; + temp->setColor(items.at(i)); + + // Second step: You must call this function with previously prepared button + insertItem(temp, false); + } + emit reset(); +} +/** + * Adds items to combobox + * @param items is a list of QPen-s with colors for items + */ +void FFColorComboBox::addItems(QList items) +{ + for(int i = 0; i < items.size(); ++i) + { + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFColorButton* temp = new FFColorButton; + temp->setColor(items.at(i).color()); + + // Second step: You must call this function with previously prepared button + insertItem(temp, false); + } + emit reset(); +} + +/** + * Sets actual color. If a color is not in colorcombobox nothing happens. + *@param color is a color to set + */ +void FFColorComboBox::setCurrentColor(QColor color) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast(items_[i])->color() == color) + { + setCurrentItem(i); + return; + } + } +} + +/** + * Sets chosen value of FFColoroComboBox on activator + * @param item is a pointer to chosen item. + */ + +void FFColorComboBox::setActivatorSpecs(FFAbstractButton* item) +{ + if(FFColorButton* but = dynamic_cast(item)) + { + dynamic_cast(activator_)->setColor(but->color()); + } +} +/** + * Returns QVariant element containing value of chosen item + */ +QVariant FFColorComboBox::activatorSpecs() +{ + return QVariant(dynamic_cast(activator_)->pen()); +} + +/** + * Adds new item to FFColorComboBox + */ +void FFColorComboBox::addItem(QVariant spec) +{ + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFColorButton* temp = new FFColorButton; + temp->setColor(spec.value()); + + // Second step: You must call this function with previously prepared button + insertItem(temp); +} + +/** + * Constructs FFColorButton with given parent + */ +FFColorButton::FFColorButton(QWidget* parent) : + FFAbstractButton(parent) +{ + setMargins(15,15,15,15); +} +/** + * A virtual destructor + */ +FFColorButton::~FFColorButton() +{ + ; +} +/** + * Sets a color painted on the button + */ +void FFColorButton::setColor(QColor color) +{ + QBrush brush; + brush = pen_.brush(); + brush.setStyle(Qt::SolidPattern); + brush.setColor(color); + pen_.setBrush(brush); + pen_.setColor(color); +} +/** + * Returns color painted on the button + */ +QColor FFColorButton::color() +{ + return pen_.color(); +} +/** + * Serves paint event, draws rounded rectangle. Overrides parent's method + * @param event Contains all informations about event. + */ +void FFColorButton::paintEvent(QPaintEvent* event) +{ + FFAbstractButton::paintEvent(event); + + QPainter painter; + painter.begin(this); + + painter.setPen(pen_); + painter.setBrush(pen_.brush()); + + painter.setRenderHint(QPainter::Antialiasing,true); + painter.drawRoundedRect(leftMargin() + indent(), + topMargin(), + width() - leftMargin() - rightMargin() - 2 * indent(), + height() - topMargin() - bottomMargin(),10,10); + + painter.end(); + +} diff --git a/libffqw-n810-1.0/sources/ffcolorcombobox.h b/libffqw-n810-1.0/sources/ffcolorcombobox.h new file mode 100644 index 0000000..94b91cf --- /dev/null +++ b/libffqw-n810-1.0/sources/ffcolorcombobox.h @@ -0,0 +1,157 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffcolorcombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#ifndef FFCOLORCOMBOBOX_H +#define FFCOLORCOMBOBOX_H + +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractcombobox.h" + +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of combobox with colors + */ +#ifdef MAEMO + +class FFColorComboBox : public FFAbstractComboBox + +#else + +class QDESIGNER_WIDGET_EXPORT FFColorComboBox : public FFAbstractComboBox + +#endif +{ + Q_OBJECT + +public: + FFColorComboBox(QWidget* parent = 0); + virtual ~FFColorComboBox(); + + void addItem(QColor item); + void addItem(QPen item); + void addItems(QList items); + void addItems(QList items); + +public slots: + void setCurrentColor(QColor item); + +protected: + virtual void setActivatorSpecs(FFAbstractButton* item); + virtual QVariant activatorSpecs(); + +private: + void addItem(QVariant item); + +}; +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of buttons with painted color + */ +class FFColorButton : public FFAbstractButton +{ + Q_OBJECT +public: + FFColorButton(QWidget* parent=0); + virtual ~FFColorButton(); + + QColor color(); + void setColor(QColor color); + +protected: + void paintEvent(QPaintEvent* event); + +}; + +#endif // FFCOLORCOMBOBOX_H diff --git a/libffqw-n810-1.0/sources/ffdpad.cpp b/libffqw-n810-1.0/sources/ffdpad.cpp new file mode 100644 index 0000000..9381c3d --- /dev/null +++ b/libffqw-n810-1.0/sources/ffdpad.cpp @@ -0,0 +1,268 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpad.cpp + * @brief Implementation of the FFDPad class + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ +#include "ffdpad.h" + + +/** + * Constructs a FFDPad with a parent + */ +FFDPad::FFDPad(QWidget* parent) : + FFAbstractWidget(parent), size_(DEFAULT_SIZE, DEFAULT_SIZE) +{ + init(); +} + +/** + * Constructs a FFDPad with given size and parent. + */ +FFDPad::FFDPad(QSize size, QWidget* parent) : + FFAbstractWidget(parent) +{ + this->size_ = QSize(size.width(),size.height()); + init(); +} + +/** A virtual destructor */ +FFDPad::~FFDPad() +{ + ; +} +/** + * Initiates FFDPad class. Sets all needed fields, connections and calls. + * It is called by all constructors. + */ +void FFDPad::init() +{ + + //sets size policy + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + setMinimumSize(QSize(DEFAULT_MIN_SIZE, DEFAULT_MIN_SIZE)); + + //Sets default values + + + path = DPAD_PATH; + ax = 0; + ay = 0; + + if(size_.height() <= 0 || size_.width() <= 0) + { + this->size_ = QSize(DEFAULT_SIZE,DEFAULT_SIZE); + } + + layout = new QGridLayout(this); + layout->setMargin(0); + layout->setSpacing(0); + + background = new FFViewCache(this); + + //creates FFDPadButtons + buttonUp = new FFDPadButton(path + "_button_up", + DPAD_UP, + this); + buttonDown = new FFDPadButton(path + "_button_down", + DPAD_DOWN, + this); + buttonLeft = new FFDPadButton(path + "_button_left", + DPAD_LEFT, + this); + buttonRight = new FFDPadButton(path + "_button_right", + DPAD_RIGHT, + this); + //connects + connect(buttonUp,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + connect(buttonDown,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + connect(buttonLeft,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + connect(buttonRight,SIGNAL(clicked(int)),this,SIGNAL(clicked(int))); + + //adds buttons to layout + layout->addWidget(buttonUp, 0, 0, 1, 1); + layout->addWidget(buttonDown, 0, 0, 1, 1); + layout->addWidget(buttonLeft, 0, 0, 1, 1); + layout->addWidget(buttonRight, 0, 0, 1, 1); + + this->setSize(size_); + + background->init(path + "_background.svg"); + background->updateView(size_); + +} + + +/** + * Returns size of FFDPad + */ +QSize FFDPad::size() const +{ + return this->geometry().size(); +} + +/** + * Sets FFDPad's size. + * If both edges are equal FFDPad have it`s maximum size cause it is always square. + * If size`s parameters are not equal then FFDPad is located in center of the widget. + * @param size Size of FFDPad widget + */ +void FFDPad::setSize(QSize size) +{ + calculateSize(size); + buttonUp -> setSize(size_); + buttonDown -> setSize(size_); + buttonLeft -> setSize(size_); + buttonRight -> setSize(size_); + setGeometry(geometry().x(), geometry().y(), size.width(), size.height()); +} + +/** + * Updates FFDPad view and events' mask after changing size of the widget, + * only when resizable_ is set up. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPad::resizeEvent(QResizeEvent* event) +{ + calculateSize(event->size()); + buttonUp -> setSize(size_); + buttonDown -> setSize(size_); + buttonLeft -> setSize(size_); + buttonRight -> setSize(size_); + background -> updateView(size_); + ax = 0; + ay = 0; + + if(event ->size().width() > event -> size().height()) + { + ax = (size_.width() - event -> size().width()) / 2; + } + else + { + ay = (size_.height() - event -> size().height()) / 2; + } + + buttonUp -> move(-ax, -ay); + buttonDown -> move(-ax, -ay); + buttonLeft -> move(-ax, -ay); + buttonRight -> move(-ax, -ay); + +} + +/** + * Repaints the view of the FFDPAd. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPad::paintEvent(QPaintEvent* event) +{ + Q_UNUSED(event) + QPainter paint(this); + paint.setOpacity(0.3); + paint.drawPixmap(-ax, -ay, background->pixmap()); +} + +/** + * Check and save size of the widget. Determine the size of the square. + * @param size Size to calculate square. + */ +void FFDPad::calculateSize(QSize size) +{ + if(size.height() <= 0 || size.width() <= 0) + { + this->size_ = QSize(DEFAULT_SIZE, DEFAULT_SIZE); + } + else + { + if(size.width() > size.height()) + { + this->size_ = QSize(size.height(),size.height()); + } + else + { + this->size_ = QSize(size.width(),size.width()); + } + } + update(); +} + +/** + \fn void FFDPad::clicked(int type) + + This signal is emitted when the one of four buttons will be released. + */ diff --git a/libffqw-n810-1.0/sources/ffdpad.h b/libffqw-n810-1.0/sources/ffdpad.h new file mode 100644 index 0000000..0aef2df --- /dev/null +++ b/libffqw-n810-1.0/sources/ffdpad.h @@ -0,0 +1,169 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpad.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ +#ifndef FFDPAD_H +#define FFDPAD_H + +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffdpadbutton.h" +#include "ffviewcache.h" +#include "ffabstractwidget.h" + + +static const QString DPAD_PATH= ":/standard/dpad";///< a part of path to graphics file + +static const int DEFAULT_SIZE = 150; ///< defines a default size of FFDPad +static const int DEFAULT_MIN_SIZE = 100; //< defines a min size of FFDPad + + +/** + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + * + * @brief A class of 4-way button + */ +#ifdef MAEMO + +class FFDPad : public FFAbstractWidget +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFDPad : public FFAbstractWidget +{ + Q_OBJECT + Q_PROPERTY(QSize size READ size WRITE setSize) + +#endif +public: + FFDPad(QWidget* parent = 0); + FFDPad(QSize size, QWidget* parent = 0); + virtual ~FFDPad(); + + enum BUTTON_TYPE + { + DPAD_LEFT, //!< signal from left button + DPAD_RIGHT, //!< signal from right button + DPAD_UP, //!< signal from up button + DPAD_DOWN //!< signal from down button + }; + + void setSize(QSize size); + QSize size() const; + + void calculateSize(QSize size); + +signals: + void clicked(int type); + +protected: + virtual void paintEvent(QPaintEvent*); + virtual void resizeEvent(QResizeEvent* event); + +private: + void init(); + + FFViewCache* background; ///< cached dpad's background + + + QGridLayout* layout; ///< a layout of dpad + + FFDPadButton* buttonUp; ///< pointer to the button "Up" + FFDPadButton* buttonDown; ///< pointer to the button "Down" + FFDPadButton* buttonLeft; ///< pointer to the button "Left" + FFDPadButton* buttonRight; ///< pointer to the button "Right" + + QSize size_; ///< size of dpad + QString path; ///< part of path to the graphics file + + int ax; ///< variable used to center dpad's buttons on X axis + int ay; ///< variable used to center dpad's buttons on Y axis +}; + +#endif // FFDPAD_H diff --git a/libffqw-n810-1.0/sources/ffdpadbutton.cpp b/libffqw-n810-1.0/sources/ffdpadbutton.cpp new file mode 100644 index 0000000..c564bbd --- /dev/null +++ b/libffqw-n810-1.0/sources/ffdpadbutton.cpp @@ -0,0 +1,216 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpadbutton.cpp + * @brief Implementation of the FFiPadButton class + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ + +#include "ffdpadbutton.h" + +/** + * Constructs a FFDPadButton with size and parent. + */ +FFDPadButton::FFDPadButton(QString path, int type, QWidget* parent) : + QAbstractButton(parent) +{ + + //initiates button's elements + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + this->type_ = type; + + pressed_ = false; + this->path = path; + + this->type_ = type; + buttonView = new FFViewCache(this); + buttonPressedView = new FFViewCache(this); + + buttonView->init(path + ".svg"); + buttonPressedView->init(path + "_pressed.svg"); + updateMask(); +} + +/** A virtual destructor */ +FFDPadButton::~FFDPadButton() +{ + +} + +/** + * Sets size of FFDPadButton + * Calls updateView of FFViewCache objects to fit pixmap's size + * to new FFDPadButton's size. + * Calls updateMask() to set new event's mask for FFDPadButton. + * + * @param size is a new size of FFDPadButton + */ +void FFDPadButton::setSize(QSize size) +{ + + buttonView->updateView(size); + buttonPressedView->updateView(size); + setGeometry(0,0, size.width(),size.height()); + updateMask(); + update(); +} + +/** + * Returns a value that tells if the FFDPadButton is pressed. + */ +bool FFDPadButton::isPressed() const +{ + return pressed_; +} +/** + * Sets FFDPadButton's state. Value "true" means that the FFDPadButton is pressed. + */ +void FFDPadButton::setPressed(bool pressed_) +{ + this->pressed_ = pressed_; +} +/** + * Returns a value defining type of pressed FFDPadButton. + */ +int FFDPadButton::type() const +{ + return type_; +} +/** + * Sets type of FFDPadButton defined in enum BUTTON_TYPE,which is placed + * in file ffdipabutton.h. + */ +void FFDPadButton::setType(int type_) +{ + this->type_ = type_; +} +/** + * Updates events' mask for FFDPadButton based on pixmap + */ +void FFDPadButton::updateMask() +{ + if(pressed_) + setMask(buttonPressedView->pixmap().mask()); + else + setMask(buttonView->pixmap().mask()); +} + +/** + * Repaints the view of FFDPadButton. There are 2 views of FFDiButton for both + * states pressed and unpressed. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPadButton::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter paint(this); + if(pressed_) + paint.drawPixmap(0, 0, buttonPressedView->pixmap()); + else + paint.drawPixmap(0, 0, buttonView->pixmap()); +} +/** + * Sets pressed_ value on true and calls updateMask() method. + * At the end calls update() method. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPadButton::mousePressEvent(QMouseEvent *) +{ + pressed_ = true; + update(); +} +/** + * Sets pressed_ value on false and calls updateMask() and update() method. + * At the end emit buttonClicked() signal. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFDPadButton::mouseReleaseEvent(QMouseEvent *) +{ + pressed_ = false; + update(); + emit clicked(this->type_); +} + +/** + \fn void FFDPadButton::clicked(int type) + + This signal is emitted when the button was released. + +*/ diff --git a/libffqw-n810-1.0/sources/ffdpadbutton.h b/libffqw-n810-1.0/sources/ffdpadbutton.h new file mode 100644 index 0000000..ae29474 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffdpadbutton.h @@ -0,0 +1,130 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffdpadbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + */ +#ifndef FFDPADBUTTON_H_ +#define FFDPADBUTTON_H_ + +#include +#include +#include +#include + +#include "ffviewcache.h" + +/** + * @author ComArch S.A. + * @date 2009.08.11 + * @version 1.0 + * + * @brief A class used by 4-way button + */ +class FFDPadButton : public QAbstractButton +{ +Q_OBJECT +public: + FFDPadButton(QString path, int type, QWidget* parent = 0); + virtual ~FFDPadButton(); + + void updateMask(); + void setSize(QSize); + bool isPressed() const; + int type() const; + void setPressed(bool pressed_); + void setType(int typ_); + +protected: + virtual void paintEvent(QPaintEvent *event); + virtual void mousePressEvent(QMouseEvent*event); + virtual void mouseReleaseEvent(QMouseEvent*event); + +private: + FFViewCache* buttonView; ///< cached dpadbutton's view + FFViewCache* buttonPressedView; ///< cached dpadbutton's clicked view + + QString path; ///< part of path to graphics files + int type_; ///< contains type of button + bool pressed_; ///< is true when button is pressed + +signals: + void clicked(int type); +}; + +#endif /* FFDPADBUTTON_H_ */ diff --git a/libffqw-n810-1.0/sources/fflinecombobox.cpp b/libffqw-n810-1.0/sources/fflinecombobox.cpp new file mode 100644 index 0000000..f969b62 --- /dev/null +++ b/libffqw-n810-1.0/sources/fflinecombobox.cpp @@ -0,0 +1,247 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file fflinecombobox.cpp + * @brief Implementation of the FFLineComboBox class + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#include "fflinecombobox.h" + +/** + * Constructs a FFStringComboBox with a parent. + */ +FFLineComboBox::FFLineComboBox(QWidget* parent) : + FFAbstractComboBox(new FFLineButton,parent) +{ + +} + +/** + * A virtual destructor. + */ +FFLineComboBox::~FFLineComboBox() +{ + ; +} +/** + * Adds item to combobox + * @param item is a pen with parameters for new item + */ +void FFLineComboBox::addItem(QPen item) +{ + addItem(QVariant(item)); +} +/** + * Adds items to combobox + * @param items is a list of pens with parameters for new items + */ +void FFLineComboBox::addItems(QList items) +{ + for(int i = 0; i < items.size(); ++i) + { + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFLineButton* temp = new FFLineButton; + temp->setPen(items.at(i)); + + // Second step: You must call this function with previously prepared button + insertItem(temp, false); + } + emit reset(); +} + +/** + * Sets chosen value of FFLineComboBox on activator + * @param item is a pointer to chosen item. + */ +void FFLineComboBox::setActivatorSpecs(FFAbstractButton* item) +{ + if(FFLineButton* but = dynamic_cast(item)) + { + dynamic_cast(activator_)->setPen(but->pen()); + } +} +/** + * Returns QVariant element containing value of chosen item + */ +QVariant FFLineComboBox::activatorSpecs() +{ + return QVariant(dynamic_cast(activator_)->pen()); +} + +/** + * Sets actual line's style. If a style is not in linecombobox nothing happens. + *@param style is a style of pen to set + */ +void FFLineComboBox::setCurrentLine(Qt::PenStyle style) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast(items_[i])->pen().style() == style) + { + setCurrentItem(i); + return; + } + } +} + +/** + * Sets actual line's thickness. If thickness is not in linecombobox nothing happens. + * @param thickness is a thickness of pen to set + */ +void FFLineComboBox::setCurrentLine(int thickness) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast(items_[i])->pen().width() == thickness) + { + setCurrentItem(i); + return; + } + } +} + +// ##################################################################### PRIVATE + +/** + * Adds new item to FFLineComboBox + */ +void FFLineComboBox::addItem(QVariant spec) +{ + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFLineButton* temp = new FFLineButton; + temp->setPen(spec.value()); + + // Second step: You must call this function with previously prepared button + insertItem(temp); +} + +/** + * Constructs FFLineButton with parent + */ + +FFLineButton::FFLineButton(QWidget* parent) : + FFScrollingButton(parent) +{ + + setDescription(""); + setTitle(""); +} +/** + * A virtual destructor + */ +FFLineButton::~FFLineButton() +{ + ; +} + +// ################################################################### PROTECTED +/** + * Serves paint event, draws line. Overrides parent's method + * @param event Contains all informations about event. + */ +void FFLineButton::paintEvent(QPaintEvent* event) +{ + FFScrollingButton::paintEvent(event); + + + QPainter painter; + painter.begin(this); + + painter.setPen(pen_); + + painter.drawLine(indent() + leftMargin(), + 0.5 * height(), + width() - indent() -rightMargin(), + 0.5 * height()); + painter.end(); +} +/** + * Sets title of linecombobox + */ +void FFLineComboBox::setTitle(QString title) +{ + dynamic_cast(activator_)->setTitle(title); +} + +/** + * Returns title of line combobox + */ +QString FFLineComboBox::title() +{ + return dynamic_cast(activator_)->title(); +} diff --git a/libffqw-n810-1.0/sources/fflinecombobox.h b/libffqw-n810-1.0/sources/fflinecombobox.h new file mode 100644 index 0000000..70575c6 --- /dev/null +++ b/libffqw-n810-1.0/sources/fflinecombobox.h @@ -0,0 +1,149 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file fflinecombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#ifndef FFLINECOMBOBOX_H +#define FFLINECOMBOBOX_H + +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractcombobox.h" +#include "ffscrollingbutton.h" +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of combobox with lines + */ + +#ifdef MAEMO + +class FFLineComboBox : public FFAbstractComboBox + +#else + +class QDESIGNER_WIDGET_EXPORT FFLineComboBox : public FFAbstractComboBox + +#endif +{ + Q_OBJECT + +public : + FFLineComboBox(QWidget* parent = 0); + virtual ~FFLineComboBox(); + + void addItem(QPen item); + void addItems(QList items); + void setTitle(QString title); + QString title(); +public slots: + void setCurrentLine(Qt::PenStyle style); + void setCurrentLine(int thickness); + +protected: + virtual void setActivatorSpecs(FFAbstractButton* item); + virtual QVariant activatorSpecs(); + +private : + void addItem(QVariant item); + QString title_; +}; + +class FFLineButton : public FFScrollingButton +{ +Q_OBJECT +public: + FFLineButton(QWidget* parent = 0); + virtual ~FFLineButton(); + +protected: + void paintEvent(QPaintEvent* event); + +}; + +#endif // FFLINECOMBOBOX_H diff --git a/libffqw-n810-1.0/sources/ffscrollarea.cpp b/libffqw-n810-1.0/sources/ffscrollarea.cpp new file mode 100644 index 0000000..9bcfdd4 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollarea.cpp @@ -0,0 +1,422 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollarea.cpp + * @brief Implementation of the FFScrollArea class + * + * @author ComArch S.A. + * @date 2009.09.20 + * @version 1.0 + */ + +#include "ffscrollarea.h" +#include +#include +#include +#include + +//defines view of scrollbars +#define SCROLLBAR_STYLE " \ + QScrollBar:vertical, QScrollBar:horizontal { \ + border: 0px solid transparent; \ + background: transparent; \ + width: 5px; \ + height: 5px; /* change this to 5px or more to see horizontal scrollbar */\ + margin: 2px 2px 2px 2px; \ + } \ + QScrollBar::sub-page, QScrollBar::add-page { \ + background: rgb(45,45,45); \ + } \ + QScrollBar::handle:vertical { \ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, \ + stop:0 rgba(30,30,30,0), stop: 0.1 #1d1, stop:0.9 #2e2, stop: 1 rgba(30,30,30,0)); \ + min-height: 25px; \ + } \ + QScrollBar::handle:horizontal { \ + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, \ + stop:0 rgba(30,30,30,0), stop: 0.1 #1d1, stop:0.9 #2e2, stop: 1 rgba(30,30,30,0)); \ + min-width: 25px; \ + } \ + QScrollBar::add-line, QScrollBar::sub-line { \ + border: 0px solid transparent; \ + } \ + QScrollArea { \ + background-color: #222; color: #ddd; \ + } \ +" + +/** + * Constructs FFScrollArea with parent + */ +FFScrollArea::FFScrollArea(QWidget* parent) : + QScrollArea(parent) +{ + init(); +} +/** + * A virtual destructor + */ +FFScrollArea::~FFScrollArea() +{ + +} +/** + * Initiates FFScrollArea class. Sets all needed fields, connections and calls. + * It is called by the constructor. + */ +void FFScrollArea::init() +{ + //sets FFScrollArea view properties + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + this->setFrameStyle(0); + setStyleSheet(SCROLLBAR_STYLE); + setStyleSheet("background-color: transparent"); + //initiates all fields with default values + moved = false; + animate = false; + + oldPos = QPointF(0, 0); + prevPos = QPointF(0, 0); + pos = QPointF(0, 0); + speed = QPointF(0, 0); + movement = QPointF(0, 0); + + x = 0; + y = 0; + + slowingDownRate_ = DEFAULT_SLOWING_DOWN_RATE; + postionSumplingTime_ = DEFAULT_POSIOTION_SUMPLING_TIME; + kineticAnimationTime_ = DEFAULT_KINETIC_ANIMATION_TIME; + minMotionLength_ = DEFAULT_MIN_MOTION_LENGTH; + + timerPos.stop(); + timerAnim.stop(); + + //connects signals and slots + connect(&timerPos, SIGNAL(timeout()), this, SLOT(updatePos())); + connect(&timerAnim, SIGNAL(timeout()), this, SLOT(animation())); +} + +/** + * Method using to serve events. Overrides the virtual method from parent. + * + * @param object is a pointer handled object + * @param ev is a pointer to handled event + */ + +bool FFScrollArea::eventFilter(QObject* object, QEvent* ev) +{ + //Does nothing when QEvent type is Paint + if(ev->type() == QEvent::Paint) + return false; + + if(QMouseEvent* event = dynamic_cast(ev)) + { + //Serves MouseButtonPressEvent + if(event->type() == QEvent::MouseButtonPress) + { + + moved = false; + movement = QPointF(0, 0); + timerAnim.stop(); + if(event) + { + //sets started values after each press event + x = event->globalX(); + y = event->globalY(); + prevPos = event->globalPos(); + oldPos = event->globalPos(); + speed = QPointF(0.0, 0.0); + pos = QPointF(0.0, 0.0); + + //starts position sampling timer + timerPos.start(postionSumplingTime_); + } + else + { + return 0; + } + + } + //Serves MouseMoveEvent + if(event->type() == QEvent::MouseMove) + { + + //sets and calculates motion parameters + int offsetY = event->globalY() - y; + int offsetX = event->globalX() - x; + + int valY = this->verticalScrollBar()->value() - offsetY; + int valX = this->horizontalScrollBar()->value() + - offsetX; + + y = event->globalY(); + x = event->globalX(); + + //If motion length is shorter then minMotionLength_ + //scrollbars postion will be not set. + if(minMotionLength_ < qAbs(movement.y()) + || minMotionLength_ + < qAbs(movement.x())) + { + //sets new scrollBars' values + this->verticalScrollBar()->setValue(valY); + this->horizontalScrollBar()->setValue(valX); + moved = true; + + } + + //Updates parameters + movement.setY(movement.y() + qAbs(prevPos.y() + - event->globalY())); + movement.setX(movement.x() + qAbs(prevPos.x() + - event->globalX())); + + prevPos = event->globalPos(); + } + //Serves MouseButtonReleaseEvent + if(event->type() == QEvent::MouseButtonRelease) + { + //Stops position's sampling + timerPos.stop(); + + if(moved) + { + //blocks signals + object->blockSignals(true); + object->event(event); + object->blockSignals(false); + + //sets cursor position after + //MouseButtonReleaseEvent + pos.setY((float)(this->verticalScrollBar()->value())); + pos.setX((float)(this->horizontalScrollBar()->value())); + + //starts animation + timerAnim.start(kineticAnimationTime_); + return true; + } + else + { + //do nothing + return false; + } + } + } + //calls parent's event filter + return QScrollArea::eventFilter(object, ev); +} + +/** + * Sets widget on FFScrollArea + * Overrides the virtual method from parent. + * + * @param widget pointer to setting widget + */ + +void FFScrollArea::setWidget(QWidget* widget) +{ + //calls parent method + ((QScrollArea*)this)->setWidget(widget); + //calls method to install EventFilter + installFilterRecursive(widget); +} +/** + * Installs eventFilter to each widget on FFScrollArea + * + * @param wdg pointer to widget to which eventFilter is installing. + */ +void FFScrollArea::installFilterRecursive(QWidget* wdg) +{ + if(!wdg) + return; + //Installs eventFilter to current widget + wdg->installEventFilter(this); + + //Calls installFilterRecursive to all children + const QList widgets = wdg->children(); + for(int i = 0; i < widgets.length(); ++i) + { + QWidget* wdg = dynamic_cast (widgets.at(i)); + if(wdg) + installFilterRecursive(wdg); + } +} +/** + * Updates motion's speed and cursor's position + */ +void FFScrollArea::updatePos() +{ + //sets motion's speed + speed.setY(oldPos.y() - this->cursor().pos().y()); + speed.setX(oldPos.x() - this->cursor().pos().x()); + //sets current cursor's position + oldPos = this->cursor().pos(); + +} + +/** + * Method responsible for kinetic's animation. + */ + +void FFScrollArea::animation() +{ + //If speed is less then 1 animations is stopped + if(1 < qAbs(speed.x()) || 1 < qAbs(speed.y())) + { + //updates position + pos.setY(pos.y() + speed.y()); + pos.setX(pos.x() + speed.x()); + + //sets new position on scrollbars + this->verticalScrollBar()->setValue((int)pos.y()); + this->horizontalScrollBar()->setValue((int)pos.x()); + + //updates speed + speed.setY(speed.y() * slowingDownRate_); + speed.setX(speed.x() * slowingDownRate_); + } + else + { + //Stops animation + timerAnim.stop(); + } +} + +/** + * Returns rate responsible for kinetic speed slowing + */ +float FFScrollArea::getSlowingDownRate() const +{ + return slowingDownRate_; +} +/** + * Sets rate responsible for kinetic speed slowing + */ +void FFScrollArea::setSlowingDownRate(float slowingDownRate_) +{ + this->slowingDownRate_ = slowingDownRate_; +} + +/** + * Returns kinetic animation frame time in ms. + */ +int FFScrollArea::getKineticAnimationTime() const +{ + return kineticAnimationTime_; +} + +/** + * Sets kinetic animation frame time in ms. + */ +void FFScrollArea::setKineticAnimationTime(int kineticAnimationTime_) +{ + this->kineticAnimationTime_ = kineticAnimationTime_; +} + +/** + * Returns cursor position sampling time in ms. + */ +int FFScrollArea::getPostionSumplingTime() const +{ + return postionSumplingTime_; +} + +/** + * Sets cursor position sampling time in ms. + */ +void FFScrollArea::setPostionSumplingTime(int postionSumplingTime_) +{ + this->postionSumplingTime_ = postionSumplingTime_; +} + +/** + * Sets value needed to blocking signals + * + */ +void FFScrollArea::setMinMotionLength(int minMotionLength_) +{ + this->minMotionLength_ = minMotionLength_; +} + +/** + * Returns value needed to blocking signals + */ +int FFScrollArea::getMinMotionLength() const +{ + return minMotionLength_; +} + + diff --git a/libffqw-n810-1.0/sources/ffscrollarea.h b/libffqw-n810-1.0/sources/ffscrollarea.h new file mode 100644 index 0000000..1045c0e --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollarea.h @@ -0,0 +1,152 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollarea.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.09.20 + * @version 1.0 + */ + +#ifndef QFFSCROLLAREA_H +#define QFFSCROLLAREA_H + +#include +#include +#include +#include +#include +#include +#include + +static const float DEFAULT_SLOWING_DOWN_RATE = 0.85; +static const int DEFAULT_POSIOTION_SUMPLING_TIME = 80; +static const int DEFAULT_KINETIC_ANIMATION_TIME = 50; +static const int DEFAULT_MIN_MOTION_LENGTH = 20; + +/** + * @author ComArch S.A. + * @date 2009.09.20 + * @version 1.0 + * + * @brief A class providing a scrolling view onto another widget. + */ +class FFScrollArea : public QScrollArea +{ + Q_OBJECT + +public: + FFScrollArea(QWidget* parent = 0); + ~FFScrollArea(); + bool eventFilter(QObject * o, QEvent *event); + void setWidget(QWidget* widget); + + void init(); + float getSlowingDownRate() const; + void setSlowingDownRate(float slowingDownRate_); + int getKineticAnimationTime() const; + void setKineticAnimationTime(int kineticAnimationTime_); + int getPostionSumplingTime() const; + void setPostionSumplingTime(int postionSumplingTime_); + int getMinMotionLength() const; + void setMinMotionLength(int minMotionLength_); + +private: + bool moved; ///< is true when widget on scrolarea is moved + bool animate; ///< is true when animation is active + + int x; ///< variable to storing cursor global position (X axis) + int y; ///< variable to storing cursor global position (Y axis) + int postionSumplingTime_; ///< period of position sampling + int kineticAnimationTime_; ///< period of one animation's frame + int minMotionLength_; ///< is motion is shorter then this value moved is false + float slowingDownRate_; ///< rate of animation slowing + + QPointF pos; ///< cursor position when button was released + QPointF speed; ///< contains motion speed value during kinetic animation + QPointF movement; ///< way's length traveled during mousemoveevent + QPointF prevPos; ///< is used to moving when area is pressed + QPointF oldPos; ///< is used to kinetic + QTimer timerPos; ///< timer is used to sampling cursor position + QTimer timerAnim; ///< timer is used to kinetic animation + + void installFilterRecursive(QWidget* widget); + +private slots: + void updatePos(); + void animation(); +}; + +#endif // QFFSCROLLAREA_H diff --git a/libffqw-n810-1.0/sources/ffscrollingbutton.cpp b/libffqw-n810-1.0/sources/ffscrollingbutton.cpp new file mode 100644 index 0000000..77b5d8d --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollingbutton.cpp @@ -0,0 +1,581 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#include "ffscrollingbutton.h" + +/** + * Constructs a FFScrollingButton with a parent. + * Sets variable to initial values and set graphics used in widget. + */ +FFScrollingButton::FFScrollingButton(QWidget* parent) : + FFAbstractButton(parent) +{ + init(); +} + +/** + * Constructs a FFScrollingButton with a parent , title and description. + * Sets variable to initial values and sets graphics used in widget. + */ +FFScrollingButton::FFScrollingButton(QString title, QString description, QWidget* parent) : + FFAbstractButton(parent) +{ + init(); + title_->setText(title); + description_->setText(description); +} + + +/** + * A virtual destructor. + */ +FFScrollingButton::~FFScrollingButton() +{ + ; +} + +/** + * Initiates an object of FFScrollingButton. Sets all needed fields. + */ +void FFScrollingButton::init() +{ + //sets title's label + title_ = new FFScrollingLabel(this); + title_->setResizable(true); + title_->setColor(FF_TITLE_COLOR); + title_->show(); + + //sets desciption's label + description_ = new FFScrollingLabel(this); + description_->setResizable(true); + description_->setColor(FF_DESCRIPTION_COLOR); + description_->show(); + + //sets indents + titleIndent_ = indent(); + descriptionIndent_ = indent(); + + titleIndentTemp = indent(); + descriptionIndentTemp = indent(); + + //sets switches + titleSwitch_ = true; + descriptionSwitch_ = true; + + //sets margins + setTopMargin(DEFAULT_TOPBOTTOM_MARGIN); + setBottomMargin(DEFAULT_TOPBOTTOM_MARGIN); + + //sets ratio + ratio_ = DEFAULT_RATIO; +} + +/** + * Returns the text from FFScrollingLabel named title + */ +QString FFScrollingButton::title() const +{ + return title_->text(); +} + +/** + * Returns alignment of title. + */ +FFScrollingLabel::Alignment FFScrollingButton::titleAlignment() const +{ + return titleWidget()->alignment(); +} + +/** + * Returns title`s color. + */ +QColor FFScrollingButton::titleColor() const +{ + return title_->color(); +} + +/** + * Returns title`s indent. + */ +int FFScrollingButton::titleIndent() const +{ + return titleIndent_; +} + +/** + * Returns title`s font. + */ +QFont FFScrollingButton::titleFont() const +{ + return title_->font(); +} + +/** + * Returns the text from FFScrollingLabel named description. + */ +QString FFScrollingButton::description() const +{ + return description_->text(); +} + +/** + * Return alignment of description. + */ +FFScrollingLabel::Alignment FFScrollingButton::descriptionAlignment() const +{ + return descriptionWidget()->alignment(); +} + +/** + * Return description`s color. + */ +QColor FFScrollingButton::descriptionColor() const +{ + return description_->color(); +} + +/** + * Returns description`s indent. + */ +int FFScrollingButton::descriptionIndent() const +{ + return descriptionIndent_; +} + +/** + * Returns description`s font. + */ +QFont FFScrollingButton::descriptionFont() const +{ + return description_->font(); +} + +/** + * Returns ratio. + */ +float FFScrollingButton::ratio() const +{ + return ratio_; +} + +/** + * Sets a text of the title. + * @param title Title text. + */ +void FFScrollingButton::setTitle(const QString& title) +{ + title_->setText(title); + update(); +} + +/** + * Sets a alignment of the title. + * @param alignment Title text. + */ +void FFScrollingButton::setTitleAlignment(FFScrollingLabel::Alignment alignment) +{ + titleWidget()->setAlignment(alignment); + update(); +} + +/** + * Sets a color of text on title. + * @param color Color of title. + */ +void FFScrollingButton::setTitleColor(QColor color) +{ + title_->setColor(color); + update(); +} + +/** + * Sets a font that will be used to print the text of the title. + * @param font Font style. + */ +void FFScrollingButton::setTitleFont(QFont font) +{ + title_->setFont(font); + update(); +} + +/** + * Sets Indent of title. + * @param indent Indent of title. + */ +void FFScrollingButton::setTitleIndent(int indent) +{ + titleIndent_ = indent; + titleIndentTemp = indent; + updateView(); +} + +/** + * Sets a text of the description. + * @param text Description text + */ +void FFScrollingButton::setDescription(const QString& text) +{ + description_->setText(text); + update(); +} + +/** + * Sets a alignment of the title. + * @param alignment Title text. + */ +void FFScrollingButton::setDescriptionAlignment(FFScrollingLabel::Alignment alignment) +{ + descriptionWidget()->setAlignment(alignment); + update(); +} + +/** + * Sets a color of text on description. + * @param color Color of description. + */ +void FFScrollingButton::setDescriptionColor(QColor color) +{ + description_->setColor(color); + update(); +} + +/** + * Sets a font that will be used to print the text of the description. + * @param font Font style. + */ +void FFScrollingButton::setDescriptionFont(QFont font) +{ + description_->setFont(font); + update(); +} + +/** + * Sets Indent of description. + * @param indent Indent of description. + */ +void FFScrollingButton::setDescriptionIndent(int indent) +{ + descriptionIndent_ = indent; + descriptionIndentTemp = indent; + updateView(); +} + +/** + * Sets ratio. + * @param ratio Ratio between size of title and description. + */ +void FFScrollingButton::setRatio(float ratio) +{ + if(ratio >= 0.05 && ratio <= 0.95) + { + ratio_ = ratio; + } + else if(ratio < 0.05) + { + ratio_ = 0.05; + } + else + { + ratio_ = 0.95; + } + calculateRatio(); + updateView(); +} + +/** + * Disables title. Show/hide title. + * @param state State true/false to set visible of description. + */ +void FFScrollingButton::disableTitle(bool state) +{ + titleSwitch_ = !state; + title_->setVisible(titleSwitch_); + update(); +} + +/** + * Disables description. Show/hide description. + * @param state State true/false to set visible of description. + */ +void FFScrollingButton::disableDescription(bool state) +{ + descriptionSwitch_ = !state; + description_->setVisible(descriptionSwitch_); + update(); +} + +/** + * Returns state of title visibility. If returned value is true visibility is on. + */ +bool FFScrollingButton::isDisabledTitle() +{ + return titleSwitch_; +} + +/** + * Returns state of description visibility. If returned value is true visibility is on. + */ +bool FFScrollingButton::isDisabledDescription() +{ + return descriptionSwitch_; +} + +/** + * Repaints the view of button. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingButton::paintEvent(QPaintEvent* event) +{ + FFAbstractButton::paintEvent(event); +} + +/** + * Updates button`s view after changing size of the widget. + * Updates size of all pixmaps which need it (without corners) + * @param event Contains all informations about event. + */ +void FFScrollingButton::resizeEvent(QResizeEvent* event) +{ + FFAbstractButton::resizeEvent(event); + calculateRatio(); + updateView(); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFScrollingButton::mousePressEvent(QMouseEvent* event) +{ + FFAbstractButton::mousePressEvent(event); +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFScrollingButton::mouseReleaseEvent(QMouseEvent* event) +{ + FFAbstractButton::mouseReleaseEvent(event); +} + +/** + * Paints icon if it was set. + * @param painter is a tool to paint icon on widget. + */ +void FFScrollingButton::paintIcon(QPainter* painter) +{ + int move = 0; + if(iconAlignment_ == Qt::AlignLeft) + { + move = titleIndent_; + } + else + { + move = -titleIndent_; + } + + // if icon was set paint it + + if (!icon().isNull()) + { + QRect rect(0+leftMargin() + move, + 0+topMargin(), + geometry().width()-rightMargin()-leftMargin() , + geometry().height()-bottomMargin()-topMargin()); + + //paint icon in button center + icon().paint(painter,rect,iconAlignment_,QIcon::Normal, QIcon::Off); + } +} + +/** + * Returns pointer to title FFScrolingLabel. + */ +FFScrollingLabel* FFScrollingButton::titleWidget() const +{ + return title_; +} + +/** + * Returns pointer to description FFScrolingLabel. + */ +FFScrollingLabel* FFScrollingButton::descriptionWidget() const +{ + return description_; +} + +/** + * Changes tRatio - title ratio and dRatio - description ratio to show/not show title/description. + */ +void FFScrollingButton::calculateRatio() +{ + if(titleSwitch_ && descriptionSwitch_) // show title and description + { + tRatio = ratio_; + dRatio = 1.0 - ratio_; + } + else if(!titleSwitch_ && descriptionSwitch_) // show only description + { + tRatio = 0; + dRatio = 1; + } + else if(titleSwitch_ && !descriptionSwitch_) // show only title + { + tRatio = 1; + dRatio = 0; + } +} + +/** + * Scales title and description indent. When resize event appears and calls out scaleIndent it changes indents to fit to new size. + * @param oldSize Old size of widget. + * @param newSize New size of widget. + */ +void FFScrollingButton::scaleIndent(QSize oldSize, QSize newSize) +{ + float widthProportion = (float)newSize.width() / (float)oldSize.width(); + + titleIndentTemp *= widthProportion; + descriptionIndentTemp *= widthProportion; + + titleIndent_ = titleIndentTemp; + descriptionIndent_ = descriptionIndentTemp; +} + +/** + * Recalculates geometry of labels (indent, margins etc.) + */ +void FFScrollingButton::updateView() +{ + // sets neede values + int margins = topMargin() + bottomMargin() + hSpacing(); + + int xT = 0; + int xD = 0; + + int w = 0; + + w = width() - 2 * descriptionIndent_ - leftMargin() - rightMargin() - iconSpace; + //values depend from alignment + if(iconAlignment() == Qt::AlignLeft) + { + xT = leftMargin() + titleIndent_ + iconSpace; + xD = leftMargin() + descriptionIndent_ + iconSpace; + + } + else + { + xT = leftMargin() + titleIndent_; + xD = leftMargin() + descriptionIndent_; + } + //sets geometry of labels with texts + title_->setGeometry(xT, + topMargin(), + w, + (height() - margins) * tRatio); + + description_->setGeometry(xD, + topMargin() + title_->size().height() + hSpacing(), + w , + (height() - margins) * dRatio); + + update(); + FFAbstractButton::updateView(); +} +/** + * Sets icon's alignment + */ +void FFScrollingButton::setIconAlignment(Qt::Alignment iconAlignment) +{ + switch(iconAlignment) + { + case Qt::AlignLeft: + case Qt::AlignRight: + FFAbstractButton::setIconAlignment(iconAlignment); + break; + default: + qDebug() << "You can only use Qt::AlignLeft or Qt::AlignRight"; + break; + } +} +// ####################################################### PRIVATE diff --git a/libffqw-n810-1.0/sources/ffscrollingbutton.h b/libffqw-n810-1.0/sources/ffscrollingbutton.h new file mode 100644 index 0000000..3646cc4 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollingbutton.h @@ -0,0 +1,216 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingbutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#ifndef FFSCROLLINGBUTTON_H +#define FFSCROLLINGBUTTON_H + +#ifndef MAEMO +#include +#endif + +#include "ffabstractbutton.h" +#include "ffviewcache.h" +#include "ffscrollinglabel.h" + +/** + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * @brief A class responsible for button with 2 labels + */ +const int DEFAULT_TOPBOTTOM_MARGIN = 2; ///< Default top and bottom margin +const float DEFAULT_RATIO = 0.3; ///< Default title/description height ratio + +#ifdef MAEMO + +class FFScrollingButton : public FFAbstractButton +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFScrollingButton : public FFAbstractButton +{ + Q_OBJECT + + Q_PROPERTY(QString title READ title WRITE setTitle) + Q_PROPERTY(QString description READ description WRITE setDescription) + + Q_PROPERTY(qreal ratio READ ratio WRITE setRatio) + + Q_PROPERTY(QColor titleColor READ titleColor WRITE setTitleColor) + Q_PROPERTY(QColor descriptionColor READ descriptionColor WRITE setDescriptionColor) + + Q_PROPERTY(int titleIndent READ titleIndent WRITE setTitleIndent) + Q_PROPERTY(int descriptionIndent READ descriptionIndent WRITE setDescriptionIndent) + + Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont) + Q_PROPERTY(QFont descriptionFont READ descriptionFont WRITE setDescriptionFont) + + Q_PROPERTY(bool titleDisabled READ isDisabledTitle WRITE disableTitle) + Q_PROPERTY(bool descriptionDisabled READ isDisabledDescription WRITE disableDescription) + + Q_PROPERTY(FFScrollingLabel::Alignment titleAlignment READ titleAlignment WRITE setTitleAlignment) + Q_PROPERTY(FFScrollingLabel::Alignment descriptionAlignment READ descriptionAlignment WRITE setDescriptionAlignment) + +#endif + +public: + FFScrollingButton(QWidget* parent = 0); + FFScrollingButton(QString title, QString description, QWidget* parent = + 0); + virtual ~FFScrollingButton(); + + QString title() const; + FFScrollingLabel::Alignment titleAlignment() const; + QColor titleColor() const; + int titleIndent() const; + QFont titleFont() const; + + QString description() const; + FFScrollingLabel::Alignment descriptionAlignment() const; + QColor descriptionColor() const; + int descriptionIndent() const; + QFont descriptionFont() const; + + float ratio() const; + + void setTitle(const QString& title); + void setTitleAlignment(FFScrollingLabel::Alignment alignment); + void setTitleColor(QColor color); + void setTitleIndent(int indent); + void setTitleFont(QFont font); + void setDescription(const QString& text); + void setDescriptionAlignment(FFScrollingLabel::Alignment alignment); + void setDescriptionColor(QColor color); + void setDescriptionIndent(int indent); + void setDescriptionFont(QFont font); + + void setRatio(float ratio); + + void disableTitle(bool state); + void disableDescription(bool state); + + bool isDisabledTitle(); + bool isDisabledDescription(); + void setIconAlignment(Qt::Alignment iconAlignment); + +protected: + + int titleIndent_; ///< indnet of title + int descriptionIndent_; ///< indent of description + + bool titleSwitch_; ///< is true when title is visible + bool descriptionSwitch_;///< is true when description is visible + + float ratio_; ///< title/description height ratio + float tRatio; ///< title height ratio + float dRatio; ///< description height ratio + + virtual void paintEvent(QPaintEvent* event); + virtual void resizeEvent(QResizeEvent* event); + virtual void mousePressEvent(QMouseEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event); + + virtual void paintIcon(QPainter* painter); + + FFScrollingLabel* titleWidget() const; + FFScrollingLabel* descriptionWidget() const; + + void scaleIndent(QSize oldSize, QSize newSize); + + void calculateRatio(); + + virtual void updateView(); + +private: + FFScrollingLabel* description_; ///< is using to displaying description of button + FFScrollingLabel* title_; ///< is using to displaying title of button + + float titleIndentTemp; ///< temporary title's indent + float descriptionIndentTemp; ///< temporary description's indent + + void init(); +}; + +#endif // FFSCROLLINGBUTTON_H diff --git a/libffqw-n810-1.0/sources/ffscrollingcheckbox.cpp b/libffqw-n810-1.0/sources/ffscrollingcheckbox.cpp new file mode 100644 index 0000000..1a2e325 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollingcheckbox.cpp @@ -0,0 +1,318 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingcheckbox.cpp + * @brief Implementation of the FFScrollingCheckBox class. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#include "ffscrollingcheckbox.h" + + +/*Static FFViewCaches -improve performance*/ +FFViewCache* FFScrollingCheckBox::stateTrue = NULL; +FFViewCache* FFScrollingCheckBox::stateFalse = NULL; +/** + * Constructs a FFScrollingCheckBox with a parent. + * Sets variable to initial values and set graphics used in widget. + */ +FFScrollingCheckBox::FFScrollingCheckBox(QWidget* parent) : + FFScrollingButton(parent) +{ + path = SCROLLINGCHECKBOX_PATH; + init(); +} +/** + * Constructs a FFScrollingCheckBox with a parent and new path to + * False/Normal Graphics. + * Set variable to initial values and set graphics used in widget. + */ +FFScrollingCheckBox::FFScrollingCheckBox(const QString& path, QWidget* parent ) : + FFScrollingButton(parent) +{ + this->path = path; + init(); +} + +/** + * A virtual destructor. + */ +FFScrollingCheckBox::~FFScrollingCheckBox() +{ + ; +} + +/** + * Repaint the view of checkbox button. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::paintEvent(QPaintEvent* event) +{ + //calls parental paint event + FFAbstractButton::paintEvent(event); + + //sets values for drawing + int x=0,y=0; + if(width() > height()) + { + x = leftMargin() + indent(); + y = topMargin() ; + } + else + { + x = leftMargin() + indent(); + y = topMargin() ; + } + + QPainter painter; + painter.begin(this); + + //draws image. + if( isChecked()) + { + painter.drawPixmap(x,y,stateTrue->pixmap()); + } + else + { + painter.drawPixmap(x,y,stateFalse->pixmap()); + } + painter.end(); +} + +/** + * Updates button`s view after changing size of the widget. + * Update size of all pixmap which need it (without corners) + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::resizeEvent(QResizeEvent* event) +{ + FFAbstractButton::resizeEvent(event); + calculateRatio(); + updateView(); +} + +/** + * Support mouse press event. + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::mousePressEvent(QMouseEvent* event) +{ + FFScrollingButton::mousePressEvent(event); +} + +/** + * Support mouse release event. + * @param event Contains all informations about event. + */ +void FFScrollingCheckBox::mouseReleaseEvent(QMouseEvent* event) +{ + if(isClicked_) + { + if(!signalsBlocked()) + { + toggle(); + } + } + FFScrollingButton::mouseReleaseEvent(event); +} +/** + * Paints icon if it was set. + * @param painter is a tool to paint icon on widget. + */ +void FFScrollingCheckBox::paintIcon(QPainter* painter) +{ + // if icon was set paint it + if (!icon().isNull()) + { + QRect rect(0+leftMargin() + qMin(width() - leftMargin() - rightMargin(), + height() - topMargin() - bottomMargin()), + 0+topMargin(), + geometry().width()-rightMargin()-leftMargin(), + geometry().height()-bottomMargin()-topMargin()); + + //paint icon in button center + icon().paint(painter,rect,iconAlignment(),QIcon::Normal, QIcon::Off); + } +} +/** + * Returns text icon space. + */ +int FFScrollingCheckBox::textIconSpace() +{ + return textIconSpace_; +} + +/** + * Initiates an object of FFScrollingCheckBox. Sets all needed fields. + */ +void FFScrollingCheckBox::init() +{ + + + setCheckable(true); + setChecked(false); + textIconSpace_ = DEFAULT_TEXTICON_SPACE; + + if(NULL == stateFalse) + { + stateFalse = new FFViewCache; + stateFalse->init(path + "_false.svg"); + stateFalse->updateView(stateFalse->defaultSize()); + } + + if(NULL == stateTrue) + { + + stateTrue = new FFViewCache; + stateTrue->init(path + "_true.svg"); + stateTrue->updateView(stateTrue->defaultSize()); + } + setTitleIndent(0); + setDescriptionIndent(0); + setMinimumWidth(minimumHeight() + leftMargin() + rightMargin() + indent()); + setMargins(0,0,0,0); +} + +/** + * Sets text icon space + */ +void FFScrollingCheckBox::setTextIconSpace(int textIconSpace) +{ + textIconSpace_=textIconSpace; +} +/** + * Updates button's view parameters + */ +void FFScrollingCheckBox::updateView() +{ + int margins = topMargin() + bottomMargin() + hSpacing(); + int checkboxEdge = qMin(width() - leftMargin() - rightMargin(), + height() - topMargin() - bottomMargin()); + QSize size= QSize(0,0); + if(width() > height()) + { + titleWidget()->setVisible(true); + descriptionWidget()->setVisible(true); + //sets button's labels geometry + titleWidget()->setGeometry(vSpacing() + checkboxEdge + leftMargin() + iconSpace + textIconSpace_ + + titleIndent() + indent(), + topMargin(), + width() - leftMargin() - rightMargin() - titleIndent() - checkboxEdge - hSpacing() - iconSpace - textIconSpace_ - indent(), + (height() - margins) * tRatio); + + descriptionWidget()->setGeometry(vSpacing() + checkboxEdge + leftMargin() + descriptionIndent() + iconSpace + textIconSpace_ + indent(), + topMargin() + titleWidget()->size().height() + hSpacing(), + width() - checkboxEdge - leftMargin() - descriptionIndent() - rightMargin() - hSpacing() - iconSpace - textIconSpace_ - indent(), + (height() - margins) * (dRatio)); + size = QSize(checkboxEdge, checkboxEdge); + } + else + { + size = QSize(width()-(leftMargin() + rightMargin() + 2* indent()),checkboxEdge-(topMargin()+bottomMargin())); + } + + if(minimumSize().width() >= width() ) + { + titleWidget()->setVisible(false); + descriptionWidget()->setVisible(false); + } + + stateFalse->updateView(size); + stateTrue->updateView(size); + + update(); + + //calls update view from parent + FFAbstractButton::updateView(); +} +/** + * Sets icon alignment + * @param iconAlignment contains new alignemnt for icon + */ +void FFScrollingCheckBox::setIconAlignment(Qt::Alignment iconAlignment) +{ + //Sets only possible alignment options + switch(iconAlignment) + { + case Qt::AlignLeft: + FFAbstractButton::setIconAlignment(iconAlignment); + break; + default: + qDebug() << "You can only use Qt::AlignLeft or Qt::AlignRight"; + break; + } +} diff --git a/libffqw-n810-1.0/sources/ffscrollingcheckbox.h b/libffqw-n810-1.0/sources/ffscrollingcheckbox.h new file mode 100644 index 0000000..8f80817 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollingcheckbox.h @@ -0,0 +1,153 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingcheckbox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + */ + +#ifndef FFSCROLLINGCHECKBOX_H +#define FFSCROLLINGCHECKBOX_H + + +#ifndef MAEMO +#include +#endif + +#include "ffviewcache.h" +#include "ffscrollinglabel.h" +#include "ffscrollingbutton.h" + +/** + * @author ComArch S.A. + * @date 2009.08.03 + * @version 1.0 + * + * @brief A class responsible for button with 2 labels and checkbox + */ + +static const QString SCROLLINGCHECKBOX_PATH = ":/standard/button"; ///< part of path to graphics files +static const int DEFAULT_TEXTICON_SPACE = 10; ///< default space of text icon + +#ifdef MAEMO + +class FFScrollingCheckBox : public FFScrollingButton + +#else + + +class QDESIGNER_WIDGET_EXPORT FFScrollingCheckBox : public FFScrollingButton + +#endif +{ + Q_OBJECT + +public: + FFScrollingCheckBox(QWidget* parent = 0); + virtual ~FFScrollingCheckBox(); + +protected: + FFScrollingCheckBox(const QString& path, QWidget* parent = 0); + virtual void paintEvent(QPaintEvent* event); + virtual void resizeEvent(QResizeEvent* event); + virtual void mousePressEvent(QMouseEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event); + + virtual void paintIcon(QPainter* painter); + + int textIconSpace(); + + void setTextIconSpace(int textIconSpace); + +private: + + static FFViewCache* stateTrue; ///< cached true icon view + static FFViewCache* stateFalse; ///< cached false icon view + + + QString path ; ///< stores a part of path to the graphics files + int textIconSpace_; ///< stores text icon space + + void init(); + virtual void updateView(); + void setIconAlignment(Qt::Alignment iconAlignment); +signals: + + +}; + +#endif // FFSCROLLINGCHECKBOX_H diff --git a/libffqw-n810-1.0/sources/ffscrollinglabel.cpp b/libffqw-n810-1.0/sources/ffscrollinglabel.cpp new file mode 100644 index 0000000..8bb7ae9 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollinglabel.cpp @@ -0,0 +1,701 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollinglabel.cpp + * @brief Implementation of the FFScrollingLabel class. + * + * @author ComArch S.A. + * @date 2009.08.07 + * @version 1.1 + */ + +#include "ffscrollinglabel.h" + +/** + * Constructs a FFScrollingLabel with a parent. + */ +FFScrollingLabel::FFScrollingLabel(QWidget* parent) : + FFAbstractWidget(parent) +{ + QFont font = QFont(FONT_TEXT_DEF, LABEL_SIZE_NORMAL); + init(DEFAULT_TEXT, font); +} + +/** + * Constructs a FFScrollingLabel with a given text and parent. + */ +FFScrollingLabel::FFScrollingLabel(QString text, QWidget* parent) : + FFAbstractWidget(parent) +{ + QFont font = QFont(FONT_TEXT_DEF, LABEL_SIZE_NORMAL); + init(text, font); +} + +/** + * Constructs a FFScrollingLabel with a given text, font and parent. + */ +FFScrollingLabel::FFScrollingLabel(QString text, QFont font, QWidget* parent) : + FFAbstractWidget(parent) +{ + init(text, font); +} + +/** + * A virtual destructor. + */ +FFScrollingLabel::~FFScrollingLabel() +{ + +} + +/** + * Initiates an object of FFScrollingLabel. Sets all needed fields and calls + * update() method. It is called by all constructors. + * + * @param text a text that will be shown at the label + * @param font a font that will be used to print a text on the label + */ +void FFScrollingLabel::init(QString text, QFont font) +{ + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + text_ = text; + font_ = font; + + timer = new QTimer(this); + + //connecting timer with method responsible for moving the text + connect(timer, SIGNAL(timeout()), this, SLOT(scrollSideToSide())); + + //setting default values + scrollSpeed_ = -DEFAULT_SCROLL_SPEED; + endScrollDelay_ = DEFAULT_END_SCROLL_DELAY; + color_ = COLOR_TEXT; + resizable_ = true; + fitToFont_ = false; + smoothDisappear_ = true; + painter = new QPainter(); + timerDelay_ = TIMER_DELAY; + alignment_ = ALIGNMENT_LEFT; + + //updating view of the label + updateView(); +} + +/** + * Updates text, font and size of the label. + * Makes that changing text, font or/and s painter->setFont(font_);ize takes effect. It is automatically + * called by resizeEvent(), setFont(), setText(), setSmoothDisappear(), so + * there is no need to call it by you. + */ +void FFScrollingLabel::updateView() +{ + //for calculate width and height of the text using a given font + QFontMetrics textSize(font_); + + //fitting the label's size to the font's size + if(fitToFont_) + { + resize(width(), textSize.size(0, text_).height()); + } + + //creating the gradient used to drawing the text on the label + gradient.setStart(0, 0); + gradient.setFinalStop(width(), 0); + gradient.setColorAt(0.2, color_); + gradient.setColorAt(0.0, Qt::transparent); + gradient.setColorAt(0.8, color_); + gradient.setColorAt(1.0, Qt::transparent); + + //if developer wants a gradient at ends of the label and if text width + //is greater than label width + if(smoothDisappear_ && textSize.size(0, text_).width() > width()) + { + //this pen will be used to drawing the text in paintEvent() + pen.setBrush(QBrush(gradient)); + } + else + { + //this pen will be used to drawing the text in paintEvent() + pen.setBrush(color_); + } + + //calculating length (in pixels) of the text + length_ = textSize.width(text_, text_.length()); + + //resetting text offset (used in text movement) + calcTextPos(); + textOffset = textStartPos; + + //resetting field responsible for freezing text movement at ends + endScrollDelayIterationL = 0; + endScrollDelayIterationR = 0; + + //if the text width is greater than label width and the label is wider + //than 0 pixels + if(length_ > width() && width() > 0) + { + if(timer->isActive() == false) + { + timer->start(timerDelay_); + } + } + else + { + timer->stop(); + } +} + +/** + * Calculates a position of the text's left edge. + */ +void FFScrollingLabel::calcTextPos() +{ + switch(alignment_) + { + case ALIGNMENT_CENTER: + textStartPos = (width() - length_) / 2; + break; + + case ALIGNMENT_LEFT: + textStartPos = 0; + break; + + case ALIGNMENT_RIGHT: + textStartPos = width() - length_; + break; + } +} + +/** + * Changes gradient using to draw a text. + * + * @param left point in which transparent color is changing into a solid color + * @param right point in which a solid color is changing into transparent color + */ +void FFScrollingLabel::changeGradient(qreal left, qreal right) +{ + gradient.setStart(0, 0); + gradient.setFinalStop(width(), 0); + + gradient.setColorAt(0.0, Qt::transparent); + gradient.setColorAt(1.0, Qt::transparent); + gradient.setColorAt(left, color_); + gradient.setColorAt(right, color_); + + pen.setBrush(QBrush(gradient)); + update(); +} + +/** + * Method that implements algorithm to scroll text from side to side. + * It is created as a slot, thus it can be called by a timer. + */ +void FFScrollingLabel::scrollSideToSide() +{ + textOffset += scrollSpeed_; + if(textOffset + length_ - scrollSpeed_ < width()) + { + textOffset -= scrollSpeed_; + if(endScrollDelayIterationR > endScrollDelay_) + { + scrollSpeed_ = -scrollSpeed_; + textOffset += scrollSpeed_; + endScrollDelayIterationR = 0; + changeGradient(0.2, 0.8); + } + else + { + endScrollDelayIterationR++; + changeGradient(0.2, 1); + } + } + else if(textOffset > 0) + { + textOffset -= scrollSpeed_; + + if(endScrollDelayIterationL > endScrollDelay_) + { + scrollSpeed_ = -scrollSpeed_; + textOffset += scrollSpeed_; + endScrollDelayIterationL = 0; + changeGradient(0.2, 0.8); + } + else + { + endScrollDelayIterationL++; + changeGradient(0, 0.8); + } + } + else + { + update(); + } +} + +///////////////////////////////////////////////////////OVERRIDDEN + +/** + * Repaints the view of this label. Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::paintEvent(QPaintEvent* event) +{ + Q_UNUSED(event); + + painter->begin(this); + painter->setPen(pen); + painter->setFont(font_); + painter->drawText(textOffset, + 0, + width() - textOffset, + height(), + 0, + text_); + painter->end(); +} + +/** + * Updates label's view after changing size of this widget. It calls update(). + * If resizable is set up it also fits the font size to the label's size. + * Overrides the virtual method from QWidget. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::resizeEvent(QResizeEvent* event) +{ + if(resizable_) + { + font_.setPixelSize(event->size().height() * 0.85 <= 0 ? 1 : event->size().height() * 0.85); + updateView(); + } + if(fitToFont_) + { + fitToFont_ = false; + updateView(); + fitToFont_ = true; + } +} + +/** + * Returns the recommended size for the widget. Overrides the virtual + * method from QWidget. + */ +QSize FFScrollingLabel::sizeHint() const +{ + return QSize(length_, font_.pixelSize()); +} + +/** + * Stops the label's timer when the label is hiding. + * It means if the label is not visible there are no useless calculates. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::hideEvent(QHideEvent* event) +{ + Q_UNUSED(event); + + timer->stop(); + +} + +/** + * Starts the label's timer when the label is showing. + * @param event Contains all informations about event. + */ +void FFScrollingLabel::showEvent(QShowEvent* event) +{ + Q_UNUSED(event); + + if(timer->isActive() == false && length_ > width() && width() > 0) + { + timer->start(timerDelay_); + } + +} + +/** + * Returns the font that is used to printing label-text. + */ +QFont FFScrollingLabel::font() const +{ + return font_; +} + +/** + * Sets a font that will be used to print the text on the label. + * Calls update() method. + */ +void FFScrollingLabel::setFont(QFont font) +{ + this->font_ = font; + updateView(); + update(); +} + +/** + * Sets parameters of the font used to print a text on the label. + * Calls update() method. + */ +void FFScrollingLabel::setFont(int fontParam) +{ + int fontSize = 0; + QString fontType; + //search font size to set + switch(fontParam & SIZE_MASK) + { + case SIZE_TINY: + fontSize = LABEL_SIZE_TINY; + break; + + case SIZE_SMALL: + fontSize = LABEL_SIZE_SMALL; + break; + + case SIZE_NORMAL: + fontSize = LABEL_SIZE_NORMAL; + break; + + case SIZE_LARGE: + fontSize = LABEL_SIZE_LARGE; + break; + + case SIZE_HUGE: + fontSize = LABEL_SIZE_HUGE; + break; + } + + //search font type to set + switch(fontParam & FONT_MASK) + { + case FONT_TITLE: + fontType = FONT_TITLE_DEF; + break; + + case FONT_TEXT: + fontType = FONT_TEXT_DEF; + break; + } + + //search font color to set + switch(fontParam & COLOR_MASK) + { + case COLOR_TITLE: + color_ = COLOR_TITLE_DEF; + break; + + case COLOR_TEXT: + color_ = COLOR_TEXT_DEF; + break; + + case COLOR_BRIGHT_BACKGROUND: + color_ = COLOR_BRIGHT_BACKGROUND_DEF; + break; + + case COLOR_DARK_BACKGROUND: + color_ = COLOR_DARK_BACKGROUND_DEF; + break; + + case COLOR_BRIGHT_FOREGROUND: + color_ = COLOR_BRIGHT_FOREGROUND_DEF; + break; + + case COLOR_DARK_FOREGROUND: + color_ = COLOR_DARK_FOREGROUND_DEF; + break; + } + //search label's alignment to set + alignment_ = Alignment(fontParam & ALIGNMENT_MASK); + switch(alignment_) + { + case ALIGNMENT_CENTER: + textStartPos = (width() - length_) / 2; + break; + + case ALIGNMENT_LEFT: + textStartPos = 0; + break; + + case ALIGNMENT_RIGHT: + textStartPos = width() - length_; + break; + } + + setFont(QFont(fontType, fontSize)); + updateView(); + update(); +} + +/** + * Returns the text printed on the label. + */ +QString FFScrollingLabel::text() const +{ + return text_; +} + +/** + * Sets the text on the label. Calls update() method. + */ +void FFScrollingLabel::setText(QString text) +{ + this->text_ = text; + updateView(); + update(); +} + +/** + * Returns a value that tells if the label is automatically fitting up + * to a layout. + */ +bool FFScrollingLabel::isResizable() const +{ + return resizable_; +} + +/** + * Turns on/off auto-fitting the label size to the layout. If it is set to true + * then with every change of the label's size, the font size will be changed. + * If false, the font size will be fixed. If resizable is true, fitToFont + * property is setting up to false. + */ +void FFScrollingLabel::setResizable(bool resizable) +{ + if((this->resizable_ = resizable)) + { + this->fitToFont_ = false; + } + else + { + + this->fitToFont_ = true; + } + update(); +} + +/** + * Returns the speed of text scrolling. + */ +int FFScrollingLabel::scrollSpeed() const +{ + return scrollSpeed_; +} + +/** + * Sets the speed of text scrolling. + */ +void FFScrollingLabel::setScrollSpeed(int scrollSpeed) +{ + this->scrollSpeed_ = scrollSpeed; + update(); +} + +/** + * Returns time that the text waits between changing move direction. The time is + * calculating as: timerDelay * endScrollDelay. + */ +int FFScrollingLabel::endScrollDelay() const +{ + return endScrollDelay_; +} + +/** + * Sets time that the text waits between changing move direction. The time is + * calculating as: timerDelay * endScrollDelay. + */ +void FFScrollingLabel::setEndScrollDelay(int endScrollDelay) +{ + this->endScrollDelay_ = endScrollDelay; + update(); +} + +/** + * Returns the color using which is printing a text. + */ +QColor FFScrollingLabel::color() const +{ + return color_; +} + +/** + * Sets the color that is used to print a text. + */ +void FFScrollingLabel::setColor(QColor color) +{ + this->color_ = color; + updateView(); + update(); +} + +/** + * Returns true if the size of label is fitting up to the font size. + */ +bool FFScrollingLabel::fitToFont() const +{ + return fitToFont_; +} + +/** + * Turns on/off fitting up size of label to the font size. If fitToFont is true + * resizable property is setting up to false. + */ +void FFScrollingLabel::setFitToFont(bool fitToFont) +{ + if((this->fitToFont_ = fitToFont)) + { + resizable_ = false; + } + else + { + resizable_ = true; + } + update(); +} + +/** + * Sets the scrolling type. + */ +void FFScrollingLabel::setScrollType(int type) +{ + switch(type) + { + case SCROLL_SIDE_TO_SIDE: + disconnect(timer, + SIGNAL(timeOut()), + this, + previousScrollType.toAscii()); + connect(timer, + SIGNAL(timeOut()), + this, + SLOT(scrollSpeed())); + previousScrollType = SLOT(scrollSpeed()); + break; + } + update(); +} + +/** + * Returns true if the gradient at ends is set up, otherwise false. + */ +bool FFScrollingLabel::isSmoothDisappear() const +{ + return smoothDisappear_; +} + +/** + * Turns on/off a gradient at the ends of the label. Calls update() method. + */ +void FFScrollingLabel::setSmoothDisappear(bool smoothDisappear) +{ + this->smoothDisappear_ = smoothDisappear; + updateView(); + update(); +} + +/** + * Returns time (in milliseconds) between movements of the text. + */ +int FFScrollingLabel::timerDelay() +{ + return timerDelay_; +} + +/** + * Sets time (in milliseconds) between movements of the text. + */ +void FFScrollingLabel::setTimerDelay(int delay) +{ + timerDelay_ = delay; + timer->stop(); + timer->start(timerDelay_); + update(); +} + +/** + * Sets alignment of the text. + */ +void FFScrollingLabel::setAlignment(FFScrollingLabel::Alignment alignment) +{ + alignment_ = alignment; + calcTextPos(); + updateView(); + update(); +} + +/** + * Returns alignment used in this label. + */ +FFScrollingLabel::Alignment FFScrollingLabel::alignment() +{ + return alignment_; +} diff --git a/libffqw-n810-1.0/sources/ffscrollinglabel.h b/libffqw-n810-1.0/sources/ffscrollinglabel.h new file mode 100644 index 0000000..8386701 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollinglabel.h @@ -0,0 +1,223 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollinglabel.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.07 + * @version 1.1 + * + * @brief A label with scrolling text. + */ + +#ifndef FFSCROLLINGLABEL_H +#define FFSCROLLINGLABEL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef MAEMO +#include +#endif + +#include "ffabstractwidget.h" +#include "ffviewcache.h" + +const int TIMER_DELAY = 200; ///< delay for timer responsible for scrolling +const QString DEFAULT_TEXT = "Default text"; ///< text printed on a label as default +const int DEFAULT_SCROLL_SPEED = 10; ///< number of pixels which defines step of scrolling +const int DEFAULT_END_SCROLL_DELAY = 10; ///< number of gaps when one of label's edge is visible +const int LABEL_SIZE_TINY = 6; ///< defines size of tiny label's font +const int LABEL_SIZE_SMALL = 10; ///< defines size of small label's font +const int LABEL_SIZE_NORMAL = 12; ///< defines size of normal label's font +const int LABEL_SIZE_LARGE = 16; ///< defines size of large label's font +const int LABEL_SIZE_HUGE = 24; ///< defines size of huge label's font + +/** + * @author ComArch S.A. + * @date 2009.08.07 + * @version 1.1 + * + * @brief A label with scrolling text. + */ +#ifdef MAEMO + +class FFScrollingLabel : public FFAbstractWidget +{ + Q_OBJECT + +#else + +class QDESIGNER_WIDGET_EXPORT FFScrollingLabel : public FFAbstractWidget +{ + Q_OBJECT + Q_ENUMS(Alignment) + Q_PROPERTY(QFont font READ font WRITE setFont) + Q_PROPERTY(QString text READ text WRITE setText) + Q_PROPERTY(bool resizable READ isResizable WRITE setResizable) + Q_PROPERTY(int scrollSpeed READ scrollSpeed WRITE setScrollSpeed) + Q_PROPERTY(int endScrollDelay READ endScrollDelay WRITE setEndScrollDelay) + Q_PROPERTY(QColor color READ color WRITE setColor) + Q_PROPERTY(bool fitToFont READ fitToFont WRITE setFitToFont) + Q_PROPERTY(bool smoothDisappear READ isSmoothDisappear WRITE setSmoothDisappear) + Q_PROPERTY(int timerDelay READ timerDelay WRITE setTimerDelay) + Q_PROPERTY(FFScrollingLabel::Alignment alignment READ alignment WRITE setAlignment) + +#endif +public: + FFScrollingLabel(QWidget* parent = 0); + FFScrollingLabel(QString text, QWidget *parent = 0); + FFScrollingLabel(QString text, QFont font, QWidget* parent = 0); + virtual ~FFScrollingLabel(); + + enum Alignment + { + ALIGNMENT_LEFT = 0x2000, ///< label alignment to left + ALIGNMENT_RIGHT = 0x4000, ///< label alignment to right + ALIGNMENT_CENTER = 0x8000 ///< label alignment to center + }; + + QFont font() const; + QString text() const; + bool isResizable() const; + int scrollSpeed() const; + int endScrollDelay() const; + QColor color() const; + bool fitToFont() const; + bool isSmoothDisappear() const; + int timerDelay(); + FFScrollingLabel::Alignment alignment(); + + void setFont(QFont font); + void setFont(int fontParam); + void setText(QString text); + void setResizable(bool resizable); + void setScrollSpeed(int scrollSpeed); + void setEndScrollDelay(int endScrollDelay); + void setColor(QColor color); + void setFitToFont(bool fitToFont); + void setScrollType(int type); + void setSmoothDisappear(bool smoothDisappear); + void setTimerDelay(int delay); + void setAlignment(FFScrollingLabel::Alignment alignment); + + void updateView(); + +protected: + virtual void paintEvent(QPaintEvent *event); + virtual void resizeEvent(QResizeEvent *event); + virtual QSize sizeHint() const; + virtual void hideEvent(QHideEvent* event); + virtual void showEvent(QShowEvent* event); + +private: + QPainter* painter; ///< pointer to painter + QLinearGradient gradient; ///< stores gradient for label + QPen pen; ///< stores pen where gradient is set + QString text_; ///< stores text of label + QFont font_; ///< stores font of text + QTimer* timer; ///< timer used to animation + bool resizable_; ///< is true when font size should change with widget's size changes. + QColor color_; ///< stores color used to create gradient + + int length_; ///< length of the text + int textOffset; ///< text's offset + int scrollSpeed_; ///< scoll's speed + int endScrollDelay_; ///< gap during one of edges is visible + int endScrollDelayIterationL; ///< contains value how many times text is in stopped state on left + int endScrollDelayIterationR; ///< contains value how many times text is in stopped state on right + bool fitToFont_; ///< if is true the widgets height is adjusted to font size + QString previousScrollType; ///< stores scrolling type + bool smoothDisappear_; ///< is true when the gradient at ends is set up + int timerDelay_; ///< defines how often text is repainted + Alignment alignment_; ///< stores text's alignment + int textStartPos; ///< contains start text's posiotion + + void init(QString text, QFont font); + void calcTextPos(); + inline void changeGradient(qreal left, qreal right); + +private slots: + void scrollSideToSide(); +}; + +#endif // FFSCROLLINGLABEL_H diff --git a/libffqw-n810-1.0/sources/ffscrollingradiobutton.cpp b/libffqw-n810-1.0/sources/ffscrollingradiobutton.cpp new file mode 100644 index 0000000..562362b --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollingradiobutton.cpp @@ -0,0 +1,101 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingradiobutton.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.10.13 + * @version 1.0 + */ + +#include "ffscrollingradiobutton.h" +#include + +/** + * Constructs FFScrollingRadioButton with parent + */ +FFScrollingRadioButton::FFScrollingRadioButton(QWidget* parent) : FFScrollingCheckBox(SCROLLINGRADIOBUTTON_PATH,parent) +{ + path = SCROLLINGRADIOBUTTON_PATH ; + + setAutoExclusive(true); +} +/** + * A virtual destructor + */ +FFScrollingRadioButton::~FFScrollingRadioButton() +{ + +} diff --git a/libffqw-n810-1.0/sources/ffscrollingradiobutton.h b/libffqw-n810-1.0/sources/ffscrollingradiobutton.h new file mode 100644 index 0000000..b5c9968 --- /dev/null +++ b/libffqw-n810-1.0/sources/ffscrollingradiobutton.h @@ -0,0 +1,112 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffscrollingradiobutton.h + * @brief Implementation of the FFScrollingRadioButton class. + * + * @author ComArch S.A. + * @date 2009.10.13 + * @version 1.0 + */ + +#ifndef FFSCROLLINGRADIOBUTTON_H_ +#define FFSCROLLINGRADIOBUTTON_H_ + +#ifndef MAEMO +#include +#endif + +#include "ffscrollingcheckbox.h" + + +static const QString SCROLLINGRADIOBUTTON_PATH = ":/standard/radiobutton"; ///< part of path to graphics files + +/** + * @author ComArch S.A. + * @date 2009.10.13 + * @version 1.0 + * + * @brief A class responsible for button with 2 labels and radiobutton + */ +class FFScrollingRadioButton : public FFScrollingCheckBox +{ + Q_OBJECT +public: + FFScrollingRadioButton(QWidget* parent = 0); + virtual ~FFScrollingRadioButton(); +private: + QString path; ///< contains part of path to graphics files +}; + +#endif /* FFSCROLLINGRADIOBUTTON_H_ */ diff --git a/libffqw-n810-1.0/sources/ffstringcombobox.cpp b/libffqw-n810-1.0/sources/ffstringcombobox.cpp new file mode 100644 index 0000000..7b6a1bf --- /dev/null +++ b/libffqw-n810-1.0/sources/ffstringcombobox.cpp @@ -0,0 +1,193 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffstringcombobox.cpp + * @brief Implementation of the FFStringComboBox class + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + + +#include "ffstringcombobox.h" +/** + * Constructs a FFStringComboBox with a parent. + */ +FFStringComboBox::FFStringComboBox(QString title, QWidget* parent) : + FFAbstractComboBox(new FFScrollingButton(title,""), parent) +{ + activator_ -> setIcon(QIcon(":/standard/combo_triangle_pressed.svg")); + activator_ -> setMargins(0,0,10,10); + activator_ -> setIconAlignment(Qt::AlignRight); + +} + +/** + * A virtual destructor. + */ +FFStringComboBox::~FFStringComboBox() +{ + ; +} + +/** + * Adds item to combobox + * @param item is a text for item + */ +void FFStringComboBox::addItem(QString item) +{ + addItem(QVariant(item)); +} +/** + * Adds items to combobox + * @param items is a list of text for items + */ +void FFStringComboBox::addItems(QList items) +{ + for(int i=0; isetDescription(items.at(i)); + temp->disableTitle(true); + + // Second step: You must call this function with previously prepared button + insertItem(temp,false); + } + emit reset(); +} +/** + * Returns title of combobox + */ +QString FFStringComboBox::title() +{ + return dynamic_cast(activator_)->title(); +} +/** + * Sets title of combobox + */ +void FFStringComboBox::setTitle(QString title) +{ + dynamic_cast(activator_)->setTitle(title); +} +/** + * Sets chosen value of FFStringComboBox on activator + * @param item is a pointer to chosen item. + */ + +void FFStringComboBox::setActivatorSpecs(FFAbstractButton* item) +{ + if(FFScrollingButton* but = dynamic_cast(item)) + { + dynamic_cast(activator_)->setDescription(but->description()); + } +} +/** + * Returns QVariant element containing value of chosen item + */ +QVariant FFStringComboBox::activatorSpecs() +{ + return QVariant(dynamic_cast(activator_)->description()); +} + + +/** + * Sets actual text. + *@param text is a text to set + */ +void FFStringComboBox::setCurrentText(QString text) +{ + for(int i = 0; i < items_.size(); ++i) + { + if(dynamic_cast (items_[i])->description() == text) + { + setCurrentItem(i); + return; + } + } +} +/** + * Adds new item to FFStringComboBox + */ +void FFStringComboBox::addItem(QVariant spec) +{ + // First step: you must prepare new button (button must be inherited from FFAbstractButton) + FFScrollingButton* temp = new FFScrollingButton; + temp->setDescription(spec.toString()); + temp->disableTitle(true); + + // Second step: You must call this function with previously prepared button + insertItem(temp); +} diff --git a/libffqw-n810-1.0/sources/ffstringcombobox.h b/libffqw-n810-1.0/sources/ffstringcombobox.h new file mode 100644 index 0000000..ff8a94f --- /dev/null +++ b/libffqw-n810-1.0/sources/ffstringcombobox.h @@ -0,0 +1,136 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffstringcombobox.h + * @brief Contains a necessary class declaration. + * + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + */ + +#ifndef FFSTRINGCOMBOBOX_H_ +#define FFSTRINGCOMBOBOX_H_ + +#ifndef MAEMO +#include +#endif + +#include "ffabstractcombobox.h" +#include "ffscrollingbutton.h" + +/** + * @author ComArch S.A. + * @date 2009.08.13 + * @version 1.0 + * + * @brief A class of combobox with texts + */ + +#ifdef MAEMO + +class FFStringComboBox : public FFAbstractComboBox + +#else + +class QDESIGNER_WIDGET_EXPORT FFStringComboBox : public FFAbstractComboBox + +#endif +{ + Q_OBJECT + +public: + FFStringComboBox(QString title = 0, QWidget* parent = 0); + virtual ~FFStringComboBox(); + + void addItem(QString item); + void addItems(QList items); + + QString title(); + + void setTitle(QString title); + +public slots: + void setCurrentText(QString text); + +protected: + virtual void setActivatorSpecs(FFAbstractButton* item); + virtual QVariant activatorSpecs(); + +private: + void addItem(QVariant item); + +}; + +#endif // FFSTRINGCOMBOBOX_H diff --git a/libffqw-n810-1.0/sources/ffviewcache.cpp b/libffqw-n810-1.0/sources/ffviewcache.cpp new file mode 100644 index 0000000..2c643fb --- /dev/null +++ b/libffqw-n810-1.0/sources/ffviewcache.cpp @@ -0,0 +1,176 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffviewcache.cpp + * @brief Implementation of the FFViewCache class + * + * @author ComArch S.A. + * @date 2009.07.30 + * @version 1.0 + */ +#include "ffviewcache.h" + + +QHash FFViewCache::graphicsTable; + +/** Constructs an FFViewCache with a parent. */ +FFViewCache::FFViewCache(QObject* parent) : QObject(parent) +{ + renderer_ = new QSvgRenderer(this); +} + +/** A virtual destructor */ +FFViewCache::~FFViewCache() +{ + ; +} + +/** + * This method is used to initiate FFViewCache class. + * Reads graphic from file in "svg" format and calls updateView method to set + * class parameters. + * + * @param path a text with path to file with a graphic +*/ + +void FFViewCache::init(QString path) +{ + + if(!graphicsTable.contains(path)) + { + QSvgRenderer* rend= new QSvgRenderer; + rend->load(path); + graphicsTable[path] = rend; + + } + renderer_= graphicsTable[path]; +} + +/** + * Fills QPixmap with graphic loaded by the QSvgRenderer from a file. + * + * @param size specifies size of a QPixmap storing a graphic +*/ +void FFViewCache::updateView(QSize size) +{ + /* creates pixmap with correct size */ + pixmap_ = QPixmap(size); + /* background will be transparent */ + pixmap_.fill(Qt::transparent); + + /* creates painter and fill pixmap by graphic */ + QPainter painter; + painter.begin(&pixmap_); + renderer_->render(&painter); + painter.end(); +} + +/** + * Returns graphic read from svg file +*/ +QPixmap FFViewCache::pixmap() const +{ + return pixmap_; +} + +/** + * Returns Svg renderer + */ +QSvgRenderer* FFViewCache::renderer() const +{ + return renderer_; +} + +/** + * Returns true when a file with graphic was correctly read + */ +bool FFViewCache::isValid() const +{ + return renderer_->isValid(); +} + +/** + * Returns default size of graphic read from file + */ +QSize FFViewCache::defaultSize() const +{ + return renderer_->defaultSize(); +} +/** + * Sets pixmap size to 0 + */ +void FFViewCache::setPixmapToZero() +{ + pixmap_ = QPixmap(0,0); +} diff --git a/libffqw-n810-1.0/sources/ffviewcache.h b/libffqw-n810-1.0/sources/ffviewcache.h new file mode 100644 index 0000000..4cb526a --- /dev/null +++ b/libffqw-n810-1.0/sources/ffviewcache.h @@ -0,0 +1,124 @@ +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +http://www.gnu.org/licenses/gpl-3.0.txt +*/ +/** + * @file ffviewcache.h + * @brief Contains a necessary class declaration. + * + * @author Marcin Kusmierski, Damian Plonek, Michał Palczewski, Dawid Klimt + * @date 2009.07.30 + * @version 1.0 + */ + +#ifndef FFVIEWCACHE_H +#define FFVIEWCACHE_H + +#include +#include +#include +#include +#include +/** + * @author ComArch S.A. + * @date 2009.07.30 + * @version 1.0 + * + * @brief A class responsible for widgets' view and event mask + */ +class FFViewCache : public QObject +{ +Q_OBJECT +public: + FFViewCache(QObject* parent = 0); + virtual ~FFViewCache(); + + void init(QString path); + void updateView(QSize size); + QPixmap pixmap() const; + QSvgRenderer* renderer() const; + bool isValid() const; + QSize defaultSize() const; + void setPixmapToZero(); + +private: + + static QHash graphicsTable; ///